patch 'raw/ioat: fix build when ioat dmadev enabled' has been queued to stable release 20.11.6

Xueming Li xuemingl at nvidia.com
Wed Jul 20 10:21:04 CEST 2022


Hi,

FYI, your patch has been queued to stable release 20.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/22/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/eb88adfe309ce5f366f566c17b4c42347d9bf93a

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From eb88adfe309ce5f366f566c17b4c42347d9bf93a Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Thu, 23 Jun 2022 14:49:32 +0100
Subject: [PATCH] raw/ioat: fix build when ioat dmadev enabled
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 7580f35ea7a6f56f3fb65a3fa8601a6c21515805 ]

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")

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
 drivers/raw/ioat/ioat_common.c  | 2 ++
 drivers/raw/ioat/ioat_private.h | 4 ++--
 drivers/raw/ioat/ioat_rawdev.c  | 2 --
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/raw/ioat/ioat_common.c b/drivers/raw/ioat/ioat_common.c
index 142e171bc9..414b753be7 100644
--- a/drivers/raw/ioat/ioat_common.c
+++ b/drivers/raw/ioat/ioat_common.c
@@ -9,6 +9,8 @@
 
 #include "ioat_private.h"
 
+RTE_LOG_REGISTER(ioat_rawdev_logtype, rawdev.ioat, INFO);
+
 static const char * const xstat_names[] = {
 		"failed_enqueues", "successful_enqueues",
 		"copies_started", "copies_completed"
diff --git a/drivers/raw/ioat/ioat_private.h b/drivers/raw/ioat/ioat_private.h
index 6c423811ec..2564eb51e4 100644
--- a/drivers/raw/ioat/ioat_private.h
+++ b/drivers/raw/ioat/ioat_private.h
@@ -18,10 +18,10 @@
 #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, "%s(): " fmt "\n", __func__, ##args)
+		ioat_rawdev_logtype, "%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)
diff --git a/drivers/raw/ioat/ioat_rawdev.c b/drivers/raw/ioat/ioat_rawdev.c
index 2c88b4369f..ea193f9d11 100644
--- a/drivers/raw/ioat/ioat_rawdev.c
+++ b/drivers/raw/ioat/ioat_rawdev.c
@@ -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(ioat_pmd_logtype, rawdev.ioat, INFO);
-
 #define DESC_SZ sizeof(struct rte_ioat_generic_hw_desc)
 #define COMPLETION_SZ sizeof(__m128i)
 
-- 
2.35.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-20 15:01:00.432143239 +0800
+++ 0035-raw-ioat-fix-build-when-ioat-dmadev-enabled.patch	2022-07-20 15:00:58.744333776 +0800
@@ -1 +1 @@
-From 7580f35ea7a6f56f3fb65a3fa8601a6c21515805 Mon Sep 17 00:00:00 2001
+From eb88adfe309ce5f366f566c17b4c42347d9bf93a Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 7580f35ea7a6f56f3fb65a3fa8601a6c21515805 ]
@@ -20 +22,0 @@
-Cc: stable at dpdk.org
@@ -30 +32 @@
-index 60de41152a..e44e181e58 100644
+index 142e171bc9..414b753be7 100644
@@ -37 +39 @@
-+RTE_LOG_REGISTER_DEFAULT(ioat_rawdev_logtype, INFO);
++RTE_LOG_REGISTER(ioat_rawdev_logtype, rawdev.ioat, INFO);
@@ -43 +45 @@
-index f032d5fe3d..7fb685a3d7 100644
+index 6c423811ec..2564eb51e4 100644
@@ -54,2 +56,2 @@
--		ioat_pmd_logtype, "IOAT: %s(): " fmt "\n", __func__, ##args)
-+		ioat_rawdev_logtype, "IOAT: %s(): " fmt "\n", __func__, ##args)
+-		ioat_pmd_logtype, "%s(): " fmt "\n", __func__, ##args)
++		ioat_rawdev_logtype, "%s(): " fmt "\n", __func__, ##args)
@@ -60 +62 @@
-index 5396671d4f..11341fcf5d 100644
+index 2c88b4369f..ea193f9d11 100644
@@ -67 +69 @@
--RTE_LOG_REGISTER_DEFAULT(ioat_pmd_logtype, INFO);
+-RTE_LOG_REGISTER(ioat_pmd_logtype, rawdev.ioat, INFO);


More information about the stable mailing list