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 1012AA0577; Tue, 14 Apr 2020 11:12:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D69751C2AB; Tue, 14 Apr 2020 11:12:30 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 1EEFF1C295; Tue, 14 Apr 2020 11:12:27 +0200 (CEST) IronPort-SDR: PWIwyvJTb8/XsKtrDGzHt+MfLtTxOhdIWCpsO2SBKBsxJxJsdBpl6XSf1D7twOBY3mis7ErjMh bTU3fSiQkoWQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 02:12:26 -0700 IronPort-SDR: OELijxXkBJbENe1vaoAYxlGtfdrMrS2J+UATRovewd5oxpTUXClsl/Bg6Wyc5sQfeS6UDXNWql auDGqboEVt4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,382,1580803200"; d="scan'208";a="243766580" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga007.fm.intel.com with ESMTP; 14 Apr 2020 02:12:26 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Apr 2020 02:12:26 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.170) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Apr 2020 02:12:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XMHILcz/dy/w1SBmCPBVgBtm/gFxSVGXF4qUk/4VuP8a1m5wy3F0TbYgFDae5ze9vdDUMZYCeL+2JtTx8ua+vaW59Ei10kGmKw49ryu4uF/15IxTa7UuKDRWNPRRhEcmKaRBXfEnjs6VG86sT0y8lJPgFpkDZsxWujR4okoA6khzbs2qCAHQfbyRtVus+lqt5ZSdKv2mRu09OzMDR6DmlewYE6axVFiIUxMFeV+KHjWyNiezUaVLOibhBst7aNXM5f0eUpmicYkaN8FjgDtofJPVJRht2G7r3ZVb5Pn2cC4dHVp6KniK8wHY4iLkWBuJhQrf5QSFtT2V9JKBvNmHCA== 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=b7sDpSODxgP3sgDQNEg14pD5TGr+rMFlwdAlR9xLEFE=; b=XsnEK91CVKWRYBtwALvgoj7v6MZBcjYwn9/UshGM8dvTsEwx3VetsZk0xaoZPXGBzky6X8NwIKP7zYxMfQwHw18CbzH7yCkP+64H+33UtYqIdPdsl+Ahm8QzbAVOaxZ6faMvsxOCVk+eIK/8PmdT3XJIOGhB1nMdLh0NQCNmXqqyIVrrHXwA+HewwH9xwpitNiGjW0fdWXzeV2nj/hL7+Aj5YXsf17K/KcTnidxLGoRUMu9wyhjmOh6hVHFdZ11oN6+dJxvrqmPdYgLbAFlEVMfAY6E+Sff+Ihdgd7AsU0ulRQkLS75U9lCEwEmayknYu3Yl7eY2t4oKT5MEIA8FkQ== 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=b7sDpSODxgP3sgDQNEg14pD5TGr+rMFlwdAlR9xLEFE=; b=HNTdFfxHWsXjy7zXl0r4vqnWgO7pfznxH5wFXbsGwV2jbjc/5rx4PuyDkuHyp2EiqJ4yJXJ2zMVhpRvZEyMCc6WpS85A5Qvq+MQ8gtWb7GUQfjCkAGOjqeKAR7D+89kxgECl16ZoqolJ5XvUOzxXhIvMGSGpPf/Z2BNDs0hytgE= Received: from BL0PR11MB3380.namprd11.prod.outlook.com (2603:10b6:208:69::12) by BL0PR11MB2900.namprd11.prod.outlook.com (2603:10b6:208:31::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Tue, 14 Apr 2020 09:12:20 +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 09:12:20 +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+jmMW8l1t0y5MTDxZDQFoah4UPEAgAATsKA= Date: Tue, 14 Apr 2020 09:12:20 +0000 Message-ID: References: <1585810557-21150-1-git-send-email-simei.su@intel.com> <039ED4275CED7440929022BC67E70611547F8CE5@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E70611547F8CE5@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.102.204.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3126f2bf-4bce-4e17-8642-08d7e053efd5 x-ms-traffictypediagnostic: BL0PR11MB2900: 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:5516; 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)(136003)(376002)(396003)(366004)(39860400002)(346002)(6636002)(86362001)(66476007)(54906003)(478600001)(52536014)(53546011)(7696005)(6506007)(64756008)(316002)(66946007)(110136005)(66446008)(66556008)(71200400001)(76116006)(186003)(2906002)(8936002)(8676002)(55016002)(4326008)(9686003)(5660300002)(26005)(450100002)(33656002)(81156014); DIR:OUT; SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: tmHDoZ+XvOkjgkS+433EZhvAHD5s9k4JgLBQznucBoBV6AYCCMNczXYIVVzLk+TL+giWFgK5BMpS3Rw+aJIGtJ07giIIxv79D0gGKmdyvQuLyT8on64n9Z8c8LYEf7IPobvcgoLPdEC9NW4LaNG2uZVXMJHIb5n3vjvnJAoDiseVCjLOJTOxFgZNkifE2KQoh6VfIHM1kZRZvmzqXTnGfv+01KFcnyzjjQO6ijPLu5L/ztTBo7dGHDrRbGRH4k1PgdhZ/b7MA6anri/8KsrZJBYnEluqCo2OE9RCyjCqBjuJD/Gvcmw42KuW65s1uyB5ox/Ih+6bf/s79kSdCPGljEbyUJDbeta0HypNNt10AG7K9kE/9taTkUHXAZAR3c1UXPmckLmgWLdhwOEe08VbHlvQzLPclWcyVw0cKMTD1Sca5bsirHmrXX27cWup+OLq x-ms-exchange-antispam-messagedata: hsl90BuMZA7wNliwEgvaF9ms8pMKk44nhmZVz2QMq93HY72NKcau/FjYUfu6yIzrHKwxb14A8terrvBfdIz89gwO+FNhzC0Dj8iHZRoWAQEWSpCbSUllok4yUvY3T7ztYWHFV4BhGdltfRSrFZN8uA== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 3126f2bf-4bce-4e17-8642-08d7e053efd5 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2020 09:12:20.6000 (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: 9HK1K9EG7av0buV6d89YT9mrfmV1MfbyengRkBIoo7Nc++fGhNRoC5G27F0EGUP9CM+tnSJf8wxnu/UEhT9lAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB2900 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" 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 >=20 >=20 >=20 > > -----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; >=20 > 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 pass= ed 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. 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" ? Thanks Simei >=20 > If (dest_num =3D=3D 0) > filter->input.dest_ctl =3D > ICE_FLTR_PRGM_DESC_DEST_DIRECT_PKT_OTHER; >=20 > > + > > 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