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 2C0BDA04B6; Mon, 12 Oct 2020 07:40:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D0CC01D5C7; Mon, 12 Oct 2020 07:40:44 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00087.outbound.protection.outlook.com [40.107.0.87]) by dpdk.org (Postfix) with ESMTP id 7AB8A1D5AC for ; Mon, 12 Oct 2020 07:40:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TBjrup4M+8/qsW+k6RQSDP5J1fGm08A0JX7zrL+UeW/GWoQCMResc7hJLwdEgLbQ9Fvg0NsfC0lwaXIb/GT7rr6/XH2JGttvVkQPRIICrAJAiczTN/fxCrxSKzKXUh/GiSMQ/7uBLrx3kxG6N9YPTzfXbWdLPw1oMetAql8SF75WLNAH5ClvnrTyOO6NI2/CcBSp+WUn1kbPdodahmbFlVnNz1sHSsox48J1oA0kVRBHYxKzj0Fl9We9Z+PQhMPnKLtNwvubkMccIankcfTDkZKZIhWxCGcKopvzw6KMA4piz3m1kZV3oKpvGaYPzgXg9QxLjEcwWA8iZLT5w7tlqA== 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=VGyAQsQi0k+ui8Q7zzKMFqFib5ndCqoDQQLA5x6Nk4c=; b=OZXA3DEDi2QefsF5bU8MyQMToyF/0n2IyqcobrnexlWFZAw6WzWJMFfHSf19UgkavW1poUitTDtflBM4RZHY4ornhx6ZWwxFD9ogi4mN+v9HX2jvkLTfgquTlhMFrFmJUYJSFMyPxbNb/irBLdpkz0gudhw+PYj5SY4P0CPnw19PHJHd3ni+7uz0Mp0uH0W9DG1Mp8mwtrtRY8wO86gCHg/PwfXZFO/ZnEYdwAr6H5JrLZ3m/X6ZVZq3PC2kyDw8/JmUGxyo0pI4aXnP9yt9hejUM9oyjNIXBUoedg0kXQTiZZFNsJZfXZYRSofylvSYFaODpNwibaMipPknVIttNA== 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=VGyAQsQi0k+ui8Q7zzKMFqFib5ndCqoDQQLA5x6Nk4c=; b=LwA9qZxAs5C8gT4hP8N5OjmJN6H8D9ExlF0FTkn8w3aGDSEG4nBIv6Ag4rw8XPA+rO3E8FtXWYslbY6MOSRzWzlLuEeUzMwgaBInCIA7nMiWWNNuUhbrg/KlZfo3TfaUgQBJ0MUTOVlp9es9UXxVpvzJ1zaE2FTurbfWYB/KqJI= Received: from AM5PR0401MB2593.eurprd04.prod.outlook.com (2603:10a6:203:37::20) by AM6PR04MB4535.eurprd04.prod.outlook.com (2603:10a6:20b:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.21; Mon, 12 Oct 2020 05:40:40 +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; Mon, 12 Oct 2020 05:40:40 +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: AQHWnj4Ed9gOlJKcG0i0nLKB4YTQZamS8hwAgAB6OIA= Date: Mon, 12 Oct 2020 05:40:39 +0000 Message-ID: References: <20200831075333.10135-1-nipun.gupta@nxp.com> <20201009131331.5897-1-nipun.gupta@nxp.com> <22570939.gbdeFbVOOX@thomas> In-Reply-To: <22570939.gbdeFbVOOX@thomas> 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: 8416d120-d23d-4d78-8540-08d86e715a72 x-ms-traffictypediagnostic: AM6PR04MB4535: 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: gB/PPMD51zZQZbdWXK6mOdN0zXR5ZjcDXkc0fZ/f4uD0SlssDGWaxwwfRWDB5CBT3g/33LGnpei6C/xSKTVpY0cHtNKYTxJTawxDNy8qkz0hMxGHkdA2qvWqZpCM7oXpD421wcnybpysCRpBy0CjOccoEIQf7dtIfFs0tNXbfvpzwUnWCVQ0H6nGQSr4CzDHDWEfGl+cVLYlMqllUCoc5sfxkWL42+ZKlp7X+7sPrOiFiFCU8x3D1uEfZqH14e12/FjWMDGpE+8D+vjm8QGNpa2RpFzzIQjwjqJIAGpFc2mqZAUfK0n38eYeBqQ7S3LPN+HBbl3W5xYGlfd+z6leGg== 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)(136003)(39860400002)(366004)(396003)(376002)(346002)(66446008)(66556008)(66476007)(76116006)(64756008)(66946007)(86362001)(44832011)(110136005)(316002)(478600001)(186003)(55016002)(54906003)(4326008)(26005)(8676002)(8936002)(71200400001)(5660300002)(9686003)(53546011)(6506007)(52536014)(83380400001)(7696005)(2906002)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: WeevZm/4UjB1MlBPx+km36eqDuS+zdoL/UsU47D5Bvf81UcAbUYQ8MwkrcC7oF4RRINMNDnTm5bDqvMGHc+d6W+LG4kJwhiqRhZJZZF7f9CUVROtFKKHGQ5qnIhV5gy3aclewaiwr/2yjmLSsHE9bSouF60yJCeVO//V9hxX36WNSrQxst48CjEoUComI03fKtJdZ3srqS+XvZ/5bR6pPEjXW6tu9WYgRaKUT6SgIs35lX8l449N4lirz2s9JiS8gwvX7pLBSl7A1IMaW0LSKzC4bsdE6mUPOPIbovUaIH5hBrKALO6XBIZ+PNWiFzXK1AKAFp8re8V3vCrG9GATBSAioASZtaM4+Yg+nbLXXk+4zIhbm0eWWc4vb/0TUtqRaKoOlIfzESZHg2tlUE++66aJ178CvRGQKen0ESlMLVOhf8hG/IUV3SfF/OHsvd8UiVxCHXBO2MloYFsRG0dnX1zxsqyT/5dv0w2+GM6j8DI4oQ+PNF7uBSRWFIO8M3OgBcQYNswDtsbpqB8mjs180XgTT0ngkEk6rz/2a/NTknL0Mg8/khZ53c42Zq5bWfy/enkHqwEKO7mPHltwbSpu/1vH7AT8Iq0LK0hDIL7w2rfbiNAvXxzN7Ay166TLGNwcMSEmGa5LbVbJojv9ip29Xg== 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: 8416d120-d23d-4d78-8540-08d86e715a72 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2020 05:40:39.8890 (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: G+9S1Xi1YVQgWg3fUA8T1xcypqtgQKUnMtuWxzud5oBuFAY/hqz4tUn/IkHgQ46/L0Gau5CMtJqWDTv7K5XqWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4535 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" > -----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 err= or > packets >=20 > Hi, >=20 > The configuration of this feature is not clear to me. > Please see the comments below. >=20 > 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. >=20 > RX -> Rx > same for other occurences below Okay. >=20 > > + */ > > +struct rte_rx_err_pkt_drop_conf { >=20 > The name should start with rte_eth_ >=20 > > + /** enable/disable all RX error packet drop. > > + * 0 (default) - disable, 1 enable > > + */ > > + uint32_t all:1; > > +}; >=20 > 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? 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. Currently DPAA drivers support drop of ALL the error packets, but does not support configuration of packet drops on basis of separate error types like dropping only L2 CSUM, L3 CSUM. So this patch is supporting only drop of 'ALL' the errors packets received on HW. Marvell supports drop on separate error types, thus Jerin suggested to have this structure so that it opens the room for adding separate configuration to drop packets on basis of separate error types. 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. */ >=20 > Why a per-port configuration is needed in addition of the per-queue offlo= ad? >=20 > [...] > > @@ -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 >=20 > New offload names should starte with RTE_ prefix. Okay >=20 >=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 >=20 > I don't understand the meaning. For DPAA drivers there is only one offload required, but once separate offl= oads 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 ' in= stead of adding this onto 'rx_offload_capa'. 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_DR= OP_OFFLOAD...' can be enabled (currently only DEV_RX_ERR_PKT_DROP_OFFLOAD_ALL) being suppo= rted 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. P.S. I can add these flags in this patch but without any ref driver support= . >=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. */ >=20 > Why adding a new field here instead of reporting in rx_offload_capa? This was part of v2 where flag was added in rx_offload_capa. 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 packet drop configuration is added on individual error types. Regards, Nipun >=20 >=20