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 E12C745A67; Mon, 30 Sep 2024 12:31:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 355E440672; Mon, 30 Sep 2024 12:30:30 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2055.outbound.protection.outlook.com [40.107.20.55]) by mails.dpdk.org (Postfix) with ESMTP id 2CFE240653 for ; Mon, 30 Sep 2024 12:30:20 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PEM81iFOHeXQdIx3AqLp6a48DRWbU2wWS9Ll9EsjlkNvLK4s4dNEjI0l/mA2eZn4YjlbxfgjHIcAuYV0Xrk8lzBGMa1ox2DxtoWSDmTREdihGG1QOfh4L7/EN6ymK9zDM7yiW4/GpMS+QRModm0ZRKQ+I0N08I04OpBHPbf36/xvCi67INIIfN94xeic+VxItG8tglkNwVT5KXWdkiRPmFGjOfjg2LHvMP/Z07mukK1lAtfcHTe7V6AyJivU/ADsWJFkaYWZFu+qXpCE48Vpq2uIDAjwF81/3wr8hLJ7SeJ0HZlO6S4740ljMDy9uzbbFnYnFwrAZ8lEg2gb1yFDUg== 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=PdCn4xYtEY6VvQZq2jOCtpkmPm9f8Yt39hbreTAu1cD8bGteqz0fH+gRiz/8QU/GdWHFjl3Y+0KIS6MLQOrPs6C/nymRJtevqtPzCodisz3uo9kWYUWRlZ21n5YANt+M8oHauV1WL8CVlhOyJNZ8VFYysmyxWk3ljocgO5F8OMyKzAYmVEeFye+cjYB3XR9JQYa2zYTcqwN/0SO01Qv64N5fE0Ql5GSZvHI2Yaccw4DPJw1mPr433ZEd1FGteSBD/rjLhEyiIsJyX5m7SYELYYUlK+Q1RKc0x9mBTzQq3SV6TYwyKr6NA7z0rvSkmJLeMfsG3Nc9Q5EQart2Yh0qmA== 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=f6FkvFoNp4RXe4IMz3mHX/IedHA0Z9RokD8U6bh2DAK5EWrvcaj/cG4RuwP3Yg7RZd7EbM8F9CcBUR/4tHQ1iT4ZbHQpoLaZh8MEnu0l2HhldteNCUQ42/LV2rbOnj1tW4zWACfSVE+O2EfFkm3x9Kcbb1/c7+rIIGMC4k+CR4bTXi9NbhIHCPPnPLiM3g3ZbPbYbigUdKjT60RKzjfna2RZh9WgdoljKHEIGX/PJ9mwQwKDFAiPyL74EWo3TwOZvf01pwpp/kl3y6ffuIvXwDNZAppmYwov7QLr9tUiRJX//7Xx/mFXHu4epR+QLs1TmfhPOi3htK3UHjUgPoISWw== 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 VI0PR04MB10161.eurprd04.prod.outlook.com (2603:10a6:800:242::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 10:30:18 +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.8005.026; Mon, 30 Sep 2024 10:30:18 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@amd.com, Jun Yang Subject: [PATCH v3 11/18] net/dpaa: implement detailed packet parsing Date: Mon, 30 Sep 2024 15:59:39 +0530 Message-Id: <20240930102946.3236998-12-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240930102946.3236998-1-hemant.agrawal@nxp.com> References: <20240823073240.3708320-1-hemant.agrawal@nxp.com> <20240930102946.3236998-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0027.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::14) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|VI0PR04MB10161:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a71f94a-66ca-485d-c95d-08dce13ae170 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|376014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?uwvTSNfO3OuCaPsC1yauhwhz/fy+MJ8hw9n/Ea5rL7Aw+as8bfkYTsd7vGDY?= =?us-ascii?Q?tinCQHUW/Wf9sc1Tupc72R2TJx9FJFVRCFqtQAXGxRFeltP9R6LvjdxPJ8Ee?= =?us-ascii?Q?OqUHPNOiPLjZoR+UaXCBlVBCN0R8ZxcdyzaMbwHLFZZfvy2rFkHoieJe729e?= =?us-ascii?Q?8MYO+hko9LMq+CUk7xy78n85YiuHlQMWqopLGDHpQMKTRJAigYahEH4XMjOd?= =?us-ascii?Q?957kh/+ukAON8VVdcRV9QByMuA1XbTkxyTzvi2g7JYJjLn132TLhqdljJxWE?= =?us-ascii?Q?pibjF9xHL/14s3rRBid8KIo2W0XvHbz/RmGRsiokcb9faP3olMyN6lTcLhJh?= =?us-ascii?Q?AS4/02986dws5NVEobbv295JH6hxJ/PrqwT8ZeIwGOE3P1oDFfvI1cIGTXMN?= =?us-ascii?Q?RL/GIGwrDiglz78SQog/3MtfIRKAebixLhNtwjj9+cmBuwxB16dDyE40J86W?= =?us-ascii?Q?kKX26wAR14fBTO54VuqYNrjJvZoQH8bZQPNCsktZ/9vFeEhGQfqXoYZvabJs?= =?us-ascii?Q?daNK3NRmCKfcuRKpmLcQGUU7Vkf1eGrJdUSepc+iYvTOMl0FPhFfe68rScTD?= =?us-ascii?Q?7+4kp0367tR1jfL5HFEKa8dmKtTvksi9ep0Iu9g2X6lhFlTnQ8xeAG1LAHiI?= =?us-ascii?Q?W4duX99XvCfeeUC74++KF6IT/rtYtQhcA3/tjkqidKucj6pZpiq4RbxXIQpJ?= =?us-ascii?Q?jvIp51St2+LEWfF+KnOSTNxuOKMhsFIB4EHlXEprBNF5Y3d5/KOEE39RcMbA?= =?us-ascii?Q?gHfgSV42nyxwq++oACQiIHsno5T8wJIVEWYCNCmwklmeDBai4VlgZTVjUC/G?= =?us-ascii?Q?Dieil7FFfkwE84nr+JMO/CzvuGskSUrxEWJvfcxsJWYRxnm3LcVpATuI+3Qp?= =?us-ascii?Q?3AOqiHANSeiS75nt8GTHmXkkBGX9ZlHdRYPrxIrfSHJzjrGbSwpF6mz9gvK1?= =?us-ascii?Q?gAfICTCBGSkI1+o1s5posPACRE3w6NazhxrzInwKA2ORz8IK0jh76yFh0fKo?= =?us-ascii?Q?XoY7ZVgMytwP0La3G53kmLy0+q+JYIjMnweAvCVXyL5MnyqmF4fhLLw178d+?= =?us-ascii?Q?qUWfH4uXpmUgadTpYUDnooWHcpTQeCG+EuGP2ifgN9ifpogOoOnxigYJePyC?= =?us-ascii?Q?rrp6Wt/O2s7M/fH2dbCOx3tSq3ObMADfKW8Z8f3rSJn4YFIsz5GksY2ua4vA?= =?us-ascii?Q?9ABtqpV9Tgz9yiDQMab5WoeYgPKakTUbDm0oK20PUe/Os4JToHs2t1ED2KxQ?= =?us-ascii?Q?46IalTWrR7/2PmCkSSaTsaY07D04qVOF5AAFPQo0AWpxU/u8IjelX3qDsngG?= =?us-ascii?Q?k3M1/j9qMyUj/5gJMS7jkWDULfXfGvYVb/deUdD8Gb5K/w=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)(366016)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?+otd9aOP/gFVRyhVo8V/UQ5BrohG6ZqYrZIZIKYApccsITjkgqKOkVZgshy/?= =?us-ascii?Q?99LCcAc0lKp48YG0za4ONLZaS74Gk0rpt/eB85BaXnRS2ooiLruhJwvnXnLN?= =?us-ascii?Q?GbhLSdac3Wjn0tERxMOB0YB7syuTuijff9dJj4sF293nGM2WL9cO4QcF07Gy?= =?us-ascii?Q?dceiYgIkmd18KxRSB0DKHyEiw4PaUCTVKVBkOPoOvoSxXE1gLJRDsuvwd4Yw?= =?us-ascii?Q?CgIQeRO7inXuIRFzR+J6+ehLhVKA2ooqmBVn9IF9MjdOStUMXjxRYBgi6rFf?= =?us-ascii?Q?qOPP1FAGvyn+sBt71IOZq55WhBDAM8rOirz+5AfVzfS0Qnu2S5Guf4nF3Aga?= =?us-ascii?Q?r4HX9IplmHkNNHiFs56nMrSFK/OI/l33jdf003Yn70yqYxgoXlw0YqEcY2ec?= =?us-ascii?Q?0cCLIxDXnQPrKGzPpYn5N/I0naeujsdajhxlDEw6rKsiHJIzwpew8qi5jIxc?= =?us-ascii?Q?/CdhD10V44mVKa04srGTuB9clZbbj4DjS4hWvXMmO1aoTgEvlf9+3vsi58nB?= =?us-ascii?Q?FQOJas0ma9d5fSjE0dOEf+j2mJMNJtIi1KFdniMlnERCOGb38XdnVNIwjspW?= =?us-ascii?Q?p+oZQA3L645nKih+mNti25/CLU3gDSLEW8QpM1Y2Qx17GC67jMiKTot+OKF1?= =?us-ascii?Q?vfxZN2WQxbiG3ZMRLb9OdyZjiW87l3fEgRaML42WOOETEzzdqe63hTgtMwT4?= =?us-ascii?Q?vkLENOEWfzIE0xrPP4q54B54lmKbWhIfzJFry3PLH1fcRTL0x6OijaGIzzpP?= =?us-ascii?Q?1jSExfS1NMUdqDwxT3PpXfBbSxM10GXJIGkxmRlJ5FqpR4sQJdN7TAF1WQOp?= =?us-ascii?Q?mFOFLStxiGNHIk4GZlgA6tgyMlwxqnPOeTXi0/sBfNUgvgSsQjglOIRPg2Me?= =?us-ascii?Q?FRc5WdNnUY6GD0cS8O+y/pjuNqrLMf/IsUvM2q25XIqCw4DdLHx86kTd/uyf?= =?us-ascii?Q?/EjXEAwaAeIhYlMtp/6LSdr8nf6zxWZkIrtUDlgwKt/gABVbisUUFgNYbr1Z?= =?us-ascii?Q?DjbXtQlK5tdxux684yN554OuZYHbVaALIEwCcXZn4oWPopA5Ed0jR/8ir8Ib?= =?us-ascii?Q?H4jsXx8NaVRmOsgyH8EZ/GfK2n+c1j/zo0BJ8Wj1e+uQ5/jfiVLavz0Z8lV1?= =?us-ascii?Q?WK//GLc5WwJxjxhTWxnRycWHNua4ld/odn8TDHV25zxFGu+y49IOrqQJFX5q?= =?us-ascii?Q?LGcYzNgRK08RIghXDr7GlXNCWOCSwERTHnEF3jgHZESb288yMcNgZXEPDSGR?= =?us-ascii?Q?Ofc4+81Fmqd9h5i1KoS1u2lEKcVz8J+nlspB9lWQz4SpBqhlUb/Kq0mbzOrs?= =?us-ascii?Q?Ngsh+AZJh3Q4Yl1vfVYb1lSUpd/JF5Dl6PXT4/I43fCP0Av+BIipQ3mP9d0u?= =?us-ascii?Q?rLnH99rZSdaVWW2dpYKT35AgzKelP2SEIUWTU6Gjnz17awrs+VQa2EOdKKDI?= =?us-ascii?Q?nWEOslkI2p0QxCqot8euny2qFMutsAf2SbCaXtTr2Bi6ErQoo1ZdqXSuMFiN?= =?us-ascii?Q?9SpOz6fj6Hzu8noSh6GF9wNKkPhdAfWTeaLaSvaHQu5bLY2x0acIAbIfUXgp?= =?us-ascii?Q?YeagpnVTjIGtyGiZGY1tvI0OrHjrT6AbvgAYw8gTLZjSrn9ZSWUyBLWcJqCc?= =?us-ascii?Q?/w=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a71f94a-66ca-485d-c95d-08dce13ae170 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 10:30:18.8441 (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: RdyBBp8ekp/uCxu3DyIoLk6nlE1Q0keLFP5HEFoF6jiVhYcwHYDkLdKr0Vh8QL9M+eeKxc25e12P40uU5CqZ8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR04MB10161 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