net/ice: fix FDIR PASSTHRU issue
diff mbox series

Message ID 20200121022559.11955-1-yahui.cao@intel.com
State Accepted, archived
Delegated to: xiaolong ye
Headers show
Series
  • net/ice: fix FDIR PASSTHRU issue
Related show

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Cao, Yahui Jan. 21, 2020, 2:25 a.m. UTC
The original PASSTHRU implementation is forwarding to queue 0. The
corrected implementation is forwarding to the next stage filter.

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

Signed-off-by: Yahui Cao <yahui.cao@intel.com>
---
 drivers/net/ice/base/ice_fdir.c   | 9 ++++++++-
 drivers/net/ice/ice_fdir_filter.c | 3 +--
 2 files changed, 9 insertions(+), 3 deletions(-)

Comments

Zhang, Qi Z Feb. 10, 2020, 6:31 a.m. UTC | #1
> -----Original Message-----
> From: Cao, Yahui <yahui.cao@intel.com>
> Sent: Tuesday, January 21, 2020 10:26 AM
> To: Yang, Qiming <qiming.yang@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Cao,
> Yahui <yahui.cao@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>; Xing, Beilei
> <beilei.xing@intel.com>
> Subject: [PATCH] net/ice: fix FDIR PASSTHRU issue
> 
> The original PASSTHRU implementation is forwarding to queue 0. The corrected
> implementation is forwarding to the next stage filter.
> 
> Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yahui Cao <yahui.cao@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Ye Xiaolong Feb. 10, 2020, 6:55 a.m. UTC | #2
On 02/10, Zhang, Qi Z wrote:
>
>
>> -----Original Message-----
>> From: Cao, Yahui <yahui.cao@intel.com>
>> Sent: Tuesday, January 21, 2020 10:26 AM
>> To: Yang, Qiming <qiming.yang@intel.com>; Lu, Wenzhuo
>> <wenzhuo.lu@intel.com>
>> Cc: dev@dpdk.org; stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Cao,
>> Yahui <yahui.cao@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>; Xing, Beilei
>> <beilei.xing@intel.com>
>> Subject: [PATCH] net/ice: fix FDIR PASSTHRU issue
>> 
>> The original PASSTHRU implementation is forwarding to queue 0. The corrected
>> implementation is forwarding to the next stage filter.
>> 
>> Fixes: f5cafa961fae ("net/ice: add flow director create and destroy")
>> Cc: stable@dpdk.org
>> 
>> Signed-off-by: Yahui Cao <yahui.cao@intel.com>
>
>Acked-by: Qi Zhang <qi.z.zhang@intel.com>
>

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

Patch
diff mbox series

diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 87fa0afba..49b1f06f1 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -401,6 +401,10 @@  ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
 	if (input->dest_ctl == ICE_FLTR_PRGM_DESC_DEST_DROP_PKT) {
 		fdir_fltr_ctx.drop = ICE_FXD_FLTR_QW0_DROP_YES;
 		fdir_fltr_ctx.qindex = 0;
+	} else if (input->dest_ctl ==
+			ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER) {
+		fdir_fltr_ctx.drop = ICE_FXD_FLTR_QW0_DROP_NO;
+		fdir_fltr_ctx.qindex = 0;
 	} else {
 		if (input->dest_ctl ==
 		    ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_QGROUP)
@@ -412,7 +416,10 @@  ice_fdir_get_prgm_desc(struct ice_hw *hw, struct ice_fdir_fltr *input,
 	fdir_fltr_ctx.cnt_index = input->cnt_index;
 	fdir_fltr_ctx.fd_vsi = ice_get_hw_vsi_num(hw, input->dest_vsi);
 	fdir_fltr_ctx.evict_ena = ICE_FXD_FLTR_QW0_EVICT_ENA_FALSE;
-	fdir_fltr_ctx.toq_prio = 3;
+	if (input->dest_ctl == ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER)
+		fdir_fltr_ctx.toq_prio = 0;
+	else
+		fdir_fltr_ctx.toq_prio = 3;
 	fdir_fltr_ctx.pcmd = (add) ? ICE_FXD_FLTR_QW1_PCMD_ADD :
 		ICE_FXD_FLTR_QW1_PCMD_REMOVE;
 	fdir_fltr_ctx.swap = ICE_FXD_FLTR_QW1_SWAP_NOT_SET;
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index fa8707455..1b783a9f8 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1488,8 +1488,7 @@  ice_fdir_parse_action(struct ice_adapter *ad,
 			dest_num++;
 
 			filter->input.dest_ctl =
-				ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_QINDEX;
-			filter->input.q_index = 0;
+				ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER;
 			break;
 		case RTE_FLOW_ACTION_TYPE_RSS:
 			dest_num++;