DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH] net/ice: fix FDIR flag issue
  2020-01-20 12:18 [dpdk-dev] [PATCH] net/ice: fix FDIR flag issue Beilei Xing
@ 2020-01-20  5:08 ` Zhang, Qi Z
  2020-01-21 11:42 ` [dpdk-dev] [PATCH v2] " Beilei Xing
  1 sibling, 0 replies; 4+ messages in thread
From: Zhang, Qi Z @ 2020-01-20  5:08 UTC (permalink / raw)
  To: Xing, Beilei, dev, Cao, Yahui; +Cc: stable



> -----Original Message-----
> From: Xing, Beilei <beilei.xing@intel.com>
> Sent: Monday, January 20, 2020 8:19 PM
> To: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Cao, Yahui
> <yahui.cao@intel.com>
> Cc: stable@dpdk.org
> Subject: [PATCH] net/ice: fix FDIR flag issue
> 
> If there's no mark action when creating a FDIR rule, there shouldn't be
> FDIR flags in mbuf.
> 
> Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
> Fixes: bd984f155f49 ("net/ice/base: support FDIR")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH] net/ice: fix FDIR flag issue
@ 2020-01-20 12:18 Beilei Xing
  2020-01-20  5:08 ` Zhang, Qi Z
  2020-01-21 11:42 ` [dpdk-dev] [PATCH v2] " Beilei Xing
  0 siblings, 2 replies; 4+ messages in thread
From: Beilei Xing @ 2020-01-20 12:18 UTC (permalink / raw)
  To: dev, qi.z.zhang, yahui.cao; +Cc: stable

If there's no mark action when creating a FDIR rule,
there shouldn't be FDIR flags in mbuf.

Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
Fixes: bd984f155f49 ("net/ice/base: support FDIR")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/ice/base/ice_fdir.c      | 2 +-
 drivers/net/ice/base/ice_fdir.h      | 1 +
 drivers/net/ice/base/ice_lan_tx_rx.h | 1 +
 drivers/net/ice/ice_fdir_filter.c    | 4 ++++
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 87fa0af..20d64f8 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -418,7 +418,7 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
 	fdir_fltr_ctx.swap = ICE_FXD_FLTR_QW1_SWAP_NOT_SET;
 	fdir_fltr_ctx.comp_q = ICE_FXD_FLTR_QW0_COMP_Q_ZERO;
 	fdir_fltr_ctx.comp_report = ICE_FXD_FLTR_QW0_COMP_REPORT_SW;
-	fdir_fltr_ctx.fdid_prio = 3;
+	fdir_fltr_ctx.fdid_prio = input->fdid_prio;
 	fdir_fltr_ctx.desc_prof = 1;
 	fdir_fltr_ctx.desc_prof_prio = 3;
 	ice_set_fd_desc_val(&fdir_fltr_ctx, fdesc);
diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
index db1f835..c811f76 100644
--- a/drivers/net/ice/base/ice_fdir.h
+++ b/drivers/net/ice/base/ice_fdir.h
@@ -202,6 +202,7 @@ struct ice_fdir_fltr {
 	u8 cnt_ena;
 	u8 fltr_status;
 	u16 cnt_index;
+	u8 fdid_prio;
 	u32 fltr_id;
 };
 
diff --git a/drivers/net/ice/base/ice_lan_tx_rx.h b/drivers/net/ice/base/ice_lan_tx_rx.h
index a97c63c..d6f66cf 100644
--- a/drivers/net/ice/base/ice_lan_tx_rx.h
+++ b/drivers/net/ice/base/ice_lan_tx_rx.h
@@ -162,6 +162,7 @@ struct ice_fltr_desc {
 
 #define ICE_FXD_FLTR_QW1_FDID_PRI_S	25
 #define ICE_FXD_FLTR_QW1_FDID_PRI_M	(0x7ULL << ICE_FXD_FLTR_QW1_FDID_PRI_S)
+#define ICE_FXD_FLTR_QW1_FDID_PRI_ZERO	0x0ULL
 #define ICE_FXD_FLTR_QW1_FDID_PRI_ONE	0x1ULL
 
 #define ICE_FXD_FLTR_QW1_FDID_MDID_S	28
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index fa87074..8359a8c 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1534,6 +1534,10 @@ ice_fdir_parse_action(struct ice_adapter *ad,
 			   RTE_FLOW_ERROR_TYPE_ACTION, actions,
 			   "Too many mark actions");
 		return -rte_errno;
+	} else if (mark_num == 0) {
+		filter->input.fdid_prio = ICE_FXD_FLTR_QW1_FDID_PRI_ZERO;
+	} else {
+		filter->input.fdid_prio = ICE_FXD_FLTR_QW1_FDID_PRI_ONE;
 	}
 
 	if (counter_num >= 2) {
-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2] net/ice: fix FDIR flag issue
  2020-01-20 12:18 [dpdk-dev] [PATCH] net/ice: fix FDIR flag issue Beilei Xing
  2020-01-20  5:08 ` Zhang, Qi Z
@ 2020-01-21 11:42 ` Beilei Xing
  2020-01-22  8:08   ` Ye Xiaolong
  1 sibling, 1 reply; 4+ messages in thread
From: Beilei Xing @ 2020-01-21 11:42 UTC (permalink / raw)
  To: dev, qi.z.zhang, yahui.cao; +Cc: stable

If there's no mark action when creating a FDIR rule,
there shouldn't be FDIR flags in mbuf.

Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
Fixes: bd984f155f49 ("net/ice/base: support FDIR")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
---

V2 change:
 - Code refine.

 drivers/net/ice/base/ice_fdir.c   | 2 +-
 drivers/net/ice/base/ice_fdir.h   | 1 +
 drivers/net/ice/ice_fdir_filter.c | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 87fa0af..20d64f8 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -418,7 +418,7 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
 	fdir_fltr_ctx.swap = ICE_FXD_FLTR_QW1_SWAP_NOT_SET;
 	fdir_fltr_ctx.comp_q = ICE_FXD_FLTR_QW0_COMP_Q_ZERO;
 	fdir_fltr_ctx.comp_report = ICE_FXD_FLTR_QW0_COMP_REPORT_SW;
-	fdir_fltr_ctx.fdid_prio = 3;
+	fdir_fltr_ctx.fdid_prio = input->fdid_prio;
 	fdir_fltr_ctx.desc_prof = 1;
 	fdir_fltr_ctx.desc_prof_prio = 3;
 	ice_set_fd_desc_val(&fdir_fltr_ctx, fdesc);
diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
index db1f835..c811f76 100644
--- a/drivers/net/ice/base/ice_fdir.h
+++ b/drivers/net/ice/base/ice_fdir.h
@@ -202,6 +202,7 @@ struct ice_fdir_fltr {
 	u8 cnt_ena;
 	u8 fltr_status;
 	u16 cnt_index;
+	u8 fdid_prio;
 	u32 fltr_id;
 };
 
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index fa87074..42b9628 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1504,6 +1504,7 @@ ice_fdir_parse_action(struct ice_adapter *ad,
 
 			mark_spec = actions->conf;
 			filter->input.fltr_id = mark_spec->id;
+			filter->input.fdid_prio = ICE_FXD_FLTR_QW1_FDID_PRI_ONE;
 			break;
 		case RTE_FLOW_ACTION_TYPE_COUNT:
 			counter_num++;
-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/ice: fix FDIR flag issue
  2020-01-21 11:42 ` [dpdk-dev] [PATCH v2] " Beilei Xing
