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 0DE41A057B; Tue, 14 Apr 2020 14:51:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D02C1C1F8; Tue, 14 Apr 2020 14:51:05 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 825F71C1E2; Tue, 14 Apr 2020 14:51:03 +0200 (CEST) IronPort-SDR: kgzOENK3uHyp3WDWsxJmqAU3EzkObAh/BVnqWx3RNGnxd0100aGcEhaioqN2rkrhL2Z5ggjl3j Vyl6hg9ZtMEg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 05:51:02 -0700 IronPort-SDR: gyp5Kj8ikz40nDL66XiuwqIkhrHXFPILBFHON/Jn9uhy19CaSpccWCE+VyQLl53Mar/0UtU80j p7kW+zYnAYGw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,382,1580803200"; d="scan'208";a="363366745" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 14 Apr 2020 05:51:02 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Apr 2020 05:51:02 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.146]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.213]) with mapi id 14.03.0439.000; Tue, 14 Apr 2020 20:50:58 +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//+WjwCAAL074A== Date: Tue, 14 Apr 2020 12:50:59 +0000 Message-ID: <039ED4275CED7440929022BC67E70611547F9005@SHSMSX103.ccr.corp.intel.com> References: <1585810557-21150-1-git-send-email-simei.su@intel.com> <039ED4275CED7440929022BC67E70611547F8CE5@SHSMSX103.ccr.corp.intel.com> In-Reply-To: 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: Tuesday, April 14, 2020 5:12 PM > To: Zhang, Qi Z ; Ye, Xiaolong > Cc: dev@dpdk.org; Cao, Yahui ; stable@dpdk.org > Subject: RE: [PATCH] net/ice: support mark only action for FDIR >=20 > Hi, Qi >=20 > > -----Original Message----- > > From: Zhang, Qi Z > > Sent: Tuesday, April 14, 2020 3:49 PM > > To: Su, Simei ; Ye, Xiaolong > > > > Cc: dev@dpdk.org; Cao, Yahui ; stable@dpdk.org > > Subject: RE: [PATCH] net/ice: support mark only action for FDIR > > > > > > > > > -----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 > > > > > > 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 | 13 ++++++++++++- > > > 1 file changed, 12 insertions(+), 1 deletion(-) > > > > > > 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; > > > > > > +/* 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 and all criteria > > check has passed Then only set destination to PASSTHROUGH for no > destination case. >=20 > I don't know whether the case "Count only" should fail or means passthru= + > count. It is the case that user may just want to count a number of the packets tha= t match a specific pattern and don't care which destination it reached.,=20 Though I don't know if this could be a real usage, but I didn't think its n= ecessary to reject this configure, and allow "count only" keep it consisten= t with "mark only" make the code easy to understand. > In my code, I return error when in the case "count only": > 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; > } >=20 > So I want to confirm how to define "count only" case here, your suggesti= on > code seems "count only" means "count + passthru" ? >=20 > Thanks > Simei >=20 > > > > 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 @@ > > > } > > > } > > > > > > -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; > > > } > > > > > > +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; > > > } > > > > > > -- > > > 1.8.3.1 > > >=20