From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 02F32A04A5; Wed, 26 Jan 2022 07:50:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC5AF426F2; Wed, 26 Jan 2022 07:50:11 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 111234069D for ; Wed, 26 Jan 2022 07:50:09 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 20Q2U44x004921; Tue, 25 Jan 2022 22:50:09 -0800 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2170.outbound.protection.outlook.com [104.47.57.170]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3dtwjprjj3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jan 2022 22:50:07 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dThtaEdePKkaO//wbtAUBdMO0aErAXVHUGMgmEMTC7/gjOdUDFLqdTfxb0GdLGhKn0CY979me61a6o1N0FkFYCSYIJ6ll0fC+IAqCkiAO4GjuJFzd9knvveQ2/6sTekNWobxoHXjhzWgBZ8KHvdchfJbl0QK/J4WJcNgFgdZKG+45aBcatNeDRFDZcvrk1Cbdgnnrd9C/wlcc88/WGC5svmMP9rtgQoLXMc/kovPoVlqvdFb7H7SDdvIZ8xRz60Z0TT9bpFMW4h/PmABlapeyiUPQ9LjFdAPriQM5OjVPvFdfGaPEeUzo9PgaabLbvmrbhqkh3IPO9escyjzM44TrQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xsWPutd+hSqNNzA1HUf6oof7yimT1ccgaQM2RW32fGs=; b=Irvp7ODLZIyhRXgt47nQY/gLisZCP2qFK3UsQ2EPT1KjMTd3Q4JpOdDhBEHqdkqnuDMzUZNavXHPqVC1GnSZ90NdXxEoK7zdXiQA/md02zoC7idpPK+80xj6LYDKf8TC/6RbZtcddigtsf7KL2RYda5oyCkBkfchcRLg0naglijzNEKOB9kLkSEoL7eyqn2hm/Gk+eH4hSR0ns+j+gESisizlFpJGdU7v0ALsdXSn50ZULlGsgGqiG1rDBDMar/CxD6yK7/8s1W/qqlh6gfXuzrDlWLmhtTbZEDoG5vM39N+Z2jvoyGgbZiZjAr2J5mrDtD7SH80/3DWD8Fqc/bTCg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xsWPutd+hSqNNzA1HUf6oof7yimT1ccgaQM2RW32fGs=; b=C7Fd2cMePxsyq6bp5WlcHukY8jo8z0qoCVixG0K+4b+2ys05xwVuUVGqc8sfPow/1WXy0rk0QGRPPqTPu99gwHSQfNTPv9yu2DrXPgA9bBs1cyqJHwkmMThHcSiaUucENjCGDvS9oMp5J42BLwN4WkuGYNAu3KUrykqn7Cthz0Y= Received: from PH0PR18MB4473.namprd18.prod.outlook.com (2603:10b6:510:d4::18) by BY3PR18MB4787.namprd18.prod.outlook.com (2603:10b6:a03:3ce::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.19; Wed, 26 Jan 2022 06:50:05 +0000 Received: from PH0PR18MB4473.namprd18.prod.outlook.com ([fe80::98d5:32e8:240b:ca02]) by PH0PR18MB4473.namprd18.prod.outlook.com ([fe80::98d5:32e8:240b:ca02%3]) with mapi id 15.20.4930.015; Wed, 26 Jan 2022 06:50:05 +0000 From: Liron Himi To: Stephen Hemminger CC: "dev@dpdk.org" , Liron Himi Subject: RE: [EXT] Re: l2/l3_len fields Thread-Topic: [EXT] Re: l2/l3_len fields Thread-Index: AdgQ/fTHBIFdckyoSEG3ajKSooWLCQASM8kAADLM1OAACARagAATkzCg Date: Wed, 26 Jan 2022 06:50:04 +0000 Message-ID: References: <20220124092104.07db8409@hermes.local> <20220125132511.2f8ba977@hermes.local> In-Reply-To: <20220125132511.2f8ba977@hermes.local> Accept-Language: he-IL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2cdaa2f2-08a5-4de5-df27-08d9e0981597 x-ms-traffictypediagnostic: BY3PR18MB4787:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aqTHLHNXoloYondE8qLDdIj2R8lqrNOQfiohVAnWI7vWqpYqXcD+JJm+3LUQrR3szWJ6+I7AqYmWwt5FNoHgm7pVPhaA0K0Izg+khLBGokwIgyqEKIA+/BF5xb/KTQ84fNheO9kB4pNDVSs9qDEAG/1hydsw9a9ciu+IZWA9FK9b/dTABvYOd8Gm8qRNIlRB24c4dNw4LzpK6TS7sWdbxy0XLtFuqv1fI9+N7y3H4ZZYTxwk4eowtPNql6dsTbukjjcKp7cO9CCUPQL+EF926xf4mhv7UGEzEPk5Ynn3sqn7QQ4Vlu0y90TgUSYmZxKK0rwkJ1BQZHCxml/TwnE/tgz8UhQpzgJazu8gAeNy4sl6MeUWTpG199wD0SPwozqsCCPsMr3vZeNl/VzZB6KkVuKVZ1XxIdoitG3UmAdHAIMginaakikcocXGSDZ3RPoEzItBN3z2AkUTgwC4gmROWKti+LEqZbpt/Rj9bo8L8FpJOeKVcN9xRxSjxoaiT+xEqX1dZRbEw2iAfcV5kjWo+Kq3BizY+NQV+e7+j2qF6pmy1/dFrDjMBusnDpLalLR3Q1+q+qMV5HAHr+PMqVAOz/PrqTeuc2x5QSSwubvhmISCWDnX/5VZJi/8V4XMCV18AvgsZTVjLuNy/LxF8s2pKjdW3jwSz/o+t5Pip4yC0L9xXjR0LLbEyx0Dlhl3TkxVFYqrKlSejynff0nLVLRo4rxhcVo4w7cVwgiHoeGgfVHjdgrV+8/KbepWLRHPlZtpKjsFWkcN+zh4CyUod+pg9mvwCNbHzBwUeTzjGANpbRE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4473.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(8676002)(55016003)(66946007)(26005)(186003)(86362001)(83380400001)(38070700005)(8936002)(2906002)(33656002)(107886003)(52536014)(122000001)(9686003)(4326008)(53546011)(38100700002)(66556008)(64756008)(316002)(7696005)(54906003)(66446008)(66476007)(71200400001)(6506007)(6916009)(5660300002)(508600001)(76116006); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cL4bge+g27NPgubVgcc9pJaTYGh+jrUS7nU+HEt6mvDXd+dcqiO6UBhQxl80?= =?us-ascii?Q?nn0+4gsdB0QWjWzSteiK5QREEm/RQiBa2DMKbw4tb1YZqm6KCnWI5MDwA2UT?= =?us-ascii?Q?mdmOeYx//uJluPvyYu+hZYmYicTRBEYxoOLmEG8OL/QoDiTjPKiEyyZRvZHC?= =?us-ascii?Q?A/mQVWED36N864S+koiOfffaOdjsPrY8ECdUQZsMG/Iwvtl9l9KCXk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oVg3v+CB13TieMoaJgACz05+Rz8Rcrshw3YyiU9?= =?us-ascii?Q?llSPcKgcsX0kKWEW+jfTZQFDshfpc+mVYjS7p5C2O6fwbUTKyuf7ycp9qVDs?= =?us-ascii?Q?N3W56btJMNOUuvYaAlw4OeIEHWR2/TPVEhRIoXkPAAL/x/0HP/+Env3uyEVd?= =?us-ascii?Q?RSELBUrG99COmwcnZsw3RBO/Ie/5jEA2Pg1YnIdYjRU8WoLEVmWnLXadjZ6F?= =?us-ascii?Q?AsYZnqo4n2VUaFfF9W57nhxRdy1QG/Cc7w3VJ4y5nI0BFUauWQB0KEHhGNvq?= =?us-ascii?Q?10F8nM0NW8BqYOfzSRsGonEagX5MqQ4oT9aO2vObzlamcMtWRyZ7IHuBA6Yr?= =?us-ascii?Q?qL9NVBk79n7HTrW+T+bFwe5hl3MjsT2mBIMCNIaDlYT+fduyQmPbQ8Rd2suL?= =?us-ascii?Q?sHpslYnuLI2KtNe2HaYlDu5Nu8H+Zz6ZXKqesfJMHrYhvS2eB5y7a7077f5o?= =?us-ascii?Q?ePyP0DIyrVpstnAG1P/sih6NSZYhwSewU9gl2W6JJe79NA/y3pOWEfY6LG+c?= =?us-ascii?Q?nw=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4473.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2cdaa2f2-08a5-4de5-df27-08d9e0981597 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jan 2022 06:50:05.0311 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: tomm5Vv8GmBmIq6ZGw10rYH6XCLZ2zLPOPikhJ/t444s608M7V2BqjhSCYnHpFaRqSh0qICKobzoEp7VyIb0YQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR18MB4787 X-Proofpoint-GUID: gclBAf1TNx3phkuCiTvgpGAgypcMiwvg X-Proofpoint-ORIG-GUID: gclBAf1TNx3phkuCiTvgpGAgypcMiwvg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-26_01,2022-01-25_02,2021-12-02_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org -----Original Message----- From: Stephen Hemminger =20 Sent: Tuesday, 25 January 2022 23:25 To: Liron Himi Cc: dev@dpdk.org Subject: Re: [EXT] Re: l2/l3_len fields On Tue, 25 Jan 2022 17:38:42 +0000 Liron Himi wrote: > -----Original Message----- > From: Stephen Hemminger > Sent: Monday, 24 January 2022 19:21 > To: Liron Himi > Cc: dev@dpdk.org > Subject: [EXT] Re: l2/l3_len fields >=20 > External Email >=20 > ---------------------------------------------------------------------- > On Mon, 24 Jan 2022 08:39:59 +0000 > Liron Himi wrote: >=20 > > Hi, > >=20 > >=20 > >=20 > > Can you please share the motivation of not filling l2/l3-len fields on = PMD's RX function? > >=20 > > PMD already filling the mbuf with parsing info, and the l2/l3-len are a= lso probably part of the HW descriptor, so why no propagate them as well? > >=20 > > The current way for application to find the l2_len (for example) is to = examine the ptype using multiple if statement. > >=20 > > However, this may not always work if there are unknown/user headers (e.= g. DSA header). > > in addition, some of the examples are not checking the ptype and assume= s a specific packet structure. > > e.g. l3-fwd, assumes only ethernet header exist and hardcoded jump by 1= 4B to access the IP header. > > but if VLAN exist it will fail. > >=20 > > checking the l2_len will work in any case. > >=20 > >=20 > > Regards, > > Liron Himi > >=20 > > [A picture containing clipart Description automatically=20 > > generated] > >=20 > > Park Azorim, Kyriat Arie, Petah Tikva, 49527, Israel > > Mobile: +972.52.3329169 >=20 >=20 > L2 len would be relatively easy since almost all devices are Ethernet onl= y. > L3 len is the problem, many devices don't interpret L3 and below headers. > Only those that have flow type functionality are likely to do that. >=20 > [L.H.] Not sure I understand what you mean. > what will be easy? Easy for the application to calculate the l2_len? >=20 If the hardware doesn't support doing it directly, then if the application = needs these it should do the calculations itself.=20 Many chips don't support reporting L2 and L3 lengths in the receive result. [L.H.] I agree with that. However, today those fields are marked as TX-offl= oad only, so even if HW can provide the information, the driver doesn't fil= l them and application are not looking at it. So maybe a good approach is to support both options. i.e. how about add new RX offload flag for this functionality and if HW sup= port it than application can use those fields, otherwise application can co= ntinue with the ptype approach. make sense?