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 B0C4B41BBE; Fri, 3 Feb 2023 17:49:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1530542D41; Fri, 3 Feb 2023 17:49:31 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2059.outbound.protection.outlook.com [40.107.94.59]) by mails.dpdk.org (Postfix) with ESMTP id D38DA42D32 for ; Fri, 3 Feb 2023 17:49:27 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dOVe15rWflcXpw7KuE5oKFL2P8Z4/XgylKHBHpk2q/BW5Yi2yQcVAbe8Xo1uRR9xlNJFe2mqnkM/pI1RNdnLjehC677GVS79bb2XarWlpQ39lW6iRL/fX4VAMzBnMeRpxbrxW7UBep4FQvtsCV4y+cAqtVZqK+/gg1d/lW0EEklcqcRTR8VR2zIt0eUCuy2eqOpeOGG4yrP7CwBwdipd9Uf/YHKXWS8sfOXrVBSHHNua9c81oshaPgfa/cJiZvLoVcKpaJHj/y20EZh85DSdpLLG8BZOPZKsdE79T0zrEl5t970WtNIVqc9JlHV2Vy+Mvg2KrRMbxRpCkw1/+kaOSQ== 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=nuBSBoPrktedO1YG63JjGHhaqjaHXfQYuMJQQykXDOE=; b=m6APRRUEgCC3yNjD3fiYrsu8w+Sr6b7FiNOHPT3kDhG5tR4VGC8uSgS9e62kpW2bSq2jQOc4bzBiH312NSspjZrfPAto8gXPp+6XA1gUX5J/mMa57R1XhW0uyRt5tJsJRht63wtaSeAI7Hw53ANQtSjrbd3tJFhTVD5s3ZtlESqHlwjnOK9TrMdoa87OvYRUGRfj9NTjxq5Ek1RsKj+DoB1zsEqLVR0vw/xkzngMsFFBGw3Ao1YJgrJIg1PspXWUqmHqjzYJ67+Fu8XbxqTRdV+ukIq7Eorn+qmwrsMnssmQuaq9oIrTmvz54EBpBJ2dMIVZwK1oE4p4xlNS26Oodg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=monjalon.net smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nuBSBoPrktedO1YG63JjGHhaqjaHXfQYuMJQQykXDOE=; b=KgfcstEmvvIQLpVrogQDTH2YM1/Ow29PenWwbr83RhQj9XNYelWYEJGwp7taQmjXO/jIe+8w73T1ur8uFzBdx+73Org+Il895DHfh4++AWveog298iYALpeO2eHzkfeDjBt5Ov+or2W/Ly/NimGROACeHp7FIS9PNC7NvMLsf7g= Received: from DS7PR06CA0054.namprd06.prod.outlook.com (2603:10b6:8:54::34) by SA1PR12MB6750.namprd12.prod.outlook.com (2603:10b6:806:257::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.27; Fri, 3 Feb 2023 16:49:22 +0000 Received: from DS1PEPF0000E65C.namprd02.prod.outlook.com (2603:10b6:8:54:cafe::27) by DS7PR06CA0054.outlook.office365.com (2603:10b6:8:54::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.29 via Frontend Transport; Fri, 3 Feb 2023 16:49:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0000E65C.mail.protection.outlook.com (10.167.18.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6064.21 via Frontend Transport; Fri, 3 Feb 2023 16:49:21 +0000 Received: from telcodpdk.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 3 Feb 2023 10:49:19 -0600 From: Ferruh Yigit To: Thomas Monjalon , Wisam Jaddo , Ori Kam , Aman Singh , Yuying Zhang , Ajit Khaparde , Somnath Kotur , Dongdong Liu , Yisen Zhuang , Beilei Xing , Qiming Yang , Qi Zhang , Rosen Xu , Wenjun Wu , Matan Azrad , Viacheslav Ovsiienko , Andrew Rybchenko CC: David Marchand , Subject: [PATCH v7 3/7] ethdev: use VXLAN protocol struct for flow matching Date: Fri, 3 Feb 2023 16:48:50 +0000 Message-ID: <20230203164854.602595-4-ferruh.yigit@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230203164854.602595-1-ferruh.yigit@amd.com> References: <20221025214410.715864-1-thomas@monjalon.net> <20230203164854.602595-1-ferruh.yigit@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0000E65C:EE_|SA1PR12MB6750:EE_ X-MS-Office365-Filtering-Correlation-Id: 7fbbda73-5050-4bff-0401-08db0606999f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iFa6XpLZbPOoxH0irWH+7s5EyWKtv8NhxmJNjK6SdioFrjlvdixMV6uaRlQroOBq8dKMueiNE8GSYQ7m15c9cMkhkKNHydRjHLj6GsVqEAqsSA/Uyt5mOgRFKqMizKlqggKgPdmV+gkYyYfVegFistKSe4sDNG/mr+xwsvmjTZk/9+GqfjxF6kjiaII29Nn1ogFwGS1xtPriYkrZKvh9UXES35PFkJglprmwszlKS4QAVeyOrq6YYoQ+ynOCS+9POm2PNE/gW8LnmCTejU13hXA+8YjE3dyENZXnlIg6pObez06KvmmtA7RhWw24SnCFsxMuOpwg9Nx/swKQGUV0nu4bXp1iumt52PyLSZ350gukrSvcjqyHugRunTG5PYkBeUyrUYccHjezKIxyvHSud6ToPx8RIEr2dTik17hYWnmT4CAl4ozbrvZt54IZ6U69ZpLXndYD+HR0KiHXRJUBXxcqa8y8mEdNEUi594+7r7vlTO3XmPxRVTDTlx1GCJ97RJSSKAeulfr70wkvB/DGsPMRreT6GG0lfJEi2tbriw8DZnE5x7NcYq833tDaUJS26Mzb+RrtwG5xcMgovty/0VIXqNIBYjTcEQx2rsqG0PC9B6yiiTmGMIUuEBd9kU8F0yRBrISKPvzEbfCAEbfR7LPUHtn+Nrx1YddE66vFSodASYQpACE/i2vaOCgH/gz//3dX/+0LBd0gxX5rfAuySdftvkZh/Fs4l91HG0GarJTzNe06XBNpMlqed1giLAoBPu+XyyGrFWtv8s9DIXycXQ== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(136003)(346002)(376002)(396003)(451199018)(40470700004)(46966006)(36840700001)(356005)(921005)(40480700001)(36756003)(36860700001)(47076005)(82310400005)(81166007)(44832011)(8936002)(40460700003)(82740400003)(426003)(8676002)(30864003)(70206006)(2906002)(4326008)(316002)(41300700001)(5660300002)(70586007)(110136005)(7416002)(86362001)(6666004)(54906003)(7696005)(1076003)(478600001)(26005)(186003)(16526019)(336012)(2616005)(83380400001)(36900700001)(309714004); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2023 16:49:21.9181 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7fbbda73-5050-4bff-0401-08db0606999f X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0000E65C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6750 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 From: Thomas Monjalon As announced in the deprecation notice, flow item structures should re-use the protocol header definitions from the directory lib/net/. In the case of VXLAN-GPE, the protocol struct is added in an unnamed union, keeping old field names. The VXLAN headers (including VXLAN-GPE) are used in apps and drivers instead of the redundant fields in the flow items. Signed-off-by: Thomas Monjalon Acked-by: Ferruh Yigit Acked-by: Ori Kam Acked-by: Andrew Rybchenko --- app/test-flow-perf/actions_gen.c | 2 +- app/test-flow-perf/items_gen.c | 12 +++---- app/test-pmd/cmdline_flow.c | 10 +++--- doc/guides/prog_guide/rte_flow.rst | 11 ++----- doc/guides/rel_notes/deprecation.rst | 1 - drivers/net/bnxt/bnxt_flow.c | 12 ++++--- drivers/net/bnxt/tf_ulp/ulp_rte_parser.c | 42 ++++++++++++------------ drivers/net/hns3/hns3_flow.c | 12 +++---- drivers/net/i40e/i40e_flow.c | 4 +-- drivers/net/ice/ice_switch_filter.c | 18 +++++----- drivers/net/ipn3ke/ipn3ke_flow.c | 4 +-- drivers/net/ixgbe/ixgbe_flow.c | 18 +++++----- drivers/net/mlx5/mlx5_flow.c | 16 ++++----- drivers/net/mlx5/mlx5_flow_dv.c | 40 +++++++++++----------- drivers/net/mlx5/mlx5_flow_verbs.c | 8 ++--- drivers/net/sfc/sfc_flow.c | 6 ++-- drivers/net/sfc/sfc_mae.c | 8 ++--- lib/ethdev/rte_flow.h | 24 ++++++++++---- 18 files changed, 126 insertions(+), 122 deletions(-) diff --git a/app/test-flow-perf/actions_gen.c b/app/test-flow-perf/actions_gen.c index 63f05d87fa86..f1d59313256d 100644 --- a/app/test-flow-perf/actions_gen.c +++ b/app/test-flow-perf/actions_gen.c @@ -874,7 +874,7 @@ add_vxlan_encap(struct rte_flow_action *actions, items[2].type = RTE_FLOW_ITEM_TYPE_UDP; - item_vxlan.vni[2] = 1; + item_vxlan.hdr.vni[2] = 1; items[3].spec = &item_vxlan; items[3].mask = &item_vxlan; items[3].type = RTE_FLOW_ITEM_TYPE_VXLAN; diff --git a/app/test-flow-perf/items_gen.c b/app/test-flow-perf/items_gen.c index b7f51030a119..a58245239ba1 100644 --- a/app/test-flow-perf/items_gen.c +++ b/app/test-flow-perf/items_gen.c @@ -128,12 +128,12 @@ add_vxlan(struct rte_flow_item *items, /* Set standard vxlan vni */ for (i = 0; i < 3; i++) { - vxlan_specs[ti].vni[2 - i] = vni_value >> (i * 8); - vxlan_masks[ti].vni[2 - i] = 0xff; + vxlan_specs[ti].hdr.vni[2 - i] = vni_value >> (i * 8); + vxlan_masks[ti].hdr.vni[2 - i] = 0xff; } /* Standard vxlan flags */ - vxlan_specs[ti].flags = 0x8; + vxlan_specs[ti].hdr.flags = 0x8; items[items_counter].type = RTE_FLOW_ITEM_TYPE_VXLAN; items[items_counter].spec = &vxlan_specs[ti]; @@ -155,12 +155,12 @@ add_vxlan_gpe(struct rte_flow_item *items, /* Set vxlan-gpe vni */ for (i = 0; i < 3; i++) { - vxlan_gpe_specs[ti].vni[2 - i] = vni_value >> (i * 8); - vxlan_gpe_masks[ti].vni[2 - i] = 0xff; + vxlan_gpe_specs[ti].hdr.vni[2 - i] = vni_value >> (i * 8); + vxlan_gpe_masks[ti].hdr.vni[2 - i] = 0xff; } /* vxlan-gpe flags */ - vxlan_gpe_specs[ti].flags = 0x0c; + vxlan_gpe_specs[ti].hdr.flags = 0x0c; items[items_counter].type = RTE_FLOW_ITEM_TYPE_VXLAN_GPE; items[items_counter].spec = &vxlan_gpe_specs[ti]; diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 694a7eb647c5..b904f8c3d45c 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -3984,7 +3984,7 @@ static const struct token token_list[] = { .help = "VXLAN identifier", .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param), - .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)), + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, hdr.vni)), }, [ITEM_VXLAN_LAST_RSVD] = { .name = "last_rsvd", @@ -3992,7 +3992,7 @@ static const struct token token_list[] = { .next = NEXT(item_vxlan, NEXT_ENTRY(COMMON_UNSIGNED), item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, - rsvd1)), + hdr.rsvd1)), }, [ITEM_E_TAG] = { .name = "e_tag", @@ -4210,7 +4210,7 @@ static const struct token token_list[] = { .next = NEXT(item_vxlan_gpe, NEXT_ENTRY(COMMON_UNSIGNED), item_param), .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan_gpe, - vni)), + hdr.vni)), }, [ITEM_ARP_ETH_IPV4] = { .name = "arp_eth_ipv4", @@ -7500,7 +7500,7 @@ parse_setup_vxlan_encap_data(struct action_vxlan_encap_data *action_vxlan_encap_ .src_port = vxlan_encap_conf.udp_src, .dst_port = vxlan_encap_conf.udp_dst, }, - .item_vxlan.flags = 0, + .item_vxlan.hdr.flags = 0, }; memcpy(action_vxlan_encap_data->item_eth.hdr.dst_addr.addr_bytes, vxlan_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN); @@ -7554,7 +7554,7 @@ parse_setup_vxlan_encap_data(struct action_vxlan_encap_data *action_vxlan_encap_ &ipv6_mask_tos; } } - memcpy(action_vxlan_encap_data->item_vxlan.vni, vxlan_encap_conf.vni, + memcpy(action_vxlan_encap_data->item_vxlan.hdr.vni, vxlan_encap_conf.vni, RTE_DIM(vxlan_encap_conf.vni)); return 0; } diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 27c3780c4f17..116722351486 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -935,10 +935,7 @@ Item: ``VXLAN`` Matches a VXLAN header (RFC 7348). -- ``flags``: normally 0x08 (I flag). -- ``rsvd0``: reserved, normally 0x000000. -- ``vni``: VXLAN network identifier. -- ``rsvd1``: reserved, normally 0x00. +- ``hdr``: header definition (``rte_vxlan.h``). - Default ``mask`` matches VNI only. Item: ``E_TAG`` @@ -1104,11 +1101,7 @@ Item: ``VXLAN-GPE`` Matches a VXLAN-GPE header (draft-ietf-nvo3-vxlan-gpe-05). -- ``flags``: normally 0x0C (I and P flags). -- ``rsvd0``: reserved, normally 0x0000. -- ``protocol``: protocol type. -- ``vni``: VXLAN network identifier. -- ``rsvd1``: reserved, normally 0x00. +- ``hdr``: header definition (``rte_vxlan.h``). - Default ``mask`` matches VNI only. Item: ``ARP_ETH_IPV4`` diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 4782d2e680d3..df8b5bcb1b64 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -90,7 +90,6 @@ Deprecation Notices - ``rte_flow_item_pfcp`` - ``rte_flow_item_pppoe`` - ``rte_flow_item_pppoe_proto_id`` - - ``rte_flow_item_vxlan_gpe`` * ethdev: Queue specific stats fields will be removed from ``struct rte_eth_stats``. Mentioned fields are: ``q_ipackets``, ``q_opackets``, ``q_ibytes``, ``q_obytes``, diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 8f660493402c..4a107e81e955 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -563,9 +563,11 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr, break; } - if (vxlan_spec->rsvd1 || vxlan_spec->rsvd0[0] || - vxlan_spec->rsvd0[1] || vxlan_spec->rsvd0[2] || - vxlan_spec->flags != 0x8) { + if ((vxlan_spec->hdr.rsvd0[0] != 0) || + (vxlan_spec->hdr.rsvd0[1] != 0) || + (vxlan_spec->hdr.rsvd0[2] != 0) || + (vxlan_spec->hdr.rsvd1 != 0) || + (vxlan_spec->hdr.flags != 8)) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, @@ -577,7 +579,7 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr, /* Check if VNI is masked. */ if (vxlan_mask != NULL) { vni_masked = - !!memcmp(vxlan_mask->vni, vni_mask, + !!memcmp(vxlan_mask->hdr.vni, vni_mask, RTE_DIM(vni_mask)); if (vni_masked) { rte_flow_error_set @@ -590,7 +592,7 @@ bnxt_validate_and_parse_flow_type(const struct rte_flow_attr *attr, } rte_memcpy(((uint8_t *)&tenant_id_be + 1), - vxlan_spec->vni, 3); + vxlan_spec->hdr.vni, 3); filter->vni = rte_be_to_cpu_32(tenant_id_be); filter->tunnel_type = diff --git a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c index 2928598ced55..80869b79c3fe 100644 --- a/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c +++ b/drivers/net/bnxt/tf_ulp/ulp_rte_parser.c @@ -1414,28 +1414,28 @@ ulp_rte_vxlan_hdr_handler(const struct rte_flow_item *item, * Copy the rte_flow_item for vxlan into hdr_field using vxlan * header fields */ - size = sizeof(((struct rte_flow_item_vxlan *)NULL)->flags); + size = sizeof(((struct rte_flow_item_vxlan *)NULL)->hdr.flags); ulp_rte_prsr_fld_mask(params, &idx, size, - ulp_deference_struct(vxlan_spec, flags), - ulp_deference_struct(vxlan_mask, flags), + ulp_deference_struct(vxlan_spec, hdr.flags), + ulp_deference_struct(vxlan_mask, hdr.flags), ULP_PRSR_ACT_DEFAULT); - size = sizeof(((struct rte_flow_item_vxlan *)NULL)->rsvd0); + size = sizeof(((struct rte_flow_item_vxlan *)NULL)->hdr.rsvd0); ulp_rte_prsr_fld_mask(params, &idx, size, - ulp_deference_struct(vxlan_spec, rsvd0), - ulp_deference_struct(vxlan_mask, rsvd0), + ulp_deference_struct(vxlan_spec, hdr.rsvd0), + ulp_deference_struct(vxlan_mask, hdr.rsvd0), ULP_PRSR_ACT_DEFAULT); - size = sizeof(((struct rte_flow_item_vxlan *)NULL)->vni); + size = sizeof(((struct rte_flow_item_vxlan *)NULL)->hdr.vni); ulp_rte_prsr_fld_mask(params, &idx, size, - ulp_deference_struct(vxlan_spec, vni), - ulp_deference_struct(vxlan_mask, vni), + ulp_deference_struct(vxlan_spec, hdr.vni), + ulp_deference_struct(vxlan_mask, hdr.vni), ULP_PRSR_ACT_DEFAULT); - size = sizeof(((struct rte_flow_item_vxlan *)NULL)->rsvd1); + size = sizeof(((struct rte_flow_item_vxlan *)NULL)->hdr.rsvd1); ulp_rte_prsr_fld_mask(params, &idx, size, - ulp_deference_struct(vxlan_spec, rsvd1), - ulp_deference_struct(vxlan_mask, rsvd1), + ulp_deference_struct(vxlan_spec, hdr.rsvd1), + ulp_deference_struct(vxlan_mask, hdr.rsvd1), ULP_PRSR_ACT_DEFAULT); /* Update the hdr_bitmap with vxlan */ @@ -1827,17 +1827,17 @@ ulp_rte_enc_vxlan_hdr_handler(struct ulp_rte_parser_params *params, uint32_t size; field = ¶ms->enc_field[BNXT_ULP_ENC_FIELD_VXLAN_FLAGS]; - size = sizeof(vxlan_spec->flags); - field = ulp_rte_parser_fld_copy(field, &vxlan_spec->flags, size); + size = sizeof(vxlan_spec->hdr.flags); + field = ulp_rte_parser_fld_copy(field, &vxlan_spec->hdr.flags, size); - size = sizeof(vxlan_spec->rsvd0); - field = ulp_rte_parser_fld_copy(field, &vxlan_spec->rsvd0, size); + size = sizeof(vxlan_spec->hdr.rsvd0); + field = ulp_rte_parser_fld_copy(field, &vxlan_spec->hdr.rsvd0, size); - size = sizeof(vxlan_spec->vni); - field = ulp_rte_parser_fld_copy(field, &vxlan_spec->vni, size); + size = sizeof(vxlan_spec->hdr.vni); + field = ulp_rte_parser_fld_copy(field, &vxlan_spec->hdr.vni, size); - size = sizeof(vxlan_spec->rsvd1); - field = ulp_rte_parser_fld_copy(field, &vxlan_spec->rsvd1, size); + size = sizeof(vxlan_spec->hdr.rsvd1); + field = ulp_rte_parser_fld_copy(field, &vxlan_spec->hdr.rsvd1, size); ULP_BITMAP_SET(params->enc_hdr_bitmap.bits, BNXT_ULP_HDR_BIT_T_VXLAN); } @@ -1989,7 +1989,7 @@ ulp_rte_vxlan_encap_act_handler(const struct rte_flow_action *action_item, vxlan_size = sizeof(struct rte_flow_item_vxlan); /* copy the vxlan details */ memcpy(&vxlan_spec, item->spec, vxlan_size); - vxlan_spec.flags = 0x08; + vxlan_spec.hdr.flags = 0x08; vxlan_size = tfp_cpu_to_be_32(vxlan_size); memcpy(&ap->act_details[BNXT_ULP_ACT_PROP_IDX_ENCAP_TUN_SZ], &vxlan_size, sizeof(uint32_t)); diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index ef1832982dee..e88f9b7e452b 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -933,23 +933,23 @@ hns3_parse_vxlan(const struct rte_flow_item *item, struct hns3_fdir_rule *rule, vxlan_mask = item->mask; vxlan_spec = item->spec; - if (vxlan_mask->flags) + if (vxlan_mask->hdr.flags) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM_MASK, item, "Flags is not supported in VxLAN"); /* VNI must be totally masked or not. */ - if (memcmp(vxlan_mask->vni, full_mask, VNI_OR_TNI_LEN) && - memcmp(vxlan_mask->vni, zero_mask, VNI_OR_TNI_LEN)) + if (memcmp(vxlan_mask->hdr.vni, full_mask, VNI_OR_TNI_LEN) && + memcmp(vxlan_mask->hdr.vni, zero_mask, VNI_OR_TNI_LEN)) return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM_MASK, item, "VNI must be totally masked or not in VxLAN"); - if (vxlan_mask->vni[0]) { + if (vxlan_mask->hdr.vni[0]) { hns3_set_bit(rule->input_set, OUTER_TUN_VNI, 1); - memcpy(rule->key_conf.mask.outer_tun_vni, vxlan_mask->vni, + memcpy(rule->key_conf.mask.outer_tun_vni, vxlan_mask->hdr.vni, VNI_OR_TNI_LEN); } - memcpy(rule->key_conf.spec.outer_tun_vni, vxlan_spec->vni, + memcpy(rule->key_conf.spec.outer_tun_vni, vxlan_spec->hdr.vni, VNI_OR_TNI_LEN); return 0; } diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 0acbd5a061e0..2855b14fe679 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -3009,7 +3009,7 @@ i40e_flow_parse_vxlan_pattern(__rte_unused struct rte_eth_dev *dev, /* Check if VNI is masked. */ if (vxlan_spec && vxlan_mask) { is_vni_masked = - !!memcmp(vxlan_mask->vni, vni_mask, + !!memcmp(vxlan_mask->hdr.vni, vni_mask, RTE_DIM(vni_mask)); if (is_vni_masked) { rte_flow_error_set(error, EINVAL, @@ -3020,7 +3020,7 @@ i40e_flow_parse_vxlan_pattern(__rte_unused struct rte_eth_dev *dev, } rte_memcpy(((uint8_t *)&tenant_id_be + 1), - vxlan_spec->vni, 3); + vxlan_spec->hdr.vni, 3); filter->tenant_id = rte_be_to_cpu_32(tenant_id_be); filter_type |= RTE_ETH_TUNNEL_FILTER_TENID; diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index d84061340e6c..7cb20fa0b4f8 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -990,17 +990,17 @@ ice_switch_parse_pattern(const struct rte_flow_item pattern[], input = &inner_input_set; if (vxlan_spec && vxlan_mask) { list[t].type = ICE_VXLAN; - if (vxlan_mask->vni[0] || - vxlan_mask->vni[1] || - vxlan_mask->vni[2]) { + if (vxlan_mask->hdr.vni[0] || + vxlan_mask->hdr.vni[1] || + vxlan_mask->hdr.vni[2]) { list[t].h_u.tnl_hdr.vni = - (vxlan_spec->vni[2] << 16) | - (vxlan_spec->vni[1] << 8) | - vxlan_spec->vni[0]; + (vxlan_spec->hdr.vni[2] << 16) | + (vxlan_spec->hdr.vni[1] << 8) | + vxlan_spec->hdr.vni[0]; list[t].m_u.tnl_hdr.vni = - (vxlan_mask->vni[2] << 16) | - (vxlan_mask->vni[1] << 8) | - vxlan_mask->vni[0]; + (vxlan_mask->hdr.vni[2] << 16) | + (vxlan_mask->hdr.vni[1] << 8) | + vxlan_mask->hdr.vni[0]; *input |= ICE_INSET_VXLAN_VNI; input_set_byte += 2; } diff --git a/drivers/net/ipn3ke/ipn3ke_flow.c b/drivers/net/ipn3ke/ipn3ke_flow.c index ee56d0f43d93..d20a29b9a2d6 100644 --- a/drivers/net/ipn3ke/ipn3ke_flow.c +++ b/drivers/net/ipn3ke/ipn3ke_flow.c @@ -108,7 +108,7 @@ ipn3ke_pattern_vxlan(const struct rte_flow_item patterns[], case RTE_FLOW_ITEM_TYPE_VXLAN: vxlan = item->spec; - rte_memcpy(&parser->key[6], vxlan->vni, 3); + rte_memcpy(&parser->key[6], vxlan->hdr.vni, 3); break; default: @@ -576,7 +576,7 @@ ipn3ke_pattern_vxlan_ip_udp(const struct rte_flow_item patterns[], case RTE_FLOW_ITEM_TYPE_VXLAN: vxlan = item->spec; - rte_memcpy(&parser->key[0], vxlan->vni, 3); + rte_memcpy(&parser->key[0], vxlan->hdr.vni, 3); break; case RTE_FLOW_ITEM_TYPE_IPV4: diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c index a11da3dc8beb..fe710b79008d 100644 --- a/drivers/net/ixgbe/ixgbe_flow.c +++ b/drivers/net/ixgbe/ixgbe_flow.c @@ -2481,7 +2481,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, rule->mask.tunnel_type_mask = 1; vxlan_mask = item->mask; - if (vxlan_mask->flags) { + if (vxlan_mask->hdr.flags) { memset(rule, 0, sizeof(struct ixgbe_fdir_rule)); rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, @@ -2489,11 +2489,11 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, return -rte_errno; } /* VNI must be totally masked or not. */ - if ((vxlan_mask->vni[0] || vxlan_mask->vni[1] || - vxlan_mask->vni[2]) && - ((vxlan_mask->vni[0] != 0xFF) || - (vxlan_mask->vni[1] != 0xFF) || - (vxlan_mask->vni[2] != 0xFF))) { + if ((vxlan_mask->hdr.vni[0] || vxlan_mask->hdr.vni[1] || + vxlan_mask->hdr.vni[2]) && + ((vxlan_mask->hdr.vni[0] != 0xFF) || + (vxlan_mask->hdr.vni[1] != 0xFF) || + (vxlan_mask->hdr.vni[2] != 0xFF))) { memset(rule, 0, sizeof(struct ixgbe_fdir_rule)); rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, @@ -2501,15 +2501,15 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr, return -rte_errno; } - rte_memcpy(&rule->mask.tunnel_id_mask, vxlan_mask->vni, - RTE_DIM(vxlan_mask->vni)); + rte_memcpy(&rule->mask.tunnel_id_mask, vxlan_mask->hdr.vni, + RTE_DIM(vxlan_mask->hdr.vni)); if (item->spec) { rule->b_spec = TRUE; vxlan_spec = item->spec; rte_memcpy(((uint8_t *) &rule->ixgbe_fdir.formatted.tni_vni), - vxlan_spec->vni, RTE_DIM(vxlan_spec->vni)); + vxlan_spec->hdr.vni, RTE_DIM(vxlan_spec->hdr.vni)); } } diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 2512d6b52db9..ff08a629e2c6 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -333,7 +333,7 @@ mlx5_flow_expand_rss_item_complete(const struct rte_flow_item *item) ret = mlx5_ethertype_to_item_type(spec, mask, true); break; case RTE_FLOW_ITEM_TYPE_VXLAN_GPE: - MLX5_XSET_ITEM_MASK_SPEC(vxlan_gpe, protocol); + MLX5_XSET_ITEM_MASK_SPEC(vxlan_gpe, hdr.proto); ret = mlx5_nsh_proto_to_item_type(spec, mask); break; default: @@ -2919,8 +2919,8 @@ mlx5_flow_validate_item_vxlan(struct rte_eth_dev *dev, uint8_t vni[4]; } id = { .vlan_id = 0, }; const struct rte_flow_item_vxlan nic_mask = { - .vni = "\xff\xff\xff", - .rsvd1 = 0xff, + .hdr.vni = "\xff\xff\xff", + .hdr.rsvd1 = 0xff, }; const struct rte_flow_item_vxlan *valid_mask; @@ -2959,8 +2959,8 @@ mlx5_flow_validate_item_vxlan(struct rte_eth_dev *dev, if (ret < 0) return ret; if (spec) { - memcpy(&id.vni[1], spec->vni, 3); - memcpy(&id.vni[1], mask->vni, 3); + memcpy(&id.vni[1], spec->hdr.vni, 3); + memcpy(&id.vni[1], mask->hdr.vni, 3); } if (!(item_flags & MLX5_FLOW_LAYER_OUTER)) return rte_flow_error_set(error, ENOTSUP, @@ -3030,14 +3030,14 @@ mlx5_flow_validate_item_vxlan_gpe(const struct rte_flow_item *item, if (ret < 0) return ret; if (spec) { - if (spec->protocol) + if (spec->hdr.proto) return rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM, item, "VxLAN-GPE protocol" " not supported"); - memcpy(&id.vni[1], spec->vni, 3); - memcpy(&id.vni[1], mask->vni, 3); + memcpy(&id.vni[1], spec->hdr.vni, 3); + memcpy(&id.vni[1], mask->hdr.vni, 3); } if (!(item_flags & MLX5_FLOW_LAYER_OUTER)) return rte_flow_error_set(error, ENOTSUP, diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index ff915183b7cc..261c60a5c33a 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -9235,8 +9235,8 @@ flow_dv_translate_item_vxlan(struct rte_eth_dev *dev, int i; struct mlx5_priv *priv = dev->data->dev_private; const struct rte_flow_item_vxlan nic_mask = { - .vni = "\xff\xff\xff", - .rsvd1 = 0xff, + .hdr.vni = "\xff\xff\xff", + .hdr.rsvd1 = 0xff, }; misc5_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters_5); @@ -9274,29 +9274,29 @@ flow_dv_translate_item_vxlan(struct rte_eth_dev *dev, ((attr->group || (attr->transfer && priv->fdb_def_rule)) && !priv->sh->misc5_cap)) { misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters); - size = sizeof(vxlan_m->vni); + size = sizeof(vxlan_m->hdr.vni); vni_v = MLX5_ADDR_OF(fte_match_set_misc, misc_v, vxlan_vni); for (i = 0; i < size; ++i) - vni_v[i] = vxlan_m->vni[i] & vxlan_v->vni[i]; + vni_v[i] = vxlan_m->hdr.vni[i] & vxlan_v->hdr.vni[i]; return; } tunnel_header_v = (uint32_t *)MLX5_ADDR_OF(fte_match_set_misc5, misc5_v, tunnel_header_1); - tunnel_v = (vxlan_v->vni[0] & vxlan_m->vni[0]) | - (vxlan_v->vni[1] & vxlan_m->vni[1]) << 8 | - (vxlan_v->vni[2] & vxlan_m->vni[2]) << 16; + tunnel_v = (vxlan_v->hdr.vni[0] & vxlan_m->hdr.vni[0]) | + (vxlan_v->hdr.vni[1] & vxlan_m->hdr.vni[1]) << 8 | + (vxlan_v->hdr.vni[2] & vxlan_m->hdr.vni[2]) << 16; *tunnel_header_v = tunnel_v; if (key_type == MLX5_SET_MATCHER_SW_M) { - tunnel_v = (vxlan_vv->vni[0] & vxlan_m->vni[0]) | - (vxlan_vv->vni[1] & vxlan_m->vni[1]) << 8 | - (vxlan_vv->vni[2] & vxlan_m->vni[2]) << 16; + tunnel_v = (vxlan_vv->hdr.vni[0] & vxlan_m->hdr.vni[0]) | + (vxlan_vv->hdr.vni[1] & vxlan_m->hdr.vni[1]) << 8 | + (vxlan_vv->hdr.vni[2] & vxlan_m->hdr.vni[2]) << 16; if (!tunnel_v) *tunnel_header_v = 0x0; - if (vxlan_vv->rsvd1 & vxlan_m->rsvd1) - *tunnel_header_v |= vxlan_v->rsvd1 << 24; + if (vxlan_vv->hdr.rsvd1 & vxlan_m->hdr.rsvd1) + *tunnel_header_v |= vxlan_v->hdr.rsvd1 << 24; } else { - *tunnel_header_v |= (vxlan_v->rsvd1 & vxlan_m->rsvd1) << 24; + *tunnel_header_v |= (vxlan_v->hdr.rsvd1 & vxlan_m->hdr.rsvd1) << 24; } } @@ -9327,7 +9327,7 @@ flow_dv_translate_item_vxlan_gpe(void *key, const struct rte_flow_item *item, MLX5_ADDR_OF(fte_match_param, key, misc_parameters_3); char *vni_v = MLX5_ADDR_OF(fte_match_set_misc3, misc_v, outer_vxlan_gpe_vni); - int i, size = sizeof(vxlan_m->vni); + int i, size = sizeof(vxlan_m->hdr.vni); uint8_t flags_m = 0xff; uint8_t flags_v = 0xc; uint8_t m_protocol, v_protocol; @@ -9352,15 +9352,15 @@ flow_dv_translate_item_vxlan_gpe(void *key, const struct rte_flow_item *item, else if (key_type == MLX5_SET_MATCHER_HS_V) vxlan_m = vxlan_v; for (i = 0; i < size; ++i) - vni_v[i] = vxlan_m->vni[i] & vxlan_v->vni[i]; - if (vxlan_m->flags) { - flags_m = vxlan_m->flags; - flags_v = vxlan_v->flags; + vni_v[i] = vxlan_m->hdr.vni[i] & vxlan_v->hdr.vni[i]; + if (vxlan_m->hdr.flags) { + flags_m = vxlan_m->hdr.flags; + flags_v = vxlan_v->hdr.flags; } MLX5_SET(fte_match_set_misc3, misc_v, outer_vxlan_gpe_flags, flags_m & flags_v); - m_protocol = vxlan_m->protocol; - v_protocol = vxlan_v->protocol; + m_protocol = vxlan_m->hdr.protocol; + v_protocol = vxlan_v->hdr.protocol; if (!m_protocol) { /* Force next protocol to ensure next headers parsing. */ if (pattern_flags & MLX5_FLOW_LAYER_INNER_L2) diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c index 1902b97ec6d4..4ef4f3044515 100644 --- a/drivers/net/mlx5/mlx5_flow_verbs.c +++ b/drivers/net/mlx5/mlx5_flow_verbs.c @@ -765,9 +765,9 @@ flow_verbs_translate_item_vxlan(struct mlx5_flow *dev_flow, if (!mask) mask = &rte_flow_item_vxlan_mask; if (spec) { - memcpy(&id.vni[1], spec->vni, 3); + memcpy(&id.vni[1], spec->hdr.vni, 3); vxlan.val.tunnel_id = id.vlan_id; - memcpy(&id.vni[1], mask->vni, 3); + memcpy(&id.vni[1], mask->hdr.vni, 3); vxlan.mask.tunnel_id = id.vlan_id; /* Remove unwanted bits from values. */ vxlan.val.tunnel_id &= vxlan.mask.tunnel_id; @@ -807,9 +807,9 @@ flow_verbs_translate_item_vxlan_gpe(struct mlx5_flow *dev_flow, if (!mask) mask = &rte_flow_item_vxlan_gpe_mask; if (spec) { - memcpy(&id.vni[1], spec->vni, 3); + memcpy(&id.vni[1], spec->hdr.vni, 3); vxlan_gpe.val.tunnel_id = id.vlan_id; - memcpy(&id.vni[1], mask->vni, 3); + memcpy(&id.vni[1], mask->hdr.vni, 3); vxlan_gpe.mask.tunnel_id = id.vlan_id; /* Remove unwanted bits from values. */ vxlan_gpe.val.tunnel_id &= vxlan_gpe.mask.tunnel_id; diff --git a/drivers/net/sfc/sfc_flow.c b/drivers/net/sfc/sfc_flow.c index f098edc6eb33..fe1f5ba55f86 100644 --- a/drivers/net/sfc/sfc_flow.c +++ b/drivers/net/sfc/sfc_flow.c @@ -921,7 +921,7 @@ sfc_flow_parse_vxlan(const struct rte_flow_item *item, const struct rte_flow_item_vxlan *spec = NULL; const struct rte_flow_item_vxlan *mask = NULL; const struct rte_flow_item_vxlan supp_mask = { - .vni = { 0xff, 0xff, 0xff } + .hdr.vni = { 0xff, 0xff, 0xff } }; rc = sfc_flow_parse_init(item, @@ -945,8 +945,8 @@ sfc_flow_parse_vxlan(const struct rte_flow_item *item, if (spec == NULL) return 0; - rc = sfc_flow_set_efx_spec_vni_or_vsid(efx_spec, spec->vni, - mask->vni, item, error); + rc = sfc_flow_set_efx_spec_vni_or_vsid(efx_spec, spec->hdr.vni, + mask->hdr.vni, item, error); return rc; } diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index 710d04be13af..aab697b204c2 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -2223,8 +2223,8 @@ static const struct sfc_mae_field_locator flocs_tunnel[] = { * The size and offset values are relevant * for Geneve and NVGRE, too. */ - .size = RTE_SIZEOF_FIELD(struct rte_flow_item_vxlan, vni), - .ofst = offsetof(struct rte_flow_item_vxlan, vni), + .size = RTE_SIZEOF_FIELD(struct rte_flow_item_vxlan, hdr.vni), + .ofst = offsetof(struct rte_flow_item_vxlan, hdr.vni), }, }; @@ -2359,10 +2359,10 @@ sfc_mae_rule_parse_item_tunnel(const struct rte_flow_item *item, * The extra byte is 0 both in the mask and in the value. */ vxp = (const struct rte_flow_item_vxlan *)spec; - memcpy(vnet_id_v + 1, &vxp->vni, sizeof(vxp->vni)); + memcpy(vnet_id_v + 1, &vxp->hdr.vni, sizeof(vxp->hdr.vni)); vxp = (const struct rte_flow_item_vxlan *)mask; - memcpy(vnet_id_m + 1, &vxp->vni, sizeof(vxp->vni)); + memcpy(vnet_id_m + 1, &vxp->hdr.vni, sizeof(vxp->hdr.vni)); rc = efx_mae_match_spec_field_set(ctx_mae->match_spec, EFX_MAE_FIELD_ENC_VNET_ID_BE, diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index b60987db4b4f..e2364823d622 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -988,7 +988,7 @@ struct rte_flow_item_vxlan { /** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN. */ #ifndef __cplusplus static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask = { - .hdr.vx_vni = RTE_BE32(0xffffff00), /* (0xffffff << 8) */ + .hdr.vni = "\xff\xff\xff", }; #endif @@ -1205,18 +1205,28 @@ static const struct rte_flow_item_geneve rte_flow_item_geneve_mask = { * * Matches a VXLAN-GPE header. */ +RTE_STD_C11 struct rte_flow_item_vxlan_gpe { - uint8_t flags; /**< Normally 0x0c (I and P flags). */ - uint8_t rsvd0[2]; /**< Reserved, normally 0x0000. */ - uint8_t protocol; /**< Protocol type. */ - uint8_t vni[3]; /**< VXLAN identifier. */ - uint8_t rsvd1; /**< Reserved, normally 0x00. */ + union { + struct { + /* + * These are old fields kept for compatibility. + * Please prefer hdr field below. + */ + uint8_t flags; /**< Normally 0x0c (I and P flags). */ + uint8_t rsvd0[2]; /**< Reserved, normally 0x0000. */ + uint8_t protocol; /**< Protocol type. */ + uint8_t vni[3]; /**< VXLAN identifier. */ + uint8_t rsvd1; /**< Reserved, normally 0x00. */ + }; + struct rte_vxlan_gpe_hdr hdr; + }; }; /** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN_GPE. */ #ifndef __cplusplus static const struct rte_flow_item_vxlan_gpe rte_flow_item_vxlan_gpe_mask = { - .vni = "\xff\xff\xff", + .hdr.vni = "\xff\xff\xff", }; #endif -- 2.34.1