From patchwork Tue Feb 4 15:41:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denis Davidoglu X-Patchwork-Id: 150864 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 77C054618E; Tue, 4 Feb 2025 16:41:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 67766410E4; Tue, 4 Feb 2025 16:41:52 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2122.outbound.protection.outlook.com [40.107.20.122]) by mails.dpdk.org (Postfix) with ESMTP id 06057400D6 for ; Tue, 4 Feb 2025 16:41:51 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pbEPw7xX7eek7X9D4ybxrl3VSybYBado5rH7Ti7CEPCvsaVOtqwFWaNNyrmhzc8hQhgr2k7vU6HrcUEfshMUz+IMgQ8JKRpEjYyPwIJHFtYhZfFIqjU9/2lo83aDC7w1J4WLldLGg1O3KXG+uYKZaBZE3UCHea+wjfIvy9DZfeD/6/97u80Z+jhnxB2GgT8auHPcWjyW0/F90GPXimygd7UheVyaPM1AzjChrz6WaQsfQNhAOhWY78nfW2l/14d5Ama0FbQjQN4UXgwo4/tANWU7+7B9DNuzOZNLtsP1f4ksc6JNlp4tmOz3ASP1xQxZjQqW4U8lP2YQgxEVkewtMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=b8TG65Pl+BXw05z3LfvUvczzqF7miduodb6llP8xCtg=; b=rEDzS+YXlm82Y+ybrxOhYnmYc3CX8OVQmaiNGw7XuK2tVCCPLWwd7iif17X6vkDSouvWo/KPToBr8+Acfeh4J+GP/ZnJoxvTzoRDitvJNVltvmjtUxfzqQs0m5dx9IPvXM06NOM/QQgG096bHgodV98YqqpjPGyutXmSh3vxe4mYtx/I8tUlMhc4CO08eTmAdbrVm9tF9gES0D/k998ckDaFfBTtL6NfklNLFHCtZ4QmrKwUyCuLGx0y9fC1yB96JdKia9jQSsWOldDGMets2oxbXdTkWrtuP9z7IYLx5sG5LjnCUsCjPnw10CcOEbkLvubEknPRp45mQT5kR28/dA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=b-ulltech.com; dmarc=pass action=none header.from=b-ulltech.com; dkim=pass header.d=b-ulltech.com; arc=none Received: from GV1P190MB2041.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:170::13) by GVXP190MB1872.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:6e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.24; Tue, 4 Feb 2025 15:41:47 +0000 Received: from GV1P190MB2041.EURP190.PROD.OUTLOOK.COM ([fe80::be7c:b426:4c2c:77c6]) by GV1P190MB2041.EURP190.PROD.OUTLOOK.COM ([fe80::be7c:b426:4c2c:77c6%4]) with mapi id 15.20.8398.021; Tue, 4 Feb 2025 15:41:46 +0000 From: "Denis Davidoglu" To: "stephen@networkplumber.org" CC: "dev@dpdk.org" Subject: [PATCH] net: support Arista L2 headers Thread-Topic: [PATCH] net: support Arista L2 headers Thread-Index: AQHbdxq5HJBJUV5MQE6/ElVdtdDZDg== Date: Tue, 4 Feb 2025 15:41:46 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=b-ulltech.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: GV1P190MB2041:EE_|GVXP190MB1872:EE_ x-ms-office365-filtering-correlation-id: 0d899fba-b689-429e-6c02-08dd45326e9e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|8096899003|38070700018; x-microsoft-antispam-message-info: =?utf-8?q?cQLK3hKvkk2VwFJjsNyRJE58auWN/yZ?= =?utf-8?q?2HXfwO/NyfWlJAkeh6g9HLUaoWfkbnmghC7nBJxqP9VrBfwCiVHrXFBwfO9dvPMjI?= =?utf-8?q?Ie0lgozXuEe5oclQ302MYhf1TC3j7X3omnpiftIc2X+cMjCO/1Jf6osc8frEn36g5?= =?utf-8?q?CQQCJkxEoSLo8egBH8TvhQnc3cX0ErlirD54fbcx3D5emE1a8W+urTCFRZ3t03nSV?= =?utf-8?q?zFgPKeFmNrT+f5iIPeJE52hEmquCA4e+qJdzX6QHp/kK2mqwLKPZTrmquhzQ/eKEE?= =?utf-8?q?tJlE0xGQOlxkIufIfEha3fAAoUDvgFSjtZ8pT3vwdbWFhMtyVIzQURGg1FiZESrYy?= =?utf-8?q?W8puk/LN1gaPFlehFtSsIJ9AR2nVGpdFLJR2Rm1+d2ciZ8+3AXyMw5zLg99KtNetx?= =?utf-8?q?jEw9oS6YLc/Mkg56boxsRyHJdkZzP9trC8LS3bdvvZkRBd4wrKbvRVNuIbom3XYBU?= =?utf-8?q?u84ilT8MyP7Ow3IDg24IPBjkztwIsRx4QNPVG2weVJtL9HsvABwp7hH1hbj0O9+07?= =?utf-8?q?j2AkW0Gvk4q8NAPe00UF07D4vGCivM2VrZcTp/H/S9TDSYPPzzMItpT2WgaBRp6gY?= =?utf-8?q?vk59m2Qmc2uBz09t2hvLExEGbT4DjNPfj05pyLff83V/16yFlOomI/w80Qw/eKTgN?= =?utf-8?q?XVaGFWbQMhFyr6hCdCfrXIh2UkMaAM+IzWOfpl6N/vR0+vd0ddWXv/kR5HXLKRq9e?= =?utf-8?q?8N3r/qCCJfHqcuj2FmKcTzo1+QE2VFXiA7yF+ssdHzJY82r8WlbwyNLdgf9K0dDgX?= =?utf-8?q?HRJa6P/mxUIKNGJoKFj8oxN+CMDD3Z7LxXEExp/oEM7a535pLM53pKLbtqyixYipo?= =?utf-8?q?QGDKwJdB8IhBSOQlCZQ3ouMAIDZD+iT8dnCybDQ9Y13RqTY0CFTznhBAYK9PBgZVV?= =?utf-8?q?0VQpidQQG271W1YfF2xyYgqDPaJxstFBlYAL0znpeD1Ma4At18HrYniwohCFziWei?= =?utf-8?q?+f0eRj9D0KoxLp/X6grRteNl1s9oXpkZM1kgqIMGtXls86Oz85b4DZggo3qTzl+6h?= =?utf-8?q?zjvgFVX77qdSEAqwENks7CyWzdRpQyPYFpRaS9ILS8awHBOwBWp7Fv9cKuhoJDmGK?= =?utf-8?q?KrZc5R8tYNQ6nd57rKjGMWIM2DByXR3Ca1DlgIsPrrBU1Dnp9ON4EpZfm+XMjJCpN?= =?utf-8?q?DBMCzhVtEXphLK96RtiHYcBGkQu1tGnhe/HKENWupDwMZ67G5EUVLtknfcumxopGL?= =?utf-8?q?BTpMdDKrcMeGN7yXJAtOI8yw3RrSytnwa7+KPb6vedMgbteB2AtyH6jMuflgq6MWm?= =?utf-8?q?7sYVFvWD7p029pMr9zwlCo0jCsDOc1uFMed0yZkuQyo66/LcCsyQqiEuFgRKdiRSu?= =?utf-8?q?pgcSQgeKhXtCtXT9XQQCddU7xoSFvvzbwK5FFvCLPtosmjVdxtLNHgt5lDemX7Q+T?= =?utf-8?q?6nEFZtpUtrd?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1P190MB2041.EURP190.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(8096899003)(38070700018); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?q?gP8kbqlre2VWpCzJMe3/snyweFJu?= =?utf-8?q?rU1Icxl9rbYuMcdDhLuTc1lfJ7cCSK6GUuXkASzF43Z+7rLK8fdJYP5D0DxO3koIF?= =?utf-8?q?bkKf2ZIL3Eis0vOykgkUa4Uh/z05AkI0KEO0PWt4ZtN7g0ZW9/BgzKd6gpSk0DJxz?= =?utf-8?q?kQu4qUsYhvDahs3HlAQgXSsGjGei+c9be1lA+saFrkm5syxAsn6+JBZgFtsR7Euj5?= =?utf-8?q?Ky1wpjCwwa+Rery9DdXg1HRhVddkIqKqc0B68BKpoA/3yTpgBebRMXIcBx6us4Uj8?= =?utf-8?q?YcNxK9xM+kELbX87RiX+V7NmDX7Ly4q3rmhX3fxoQWg5Csk5ZLc8KFAxb9I1M2Zet?= =?utf-8?q?0rHOIlRreNrIq03Kd+7RI3XYIVKpGLThEWNDtWmPJdfZNXFRwnlFQFm/k4wQjNX9A?= =?utf-8?q?DLcNYHQC87EL8YNG27+1+Xj2aEhfuzF7/kz32n/G6S/BgLW+6vyDUxMLSNTfmfv5i?= =?utf-8?q?MwhUMMaUN1XMpkQtXwBdUmddFkMKvHdlrE4NTpONtYKfILKFpFpEhbXNWUPI/jxI8?= =?utf-8?q?ub+y+LjMX/4dEHoYT5xjFI1mDOMgfetZnsmbvoH4SBLqGb43UaYa2nu+cNtRwkXkP?= =?utf-8?q?aAQTr2oFw7AmGt3fYMXkbf1mGex5k/sVJ1XqGdYpbxkcD7VxDK0er56MsW1g1Ked8?= =?utf-8?q?bPHlWOWcwEYwaxJyJzYRGa8tMwSgaINj0/kGzEDHbvHGEZRcT0+LE2vHu3y9f0XZ5?= =?utf-8?q?YPJm5U29cQQN7QX4842N7TeUzBXoFIF/DFbqyIS2WrhH88ywEktGchYMTQWhZtIy6?= =?utf-8?q?C12U6W+H+Q9kss+eR4OL9pqiP2XeVVR3dL7pIbgH9wirl2dvT/SccTHaTDCrIDdas?= =?utf-8?q?C68GYxtI0kjZJtGUxUDH8JxEDYxtxP/kXLtT/gafXNXz2Eut68sDJtKftlW9AEDHt?= =?utf-8?q?aseK6hAjTjG/XAuqNmcdc7IVXZJ1UZhcVWGgVHSP5BMxfrk3wfIc25yTp/dpzqjp5?= =?utf-8?q?6qQO4bFqUv15XPiGz0hRPhGzcyH8AfPp8GTNtwJF6/ViXLUeT53hBZcZamOsClbTr?= =?utf-8?q?FKLtfFg39dC1I3MTCQL88OH9FM1wMFPQ0y7i+0XHujuJjFbdALoEmZVQDHgoYRA9t?= =?utf-8?q?t7gXh/xl7XZpQiWLAjPAlVR7KVI80YFLohhlMguDQ4cHC7rqIocs4iekMOQ6DlOaO?= =?utf-8?q?RVuQ0ZATr3WtW7bUjUFq+3u3XgAw0Fr2WEQAVq81AD8bLFl/po9Ljbp4QMd6jY/E9?= =?utf-8?q?XJYaWaY96T8Oy4Qr9BB0Dv4U+XrjVZgdYVvKa9D7YJVNk1FKLWeHuK9lyJP3oTrRW?= =?utf-8?q?FKFDYRcAhvYM+UgE1gfEOdX5uEB+aqN1NsxDfYWWVeVRxwuXC/ts+8BAo7hBXPjRT?= =?utf-8?q?vl17Crr16KpcVuGJ4lJtCI4lM3yKvH3ZhPi3J+pIelR0/00IahXD6hQ0kyIR68ean?= =?utf-8?q?Z1IA5Dmv3D8kijXDsbVOqgW41NLu3EwVRhe3yrIP2weLnjzushd07vBFxiHxZcvl3?= =?utf-8?q?CynLrPyo7fcSSD5TUz3Htdyb8YjN6+bhzlVeQg+a+S7cLXD59XHU0VuVR1SJqO95u?= =?utf-8?q?ZikkVFaC6SqCPC/UeUeFDdD+QOYa/TtmRw=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: b-ulltech.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: GV1P190MB2041.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 0d899fba-b689-429e-6c02-08dd45326e9e X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2025 15:41:46.2488 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: db7d47da-267a-4c33-9093-c84879076293 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: IkK459cfcSOACv4Y6iO5m0deEXvHzVUk6L7ymwr7yNUQqxQnTDEhy7hEfkvOGu2+Mdsy89fpp7X6Iab0a0eKWDYNd62f5DByyS+X0gH/lcg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXP190MB1872 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 Packet parsing and type detection fail for packets containing Arista Vendor Specific Protocol (AVSP) headers. This patch adds support for three L2 headers: Arista TGen, Arista 64-bit Timestamp and Arista 48-bit Timestamp. Signed-off-by: Denis Davidoglu --- lib/net/rte_ether.h | 31 ++++++++++++++ lib/net/rte_net.c | 99 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 129 insertions(+), 1 deletion(-) -- 2.48.1 diff --git a/lib/net/rte_ether.h b/lib/net/rte_ether.h index c9a0b536c3..054a54af40 100644 --- a/lib/net/rte_ether.h +++ b/lib/net/rte_ether.h @@ -62,6 +62,13 @@ extern "C" {                               ((pri) << RTE_VLAN_PRI_SHIFT) |    \                               ((dei) << RTE_VLAN_DEI_SHIFT)) +/* Arista Vendor Specific Protocol (AVSP) Header Types */ +#define RTE_AVSP_SUBTYPE_TGEN            0xCAFE +#define RTE_AVSP_VERSION_TGEN            0x0001 +#define RTE_AVSP_SUBTYPE_TIMESTAMP 0x0001 +#define RTE_AVSP_VERSION_64_MASK   0x0010 +#define RTE_AVSP_VERSION_48_MASK   0x0020 + /** * Ethernet address: * A universally administered address is uniquely assigned to a device by its @@ -323,7 +330,30 @@ static_assert(sizeof(struct rte_vlan_hdr) == 4, static_assert(alignof(struct rte_vlan_hdr) == 2,            "alignof(struct rte_vlan_hdr) == 2"); +/* Arista Vendor Specific Protocol (AVSP) Headers */ +struct __rte_packed_begin rte_avsp_common_hdr { +     rte_be16_t subtype; +     rte_be16_t version; +} __rte_packed_end; + +struct __rte_packed_begin rte_avsp_tgen_hdr { +     struct rte_avsp_common_hdr common; +     rte_be16_t eth_proto; /**< Ethernet type of encapsulated frame. */ +} __rte_packed_end; + +struct __rte_packed_begin rte_avsp_timestamp_64_hdr { +     struct rte_avsp_common_hdr common; +     rte_be32_t sec; /**< Seconds (IEEE 1588 time of day format). */ +     rte_be32_t ns; /**< Nanoseconds (IEEE 1588 time of day format). */ +     rte_be16_t eth_proto; /**< Ethernet type of encapsulated frame. */ +} __rte_packed_end; +struct __rte_packed_begin rte_avsp_timestamp_48_hdr { +     struct rte_avsp_common_hdr common; +     rte_be16_t sec; /**< Seconds (IEEE 1588 time of day format). */ +     rte_be32_t ns; /**< Nanoseconds (IEEE 1588 time of day format). */ +     rte_be16_t eth_proto; /**< Ethernet type of encapsulated frame. */ +} __rte_packed_end; /* Ethernet frame types */ #define RTE_ETHER_TYPE_IPV4 0x0800 /**< IPv4 Protocol. */ @@ -346,6 +376,7 @@ static_assert(alignof(struct rte_vlan_hdr) == 2, #define RTE_ETHER_TYPE_MPLS 0x8847 /**< MPLS ethertype. */ #define RTE_ETHER_TYPE_MPLSM 0x8848 /**< MPLS multicast ethertype. */ #define RTE_ETHER_TYPE_ECPRI 0xAEFE /**< eCPRI ethertype (.1Q supported). */ +#define RTE_ETHER_TYPE_AVSP 0xD28B /**< Arista ethertype */ /** * Extract VLAN tag information into mbuf diff --git a/lib/net/rte_net.c b/lib/net/rte_net.c index d680accc16..d260cfdf0a 100644 --- a/lib/net/rte_net.c +++ b/lib/net/rte_net.c @@ -269,7 +269,56 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,            off += 2 * sizeof(*vh);            hdr_lens->l2_len += 2 * sizeof(*vh);            proto = vh->eth_proto; -     } else if ((proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_MPLS)) || +     } +     if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_AVSP)) { +           union { +                 const struct rte_avsp_common_hdr *common; +                 const struct rte_avsp_tgen_hdr *tgen; +                 const struct rte_avsp_timestamp_64_hdr *t64; +                 const struct rte_avsp_timestamp_48_hdr *t48; +           } ah; +           union { +                 struct rte_avsp_common_hdr common; +                 struct rte_avsp_tgen_hdr tgen; +                 struct rte_avsp_timestamp_64_hdr t64; +                 struct rte_avsp_timestamp_48_hdr t48; +           } ah_copy; + +           ah.common = rte_pktmbuf_read(m, off, sizeof(*ah.common), +                                                      &ah_copy.common); +           if (unlikely(ah.common == NULL)) +                 return pkt_type; +           uint16_t subtype = rte_be_to_cpu_16(ah.common->subtype); +           uint16_t version = rte_be_to_cpu_16(ah.common->version); + +           if (subtype == RTE_AVSP_SUBTYPE_TGEN && +                       (version == RTE_AVSP_VERSION_TGEN)) { +                 ah.tgen = rte_pktmbuf_read(m, off, sizeof(*ah.tgen), &ah_copy); +                 if (unlikely(ah.tgen == NULL)) +                       return pkt_type; +                 off += sizeof(*ah.tgen); +                 hdr_lens->l2_len += sizeof(*ah.tgen); +                 proto = ah.tgen->eth_proto; +           } else if ((subtype == RTE_AVSP_SUBTYPE_TIMESTAMP && +                             (version & RTE_AVSP_VERSION_64_MASK) != 0)) { +                 ah.t64 = rte_pktmbuf_read(m, off, sizeof(*ah.t64), &ah_copy); +                 if (unlikely(ah.t64 == NULL)) +                       return pkt_type; +                 off += sizeof(*ah.t64); +                 hdr_lens->l2_len += sizeof(*ah.t64); +                 proto = ah.t64->eth_proto; +           } else if ((subtype == RTE_AVSP_SUBTYPE_TIMESTAMP && +                             (version & RTE_AVSP_VERSION_48_MASK) != 0)) { +                 ah.t48 = rte_pktmbuf_read(m, off, sizeof(*ah.t48), &ah_copy); +                 if (unlikely(ah.t48 == NULL)) +                       return pkt_type; +                 off += sizeof(*ah.t48); +                 hdr_lens->l2_len += sizeof(*ah.t48); +                 proto = ah.t48->eth_proto; +           } else +                 return pkt_type; +     } +     if ((proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_MPLS)) ||            (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_MPLSM))) {            unsigned int i;            const struct rte_mpls_hdr *mh; @@ -421,6 +470,54 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,            hdr_lens->inner_l2_len += 2 * sizeof(*vh);            proto = vh->eth_proto;      } +     if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_AVSP)) { +           union { +                 const struct rte_avsp_common_hdr *common; +                 const struct rte_avsp_tgen_hdr *tgen; +                 const struct rte_avsp_timestamp_64_hdr *t64; +                 const struct rte_avsp_timestamp_48_hdr *t48; +           } ah; +           union { +                 struct rte_avsp_common_hdr common; +                 struct rte_avsp_tgen_hdr tgen; +                 struct rte_avsp_timestamp_64_hdr t64; +                 struct rte_avsp_timestamp_48_hdr t48; +           } ah_copy; + +           ah.common = rte_pktmbuf_read(m, off, sizeof(*ah.common), +                                                      &ah_copy.common); +           if (unlikely(ah.common == NULL)) +                 return pkt_type; +           uint16_t subtype = rte_be_to_cpu_16(ah.common->subtype); +           uint16_t version = rte_be_to_cpu_16(ah.common->version); + +           if (subtype == RTE_AVSP_SUBTYPE_TGEN && +                       (version == RTE_AVSP_VERSION_TGEN)) { +                 ah.tgen = rte_pktmbuf_read(m, off, sizeof(*ah.tgen), &ah_copy); +                 if (unlikely(ah.tgen == NULL)) +                       return pkt_type; +                 off += sizeof(*ah.tgen); +                 hdr_lens->inner_l2_len += sizeof(*ah.tgen); +                 proto = ah.tgen->eth_proto; +           } else if ((subtype == RTE_AVSP_SUBTYPE_TIMESTAMP && +                             (version & RTE_AVSP_VERSION_64_MASK) != 0)) { +                 ah.t64 = rte_pktmbuf_read(m, off, sizeof(*ah.t64), &ah_copy); +                 if (unlikely(ah.t64 == NULL)) +                       return pkt_type; +                 off += sizeof(*ah.t64); +                 hdr_lens->inner_l2_len += sizeof(*ah.t64); +                 proto = ah.t64->eth_proto; +           } else if ((subtype == RTE_AVSP_SUBTYPE_TIMESTAMP && +                             (version & RTE_AVSP_VERSION_48_MASK) != 0)) { +                 ah.t48 = rte_pktmbuf_read(m, off, sizeof(*ah.t48), &ah_copy); +                 if (unlikely(ah.t48 == NULL)) +                       return pkt_type; +                 off += sizeof(*ah.t48); +                 hdr_lens->inner_l2_len += sizeof(*ah.t48); +                 proto = ah.t48->eth_proto; +           } else +                 return pkt_type; +     }      if ((layers & RTE_PTYPE_INNER_L3_MASK) == 0)            return pkt_type;