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 5BA6643B06; Thu, 15 Feb 2024 07:22:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB5A3433BF; Thu, 15 Feb 2024 07:21:49 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E4B894338F for ; Thu, 15 Feb 2024 07:21:37 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 960B820B2003; Wed, 14 Feb 2024 22:21:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 960B820B2003 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1707978096; bh=0CGzCXRxrtaJWvf/hjQxF4L7KkLCQZ5l0DmIUqB9OV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pTYTJcItlLgAZkif+n154ByiM52IzS1d/fdJ3I32LCZqK8Bbne1tWHL5tGTPzklQa cpJ+nAGmvUB5fdQknYbK8tXF2nl4o+bhj2y+KvhzC10ckMsL7cBvcy1oS+OUYKxbOO XgRQX+sfM1qtr46OB3532ZoKSaYqFJvKL9hi0fKw= 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 10/18] net/enic: stop using zero sized marker fields Date: Wed, 14 Feb 2024 22:21:12 -0800 Message-Id: <1707978080-28859-11-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/enic/enic.h | 2 +- drivers/net/enic/enic_main.c | 4 ++-- drivers/net/enic/enic_rxtx_vec_avx2.c | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h index 7877870..f2064ad 100644 --- a/drivers/net/enic/enic.h +++ b/drivers/net/enic/enic.h @@ -92,7 +92,7 @@ struct enic { struct vnic_dev *vdev; /* - * mbuf_initializer contains 64 bits of mbuf rearm_data, used by + * mbuf_initializer contains 64 bits of mbuf mbuf_rearm_data, used by * the avx2 handler at this time. */ uint64_t mbuf_initializer; diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index a6aaa76..923f92f 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -584,7 +584,7 @@ int enic_enable(struct enic *enic) /* * mbuf_initializer contains const-after-init fields of - * receive mbufs (i.e. 64 bits of fields from rearm_data). + * receive mbufs (i.e. 64 bits of fields from mbuf_rearm_data). * It is currently used by the vectorized handler. */ mb_def.nb_segs = 1; @@ -592,7 +592,7 @@ int enic_enable(struct enic *enic) mb_def.port = enic->port_id; rte_mbuf_refcnt_set(&mb_def, 1); rte_compiler_barrier(); - p = (uintptr_t)&mb_def.rearm_data; + p = (uintptr_t)&mb_def.mbuf_rearm_data; enic->mbuf_initializer = *(uint64_t *)p; } diff --git a/drivers/net/enic/enic_rxtx_vec_avx2.c b/drivers/net/enic/enic_rxtx_vec_avx2.c index 600efff..bd495d7 100644 --- a/drivers/net/enic/enic_rxtx_vec_avx2.c +++ b/drivers/net/enic/enic_rxtx_vec_avx2.c @@ -19,7 +19,7 @@ { bool tnl; - *(uint64_t *)&mb->rearm_data = enic->mbuf_initializer; + *(uint64_t *)&mb->mbuf_rearm_data = enic->mbuf_initializer; mb->data_len = cqd->bytes_written_flags & CQ_ENET_RQ_DESC_BYTES_WRITTEN_MASK; mb->pkt_len = mb->data_len; @@ -394,13 +394,13 @@ * type_color - 15 (unused) * * --- mbuf fields --- offset - * rearm_data ---- 16 + * mbuf_rearm_data ---- 16 * data_off - 0 (mbuf_init) -+ * refcnt - 2 (mbuf_init) | * nb_segs - 4 (mbuf_init) | 16B 128b * port - 6 (mbuf_init) | * ol_flag - 8 (from cqd) -+ - * rx_descriptor_fields1 ---- 32 + * mbuf_rx_descriptor_fields1 ---- 32 * packet_type - 0 (from cqd) -+ * pkt_len - 4 (from cqd) | * data_len - 8 (from cqd) | 16B 128b @@ -737,14 +737,14 @@ * vlan_tci - 26 (from cqd) * rss - 28 (from cqd) */ - _mm256_storeu_si256((__m256i *)&rxmb[0]->rearm_data, rearm0); - _mm256_storeu_si256((__m256i *)&rxmb[1]->rearm_data, rearm1); - _mm256_storeu_si256((__m256i *)&rxmb[2]->rearm_data, rearm2); - _mm256_storeu_si256((__m256i *)&rxmb[3]->rearm_data, rearm3); - _mm256_storeu_si256((__m256i *)&rxmb[4]->rearm_data, rearm4); - _mm256_storeu_si256((__m256i *)&rxmb[5]->rearm_data, rearm5); - _mm256_storeu_si256((__m256i *)&rxmb[6]->rearm_data, rearm6); - _mm256_storeu_si256((__m256i *)&rxmb[7]->rearm_data, rearm7); + _mm256_storeu_si256((__m256i *)&rxmb[0]->mbuf_rearm_data, rearm0); + _mm256_storeu_si256((__m256i *)&rxmb[1]->mbuf_rearm_data, rearm1); + _mm256_storeu_si256((__m256i *)&rxmb[2]->mbuf_rearm_data, rearm2); + _mm256_storeu_si256((__m256i *)&rxmb[3]->mbuf_rearm_data, rearm3); + _mm256_storeu_si256((__m256i *)&rxmb[4]->mbuf_rearm_data, rearm4); + _mm256_storeu_si256((__m256i *)&rxmb[5]->mbuf_rearm_data, rearm5); + _mm256_storeu_si256((__m256i *)&rxmb[6]->mbuf_rearm_data, rearm6); + _mm256_storeu_si256((__m256i *)&rxmb[7]->mbuf_rearm_data, rearm7); max_rx -= 8; cqd += 8; -- 1.8.3.1