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 EF4C4A04A6; Mon, 24 Jan 2022 09:40:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 84D4740DF5; Mon, 24 Jan 2022 09:40:04 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 1458640040 for ; Mon, 24 Jan 2022 09:40:02 +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 20NKU73E010668 for ; Mon, 24 Jan 2022 00:40:02 -0800 Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam08lp2168.outbound.protection.outlook.com [104.47.73.168]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3dse3psem2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 24 Jan 2022 00:40:01 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FbGvCnjD8CvuGJxpT+xtrzS6KLjk299pYGccPgYZCAOOpO7SIjJ0QadDYTVDw2iE2cE/QOydQjMBi5MDeUXowpiW0tsmQ7CD0OXuK6QEN0MgQikaoK7tlrmPVtzLHlbv60/jUL88MbxtbzRh0Mw4vl0UmrKPo3hkKuP5QDg3jFrV1LTxeSKyCLvU5+a9hVujGib3vjGGK0OmlmITrYA4A/eITqe9bHyA1DN8kScy6pr1NPZdwpRMsJEAmeBv7DAFmi2To9nWBQ1j8Dves5YJvd7x5TQZf4QiS2NtQcn4W5iYCuxjVyyb3Xs86ha+uTHLei47KQv2xm+ZyIlfBDEwpQ== 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=i1CxeGsz/PTOFy3dHK/rpXxjM+VPWdOHFdnZw7gDCe0=; b=DYL+KKBuCsCN6r5Xae3RxDxffa7Oou3Fl/PiW8UOLHizyIaQXvBBNbq7C5NF/q53oEx8e97yOUHW0YTYrmgbz3paGKnkRWCzCM5VpVifrJUHG2XWZoV99MvhG1uqI/nDxkU2+DTK7DJWmwytUdqdbbgI9q5m8PPeEJv+mU04R+sK0QqKhqIKdkXD7+F0YTxhE9VUFMODT57dJThRsZOH9jseEgP3qBBU86mJdQ+I/sKLi3xUFOmX+OmZJj502uPjCQr4rmP2PUmhNvq9fgd2Qt3Nfr7bqUafYCkz0Ljoqm2QymJDBU6FIiN5SpK41wpHlouFEavOsUYvFC+rtWUmMg== 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=i1CxeGsz/PTOFy3dHK/rpXxjM+VPWdOHFdnZw7gDCe0=; b=ift17f7tY+qSwysh6BzCKFdsTa9+f3z9U5azTPnvtly6F+NdN8sQvWDxKGkDOIq8vXsjw4UbTyXsn3UUIf2hzCPrVaajcq+7ZAh4jSuBRfSWDweWdKoYyRQXz1C58gRTnIGiSfWwkZ4MOskVSNBgTDbdPc/uek4uPNi2dRwJqpw= Received: from PH0PR18MB4473.namprd18.prod.outlook.com (2603:10b6:510:d4::18) by MWHPR1801MB1839.namprd18.prod.outlook.com (2603:10b6:301:64::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.17; Mon, 24 Jan 2022 08:39:59 +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.4909.017; Mon, 24 Jan 2022 08:39:59 +0000 From: Liron Himi To: "dev@dpdk.org" CC: Liron Himi Subject: l2/l3_len fields Thread-Topic: l2/l3_len fields Thread-Index: AdgQ/fTHBIFdckyoSEG3ajKSooWLCQ== Date: Mon, 24 Jan 2022 08:39:59 +0000 Message-ID: Accept-Language: he-IL, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b942177f-2815-4e77-47ab-08d9df151b3b x-ms-traffictypediagnostic: MWHPR1801MB1839: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: oaiF3uUeqxPlk/MfM2mCPli+QCupEA2cDybqvXnnB3ZsKd9VIraSEA1ibzU20lpKbyOAWqrO1sas/M0YHcCgh8X+e3XyxAMF6l0B+hkgP/NS1djtwzAaUAieAyBorQBWfQVsY7Xq9dfbMTfza16PdLuPRyPp6w2H0RzKZTUWuu4ZyQFUyT98AOm5Gfb+FX10RSOThHQL+uQr7PTBEysI6CZ+9I45bYP8FxTNi1dv3xGHDJQFKU+rfJV5KD8/wAjCZ/uAGoUJslM9RY2fXTX5S8c/xLvoylVZ0HL/T+XfLK7irmEsWRN4C9+M1HC/g5zhCHWG7wwQ7IJpbtn1uSyllsOuNkp+TrqAAMEbCvaKOaU9de63iqVyXeEKWUHkPLnVe+VzZZ/nog92NLFWwtdWdTXYZWiHDOTIFfwmt9tgLiD1ajXVOiLIP8/xtbeC702o5JOFT2AO4OYuZ2N7sw+S1isjCC4c9DiR9XVniAAf2qzFpz6nRekIBfoP42CmjgAL0FMZXfr+PjhPZC05G4UMmunyHL4X67ef31CyEWUN5BRvwGWqGVlCVQ/7tnDEgAnTulxFIb35kGUuIufuKVQj0wTfxOA5sg+iSW+wSq6pYvPfJetsDzZ/tmqnKSqtr5lIkoIh+8ystKeiLqgQc6fT8b4kyzSGWEKC1LWGtQwVIKmgJ9bif8goiQDcPt2f4rFMLIk1TvlPvYylpoXTYOqGo0luDQG8Hcfih4M+AaC5IODVbfAkmxS03fLlcyQ1JJZY1FN4ThobcqQs5kSil2RVx6h774lsFsjqB8Z0QTy4G9Q= 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)(33656002)(6506007)(8936002)(83380400001)(66946007)(6916009)(9326002)(186003)(26005)(4744005)(508600001)(86362001)(8676002)(7696005)(71200400001)(52536014)(66556008)(99936003)(38070700005)(5660300002)(166002)(76116006)(316002)(4326008)(107886003)(2906002)(122000001)(38100700002)(9686003)(55016003)(66476007)(66446008)(64756008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4ECsr1FPvD4Wns3ifYuV+k5yme9OnaPXHn15Csr7fvxguNirOnSnWH32/sCV?= =?us-ascii?Q?ggLAcgu7ROFxqqCBdtIEMdE0hPT/UTVmrYjqBJlHUF46QI4R6vjI1UdqIL/Z?= =?us-ascii?Q?koQqWk3NdyzqtEOvpOzm7RXWw5FKUCqrcCnp5xq3EnS/Sv1QWdhVsABR05g7?= =?us-ascii?Q?bW4VwIKlQCXCIvfW87fogSwpkQpQbBT7zFm+OnhdYGuzt99RB6iamvnYPcO7?= =?us-ascii?Q?31/wvBRg96Mn9cb6RzLrN1hgnQYZV8BdoNzPBGxScuzusQeqo7ZeDSh3sok/?= =?us-ascii?Q?n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UIp8k3lA?= =?us-ascii?Q?KgGaVWoevS5JnVV1/d7SPYrjazplcl/9Y3o2/3v9dIyDtA0l5SxkgxUi6WFG?= =?us-ascii?Q?IuNm0TD3Zal9JlWsEpMBu0TZsXhPDwJWND4NZMmG7M5UwKc1iV4lKQbR0Aij?= =?us-ascii?Q?sbEHOUFBmc/ZJR8V0jUZR+Qfjg3FHNgFDzzo9JJW08bXLNVivtwrqSgBTpua?= =?us-ascii?Q?ja7vG0i7h9NJSvZIjEDt43fsyfaiZDnXcrTxBWgZSJ4rQVnvfOxsHaCirfIV?= =?us-ascii?Q?m3jG5Sa2zoOlanaUcHom7LEqKbkaNyKmSMVuHeRdwaztWpGg8/IbmuLaugt0?= =?us-ascii?Q?hrnPqzY0gzszWEoNzkyU+huzkzP1eMBVMCiQNzM8ouvDeTwrUAW7QszDKl5F?= =?us-ascii?Q?cTEruo7opKCz7TUA9XcVrtJQzPT7frYSkSoitVgsql1jQH5ze7QEZkCLQ7p7?= =?us-ascii?Q?1g=3D=3D?= Content-Type: multipart/related; boundary="_004_PH0PR18MB4473F4E9A98B6E39E5DECA35C65E9PH0PR18MB4473namp_"; type="multipart/alternative" 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: b942177f-2815-4e77-47ab-08d9df151b3b X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2022 08:39:59.2719 (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: 7Xpj4DMg4xYuTsl12Sq0LwS4zzjqUt2VBm+b4+2pP+zqKlZ0KneCl3j8G5akAJn2byP292w4WP3XP82nAUUuRw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1801MB1839 X-Proofpoint-ORIG-GUID: 9Wh3mfmkCeXtspd3WcX7KJ4Z30Z-Gfps X-Proofpoint-GUID: 9Wh3mfmkCeXtspd3WcX7KJ4Z30Z-Gfps 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-24_06,2022-01-21_01,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 --_004_PH0PR18MB4473F4E9A98B6E39E5DECA35C65E9PH0PR18MB4473namp_ Content-Type: multipart/alternative; boundary="_000_PH0PR18MB4473F4E9A98B6E39E5DECA35C65E9PH0PR18MB4473namp_" --_000_PH0PR18MB4473F4E9A98B6E39E5DECA35C65E9PH0PR18MB4473namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, Can you please share the motivation of not filling l2/l3-len fields on PMD'= s RX function? PMD already filling the mbuf with parsing info, and the l2/l3-len are also = probably part of the HW descriptor, so why no propagate them as well? The current way for application to find the l2_len (for example) is to exam= ine the ptype using multiple if statement. However, this may not always work if there are unknown/user headers (e.g. D= SA header). in addition, some of the examples are not checking the ptype and assumes a = specific packet structure. e.g. l3-fwd, assumes only ethernet header exist and hardcoded jump by 14B t= o access the IP header. but if VLAN exist it will fail. checking the l2_len will work in any case. Regards, Liron Himi [A picture containing clipart Description automatically generated] Park Azorim, Kyriat Arie, Petah Tikva, 49527, Israel Mobile: +972.52.3329169 --_000_PH0PR18MB4473F4E9A98B6E39E5DECA35C65E9PH0PR18MB4473namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 =

Can you please sha= re the motivation of not filling l2/l3-len fields on PMD’s RX functio= n?

PMD already fillin= g the mbuf with parsing info, and the l2/l3-len are also probably part of t= he HW descriptor, so why no propagate them as well?

The current way for a= pplication to find the l2_len (for example) is to examine the ptype using m= ultiple if statement.

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 assumes a = specific packet structure.
e.g. l3-fwd, assumes only ethernet header exist and hardcoded jump by 14B t= o access the IP header.
but if VLAN exist it will fail.

checking the l2_len w= ill work in any case.

 

Regards,

Liron Himi

3D"A

Park Azorim, Kyriat Arie, Petah Tikva, 49527, Israel
Mobile: +972.52.3329169

 

--_000_PH0PR18MB4473F4E9A98B6E39E5DECA35C65E9PH0PR18MB4473namp_-- --_004_PH0PR18MB4473F4E9A98B6E39E5DECA35C65E9PH0PR18MB4473namp_ Content-Type: image/jpeg; name="image003.jpg" Content-Description: image003.jpg Content-Disposition: inline; filename="image003.jpg"; size=1464; creation-date="Mon, 24 Jan 2022 08:39:58 GMT"; modification-date="Mon, 24 Jan 2022 08:39:58 GMT" Content-ID: Content-Transfer-Encoding: base64 /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIf IiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/wAALCAAkAH0BAREA/8QAHwAAAQUBAQEB AQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1Fh ByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZ WmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXG x8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/9oACAEBAAA/ALnwv8Y6svgO/mubWfVl 0qRUjjiI80Rbcnr97GOnXFWP+F7aX/0AdS/8d/xpP+F7aX/0AdS/8d/xrY8MfFCPxXqy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