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 CBDD1A04B6; Tue, 13 Oct 2020 09:22:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AD6651D99D; Tue, 13 Oct 2020 09:22:29 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80048.outbound.protection.outlook.com [40.107.8.48]) by dpdk.org (Postfix) with ESMTP id 0824E1D99E for ; Tue, 13 Oct 2020 09:22:27 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W0HApYWGRM84s0kXwz7xsDuSlUpFaCAiu90je9nrT8W768hILBBLjREpgyOC27AUz+Os6uezSvz5HVCk9/WLEiuDRHr3t1bdGPqYUtfX38HuJ4mRPZzjfQUGreHKqWbYxrH8DQh2ZMfJOCIKWp3RJWeTqTLVsDLk5fkDs6rGpZtiUNRydAXGGDwQLVER1x29aYaqiVp5Gpt/QVz0ztkCpDlUy4FwMeuHA2nRCuky1hijl8zQLorNV9nuVfZx8gTvzJd6CF8hofvxDDJUCRWW6qo0+AAWZLBWzJ/0iB83LIh9N8wV+HVOq+8P0lwf6d4H9C7bgpfWZhq1S3gnEY4DJA== 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=q+HHYG4fqXBxcdJEi51c/7CFLEHrHhI1/Xma8Jq/yCY=; b=SDpFMK6/cwvY/rfs6gy22yvMJfgzXUPIjcOPdX5oYIMUb9NZa7rPG5ZvgCRfFBtqA+M8FM5dsjA1E5481BHmRcxEupc2WVC+UgQmgLTyR9XCLcdqO6wjrorvMly5THaV7UbIy7yHX3iXZIIdx0CNVmZW9MS+6+P5z4rLetd9c9zXSfaEpNL9LK+AQ8AfhbYJbAjZCOuOPzn+CJgvBtxkC0+NADjFcw2XtOjzyKDpU52LPqrFAXfXQpLARJdd3rb3AP9+NrcLJcIvWZvcGxIEzToZ5Lz1/CJs24vCt4vX3P/2GupwjdzxQ9veInQcViNARuLMoECNE/8wlHoyhUbWeg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q+HHYG4fqXBxcdJEi51c/7CFLEHrHhI1/Xma8Jq/yCY=; b=Oy3/sCGP+MWyt/k/7xkQy8+VEopBlnOraA9Et7LSkWRsntzg67KS8m5o54PpVLDNxZ4ejCtdjsNKiF8z/vWV/gZdQRmo5TZw/+FwEofj9Mh2U2dAu8ZS9UrbqM2t10+S76aJ8Si8Y0A91gz9VyhtuEYuncoMWfTWwRdTcmXmphI= Received: from AM5PR0401MB2593.eurprd04.prod.outlook.com (2603:10a6:203:37::20) by AM7PR04MB6997.eurprd04.prod.outlook.com (2603:10a6:20b:10d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20; Tue, 13 Oct 2020 07:22:24 +0000 Received: from AM5PR0401MB2593.eurprd04.prod.outlook.com ([fe80::3c2c:e6e1:4e49:2e5c]) by AM5PR0401MB2593.eurprd04.prod.outlook.com ([fe80::3c2c:e6e1:4e49:2e5c%11]) with mapi id 15.20.3455.030; Tue, 13 Oct 2020 07:22:24 +0000 From: Nipun Gupta To: Thomas Monjalon , "jerinjacobk@gmail.com" CC: "dev@dpdk.org" , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , Hemant Agrawal , Sachin Saxena , Rohit Raj , "stephen@networkplumber.org" , "asafp@nvidia.com" Thread-Topic: [dpdk-dev] [PATCH 1/3 v3] ethdev: add rx offload to drop error packets Thread-Index: AQHWnj4Ed9gOlJKcG0i0nLKB4YTQZamS8hwAgAB6OICAAbiJIA== Date: Tue, 13 Oct 2020 07:22:24 +0000 Message-ID: References: <20200831075333.10135-1-nipun.gupta@nxp.com> <20201009131331.5897-1-nipun.gupta@nxp.com> <22570939.gbdeFbVOOX@thomas> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nxp.com; x-originating-ip: [182.69.77.55] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: cc44cc53-22a0-4a46-415d-08d86f48bb99 x-ms-traffictypediagnostic: AM7PR04MB6997: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: R/YGz8H5ffXhmDUYCA6kb1mB63d0J8SiR/DgmxqXNgQvxRZrmA4YDzDdGrC8nYTTfjU4CsICo4K69J4r/npQ4vkz1lZXPkwI7hEvaWnOcZXUKUTRSeYxaKYxSrWoeDDJ9Nu3Wd8gnXpXMQOqVwR6p+tz7gg3EftrZ3lrxAWHqhDMY/UThXupDt3eQPwGSbIVErBXngp9VouqQsDv0Rhu3FNTrTFvSHuFmXxLM2VsxLJGm4vFByROyLx+g96UrQowkv2Fz7nI+FpiHVRqWF94AghPSekETRwNbaRzhtYQ6sVRU6snyfa50NKD0j7AgWTazu1T00a8iOrpwkH0SVjjQA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM5PR0401MB2593.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39860400002)(366004)(136003)(376002)(346002)(7696005)(44832011)(54906003)(316002)(110136005)(2906002)(478600001)(86362001)(4326008)(76116006)(52536014)(66476007)(66556008)(64756008)(66446008)(66946007)(55016002)(53546011)(6506007)(71200400001)(186003)(26005)(33656002)(8936002)(9686003)(8676002)(5660300002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: utl20fd8aFniXgmWud593DzgFCDFDDNxheEGkBWktHY69P01i9iZ5GAY1A2FUNoYmP/y5Qu4tFLuU8pNQjSC3i18iojaPWYz9E5r+4mXl3PYewbPjLSn65FM0Ug9jsIo9lVDj33XoosglDpun2S6r2X10iUVANjNka+COg8bmanoj6jOcDJUpqaj/qW+VRHR0+eSzCU6Lre4djc2D9Yn8DQM7bTK/dtrIZhGAoFcdEggSMxJlwqZ3eyN4JKcpYCZsy3H3OD8JoyFsDzX4Q3uWQEH/adIjsKpGqKji6UDBcIK59wgs5QZRt2lyVmRkgEafxe5LVZKWvDT5rCADGwHXewk+6rXYo0gm5hnnOVJd6TGdk53FbctwT+GGt9UU4a0k4Bd3R20TGIheOzzEDRpI+g6phi4Pn4kt/R5EhCHct9uKNeC6H6076mzRqedy7FvxmqIr2rj5gUBSqumrBPS/WqnPFt1ZJLfF6K0oxleKo+5w8ftdC2lLAmn0zBz7zgeG+lV/UC0qjTK6y+kfwXsb7Gd7vjTXOYANpgbaYqBG1jq3xUZoxFnVrKBuW5P2h89/8wvvGRIMk5sAeuX/Ae/V45+70v+aOIAd5DhaBvaktaQpvRAjAd43HO0CJomLiOBkqOyZtgrs9ZX/Xn3Bq2Xaw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM5PR0401MB2593.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cc44cc53-22a0-4a46-415d-08d86f48bb99 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2020 07:22:24.7267 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: J5l6Mfxfz9lDLGxQQLHsSoDTMDmTMlyyxWK0/782rCAzZldahHO4GUbC7N7UgT8I/eFIcOcMnlGtytJBtvxBPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6997 Subject: Re: [dpdk-dev] [PATCH 1/3 v3] ethdev: add rx offload to drop error packets 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 Thomas and Jerin, There seems two views: 1. Use of existing rx_offload_capa, to have additional error packet drop of= fload capabilities. This is showcased in v2, and also suggested by Thomas. 2. Adding additional offload capability flag types and configuration struct= ure for error packet drop configuration as suggested by Jerin, which is par= t of v3. Please let me know which one shall I continue with for the next spin. Thanks, Nipun > -----Original Message----- > From: Nipun Gupta > Sent: Monday, October 12, 2020 11:11 AM > To: Thomas Monjalon ; jerinjacobk@gmail.com > Cc: dev@dpdk.org; ferruh.yigit@intel.com; arybchenko@solarflare.com; > Hemant Agrawal ; Sachin Saxena > ; Rohit Raj ; > stephen@networkplumber.org; asafp@nvidia.com > Subject: RE: [dpdk-dev] [PATCH 1/3 v3] ethdev: add rx offload to drop err= or > packets >=20 >=20 >=20 > > -----Original Message----- > > From: Thomas Monjalon > > Sent: Monday, October 12, 2020 3:12 AM > > To: Nipun Gupta > > Cc: dev@dpdk.org; ferruh.yigit@intel.com; arybchenko@solarflare.com; > > Hemant Agrawal ; Sachin Saxena > > ; Rohit Raj ; > > jerinjacobk@gmail.com; stephen@networkplumber.org; asafp@nvidia.com > > Subject: Re: [dpdk-dev] [PATCH 1/3 v3] ethdev: add rx offload to drop e= rror > > packets > > > > Hi, > > > > The configuration of this feature is not clear to me. > > Please see the comments below. > > > > 09/10/2020 15:13, nipun.gupta@nxp.com: > > > From: Nipun Gupta > > > > > > This change adds a RX offload capability and configuration to > > > enable hardware to drop the packets in case of any error in the > > > packets such as L3 checksum error or L4 checksum. > > > > > > Signed-off-by: Nipun Gupta > > > Signed-off-by: Rohit Raj > > > Reviewed-by: Asaf Penso > > > --- > > [...] > > > +/** > > > + * A structure used to enable/disable error packet drop on RX. > > > > RX -> Rx > > same for other occurences below >=20 > Okay. >=20 > > > > > + */ > > > +struct rte_rx_err_pkt_drop_conf { > > > > The name should start with rte_eth_ > > > > > + /** enable/disable all RX error packet drop. > > > + * 0 (default) - disable, 1 enable > > > + */ > > > + uint32_t all:1; > > > +}; > > > > I don't understand the meaning of this struct. > > Is it just one bit to drop packets having an error? > > How do you determine what is an error? >=20 > The error packets which are dropped on the hardware can be from > various reasons, like L1 FCS, L3 CSUM, L4 CSUM or HW can be configured > to drop ALL (or any) of the error packets received on the interface. >=20 > Currently DPAA drivers support drop of ALL the error packets, but does > not support configuration of packet drops on basis of separate error type= s > like dropping only L2 CSUM, L3 CSUM. So this patch is supporting only dro= p > of 'ALL' the errors packets received on HW. >=20 > Marvell supports drop on separate error types, thus Jerin suggested to ha= ve > this structure so that it opens the room for adding separate configuratio= n > to drop packets on basis of separate error types. >=20 > Jerin, > maybe you can add more on this. >=20 > > > > [...] > > > @@ -1236,6 +1246,8 @@ struct rte_eth_conf { > > > uint32_t dcb_capability_en; > > > struct rte_fdir_conf fdir_conf; /**< FDIR configuration. DEPRECATED= */ > > > struct rte_intr_conf intr_conf; /**< Interrupt mode configuration. = */ > > > + struct rte_rx_err_pkt_drop_conf err_pkt_drop_conf; > > > + /**< RX error packet drop configuration. */ > > > > Why a per-port configuration is needed in addition of the per-queue off= load? > > > > [...] > > > @@ -1260,6 +1272,7 @@ struct rte_eth_conf { > > > #define DEV_RX_OFFLOAD_SCTP_CKSUM 0x00020000 > > > #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM 0x00040000 > > > #define DEV_RX_OFFLOAD_RSS_HASH 0x00080000 > > > +#define DEV_RX_OFFLOAD_ERR_PKT_DROP 0x00100000 > > > > New offload names should starte with RTE_ prefix. >=20 > Okay >=20 > > > > > > > +/** > > > + * RX Error Drop offload config/capabilities of a device. These > > > + * are valid only when RX capability DEV_RX_OFFLOAD_ERR_PKT_DROP > > > + * is supported by the device. > > > + */ > > > +#define DEV_RX_ERR_PKT_DROP_OFFLOAD_ALL 0x00000001 > > > > I don't understand the meaning. >=20 > For DPAA drivers there is only one offload required, but once separate of= floads > are added to drop packets on basis of separate errors, then it can bloat = up the > offload capabilities. So we added new flags ' rte_rx_err_pkt_drop_conf ' = instead > of adding this onto 'rx_offload_capa'. >=20 > There is only one flag ' DEV_RX_OFFLOAD_ERR_PKT_DROP' added in > 'rx_offload_capa' > and if this flag is enabled, one or more of the flag in ' > DEV_RX_ERR_PKT_DROP_OFFLOAD...' > can be enabled (currently only DEV_RX_ERR_PKT_DROP_OFFLOAD_ALL) being > supported > Others like: > - DEV_RX_ERR_PKT_DROP_OFFLOAD_L1_FCS > - DEV_RX_ERR_PKT_DROP_OFFLOAD_L3_CSUM > - DEV_RX_ERR_PKT_DROP_OFFLOAD_L4_CSUM etc. > Can be added once any reference driver is supporting this. >=20 > P.S. I can add these flags in this patch but without any ref driver suppo= rt. >=20 > > > > > @@ -1411,6 +1431,8 @@ struct rte_eth_dev_info { > > > /**< Device per-queue RX offload capabilities. */ > > > uint64_t tx_queue_offload_capa; > > > /**< Device per-queue TX offload capabilities. */ > > > + uint64_t rx_err_drop_offload_capa; > > > + /**< RX error packet drop offload capabilities. */ > > > > Why adding a new field here instead of reporting in rx_offload_capa? >=20 > This was part of v2 where flag was added in rx_offload_capa. >=20 > Both ways (v2 and v3 versions) seems to have pros and cons: > - Adding only in the rx_offload_capa' seems simpler to implement and use > - But it shall lead to increase in the offload capability types when pack= et > drop configuration is added on individual error types. >=20 > Regards, > Nipun >=20 > > > >