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 7EC07A0577; Tue, 14 Apr 2020 17:14:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8FEBC1C1FE; Tue, 14 Apr 2020 17:14:58 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id C301C1C01F; Tue, 14 Apr 2020 17:14:56 +0200 (CEST) IronPort-SDR: iopXOB7YhHuHW8QoVMDsCj1MCl82qfyvah1XzH+C8rNXWJUb8vcq6qep1hgwaSW/FvhN+N48qq Y0fl06g2G1Ig== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 08:14:55 -0700 IronPort-SDR: MaQ2SNE4JwMA7mNfyBOIUKSZXQu49Aw+/EZMRZJPdhVjXBpa5ZtCW86l4FCf4F3tGWZTuZx3+X ByEVRYZzz+Vw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,382,1580803200"; d="scan'208";a="399982620" Received: from npg-dpdk-cvl-simeisu-118d193.sh.intel.com ([10.67.110.183]) by orsmga004.jf.intel.com with ESMTP; 14 Apr 2020 08:14:49 -0700 From: Simei Su To: qi.z.zhang@intel.com, xiaolong.ye@intel.com Cc: dev@dpdk.org, yahui.cao@intel.com, simei.su@intel.com, stable@dpdk.org Date: Tue, 14 Apr 2020 23:11:13 +0800 Message-Id: <1586877073-450369-1-git-send-email-simei.su@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1585810557-21150-1-git-send-email-simei.su@intel.com> References: <1585810557-21150-1-git-send-email-simei.su@intel.com> Subject: [dpdk-dev] [PATCH v2] net/ice: support mark only action for FDIR 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" This patch fixes issue that doesn't support mark only case. Mark only action is equal to mark + passthru action. Fixes: f5cafa961fae ("net/ice: add flow director create and destroy") Cc: stable@dpdk.org Signed-off-by: Simei Su --- drivers/net/ice/ice_fdir_filter.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 1a85d6c..77c6ebb 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -1539,7 +1539,7 @@ } } - if (dest_num == 0 || dest_num >= 2) { + if (dest_num >= 2) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, actions, "Unsupported action combination"); @@ -1560,6 +1560,18 @@ return -rte_errno; } + if (dest_num + mark_num + counter_num == 0) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, actions, + "Emtpy action"); + return -rte_errno; + } + + /* set default action to PASSTHRU mode, in "mark/count only" case. */ + if (dest_num == 0) + filter->input.dest_ctl = + ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER; + return 0; } -- 1.8.3.1