]> git.droids-corp.org - dpdk.git/commitdiff
raw/ioat: fix build when ioat dmadev enabled
authorBruce Richardson <bruce.richardson@intel.com>
Thu, 23 Jun 2022 13:49:32 +0000 (14:49 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 26 Jun 2022 08:26:36 +0000 (10:26 +0200)
The build of the raw/ioat driver only occurs when the equivalent dmadev
drivers are disabled. Complications occur when the ioat dmadev is being
built but not the idxd. In this case, only the idxd part of raw/ioat
gets built, but the definition of the logtype is in the ioat part,
causing build errors.

  .../raw_ioat_idxd_bus.c.o: In function `idxd_vdev_mmap_wq':
  idxd_bus.c:(.text+0x116): undefined reference to `ioat_pmd_logtype'

Fix this by moving the logtype definition to the common C file, and
renaming it to avoid conflicts with a similarly named value in the
dma/ioat driver.

Fixes: ff06fa2cf3ba ("raw/ioat: probe idxd PCI")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/raw/ioat/ioat_common.c
drivers/raw/ioat/ioat_private.h
drivers/raw/ioat/ioat_rawdev.c

index 60de41152ac39851944bfa8d272edda15898b099..e44e181e58f6dc44c7b8c0196d70ac8eeafe637c 100644 (file)
@@ -9,6 +9,8 @@
 
 #include "ioat_private.h"
 
+RTE_LOG_REGISTER_DEFAULT(ioat_rawdev_logtype, INFO);
+
 static const char * const xstat_names[] = {
                "failed_enqueues", "successful_enqueues",
                "copies_started", "copies_completed"
index f032d5fe3d96339d823071fcb857430e2b965bfb..7fb685a3d7a84209c23bb6fe4b083497607d0b38 100644 (file)
 #include <rte_rawdev_pmd.h>
 #include "rte_ioat_rawdev.h"
 
-extern int ioat_pmd_logtype;
+extern int ioat_rawdev_logtype;
 
 #define IOAT_PMD_LOG(level, fmt, args...) rte_log(RTE_LOG_ ## level, \
-               ioat_pmd_logtype, "IOAT: %s(): " fmt "\n", __func__, ##args)
+               ioat_rawdev_logtype, "IOAT: %s(): " fmt "\n", __func__, ##args)
 
 #define IOAT_PMD_DEBUG(fmt, args...)  IOAT_PMD_LOG(DEBUG, fmt, ## args)
 #define IOAT_PMD_INFO(fmt, args...)   IOAT_PMD_LOG(INFO, fmt, ## args)
index 5396671d4f5c5f995bbbb5bfe1b6b78ba70e07e1..11341fcf5d1574232537f8db6b775c608e67105d 100644 (file)
@@ -28,8 +28,6 @@ static struct rte_pci_driver ioat_pmd_drv;
 #define IOAT_DEVICE_ID_BDXF    0x6f2F
 #define IOAT_DEVICE_ID_ICX     0x0b00
 
-RTE_LOG_REGISTER_DEFAULT(ioat_pmd_logtype, INFO);
-
 #define DESC_SZ sizeof(struct rte_ioat_generic_hw_desc)
 #define COMPLETION_SZ sizeof(__m128i)