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 6245843B80; Tue, 5 Mar 2024 03:30:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 512AB40C35; Tue, 5 Mar 2024 03:29:50 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2117.outbound.protection.outlook.com [40.107.94.117]) by mails.dpdk.org (Postfix) with ESMTP id 287B1402EC for ; Tue, 5 Mar 2024 03:29:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CdLjU9+nUZguJdbzukeiOHOGs+kaMJQTA2Tp50qHUK8Cc1g3qdm3VnL5Xb6hcToRY+hydU2LaF9wGAlCU5Gf6Eo+CtXmM8B7oz41I/Svwd8wlFTtpk5NurTjSwBXHFyOHNH2TQEtigxzWj7MoTz0a/pgi6xeC+KCGNtbELYFh2ow5RNpdjTtgQZLLJR+Ig1I2Px1O1FRk8igWmttR+tpElJO/iNwoYBflm2ob2Vt3Qw3Nxu+Tw/Afj004BFbyznfO6BMB/3JnfqXc1BAo6zt4JTOT8wEqFkg6P5Fto0tHxLnjqPpJiUVo3ZQwLw4Cz3i0gGTVK20zpa4ks3UTZP+Lg== 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=9DrHVg/opc8LrqKrDIq7kHeq8OpJHWghRCi3NmOkcy4=; b=YucSOnNzQnKwVScPuSz0rC8033U1iLe2wgUTgL/yuBJ4wnyDGMni4fFubNQsFCFK3gda+3Zi2RmSLuw0mxfNIfmKEW6pwVMZ/8OsdxZXQdQFpWdMgyH7HKn1QLB5pG62W6tg+Wuo7dR8qcQlPn7s4d/l0+3+vwBcRcnYNBHe5Ur5EPr1bPLzWklZbAmevkxMD23B3MP3AV737623eE/amiHHlyC4iSub8C+2RjEraWXwpd2J8dcsKSW6j3hsKvSoDiczc9yJMLcux7OSkzHuEP5CkIpsw+ov+OtsaaUr/Ob7M4jv2KaAawH53nGvTc+RBfreBplVLLC7cBjkqqFUCw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9DrHVg/opc8LrqKrDIq7kHeq8OpJHWghRCi3NmOkcy4=; b=UJI85nLq5b4jId4xEFO1Cyfvo72tSZGdugdon/ARWQW1b/D7QgCInBPAw0zA7sw5VyLudKdMKAeXYYDyY3epujr6QaGNTvQpQjfW4KVRcvkXfKu7Othio3YUVA+bbzG6RmgIhkZwAr4rOMLTIaTQ74IZv+/rcQ2Zm16fPNtY3TY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by PH0PR13MB5780.namprd13.prod.outlook.com (2603:10b6:510:11b::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.37; Tue, 5 Mar 2024 02:29:46 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e%5]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 02:29:46 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , Chaoyong He Subject: [PATCH 2/5] net/nfp: uniform variable name format Date: Tue, 5 Mar 2024 10:29:20 +0800 Message-Id: <20240305022923.891544-3-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240305022923.891544-1-chaoyong.he@corigine.com> References: <20240305022923.891544-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BY5PR04CA0028.namprd04.prod.outlook.com (2603:10b6:a03:1d0::38) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|PH0PR13MB5780:EE_ X-MS-Office365-Filtering-Correlation-Id: 10e395ea-c4b8-4343-ab32-08dc3cbc1f6c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A4+awEIneNWB5EFy4fEg8O4l2mugTJq0ldkQL6haNcppRmwEJ2askcblfX7NTUAflOnwAVwrJIKjlHJiLCAnWH4WITKV5u/FGhH4Huyw/3JhjDgZdl+ZpJL4qJxSlXOoKzsoBAbm8XdQh0bLBB1alkKJmcz6hYsbSpKye9UqCSNOYC8++PPBpuGHAOn/+cbK8EV6cweG9N4dNmX506QFKj37x7pblgIbbOt6NmqP/+0LSzAtbLWO2G6dWDrG6zWl1nwEUt3DZinkeLslbL80AcS1nC9yqaT4regrsrgO3S2dwTOBcmuGZyfjGlWV6c59U6Y65ZYoBLJ7+7rp0PsK2j9ZYskJW7REjnQrtMLN8Z29j0H4WDvVKlP73wxAbdtBI3H1AkxiIfwsHeY7L8Z84ClJLR8y1tuc/PzS99n8P+M0swTpVRBnpGzrwaZ84vfFbCnpCanmnwAWvURx2pAumVJI6ro2CA0ix29FjCmhIduN5lTmkbvKAixhWF/5pbo+wT+tmJgAZ9DvGr/Qav+jRovtHxGs2MQ5je4kbq4qsJX/+fDCpsCb0TXNvcp11MxwygjyRiGv59BE5DnFYLt066UNKwjMvidQSvtTE1TJOc8jFWUHy6ZiaJ47d8iWrhvbbXtRdpcCMewTOXaTijoAb865BfSfCaNzyXKVv9nVdklVuo25Ha+9dIsa60h70khI91w62b5ynQbBLER3T38rFVL7/NGqW/SddHK4U5Wr7wA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?n37RL3vkBQGNw4vEnddXzw8KDdqIJ4HalCEA5HrzhduMWufL7k59ktJEi9ng?= =?us-ascii?Q?x3oWMMx23EuQftWHbg5tQBCw5yUURP0+/Ij4Rr+gpCa4W1CmEe48NMh2BOa6?= =?us-ascii?Q?gVT7Q1dx9VIsw6aVYzBd7PaEMH+nHxs+HjCw5h78cRQlRfDH5o0BRtVASnNI?= =?us-ascii?Q?bHATGfY/3Q+oSKmKume6D0JHV4v0C7Q8gX6vEOQmCFmHE62o0ZXxSlLFFXjR?= =?us-ascii?Q?GK1DTBsyzdGn2jAn7CQIQBY9Jc9HZZ+LnWmwl1jnPRBRDG7yQmjOgM7fhxYx?= =?us-ascii?Q?ztrQ346EkTbg++fk0y+qvR3FJrn7INX2C1rCp+zjDokLAE/Sf3nxmmLKIt7s?= =?us-ascii?Q?N/O6Cul519mfafS6jjA3eWKuhoL+24zetUbnE4Ti7XMXHFDugOwTmnG5gN6v?= =?us-ascii?Q?Jdf48T8zDZM8l3YcTzBJGwCkEe46cp14AQb/Tm65Rid6jta1a83rDWKFglf2?= =?us-ascii?Q?5KmMJQdXF7THS8jxC4XFTkeP/hHUEvFBFVbUSAX+O61zs+lSg8vtOYXY66NR?= =?us-ascii?Q?6uOcLxBuHmwQKFhWOv9pRv6Ni3c4QPIDwUsjCIJwwSwEW9zGX+hNWoGq0JSh?= =?us-ascii?Q?DY8WQQpGDrPRT/J+P6gf19EPoIqSlmcPIgoMDoJf7vBozgxm2FlIZtUE4leo?= =?us-ascii?Q?4QFBLVN1J4JnEBwAHR/APImilnLtlJYMvaYBhV898mn9xodBUD4G+RIc/XBW?= =?us-ascii?Q?ieG9VSBmCN05FRbC3eCOVoTQeBrpxls/kgEit4qvfmkgR/u5DEwnpnsbiQMR?= =?us-ascii?Q?KGq2Uhy2cVodaXKvt3SP/G7wKddJ57NXdXW+E5zS+apOd55vRnJX1hN5hO/w?= =?us-ascii?Q?LQWxjsfjXr/AeLO3RQEp9MbrB6QVuYQsbf65hwVF09Mn1JgHu1mpX/VmVC+P?= =?us-ascii?Q?9I6BhbEE1kIw8i1t8J4MergnkWxvrM1NMjxqwBowqcaCg+BvaTqoyYCg/DGt?= =?us-ascii?Q?jcAb/n3cYW0/YK0rvqW6Kz14/gzha+NtaScDeAkSpjcyn7C4gdvk7kv2unsk?= =?us-ascii?Q?EhWM8FiDDPTwArNwokbVNs8rxlGXN6njEPlQGpf3X9Qrjj9h+DDg0sRHQVyk?= =?us-ascii?Q?I94FuJYFkP5gW/IfLTiQHBikiYeXnf5HnjjRjz1LsRFa7o6D9Yj+O12crC+4?= =?us-ascii?Q?c8/l+3zdIiVSxVKK6YgwT22vqVsdvVzVcKdSx6Z9LmpkaipRpqwl9bk4jb+/?= =?us-ascii?Q?h/Y9ax57vrGSpJZEAWFBwuTz5Y3bdh6d//BhvdMpuzWN3+prPGsl/kIvaaWC?= =?us-ascii?Q?o+vZm0tdDQ1hKErMGtfnl9O8Q1h2jIOP6u3sYlA1+OMEgf9BOUtkwuDWyvuF?= =?us-ascii?Q?2TvLQcLjK6BiMa3Yj0tc4b7rElOPqRv1Nx1p9birueHHn7ueObqS8oJ3E0a8?= =?us-ascii?Q?eo1PcGpixukuPjGSPz1lU9AUl8EiuBd3djB5mRO1BpCcv4FJ1/9tjUgYCVKz?= =?us-ascii?Q?HmDdYnfaggsAfutneK3b9KEpDqUe/CowmYiiKomUKJULDcXhbRWsL6/KXngY?= =?us-ascii?Q?3cX9seN34KlE8fd0jv1O9ng+zi5s2l56wXDOMTJY/C8hyr8P46f6vHCd+1Db?= =?us-ascii?Q?nyFmLgodZf1aRXsaSm11mtD0d8ywlLyCpB2Uj7NYADnLN05FmukIV1OvWGny?= =?us-ascii?Q?GQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10e395ea-c4b8-4343-ab32-08dc3cbc1f6c X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 02:29:46.1394 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FJ0LjI90rQjSCNy8E+TMENqLz/6nyuD5WS78bBFWOK0mJ+hdK5r9nrO/cMjgyMT5RsveTOq+Bl6S8O4eDUpMv+qiClQBQsIy3GDZyvhhGBU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR13MB5780 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: Long Wu Uniform variable name format by add the same prefix. Signed-off-by: Long Wu Reviewed-by: Chaoyong He --- drivers/net/nfp/flower/nfp_flower_cmsg.c | 2 +- drivers/net/nfp/flower/nfp_flower_ctrl.c | 2 +- drivers/net/nfp/nfp_net_meta.c | 32 ++++++++++---------- drivers/net/nfp/nfp_net_meta.h | 38 ++++++++++++------------ drivers/net/nfp/nfp_rxtx.c | 2 +- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower_cmsg.c b/drivers/net/nfp/flower/nfp_flower_cmsg.c index f78bfba332..eefeb0d887 100644 --- a/drivers/net/nfp/flower/nfp_flower_cmsg.c +++ b/drivers/net/nfp/flower/nfp_flower_cmsg.c @@ -31,7 +31,7 @@ nfp_flower_cmsg_init(struct nfp_app_fw_flower *app_fw_flower, pkt = rte_pktmbuf_mtod(m, char *); PMD_DRV_LOG(DEBUG, "flower_cmsg_init using pkt at %p", pkt); - new_size += nfp_flower_pkt_add_metadata(app_fw_flower, m, NFP_META_PORT_ID_CTRL); + new_size += nfp_flower_pkt_add_metadata(app_fw_flower, m, NFP_NET_META_PORT_ID_CTRL); /* Now the ctrl header */ hdr = (struct nfp_flower_cmsg_hdr *)pkt; diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c b/drivers/net/nfp/flower/nfp_flower_ctrl.c index 720a0d9495..4c2aeb9849 100644 --- a/drivers/net/nfp/flower/nfp_flower_ctrl.c +++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c @@ -475,7 +475,7 @@ nfp_flower_cmsg_rx(struct nfp_app_fw_flower *app_fw_flower, meta_type = rte_be_to_cpu_32(*(uint32_t *)(meta - 8)); meta_info = rte_be_to_cpu_32(*(uint32_t *)(meta - 4)); if (meta_type != NFP_NET_META_PORTID || - meta_info != NFP_META_PORT_ID_CTRL) { + meta_info != NFP_NET_META_PORT_ID_CTRL) { PMD_DRV_LOG(ERR, "Incorrect metadata for ctrl packet!"); rte_pktmbuf_free(pkts_burst[i]); continue; diff --git a/drivers/net/nfp/nfp_net_meta.c b/drivers/net/nfp/nfp_net_meta.c index 0bc22b2f88..0fd5ba17a0 100644 --- a/drivers/net/nfp/nfp_net_meta.c +++ b/drivers/net/nfp/nfp_net_meta.c @@ -9,17 +9,17 @@ #include "nfp_ipsec.h" #include "nfp_logs.h" -enum nfp_ipsec_meta_layer { - NFP_IPSEC_META_SAIDX, /**< Order of SA index in metadata */ - NFP_IPSEC_META_SEQLOW, /**< Order of Sequence Number (low 32bits) in metadata */ - NFP_IPSEC_META_SEQHI, /**< Order of Sequence Number (high 32bits) in metadata */ +enum nfp_net_meta_ipsec_layer { + NFP_NET_META_IPSEC_SAIDX, /**< Order of SA index in metadata */ + NFP_NET_META_IPSEC_SEQLOW, /**< Order of Sequence Number (low 32bits) in metadata */ + NFP_NET_META_IPSEC_SEQHI, /**< Order of Sequence Number (high 32bits) in metadata */ }; /* Parse the chained metadata from packet */ static bool nfp_net_parse_chained_meta(uint8_t *meta_base, rte_be32_t meta_header, - struct nfp_meta_parsed *meta) + struct nfp_net_meta_parsed *meta) { uint32_t meta_info; uint32_t vlan_info; @@ -75,7 +75,7 @@ nfp_net_parse_chained_meta(uint8_t *meta_base, static inline void nfp_net_parse_single_meta(uint8_t *meta_base, rte_be32_t meta_header, - struct nfp_meta_parsed *meta) + struct nfp_net_meta_parsed *meta) { meta->hash_type = rte_be_to_cpu_32(meta_header); meta->hash = rte_be_to_cpu_32(*(rte_be32_t *)(meta_base + 4)); @@ -83,7 +83,7 @@ nfp_net_parse_single_meta(uint8_t *meta_base, /* Set mbuf hash data based on the metadata info */ static void -nfp_net_parse_meta_hash(const struct nfp_meta_parsed *meta, +nfp_net_parse_meta_hash(const struct nfp_net_meta_parsed *meta, struct nfp_net_rxq *rxq, struct rte_mbuf *mbuf) { @@ -98,7 +98,7 @@ nfp_net_parse_meta_hash(const struct nfp_meta_parsed *meta, /* Set mbuf vlan_strip data based on metadata info */ static void -nfp_net_parse_meta_vlan(const struct nfp_meta_parsed *meta, +nfp_net_parse_meta_vlan(const struct nfp_net_meta_parsed *meta, struct nfp_net_rx_desc *rxd, struct nfp_net_rxq *rxq, struct rte_mbuf *mb) @@ -146,7 +146,7 @@ nfp_net_parse_meta_vlan(const struct nfp_meta_parsed *meta, * qinq not set & vlan not set: meta->vlan_layer=0 */ static void -nfp_net_parse_meta_qinq(const struct nfp_meta_parsed *meta, +nfp_net_parse_meta_qinq(const struct nfp_net_meta_parsed *meta, struct nfp_net_rxq *rxq, struct rte_mbuf *mb) { @@ -156,7 +156,7 @@ nfp_net_parse_meta_qinq(const struct nfp_meta_parsed *meta, (hw->cap & NFP_NET_CFG_CTRL_RXQINQ) == 0) return; - if (meta->vlan_layer < NFP_META_MAX_VLANS) + if (meta->vlan_layer < NFP_NET_META_MAX_VLANS) return; if (meta->vlan[0].offload == 0) @@ -175,7 +175,7 @@ nfp_net_parse_meta_qinq(const struct nfp_meta_parsed *meta, * Extract and decode metadata info and set the mbuf ol_flags. */ static void -nfp_net_parse_meta_ipsec(struct nfp_meta_parsed *meta, +nfp_net_parse_meta_ipsec(struct nfp_net_meta_parsed *meta, struct nfp_net_rxq *rxq, struct rte_mbuf *mbuf) { @@ -202,7 +202,7 @@ nfp_net_parse_meta_ipsec(struct nfp_meta_parsed *meta, } static void -nfp_net_parse_meta_mark(const struct nfp_meta_parsed *meta, +nfp_net_parse_meta_mark(const struct nfp_net_meta_parsed *meta, struct rte_mbuf *mbuf) { if (((meta->flags >> NFP_NET_META_MARK) & 0x1) == 0) @@ -218,7 +218,7 @@ nfp_net_parse_meta(struct nfp_net_rx_desc *rxds, struct nfp_net_rxq *rxq, struct nfp_net_hw *hw, struct rte_mbuf *mb, - struct nfp_meta_parsed *meta) + struct nfp_net_meta_parsed *meta) { uint8_t *meta_base; rte_be32_t meta_header; @@ -305,13 +305,13 @@ nfp_net_set_meta_ipsec(struct nfp_net_meta_raw *meta_data, desc_md = RTE_MBUF_DYNFIELD(pkt, offset, struct nfp_tx_ipsec_desc_msg *); switch (ipsec_layer) { - case NFP_IPSEC_META_SAIDX: + case NFP_NET_META_IPSEC_SAIDX: meta_data->data[layer] = desc_md->sa_idx; break; - case NFP_IPSEC_META_SEQLOW: + case NFP_NET_META_IPSEC_SEQLOW: meta_data->data[layer] = desc_md->esn.low; break; - case NFP_IPSEC_META_SEQHI: + case NFP_NET_META_IPSEC_SEQHI: meta_data->data[layer] = desc_md->esn.hi; break; default: diff --git a/drivers/net/nfp/nfp_net_meta.h b/drivers/net/nfp/nfp_net_meta.h index da2091ce9f..46caa777da 100644 --- a/drivers/net/nfp/nfp_net_meta.h +++ b/drivers/net/nfp/nfp_net_meta.h @@ -9,18 +9,18 @@ #include "nfp_rxtx.h" /* Hash type prepended when a RSS hash was computed */ -#define NFP_NET_RSS_NONE 0 -#define NFP_NET_RSS_IPV4 1 -#define NFP_NET_RSS_IPV6 2 -#define NFP_NET_RSS_IPV6_EX 3 -#define NFP_NET_RSS_IPV4_TCP 4 -#define NFP_NET_RSS_IPV6_TCP 5 -#define NFP_NET_RSS_IPV6_EX_TCP 6 -#define NFP_NET_RSS_IPV4_UDP 7 -#define NFP_NET_RSS_IPV6_UDP 8 -#define NFP_NET_RSS_IPV6_EX_UDP 9 -#define NFP_NET_RSS_IPV4_SCTP 10 -#define NFP_NET_RSS_IPV6_SCTP 11 +#define NFP_NET_META_RSS_NONE 0 +#define NFP_NET_META_RSS_IPV4 1 +#define NFP_NET_META_RSS_IPV6 2 +#define NFP_NET_META_RSS_IPV6_EX 3 +#define NFP_NET_META_RSS_IPV4_TCP 4 +#define NFP_NET_META_RSS_IPV6_TCP 5 +#define NFP_NET_META_RSS_IPV6_EX_TCP 6 +#define NFP_NET_META_RSS_IPV4_UDP 7 +#define NFP_NET_META_RSS_IPV6_UDP 8 +#define NFP_NET_META_RSS_IPV6_EX_UDP 9 +#define NFP_NET_META_RSS_IPV4_SCTP 10 +#define NFP_NET_META_RSS_IPV6_SCTP 11 /* Offset in Freelist buffer where packet starts on RX */ #define NFP_NET_RX_OFFSET 32 @@ -47,15 +47,15 @@ #define NFP_NET_META_PORTID 5 #define NFP_NET_META_IPSEC 9 -#define NFP_META_PORT_ID_CTRL ~0U +#define NFP_NET_META_PORT_ID_CTRL ~0U #define NFP_DESC_META_LEN(d) ((d)->rxd.meta_len_dd & PCIE_DESC_RX_META_LEN_MASK) /* Maximum number of NFP packet metadata fields. */ -#define NFP_META_MAX_FIELDS 8 +#define NFP_NET_META_MAX_FIELDS 8 /* Maximum number of supported VLANs in parsed form packet metadata. */ -#define NFP_META_MAX_VLANS 2 +#define NFP_NET_META_MAX_VLANS 2 enum nfp_net_meta_format { NFP_NET_METAFORMAT_SINGLE, @@ -65,12 +65,12 @@ enum nfp_net_meta_format { /* Describe the raw metadata format. */ struct nfp_net_meta_raw { uint32_t header; /**< Field type header (see format in nfp.rst) */ - uint32_t data[NFP_META_MAX_FIELDS]; /**< Array of each fields data member */ + uint32_t data[NFP_NET_META_MAX_FIELDS]; /**< Array of each fields data member */ uint8_t length; /**< Number of valid fields in @header */ }; /* Record metadata parsed from packet */ -struct nfp_meta_parsed { +struct nfp_net_meta_parsed { uint32_t port_id; /**< Port id value */ uint32_t sa_idx; /**< IPsec SA index */ uint32_t hash; /**< RSS hash value */ @@ -87,7 +87,7 @@ struct nfp_meta_parsed { uint8_t offload; /**< Flag indicates whether VLAN is offloaded */ uint8_t tpid; /**< Vlan TPID */ uint16_t tci; /**< Vlan TCI (PCP + Priority + VID) */ - } vlan[NFP_META_MAX_VLANS]; + } vlan[NFP_NET_META_MAX_VLANS]; }; void nfp_net_init_metadata_format(struct nfp_net_hw *hw); @@ -95,7 +95,7 @@ void nfp_net_parse_meta(struct nfp_net_rx_desc *rxds, struct nfp_net_rxq *rxq, struct nfp_net_hw *hw, struct rte_mbuf *mb, - struct nfp_meta_parsed *meta); + struct nfp_net_meta_parsed *meta); void nfp_net_set_meta_vlan(struct nfp_net_meta_raw *meta_data, struct rte_mbuf *pkt, uint8_t layer); diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c index 0256eba456..e863c42039 100644 --- a/drivers/net/nfp/nfp_rxtx.c +++ b/drivers/net/nfp/nfp_rxtx.c @@ -497,7 +497,7 @@ nfp_net_recv_pkts(void *rx_queue, mb->next = NULL; mb->port = rxq->port_id; - struct nfp_meta_parsed meta = {}; + struct nfp_net_meta_parsed meta = {}; nfp_net_parse_meta(rxds, rxq, hw, mb, &meta); nfp_net_parse_ptype(rxq, rxds, mb); -- 2.39.1