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 92BD2A0577; Tue, 14 Apr 2020 16:30:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5DEA21C2BB; Tue, 14 Apr 2020 16:30:35 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 52A841C20A; Tue, 14 Apr 2020 16:30:32 +0200 (CEST) IronPort-SDR: ypxwzr2mAulmus/Zjnws8B9k5gWPZCfshCND6HBRRm6dLKsao6rxw2gS9rMcQTFyRTmXBAtxZP QEBHrXFrazhA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 07:30:31 -0700 IronPort-SDR: GnnRz/7as89gjh5tnMry9VOA4w83fCzEf2EHbbUatkaDFyls2BhFz8nzXM1cV1i3NNWJBH1bXr gX1Oz2m1ju/Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,382,1580803200"; d="scan'208";a="256527079" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by orsmga006.jf.intel.com with ESMTP; 14 Apr 2020 07:30:31 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Apr 2020 07:30:31 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Apr 2020 07:30:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NEW3NL5tqOB2wsusu9BtWXfEjP9QiZBj2nDMM6IGN5xnNHoHyf0Ohu6Xk1DRRr7YAnPuycY+IQ3jJJ7r0k2Lip/1UFz7/GY2+CwgWxa3UmJHgeyhzrMAb+AaFnu2aEnSYWK2Wxf3IS8A2kO42jd29VGaiczSg3gQ9YFzHMSlGpERkb/Mhv1CVfQP3ea7tGl2IHWUXA7VavJJpugzlie3Vw8TZK+jWApudFU7n0bwohZHE9qnVjIhPjk1VbQ+Oqj99sEDhiwEbxzIG/f1b+qGcB7KN1mJPCFDN99wj3BZwcjI2hoTdKWQfBpA3/s9hye+JClI35+x937Nv0WQKwk69A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q3TD2MtqLKOdirKy756uGjY13k+iq2QuSxhtoOsCTGI=; b=jQ758puOazcpAJIKYOKd7tQDopHbXvUMvW1bvL1MHfkovBB1DKIdz6oV9SVKRUbP9AEQTwfl0hSvEsCPrBlJ/1CoR/dXla52HDSjpbUvr+pidqifSUHwduY+RgfNst2JHQ5cRytTCJ+W0PeDDMLOMzJqKOefJ4OViUP1QVtBvurTKeim2b1dgMTDuAY69uPXvguy0SxbTGsf5dr2q4fELcvBq8CdskSzUDjMdFBK+k/YVWg57MbXJQFKoq5/mNIyOv+3gLGCpTzV6+3GpAytWemYTiKWRjRA3J65tcSLscCmVxq4gRcjVXVoKJxP8A+eTbPxFgkZooZsafOoxJI4yA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q3TD2MtqLKOdirKy756uGjY13k+iq2QuSxhtoOsCTGI=; b=mwpzP7gf5L7zZvQeDhJYjsSaVpwBLxC6D+4P0f0WtdosMqv4vGse29ReWGBriw1fte5WC7aT6jaP2ADC0SOpqpNrcKDU2UZGakVT8qDbc84OSJd7juLjBtAaa4ChF7uvjcGIRrsz/VMWWAhCrRIbAFD7Ogo8PCBU8tiOKao07Cc= Received: from BL0PR11MB3380.namprd11.prod.outlook.com (2603:10b6:208:69::12) by BL0PR11MB2980.namprd11.prod.outlook.com (2603:10b6:208:32::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.26; Tue, 14 Apr 2020 14:30:29 +0000 Received: from BL0PR11MB3380.namprd11.prod.outlook.com ([fe80::2c08:5b44:ebfd:6ea6]) by BL0PR11MB3380.namprd11.prod.outlook.com ([fe80::2c08:5b44:ebfd:6ea6%6]) with mapi id 15.20.2900.028; Tue, 14 Apr 2020 14:30:28 +0000 From: "Su, Simei" To: "Zhang, Qi Z" , "Ye, Xiaolong" CC: "dev@dpdk.org" , "Cao, Yahui" , "stable@dpdk.org" Thread-Topic: [PATCH] net/ice: support mark only action for FDIR Thread-Index: AQHWCLwV+jmMW8l1t0y5MTDxZDQFoah4UPEAgAATsKCAAECXgIAAG4aw Date: Tue, 14 Apr 2020 14:30:28 +0000 Message-ID: References: <1585810557-21150-1-git-send-email-simei.su@intel.com> <039ED4275CED7440929022BC67E70611547F8CE5@SHSMSX103.ccr.corp.intel.com> <039ED4275CED7440929022BC67E70611547F9005@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E70611547F9005@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.2.0.6 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: spf=none (sender IP is ) smtp.mailfrom=simei.su@intel.com; x-originating-ip: [192.55.52.207] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f227f714-79b6-4c6b-996d-08d7e0806152 x-ms-traffictypediagnostic: BL0PR11MB2980: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 0373D94D15 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BL0PR11MB3380.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(366004)(64756008)(66476007)(52536014)(9686003)(33656002)(4326008)(5660300002)(2906002)(7696005)(6506007)(66446008)(66946007)(8936002)(8676002)(55016002)(86362001)(81156014)(26005)(498600001)(71200400001)(110136005)(450100002)(6636002)(76116006)(66556008)(53546011)(54906003)(186003); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MII4NKUEK2QxzH1V2blZSybFGBQc4y3NoGzFRIwBEtATMT8mVJ6SVPrwxDGE+YG/HsWHGdG0ObnmD7IoJmEVbI6rIUA//+vguA7LY6MlPq0bIRQr3RuTFm9ZSpDojMqHlIXBDmO47EPs0zy71xHcN8C5X8QOOgQiCfmWylCZ0mGXnqtpj5EJiBaT8tfy9mHkmFtcjWcbQeJU+eR2Jd+MEZrDDzEM3hAKkGZzkDT2iHI6p3gzyNuffn0oifuuMWPneWEukv5ATneekMH1KWmM1qpAbgmi+rrhEr6d4ZHaT+xLVt9gza1oCI9IGOnUvLSprks6tPyFgs0RmqVkOzt939wt1pRvUedgPmirT7pVc47Z9C3HIpVMQPaNc/Qi4qIPNW2g/wrq0yhBMAqRBZaRv8q0RM3e73Nw8qD5vhMGplrGTUbxAEHZVToUvR6kzXBL x-ms-exchange-antispam-messagedata: 39A78oHvCdd3wkUJ4ruMzGPgSrYzcBoiMNQ6N9wYnbJmQiLQ+1ymQEKolLlKV+6qX29sucOI69iJW/WQQFBw8Q3prCkNxS7aYXb76rBddTF8wTu0ZRjntU9zWVIQRUhDF9op26ljSFLBZ17uBTsKLw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: f227f714-79b6-4c6b-996d-08d7e0806152 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2020 14:30:28.7804 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4VxkNlGY7Gsyh2veb8ka+49YP9GJECdRb2ctRRC8mVUUz4O2vGwqQu6A8n3WdXYvilM1H7mcCRpvOOurMvygvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB2980 X-OriginatorOrg: intel.com 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: Zhang, Qi Z > Sent: Tuesday, April 14, 2020 8:51 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 >=20 >=20 >=20 > > -----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 > > > > Hi, Qi > > > > > -----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. > > > > I don't know whether the case "Count only" should fail or means > > passthru + count. >=20 > It is the case that user may just want to count a number of the packets t= hat > match a specific pattern and don't care which destination it reached., Th= ough > I don't know if this could be a real usage, but I didn't think its necess= ary to > reject this configure, and allow "count only" keep it consistent with "ma= rk > only" make the code easy to understand. >=20 Ok, got your idea. Thanks, Qi. Br Simei > > 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; > > } > > > > So I want to confirm how to define "count only" case here, your > > suggestion code seems "count only" means "count + passthru" ? >=20 >=20 > > > > Thanks > > Simei > > > > > > > > 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