From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 96E3FA0530; Tue, 21 Jan 2020 03:28:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B28491BFC0; Tue, 21 Jan 2020 03:28:20 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 0C6BD1BFB6; Tue, 21 Jan 2020 03:28:18 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jan 2020 18:28:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,344,1574150400"; d="scan'208";a="219803406" Received: from dpdk-yahui-skylake.sh.intel.com ([10.67.119.16]) by orsmga008.jf.intel.com with ESMTP; 20 Jan 2020 18:28:16 -0800 From: Yahui Cao To: Qiming Yang , Wenzhuo Lu Cc: dev@dpdk.org, stable@dpdk.org, Qi Zhang , Yahui Cao , Xiaolong Ye , Beilei Xing Date: Tue, 21 Jan 2020 10:25:59 +0800 Message-Id: <20200121022559.11955-1-yahui.cao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/ice: fix FDIR PASSTHRU issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/net/ice/base/ice_fdir.c | 9 ++++++++- drivers/net/ice/ice_fdir_filter.c | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) 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++; -- 2.17.1