[dpdk-stable] patch 'net/i40e: fix flow director for common pctypes' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 18:02:56 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/12/21. 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/bd0291a99ab98cac01cae57de79e3dcdbd7500a0

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From bd0291a99ab98cac01cae57de79e3dcdbd7500a0 Mon Sep 17 00:00:00 2001
From: Murphy Yang <murphyx.yang at intel.com>
Date: Wed, 21 Apr 2021 03:44:03 +0000
Subject: [PATCH] net/i40e: fix flow director for common pctypes
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit ff04964ea6d5feeaedf421504e63e58407ffcd10 ]

Currently, FDIR doesn't work for all common PCTYPEs, the root cause is
that input set is not configured.

Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate")

Signed-off-by: Murphy Yang <murphyx.yang at intel.com>
Acked-by: Beilei Xing <beilei.xing at intel.com>
---
 drivers/net/i40e/i40e_fdir.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 37d988d21c..c9cd1e4960 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
 
 	/* Check if the configuration is conflicted */
 	if (pf->fdir.inset_flag[pctype] &&
-	    memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))
-		return -1;
+	    memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) {
+		PMD_DRV_LOG(ERR, "Conflict with the first rule's input set.");
+		return -EINVAL;
+	}
 
 	if (pf->fdir.inset_flag[pctype] &&
 	    !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t)))
@@ -1616,8 +1618,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
 
 	num = i40e_generate_inset_mask_reg(hw, input_set, mask_reg,
 						 I40E_INSET_MASK_NUM_REG);
-	if (num < 0)
+	if (num < 0) {
+		PMD_DRV_LOG(ERR, "Invalid pattern mask.");
 		return -EINVAL;
+	}
 
 	if (pf->support_multi_driver) {
 		for (i = 0; i < num; i++)
@@ -1762,18 +1766,15 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
 	i40e_fdir_filter_convert(filter, &check_filter);
 
 	if (add) {
-		if (filter->input.flow_ext.is_flex_flow) {
+		/* configure the input set for common PCTYPEs*/
+		if (!filter->input.flow_ext.customized_pctype) {
 			ret = i40e_flow_set_fdir_inset(pf, pctype,
 					filter->input.flow_ext.input_set);
-			if (ret == -1) {
-				PMD_DRV_LOG(ERR, "Conflict with the"
-					    " first rule's input set.");
-				return -EINVAL;
-			} else if (ret == -EINVAL) {
-				PMD_DRV_LOG(ERR, "Invalid pattern mask.");
-				return -EINVAL;
-			}
+			if (ret < 0)
+				return ret;
+		}
 
+		if (filter->input.flow_ext.is_flex_flow) {
 			for (i = 0; i < filter->input.flow_ext.raw_id; i++) {
 				layer_idx = filter->input.flow_ext.layer_idx;
 				field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + i;
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:32.437250500 +0800
+++ 0228-net-i40e-fix-flow-director-for-common-pctypes.patch	2021-05-10 23:59:26.710000000 +0800
@@ -1 +1 @@
-From ff04964ea6d5feeaedf421504e63e58407ffcd10 Mon Sep 17 00:00:00 2001
+From bd0291a99ab98cac01cae57de79e3dcdbd7500a0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit ff04964ea6d5feeaedf421504e63e58407ffcd10 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index 22e6e34640..ac0e09bfdd 100644
+index 37d988d21c..c9cd1e4960 100644
@@ -22 +24 @@
-@@ -1608,8 +1608,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
+@@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
@@ -35 +37 @@
-@@ -1617,8 +1619,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
+@@ -1616,8 +1618,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf,
@@ -47 +49 @@
-@@ -1763,18 +1767,15 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,
+@@ -1762,18 +1766,15 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev,


More information about the stable mailing list