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 7C23C43B06; Thu, 15 Feb 2024 07:22:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 53E11433CA; Thu, 15 Feb 2024 07:21:52 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1FCD643392 for ; Thu, 15 Feb 2024 07:21:38 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 86BB820B2002; Wed, 14 Feb 2024 22:21:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 86BB820B2002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707978096; bh=E73HGeXI2VX57uMeWwU+abIvWzf82jmj5rK3wnT1I7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nOS2LoLPQIjASbxC9nl1ACdmOUCTkQpJx8zR7JeJBOHdikoRoyLMBXlMjxQmR3APx 53rbE1IjZv2Y9XT70sRE9lkmHzkIXjYJ4+2E2OkC8XnEDbC03aHf/sAkhok+OXKmqr icNbfAExsqYpUJ9swT657uHUoDJfEqkSrwOjWxtA= From: Tyler Retzlaff To: dev@dpdk.org Cc: Ajit Khaparde , Andrew Boyer , Andrew Rybchenko , Bruce Richardson , Chenbo Xia , Chengwen Feng , Dariusz Sosnowski , David Christensen , Hyong Youb Kim , Jerin Jacob , Jie Hai , Jingjing Wu , John Daley , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Maciej Czekaj , Matan Azrad , Maxime Coquelin , Nithin Dabilpuram , Ori Kam , Ruifeng Wang , Satha Rao , Somnath Kotur , Suanming Mou , Sunil Kumar Kori , Viacheslav Ovsiienko , Yisen Zhuang , Yuying Zhang , mb@smartsharesystems.com, Tyler Retzlaff Subject: [PATCH v4 09/18] net/bnxt: stop using zero sized marker fields Date: Wed, 14 Feb 2024 22:21:11 -0800 Message-Id: <1707978080-28859-10-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1707978080-28859-1-git-send-email-roretzla@linux.microsoft.com> References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1707978080-28859-1-git-send-email-roretzla@linux.microsoft.com> 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 Update to reference newly named anonymous union markers supported by standard C and stop referencing zero sized compiler extension markers. Signed-off-by: Tyler Retzlaff --- drivers/net/bnxt/bnxt_rxtx_vec_avx2.c | 18 +++++++++--------- drivers/net/bnxt/bnxt_rxtx_vec_common.h | 4 ++-- drivers/net/bnxt/bnxt_rxtx_vec_neon.c | 20 ++++++++++---------- drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 20 ++++++++++---------- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c index ea8dbaf..5f92e0f 100644 --- a/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c +++ b/drivers/net/bnxt/bnxt_rxtx_vec_avx2.c @@ -266,7 +266,7 @@ if (num_valid == 0) break; - /* Update mbuf rearm_data for eight packets. */ + /* Update mbuf mbuf_rearm_data for eight packets. */ mbuf01 = _mm256_shuffle_epi8(rxcmp0_1, shuf_msk); mbuf23 = _mm256_shuffle_epi8(rxcmp2_3, shuf_msk); mbuf45 = _mm256_shuffle_epi8(rxcmp4_5, shuf_msk); @@ -310,13 +310,13 @@ 0x04); /* Store all mbuf fields for first four packets. */ - _mm256_storeu_si256((void *)&rx_pkts[i + 0]->rearm_data, + _mm256_storeu_si256((void *)&rx_pkts[i + 0]->mbuf_rearm_data, rearm0); - _mm256_storeu_si256((void *)&rx_pkts[i + 1]->rearm_data, + _mm256_storeu_si256((void *)&rx_pkts[i + 1]->mbuf_rearm_data, rearm1); - _mm256_storeu_si256((void *)&rx_pkts[i + 2]->rearm_data, + _mm256_storeu_si256((void *)&rx_pkts[i + 2]->mbuf_rearm_data, rearm2); - _mm256_storeu_si256((void *)&rx_pkts[i + 3]->rearm_data, + _mm256_storeu_si256((void *)&rx_pkts[i + 3]->mbuf_rearm_data, rearm3); /* Unpack rearm data, set fixed fields for final four mbufs. */ @@ -336,13 +336,13 @@ 0x04); /* Store all mbuf fields for final four packets. */ - _mm256_storeu_si256((void *)&rx_pkts[i + 4]->rearm_data, + _mm256_storeu_si256((void *)&rx_pkts[i + 4]->mbuf_rearm_data, rearm4); - _mm256_storeu_si256((void *)&rx_pkts[i + 5]->rearm_data, + _mm256_storeu_si256((void *)&rx_pkts[i + 5]->mbuf_rearm_data, rearm5); - _mm256_storeu_si256((void *)&rx_pkts[i + 6]->rearm_data, + _mm256_storeu_si256((void *)&rx_pkts[i + 6]->mbuf_rearm_data, rearm6); - _mm256_storeu_si256((void *)&rx_pkts[i + 7]->rearm_data, + _mm256_storeu_si256((void *)&rx_pkts[i + 7]->mbuf_rearm_data, rearm7); nb_rx_pkts += num_valid; diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_common.h b/drivers/net/bnxt/bnxt_rxtx_vec_common.h index 2294f0a..05a52d2 100644 --- a/drivers/net/bnxt/bnxt_rxtx_vec_common.h +++ b/drivers/net/bnxt/bnxt_rxtx_vec_common.h @@ -44,9 +44,9 @@ mb_def.port = rxq->port_id; rte_mbuf_refcnt_set(&mb_def, 1); - /* prevent compiler reordering: rearm_data covers previous fields */ + /* prevent compiler reordering: mbuf_rearm_data covers previous fields */ rte_compiler_barrier(); - p = (uintptr_t)&mb_def.rearm_data; + p = (uintptr_t)&mb_def.mbuf_rearm_data; rxq->mbuf_initializer = *(uint64_t *)p; rxq->rxrearm_nb = 0; rxq->rxrearm_start = 0; diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c index 775400f..7156f05 100644 --- a/drivers/net/bnxt/bnxt_rxtx_vec_neon.c +++ b/drivers/net/bnxt/bnxt_rxtx_vec_neon.c @@ -133,29 +133,29 @@ errors = vorrq_u32(errors, vshrq_n_u32(is_tunnel, 1)); index = vorrq_u32(index, is_tunnel); - /* Update mbuf rearm_data for four packets. */ + /* Update mbuf mbuf_rearm_data for four packets. */ GET_OL_FLAGS(rss_flags, index, errors, 0, ol_flags); - vst1q_u32((uint32_t *)&mbuf[0]->rearm_data, + vst1q_u32((uint32_t *)&mbuf[0]->mbuf_rearm_data, vsetq_lane_u32(ol_flags, vreinterpretq_u32_u64(mb_init), 2)); GET_OL_FLAGS(rss_flags, index, errors, 1, ol_flags); - vst1q_u32((uint32_t *)&mbuf[1]->rearm_data, + vst1q_u32((uint32_t *)&mbuf[1]->mbuf_rearm_data, vsetq_lane_u32(ol_flags, vreinterpretq_u32_u64(mb_init), 2)); GET_OL_FLAGS(rss_flags, index, errors, 2, ol_flags); - vst1q_u32((uint32_t *)&mbuf[2]->rearm_data, + vst1q_u32((uint32_t *)&mbuf[2]->mbuf_rearm_data, vsetq_lane_u32(ol_flags, vreinterpretq_u32_u64(mb_init), 2)); GET_OL_FLAGS(rss_flags, index, errors, 3, ol_flags); - vst1q_u32((uint32_t *)&mbuf[3]->rearm_data, + vst1q_u32((uint32_t *)&mbuf[3]->mbuf_rearm_data, vsetq_lane_u32(ol_flags, vreinterpretq_u32_u64(mb_init), 2)); - /* Update mbuf rx_descriptor_fields1 for four packets. */ + /* Update mbuf mbuf_rx_descriptor_fields1 for four packets. */ GET_DESC_FIELDS(mm_rxcmp[0], mm_rxcmp1[0], shuf_msk, ptype_idx, 0, tmp); - vst1q_u32((uint32_t *)&mbuf[0]->rx_descriptor_fields1, tmp); + vst1q_u32((uint32_t *)&mbuf[0]->mbuf_rx_descriptor_fields1, tmp); GET_DESC_FIELDS(mm_rxcmp[1], mm_rxcmp1[1], shuf_msk, ptype_idx, 1, tmp); - vst1q_u32((uint32_t *)&mbuf[1]->rx_descriptor_fields1, tmp); + vst1q_u32((uint32_t *)&mbuf[1]->mbuf_rx_descriptor_fields1, tmp); GET_DESC_FIELDS(mm_rxcmp[2], mm_rxcmp1[2], shuf_msk, ptype_idx, 2, tmp); - vst1q_u32((uint32_t *)&mbuf[2]->rx_descriptor_fields1, tmp); + vst1q_u32((uint32_t *)&mbuf[2]->mbuf_rx_descriptor_fields1, tmp); GET_DESC_FIELDS(mm_rxcmp[3], mm_rxcmp1[3], shuf_msk, ptype_idx, 3, tmp); - vst1q_u32((uint32_t *)&mbuf[3]->rx_descriptor_fields1, tmp); + vst1q_u32((uint32_t *)&mbuf[3]->mbuf_rx_descriptor_fields1, tmp); } static uint16_t diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c index 8ef51ce..b4e6fa6 100644 --- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c +++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c @@ -118,35 +118,35 @@ errors = _mm_or_si128(errors, _mm_srli_epi32(is_tunnel, 1)); index = _mm_or_si128(index, is_tunnel); - /* Update mbuf rearm_data for four packets. */ + /* Update mbuf mbuf_rearm_data for four packets. */ GET_OL_FLAGS(rss_flags, index, errors, 0, ol_flags); - _mm_store_si128((void *)&mbuf[0]->rearm_data, + _mm_store_si128((void *)&mbuf[0]->mbuf_rearm_data, _mm_or_si128(mbuf_init, _mm_set_epi64x(ol_flags, 0))); GET_OL_FLAGS(rss_flags, index, errors, 1, ol_flags); - _mm_store_si128((void *)&mbuf[1]->rearm_data, + _mm_store_si128((void *)&mbuf[1]->mbuf_rearm_data, _mm_or_si128(mbuf_init, _mm_set_epi64x(ol_flags, 0))); GET_OL_FLAGS(rss_flags, index, errors, 2, ol_flags); - _mm_store_si128((void *)&mbuf[2]->rearm_data, + _mm_store_si128((void *)&mbuf[2]->mbuf_rearm_data, _mm_or_si128(mbuf_init, _mm_set_epi64x(ol_flags, 0))); GET_OL_FLAGS(rss_flags, index, errors, 3, ol_flags); - _mm_store_si128((void *)&mbuf[3]->rearm_data, + _mm_store_si128((void *)&mbuf[3]->mbuf_rearm_data, _mm_or_si128(mbuf_init, _mm_set_epi64x(ol_flags, 0))); - /* Update mbuf rx_descriptor_fields1 for four packes. */ + /* Update mbuf mbuf_rx_descriptor_fields1 for four packes. */ GET_DESC_FIELDS(mm_rxcmp[0], mm_rxcmp1[0], shuf_msk, ptype_idx, 0, t0); - _mm_store_si128((void *)&mbuf[0]->rx_descriptor_fields1, t0); + _mm_store_si128((void *)&mbuf[0]->mbuf_rx_descriptor_fields1, t0); GET_DESC_FIELDS(mm_rxcmp[1], mm_rxcmp1[1], shuf_msk, ptype_idx, 1, t0); - _mm_store_si128((void *)&mbuf[1]->rx_descriptor_fields1, t0); + _mm_store_si128((void *)&mbuf[1]->mbuf_rx_descriptor_fields1, t0); GET_DESC_FIELDS(mm_rxcmp[2], mm_rxcmp1[2], shuf_msk, ptype_idx, 2, t0); - _mm_store_si128((void *)&mbuf[2]->rx_descriptor_fields1, t0); + _mm_store_si128((void *)&mbuf[2]->mbuf_rx_descriptor_fields1, t0); GET_DESC_FIELDS(mm_rxcmp[3], mm_rxcmp1[3], shuf_msk, ptype_idx, 3, t0); - _mm_store_si128((void *)&mbuf[3]->rx_descriptor_fields1, t0); + _mm_store_si128((void *)&mbuf[3]->mbuf_rx_descriptor_fields1, t0); } static uint16_t -- 1.8.3.1