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 5908145843; Fri, 23 Aug 2024 09:34:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B70743291; Fri, 23 Aug 2024 09:33:22 +0200 (CEST) Received: from DB3PR0202CU003.outbound.protection.outlook.com (mail-northeuropeazon11011033.outbound.protection.outlook.com [52.101.65.33]) by mails.dpdk.org (Postfix) with ESMTP id 4B3764300B for ; Fri, 23 Aug 2024 09:33:15 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h9SVURqNXFr7aEp+4yTWQQW1YwsDniSfMFzBPqNkswsdUnif/bfNC8w9U0UcXZTyr7rW7237OJOYvSIKI2SMrD0Ge9Kxy7ZdxYbv8Rm5lLudMF25qvLmUW9J4buvftxpiBFJuU69Nv3saytbM7f9Re7xACGG5NTfNRvSIdp7Sw7LIlB8EbgIEM1B5AqblcXp3MzRrLA2ORd5TE4LmdHGCbEdufZiJZ/kk/phNxfSDu6lSyz+hcyRl0P4oV/DtlO3iTRx4Jam2JuvzriH46Y3qXlbNSGS3qyZgEz9EIlWHBkNBKVZjEO8z/CRvZzJB19mus1kGwL3i4Lpz1vC933NcA== 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=KOSilZWw22yDsuC5+p2OLO7zFOoOe1Fq5RQEctMPcBs=; b=e1ySXnAMidMeu3vIuuxW5Ue2ZnJ9RObiu/ZXiC46ucfZ7xU1nzSUS4OnW6l+vQFir4oJOycUl30SeiApxLCHnCJLvLl7WlRJrLYfg4nOk6jPpdJocjw1d4cBLQdinJULTduxi0D054QKCtwfE32dGYLaiDdvDd7qQaRXjj+cPtCIOdxY6lTA28sxvWJro1UkSvCwnT5SQDuhD58xIMh/Y/tE56hYMH30/g1rGVZ7SG/BW0XDLqEvBW9886+rnY1gZs0PlhlAhR1Z2ossAjqYj9OUjPbwt2EdxRjnJ66cbVhQkWEFWw4AMrKJBg6b1ZaFnO3DTZEPvvnFIYCvYcjccg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KOSilZWw22yDsuC5+p2OLO7zFOoOe1Fq5RQEctMPcBs=; b=EyILChzMqZOc9qMhJma2ng36+2HUOwfP5fp/BGd2ESrAScWy7yOFCzRZUIycnr8aQJeF+sSJqlKjAGta3TBToIwhlsjynzh6mrHxeXh7ujZpZFrww3qpnv+Jaopv0rLU8Ys7sasJ7PhoBIzyKK2wGGH9whDWwt34IurEgJpjwkJUsCUq+euNThbrvkbNQDbMVM8OHwTWZZq1cCq7/E1QBnc0rrsR/VucBc7UkziMEu8ZXpFHwNF1VbtLVN8B8ZizRqyAPT26nu5ayZeYEHFzixX3yB/Ebk+txhWaHkcqBEe0h8j56B19pbDtJ8MKZsnQfXCkJg0Ix1W2bZzG8Ca2Fg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by DU2PR04MB8789.eurprd04.prod.outlook.com (2603:10a6:10:2e0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.18; Fri, 23 Aug 2024 07:33:14 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%3]) with mapi id 15.20.7875.019; Fri, 23 Aug 2024 07:33:14 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Jun Yang Subject: [PATCH v2 11/18] net/dpaa: implement detailed packet parsing Date: Fri, 23 Aug 2024 13:02:33 +0530 Message-Id: <20240823073240.3708320-12-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240823073240.3708320-1-hemant.agrawal@nxp.com> References: <20240801105313.630280-1-hemant.agrawal@nxp.com> <20240823073240.3708320-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0028.apcprd02.prod.outlook.com (2603:1096:3:18::16) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|DU2PR04MB8789:EE_ X-MS-Office365-Filtering-Correlation-Id: 8c46505a-9895-4738-1e3c-08dcc345d8fa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?VNWPJ9DrBlkaDN9Xu/mgvM+s40OJqzRjB6l4KX2BSNRFyUwhxutXCmliB3jb?= =?us-ascii?Q?VnXhqQpZrv2scWQwThYVfiDfvllGGd/X71hZYRfJuLIQO5j0t+HLmVlHwC7s?= =?us-ascii?Q?P45TgfvV2GRfHG28MoF6VXH1qmWdhL8SwnbjvfsWCpQCy1nhTvsToxPZCeIN?= =?us-ascii?Q?UCyVNH2nVkd7W7Lg/2kBbUqVuOD960U3q9p5Mri4NspteGo91eHUrten/ke5?= =?us-ascii?Q?VBv00df9vgHEhDAQXKlULDcVNh42l2edZ+4ZHH7IDo0ypp4xu9JmpL45Dbnj?= =?us-ascii?Q?SRPBMidf9WCpjwXS9plV0TS/v2SZPh4wEE7bdTSp79mNW7WM+Hxun7lnrX3b?= =?us-ascii?Q?4YRREI2G6k6Ty7CIwGTMGF0zOOlyPVBaAYWn70Dzdw6ry9Sr4DvxhwfykeIG?= =?us-ascii?Q?sG52N67EQ7dSAbovfnAB8CWEIWhdPbvEsCD/0TiCSRAEQiRXpOLpaqPDXjqb?= =?us-ascii?Q?zCo/iFsTy8CEKpFe/9XH1zksBbDBqVEAPjFNSWZuJbfYMmqiGturG1ow9Vp7?= =?us-ascii?Q?C5u4UL3Q5YuoOa3SjC79zqP6DM3uYGpbKtnvvhFtulg2CStQ8vAoHjLszuiF?= =?us-ascii?Q?0yl8Oi7NE/0xx9B5Hh2+mD8Eh4HW48guxTyWAezuedWoLJry5lqpNwZEocA2?= =?us-ascii?Q?ZNzOQKJC6FtfCRqReyxz+cy5/Mhd8TqwYlrqOhdS+1CUZ0NHxYbamWoMTETS?= =?us-ascii?Q?aorRY1qrmIw3yrK2HKIK5A6dQ5XRqSzkiNsilKSya50wKly2M/10Y8w64LR0?= =?us-ascii?Q?gYDHuJyNdKAfpxucaJTQQQDbEx3XoGgJsBsmkPnn+jy97Oyl4EYnKrzbmTOd?= =?us-ascii?Q?DrM5nkfNSN5Vg8aCbXXDDZg2M1kiiNTO3jXTrp0pT6uNKk3KYdUGgszoo8vr?= =?us-ascii?Q?anExGwGAb6gYsaU9+OhrQpJAr/2YdIhhk4+vQ/vgAFnqnoBDfhSh8RGHfas2?= =?us-ascii?Q?ZyRrtme/NP+p/YC50Or9jI15fHPs3BUCiwePtHX5XmgXid0fcWH0lgVWuusp?= =?us-ascii?Q?EhkreIZYdC7VV6DEYAAqBO8rOkYPjRbfkg0ED9+C/KK8ryVNVD09obA77bxp?= =?us-ascii?Q?l3stXiAp+YNnp1aHFU415Aj60EvkU/Cd+8JfPPjajIE4PhqpTvotM5+10EMc?= =?us-ascii?Q?vQYitEx8jKT0IUg3Qjk5iM0KLK0vr4cO6qpKjy2WeCwG2HrUn/A/TDii4w0w?= =?us-ascii?Q?44xFVeVUogOv8NlFmi9mZb3FVlgO/4kvuoC+MJpEjaNUwhDN5EANx4hKKhkY?= =?us-ascii?Q?BGLaeIdRKTLDpivIZFFcqUOGkqK8KMaquKXyRDcmseeyaqHDrEDH7zWJrwQr?= =?us-ascii?Q?fcuzWPMpFEZWf2nlWQb17P9uSqFcqQdzo+C4pKCn81aYfmEUsInUJ//nQIVh?= =?us-ascii?Q?wxeH8LhZuef5dZmVy7ROppfx7qwX1XcNKgF6jzrkk/YyWPZEDg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(52116014)(376014)(1800799024)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?pfSxl95ToZwHO9kMvtJo9z5+j1K7QfnFNIPnBWovL6niRBUxcQdoZcMsqJSu?= =?us-ascii?Q?PbmoLLEnX0Dn7jO7Xu68WDYwt3em/wUJrbnhLHzVzNFt++xBDLmcQb+aTZHe?= =?us-ascii?Q?cxb+CHOCbyMWjWeW9T8+oloIBqB6RrM0mivMQ34+yK6Qk/18DzOJMPlxPWO6?= =?us-ascii?Q?Z+UwzaD3fBYegdDVHUVbXR0XQggR+UN8Jflud1qWrEN55uQIYjKp0/dTjahS?= =?us-ascii?Q?RzqZdx4MkQq1CA7/lHown6J9BIv9aaQnoWyCg3rCfPbuHFy2g2Al6Bx8lUPQ?= =?us-ascii?Q?egWtk1gv9BmxfcL/MRU9USREwKs6AL/sBHU4S9TK4nSh8vH5a0KZbjeGmfsk?= =?us-ascii?Q?gWwamZ4sBKyp3RocqGLJw6bK/RB8pMSE4WsqclNiI21BZ+nF03JGG0JCG852?= =?us-ascii?Q?uaWyzRycCJwtLnEU5xHWizspzwTeb/TboMnXuqzJVoeUryIZJttbsxLZaeym?= =?us-ascii?Q?fNLJ11lZctBQEqFH8axTXZmUTG/etGRtn+Y4l9Q+L3xeZy6SuVjr2v6A/+PH?= =?us-ascii?Q?nHNNuWxqinzjJlP418BmDQRafIs3hAEsc065pVR1ODXGVeMEtMhyWb+Dp8o5?= =?us-ascii?Q?UQveu1zvBeOTBdsDFItguxV61THMYZPWx+kov0zJqDBWJrHD3ItXn7llkPko?= =?us-ascii?Q?KYCPG3EY+k/D430pfcRQsKtmvOhdPi7gsezWj+t17dCBACDqRVpEy15HgNjU?= =?us-ascii?Q?bfnLCZEsPlv3eWLh+omuyzYl38zw/O8iV3sQmfbgTMRAbo/QlxsT7WubBdPL?= =?us-ascii?Q?scEinyEl83i8j6yQmj53oF79YZ2aPHxXL3vEulGK27qbMxNRvc4P49Su7zf5?= =?us-ascii?Q?OFEJwRiPAwUpDXaY3jl3PMonJUJMwB7T2fy4Pk7k4FzRNTO9urTYHnUAF0lo?= =?us-ascii?Q?23YYfacEthhUe2abveYbpAetLOS4Ry1h2lgtfXZ6hUDmGM+brx2pv3EnCzir?= =?us-ascii?Q?fx/V7RGgHArBsutnv/bg4Mms1I6GUlGSxYvGdpuan1zdlxxSIqUB3NH6fjV/?= =?us-ascii?Q?9yp/7HzDFTbX0Kmad91WcerNl19d366hTEYErAcaIZL4KV4DIydE766mtLT4?= =?us-ascii?Q?ia/AEhFhfaY19PTR3WLFoFKKpamsCHZiGh5t8AQPH8lCIpUwJ4x7Z+89m3lm?= =?us-ascii?Q?xiTH8eZz0aRe2YXnz/LYIvdj7zIxVwRo92jhfSotw58MrU2lTttlwbly5gw/?= =?us-ascii?Q?4n/mg8APMHevid1mRerEf1+Lm5Op/T0WlTWIPqcocDjlepQ22564//MLBrfo?= =?us-ascii?Q?bB84x721YzyuCTMzQnztK6Vf9vAPVoOfWg2i2jjgnDPVAiwDb9U3/HSLktgY?= =?us-ascii?Q?X+Cs8o76bDQxGlQmot62nWyDVH5fZr2vz6cxQtWP4ItuJbkQ/SghXzztP+5i?= =?us-ascii?Q?ECjhmlqfPlWBljwY1TGjSqvgsjJbtFSfFruPIsUbJOMUycDSHXIIYqwTihNj?= =?us-ascii?Q?DnikaK8opYTII/mqwT3ONR336ZiJVPnVyjs2uJRvjk0sMQaMCBlkYpa2AO3S?= =?us-ascii?Q?BFHM5ero1XmISL5hArSD6sOgB1BvnYx4Ie3ZHPsnHAchZQTMdak6UrocoIVV?= =?us-ascii?Q?gCKf+8lHTh05b/x5O0d3K9E0jEVa7I0sOpEbjubRZ/ArhxRJOF0zN6MofYox?= =?us-ascii?Q?KQ=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c46505a-9895-4738-1e3c-08dcc345d8fa X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2024 07:33:14.1632 (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: 3cwnRA6/uAz7Fk1qhZcmQi/GjOo2Mp/7OyY1ap3cYjAS9KEy2aZMsLxixrcnE6LpZst/c+5FBXClmj6v1wJqEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8789 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 This patch implements the detailed packet parsing using the annotation info from the hardware. decode parser to set RX muf packet type by dpaa_slow_parsing. Support to identify the IPSec ESP, GRE and SCTP packets. Signed-off-by: Jun Yang Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 1 + drivers/net/dpaa/dpaa_rxtx.c | 35 +++++++- drivers/net/dpaa/dpaa_rxtx.h | 143 ++++++++++++++------------------- 3 files changed, 93 insertions(+), 86 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 82d1960356..a302b24be6 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -411,6 +411,7 @@ dpaa_supported_ptypes_get(struct rte_eth_dev *dev, size_t *no_of_elements) RTE_PTYPE_L4_UDP, RTE_PTYPE_L4_SCTP, RTE_PTYPE_TUNNEL_ESP, + RTE_PTYPE_TUNNEL_GRE, }; PMD_INIT_FUNC_TRACE(); diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c index e3b4bb14ab..99fc3f1b43 100644 --- a/drivers/net/dpaa/dpaa_rxtx.c +++ b/drivers/net/dpaa/dpaa_rxtx.c @@ -110,11 +110,38 @@ static void dpaa_display_frame_info(const struct qm_fd *fd, #define dpaa_display_frame_info(a, b, c) #endif -static inline void dpaa_slow_parsing(struct rte_mbuf *m __rte_unused, - uint64_t prs __rte_unused) +static inline void +dpaa_slow_parsing(struct rte_mbuf *m, + const struct annotations_t *annot) { + const struct dpaa_eth_parse_results_t *parse; + DPAA_DP_LOG(DEBUG, "Slow parsing"); - /*TBD:XXX: to be implemented*/ + parse = &annot->parse; + + if (parse->ethernet) + m->packet_type |= RTE_PTYPE_L2_ETHER; + if (parse->vlan) + m->packet_type |= RTE_PTYPE_L2_ETHER_VLAN; + if (parse->first_ipv4) + m->packet_type |= RTE_PTYPE_L3_IPV4; + if (parse->first_ipv6) + m->packet_type |= RTE_PTYPE_L3_IPV6; + if (parse->gre) + m->packet_type |= RTE_PTYPE_TUNNEL_GRE; + if (parse->last_ipv4) + m->packet_type |= RTE_PTYPE_L3_IPV4_EXT; + if (parse->last_ipv6) + m->packet_type |= RTE_PTYPE_L3_IPV6_EXT; + if (parse->l4_type == DPAA_PR_L4_TCP_TYPE) + m->packet_type |= RTE_PTYPE_L4_TCP; + else if (parse->l4_type == DPAA_PR_L4_UDP_TYPE) + m->packet_type |= RTE_PTYPE_L4_UDP; + else if (parse->l4_type == DPAA_PR_L4_IPSEC_TYPE && + !parse->l4_info_err && parse->esp_sum) + m->packet_type |= RTE_PTYPE_TUNNEL_ESP; + else if (parse->l4_type == DPAA_PR_L4_SCTP_TYPE) + m->packet_type |= RTE_PTYPE_L4_SCTP; } static inline void dpaa_eth_packet_info(struct rte_mbuf *m, void *fd_virt_addr) @@ -228,7 +255,7 @@ static inline void dpaa_eth_packet_info(struct rte_mbuf *m, void *fd_virt_addr) break; /* More switch cases can be added */ default: - dpaa_slow_parsing(m, prs); + dpaa_slow_parsing(m, annot); } m->tx_offload = annot->parse.ip_off[0]; diff --git a/drivers/net/dpaa/dpaa_rxtx.h b/drivers/net/dpaa/dpaa_rxtx.h index 1048e86d41..215bdeaf7f 100644 --- a/drivers/net/dpaa/dpaa_rxtx.h +++ b/drivers/net/dpaa/dpaa_rxtx.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * * Copyright 2016 Freescale Semiconductor, Inc. All rights reserved. - * Copyright 2017,2020-2022 NXP + * Copyright 2017,2020-2024 NXP * */ @@ -162,98 +162,77 @@ #define DPAA_PKT_L3_LEN_SHIFT 7 +enum dpaa_parse_result_l4_type { + DPAA_PR_L4_TCP_TYPE = 1, + DPAA_PR_L4_UDP_TYPE = 2, + DPAA_PR_L4_IPSEC_TYPE = 3, + DPAA_PR_L4_SCTP_TYPE = 4, + DPAA_PR_L4_DCCP_TYPE = 5 +}; + /** * FMan parse result array */ struct dpaa_eth_parse_results_t { - uint8_t lpid; /**< Logical port id */ - uint8_t shimr; /**< Shim header result */ - union { - uint16_t l2r; /**< Layer 2 result */ + uint8_t lpid; /**< Logical port id */ + uint8_t shimr; /**< Shim header result */ + union { + uint16_t l2r; /**< Layer 2 result */ struct { -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ - uint16_t ethernet:1; - uint16_t vlan:1; - uint16_t llc_snap:1; - uint16_t mpls:1; - uint16_t ppoe_ppp:1; - uint16_t unused_1:3; - uint16_t unknown_eth_proto:1; - uint16_t eth_frame_type:2; - uint16_t l2r_err:5; + uint16_t unused_1:3; + uint16_t ppoe_ppp:1; + uint16_t mpls:1; + uint16_t llc_snap:1; + uint16_t vlan:1; + uint16_t ethernet:1; + + uint16_t l2r_err:5; + uint16_t eth_frame_type:2; /*00-unicast, 01-multicast, 11-broadcast*/ -#else - uint16_t l2r_err:5; - uint16_t eth_frame_type:2; - uint16_t unknown_eth_proto:1; - uint16_t unused_1:3; - uint16_t ppoe_ppp:1; - uint16_t mpls:1; - uint16_t llc_snap:1; - uint16_t vlan:1; - uint16_t ethernet:1; -#endif + uint16_t unknown_eth_proto:1; } __rte_packed; - } __rte_packed; - union { - uint16_t l3r; /**< Layer 3 result */ + } __rte_packed; + union { + uint16_t l3r; /**< Layer 3 result */ struct { -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ - uint16_t first_ipv4:1; - uint16_t first_ipv6:1; - uint16_t gre:1; - uint16_t min_enc:1; - uint16_t last_ipv4:1; - uint16_t last_ipv6:1; - uint16_t first_info_err:1;/*0 info, 1 error*/ - uint16_t first_ip_err_code:5; - uint16_t last_info_err:1; /*0 info, 1 error*/ - uint16_t last_ip_err_code:3; -#else - uint16_t last_ip_err_code:3; - uint16_t last_info_err:1; /*0 info, 1 error*/ - uint16_t first_ip_err_code:5; - uint16_t first_info_err:1;/*0 info, 1 error*/ - uint16_t last_ipv6:1; - uint16_t last_ipv4:1; - uint16_t min_enc:1; - uint16_t gre:1; - uint16_t first_ipv6:1; - uint16_t first_ipv4:1; -#endif + uint16_t unused_2:1; + uint16_t l3_err:1; + uint16_t last_ipv6:1; + uint16_t last_ipv4:1; + uint16_t min_enc:1; + uint16_t gre:1; + uint16_t first_ipv6:1; + uint16_t first_ipv4:1; + + uint16_t unused_3:8; } __rte_packed; - } __rte_packed; - union { - uint8_t l4r; /**< Layer 4 result */ + } __rte_packed; + union { + uint8_t l4r; /**< Layer 4 result */ struct{ -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ - uint8_t l4_type:3; - uint8_t l4_info_err:1; - uint8_t l4_result:4; - /* if type IPSec: 1 ESP, 2 AH */ -#else - uint8_t l4_result:4; - /* if type IPSec: 1 ESP, 2 AH */ - uint8_t l4_info_err:1; - uint8_t l4_type:3; -#endif + uint8_t l4cv:1; + uint8_t unused_4:1; + uint8_t ah:1; + uint8_t esp_sum:1; + uint8_t l4_info_err:1; + uint8_t l4_type:3; } __rte_packed; - } __rte_packed; - uint8_t cplan; /**< Classification plan id */ - uint16_t nxthdr; /**< Next Header */ - uint16_t cksum; /**< Checksum */ - uint32_t lcv; /**< LCV */ - uint8_t shim_off[3]; /**< Shim offset */ - uint8_t eth_off; /**< ETH offset */ - uint8_t llc_snap_off; /**< LLC_SNAP offset */ - uint8_t vlan_off[2]; /**< VLAN offset */ - uint8_t etype_off; /**< ETYPE offset */ - uint8_t pppoe_off; /**< PPP offset */ - uint8_t mpls_off[2]; /**< MPLS offset */ - uint8_t ip_off[2]; /**< IP offset */ - uint8_t gre_off; /**< GRE offset */ - uint8_t l4_off; /**< Layer 4 offset */ - uint8_t nxthdr_off; /**< Parser end point */ + } __rte_packed; + uint8_t cplan; /**< Classification plan id */ + uint16_t nxthdr; /**< Next Header */ + uint16_t cksum; /**< Checksum */ + uint32_t lcv; /**< LCV */ + uint8_t shim_off[3]; /**< Shim offset */ + uint8_t eth_off; /**< ETH offset */ + uint8_t llc_snap_off; /**< LLC_SNAP offset */ + uint8_t vlan_off[2]; /**< VLAN offset */ + uint8_t etype_off; /**< ETYPE offset */ + uint8_t pppoe_off; /**< PPP offset */ + uint8_t mpls_off[2]; /**< MPLS offset */ + uint8_t ip_off[2]; /**< IP offset */ + uint8_t gre_off; /**< GRE offset */ + uint8_t l4_off; /**< Layer 4 offset */ + uint8_t nxthdr_off; /**< Parser end point */ } __rte_packed; /* The structure is the Prepended Data to the Frame which is used by FMAN */ -- 2.25.1