patch 'event/dlb2: disable PASID' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:11:31 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/13/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=ac8ca59223717f984c689422f3319c16521eaefd

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From ac8ca59223717f984c689422f3319c16521eaefd Mon Sep 17 00:00:00 2001
From: Abdullah Sevincer <abdullah.sevincer at intel.com>
Date: Mon, 6 Nov 2023 11:05:21 -0600
Subject: [PATCH] event/dlb2: disable PASID
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 5a6878335b8179337ec2d9931debf1f46525e8fc ]

In vfio-pci driver when PASID is enabled by default DLB hardware puts
DLB in SIOV mode. This breaks DLB PF-PMD mode. For DLB PF-PMD mode to
function properly PASID needs to be disabled.

In this commit this issue is addressed and PASID is disabled by writing
a zero to PASID control register.

Fixes: 5433956d5185 ("event/dlb2: add eventdev probe")

Signed-off-by: Abdullah Sevincer <abdullah.sevincer at intel.com>
---
 drivers/event/dlb2/pf/dlb2_main.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/event/dlb2/pf/dlb2_main.c b/drivers/event/dlb2/pf/dlb2_main.c
index 717aa4fc08..64a59f7616 100644
--- a/drivers/event/dlb2/pf/dlb2_main.c
+++ b/drivers/event/dlb2/pf/dlb2_main.c
@@ -26,6 +26,7 @@
 #define PF_ID_ZERO 0	/* PF ONLY! */
 #define NO_OWNER_VF 0	/* PF ONLY! */
 #define NOT_VF_REQ false /* PF ONLY! */
+#define DLB2_PCI_PASID_CAP_OFFSET        0x148   /* PASID capability offset */
 
 #define DLB2_PCI_CAP_POINTER 0x34
 #define DLB2_PCI_CAP_NEXT(hdr) (((hdr) >> 8) & 0xFC)
@@ -582,6 +583,16 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
 		}
 	}
 
+	/* Disable PASID if it is enabled by default, which
+	 * breaks the DLB if enabled.
+	 */
+	off = DLB2_PCI_PASID_CAP_OFFSET + RTE_PCI_PASID_CTRL;
+	if (rte_pci_pasid_set_state(pdev, off, false)) {
+		DLB2_LOG_ERR("[%s()] failed to write the pcie config space at offset %d\n",
+				__func__, (int)off);
+		return -1;
+	}
+
 	return 0;
 }
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:25.257206700 +0800
+++ 0066-event-dlb2-disable-PASID.patch	2023-12-11 17:56:23.067652300 +0800
@@ -1 +1 @@
-From 5a6878335b8179337ec2d9931debf1f46525e8fc Mon Sep 17 00:00:00 2001
+From ac8ca59223717f984c689422f3319c16521eaefd Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 5a6878335b8179337ec2d9931debf1f46525e8fc ]
@@ -14 +16,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index aa03e4c311..61a7b39eef 100644
+index 717aa4fc08..64a59f7616 100644
@@ -31,3 +33,3 @@
- static int
- dlb2_pf_init_driver_state(struct dlb2_dev *dlb2_dev)
-@@ -514,6 +515,16 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)
+ #define DLB2_PCI_CAP_POINTER 0x34
+ #define DLB2_PCI_CAP_NEXT(hdr) (((hdr) >> 8) & 0xFC)
+@@ -582,6 +583,16 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev)


More information about the stable mailing list