@ 2020-01-22  8:08   ` Ye Xiaolong
  0 siblings, 0 replies; 4+ messages in thread
From: Ye Xiaolong @ 2020-01-22  8:08 UTC (permalink / raw)
  To: Beilei Xing; +Cc: dev, qi.z.zhang, yahui.cao, stable

On 01/21, Beilei Xing wrote:
>If there's no mark action when creating a FDIR rule,
>there shouldn't be FDIR flags in mbuf.
>
>Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
>Fixes: bd984f155f49 ("net/ice/base: support FDIR")
>Cc: stable@dpdk.org
>
>Signed-off-by: Beilei Xing <beilei.xing@intel.com>
>Acked-by: Qi Zhang <qi.z.zhang@intel.com>
>---
>
>V2 change:
> - Code refine.
>
> drivers/net/ice/base/ice_fdir.c   | 2 +-
> drivers/net/ice/base/ice_fdir.h   | 1 +
> drivers/net/ice/ice_fdir_filter.c | 1 +
> 3 files changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
>index 87fa0af..20d64f8 100644
>--- a/drivers/net/ice/base/ice_fdir.c
>+++ b/drivers/net/ice/base/ice_fdir.c
>@@ -418,7 +418,7 @@ ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
> 	fdir_fltr_ctx.swap = ICE_FXD_FLTR_QW1_SWAP_NOT_SET;
> 	fdir_fltr_ctx.comp_q = ICE_FXD_FLTR_QW0_COMP_Q_ZERO;
> 	fdir_fltr_ctx.comp_report = ICE_FXD_FLTR_QW0_COMP_REPORT_SW;
>-	fdir_fltr_ctx.fdid_prio = 3;
>+	fdir_fltr_ctx.fdid_prio = input->fdid_prio;
> 	fdir_fltr_ctx.desc_prof = 1;
> 	fdir_fltr_ctx.desc_prof_prio = 3;
> 	ice_set_fd_desc_val(&fdir_fltr_ctx, fdesc);
>diff --git a/drivers/net/ice/base/ice_fdir.h b/drivers/net/ice/base/ice_fdir.h
>index db1f835..c811f76 100644
>--- a/drivers/net/ice/base/ice_fdir.h
>+++ b/drivers/net/ice/base/ice_fdir.h
>@@ -202,6 +202,7 @@ struct ice_fdir_fltr {
> 	u8 cnt_ena;
> 	u8 fltr_status;
> 	u16 cnt_index;
>+	u8 fdid_prio;
> 	u32 fltr_id;
> };
> 
>diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
>index fa87074..42b9628 100644
>--- a/drivers/net/ice/ice_fdir_filter.c
>+++ b/drivers/net/ice/ice_fdir_filter.c
>@@ -1504,6 +1504,7 @@ ice_fdir_parse_action(struct ice_adapter *ad,
> 
> 			mark_spec = actions->conf;
> 			filter->input.fltr_id = mark_spec->id;
>+			filter->input.fdid_prio = ICE_FXD_FLTR_QW1_FDID_PRI_ONE;
> 			break;
> 		case RTE_FLOW_ACTION_TYPE_COUNT:
> 			counter_num++;
>-- 
>2.7.4
>

Applied to dpdk-next-net-intel, Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-22  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 12:18 [dpdk-dev] [PATCH] net/ice: fix FDIR flag issue Beilei Xing
2020-01-20  5:08 ` Zhang, Qi Z
2020-01-21 11:42 ` [dpdk-dev] [PATCH v2] " Beilei Xing
2020-01-22  8:08   ` Ye Xiaolong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).