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 565D5A0577; Tue, 14 Apr 2020 09:50:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 33A8E1C126; Tue, 14 Apr 2020 09:49:58 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id D3AFF1C122; Tue, 14 Apr 2020 09:49:55 +0200 (CEST) IronPort-SDR: /adCAMdtS/nRSP8nublzkx2JgadlRzVueIOCTrmTSsAA6GTx+xPSeOm31Kw7JblvE01T0bp59u 4d2dx665EbXg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 00:49:54 -0700 IronPort-SDR: n+pnmEpCf5xJQLIzAdAPxgY7xKFLPelC+BbV3YzO5IPMJsTgjOTgCGR+N3DFpPxSevVoQYBs3f r/AEdfkwwK5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,381,1580803200"; d="scan'208";a="256431749" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 14 Apr 2020 00:49:53 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Apr 2020 00:49:53 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 14 Apr 2020 00:49:52 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 14 Apr 2020 00:49:52 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.146]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.22]) with mapi id 14.03.0439.000; Tue, 14 Apr 2020 15:49:21 +0800 From: "Zhang, Qi Z" To: "Su, Simei" , "Ye, Xiaolong" CC: "dev@dpdk.org" , "Cao, Yahui" , "stable@dpdk.org" Thread-Topic: [PATCH] net/ice: support mark only action for FDIR Thread-Index: AQHWCLwQMApEUFK0qUO6ShpC1+nvl6h4S3aA Date: Tue, 14 Apr 2020 07:49:20 +0000 Message-ID: <039ED4275CED7440929022BC67E70611547F8CE5@SHSMSX103.ccr.corp.intel.com> References: <1585810557-21150-1-git-send-email-simei.su@intel.com> In-Reply-To: <1585810557-21150-1-git-send-email-simei.su@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] 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" > -----Original Message----- > From: Su, Simei > Sent: Thursday, April 2, 2020 2:56 PM > To: Zhang, Qi Z ; Ye, Xiaolong > Cc: dev@dpdk.org; Cao, Yahui ; Su, Simei > ; stable@dpdk.org > Subject: [PATCH] net/ice: support mark only action for FDIR >=20 > This patch fixes issue that doesn't support mark only case. > Mark only action is equal to mark + passthru action. >=20 > Fixes: f5cafa961fae ("net/ice: add flow director create and destroy") > Cc: stable@dpdk.org >=20 > Signed-off-by: Simei Su > --- > drivers/net/ice/ice_fdir_filter.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir= _filter.c > index a082a13..8acdb1a 100644 > --- a/drivers/net/ice/ice_fdir_filter.c > +++ b/drivers/net/ice/ice_fdir_filter.c > @@ -1469,6 +1469,10 @@ > uint32_t counter_num =3D 0; > int ret; >=20 > + /* set default action to PASSTHRU mode, in the case of MARK only. */ > + filter->input.dest_ctl =3D > + ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER; Should we also consider the case "Count only", I will suggest move above code to after all the action has been iterated an= d all criteria check has passed Then only set destination to PASSTHROUGH for no destination case. If (dest_num =3D=3D 0) filter->input.dest_ctl =3D ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER; > + > for (; actions->type !=3D RTE_FLOW_ACTION_TYPE_END; actions++) { > switch (actions->type) { > case RTE_FLOW_ACTION_TYPE_VOID: > @@ -1533,7 +1537,7 @@ > } > } >=20 > - if (dest_num =3D=3D 0 || dest_num >=3D 2) { > + if (dest_num >=3D 2) { > rte_flow_error_set(error, EINVAL, > RTE_FLOW_ERROR_TYPE_ACTION, actions, > "Unsupported action combination"); @@ -1554,6 +1558,13 > @@ > return -rte_errno; > } >=20 > + if (dest_num + mark_num =3D=3D 0) { > + rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ACTION, actions, > + "Emtpy action"); > + return -rte_errno; > + } > + > return 0; > } >=20 > -- > 1.8.3.1