[dpdk-stable] patch 'net/i40e: fix exception with multi-driver' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:58:58 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.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 12/16/19. 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/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/33c64c29449cb19efaf38e05231281d78355c7d5

Thanks.

Kevin.

---
>From 33c64c29449cb19efaf38e05231281d78355c7d5 Mon Sep 17 00:00:00 2001
From: Alvin Zhang <alvinx.zhang at intel.com>
Date: Tue, 8 Oct 2019 18:52:31 +0800
Subject: [PATCH] net/i40e: fix exception with multi-driver

[ upstream commit 39de80b267e05d6f3322044e5851306acc84f892 ]

If support-multi-driver is enabled, the global registers should not
be configured. But with the current code base, if creating a flow
with rte_flow API, the global register GLQF_FD_MSK may be changed.

Fixes: cfdfca493cae ("net/i40e: fix multiple driver support")

Signed-off-by: Alvin Zhang <alvinx.zhang at intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye at intel.com>
---
 drivers/net/i40e/i40e_flow.c | 38 +++++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 4208d8306..642532ba9 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2351,4 +2351,35 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
 		return -EINVAL;
 
+	if (pf->support_multi_driver) {
+		for (i = 0; i < num; i++)
+			if (i40e_read_rx_ctl(hw,
+					I40E_GLQF_FD_MSK(i, pctype)) !=
+					mask_reg[i]) {
+				PMD_DRV_LOG(ERR, "Input set setting is not"
+						" supported with"
+						" `support-multi-driver`"
+						" enabled!");
+				return -EPERM;
+			}
+		for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
+			if (i40e_read_rx_ctl(hw,
+					I40E_GLQF_FD_MSK(i, pctype)) != 0) {
+				PMD_DRV_LOG(ERR, "Input set setting is not"
+						" supported with"
+						" `support-multi-driver`"
+						" enabled!");
+				return -EPERM;
+			}
+
+	} else {
+		for (i = 0; i < num; i++)
+			i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype),
+				mask_reg[i]);
+		/*clear unused mask registers of the pctype */
+		for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
+			i40e_check_write_reg(hw,
+					I40E_GLQF_FD_MSK(i, pctype), 0);
+	}
+
 	inset_reg |= i40e_translate_input_set_reg(hw->mac.type, input_set);
 
@@ -2359,11 +2390,4 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
 					 I40E_32_BIT_WIDTH) & UINT32_MAX));
 
-	for (i = 0; i < num; i++)
-		i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype),
-				     mask_reg[i]);
-
-	/*clear unused mask registers of the pctype */
-	for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
-		i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), 0);
 	I40E_WRITE_FLUSH(hw);
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:40.712975636 +0000
+++ 0024-net-i40e-fix-exception-with-multi-driver.patch	2019-12-10 14:49:39.029458196 +0000
@@ -1 +1 @@
-From 39de80b267e05d6f3322044e5851306acc84f892 Mon Sep 17 00:00:00 2001
+From 33c64c29449cb19efaf38e05231281d78355c7d5 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39de80b267e05d6f3322044e5851306acc84f892 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 9e038fa48..61021037c 100644
+index 4208d8306..642532ba9 100644
@@ -23 +24 @@
-@@ -2350,4 +2350,35 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
+@@ -2351,4 +2351,35 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
@@ -59 +60 @@
-@@ -2358,11 +2389,4 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
+@@ -2359,11 +2390,4 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,



More information about the stable mailing list