From patchwork Wed Mar 20 22:01:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138649 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 023AF43D0A; Wed, 20 Mar 2024 23:01:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D4F842E4D; Wed, 20 Mar 2024 23:01:42 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 25FAF42DCA for ; Wed, 20 Mar 2024 23:01:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2366920B74C1; Wed, 20 Mar 2024 15:01:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2366920B74C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710972099; bh=VB20aPQVNOooxgPLR4CSGIgBDRYizT7NUr6cbYNK/eo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sZDD8vO3VNBLMSroMK6oS249J6cIrLtyPiCzQbFnxATyBOTPtCr697+/1bX9+0hI7 ka3Bq2EZ+DQQnmUfRJgfY7MbDF4bVzOlXNusri8AM3q53wagZqo0SRztuf3MN8DeJ7 VMLR/f0WBMLCZCLiXQwBcvtWoXW7i+kSaD/5D260= 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 v7 1/4] net/i40e: use inline prefetch function Date: Wed, 20 Mar 2024 15:01:35 -0700 Message-Id: <1710972098-2209-2-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710972098-2209-1-git-send-email-roretzla@linux.microsoft.com> References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1710972098-2209-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 Don't directly access the cacheline1 field in rte_mbuf struct for prefetch instead just use rte_mbuf_prefetch_part2() to prefetch. Signed-off-by: Tyler Retzlaff Reviewed-by: Morten Brørup --- drivers/net/i40e/i40e_rxtx_vec_avx512.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c index f3050cd..0238b03 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c @@ -826,7 +826,7 @@ free[0] = m; nb_free = 1; for (i = 1; i < n; i++) { - rte_prefetch0(&txep[i + 3].mbuf->cacheline1); + rte_mbuf_prefetch_part2(txep[i + 3].mbuf); m = rte_pktmbuf_prefree_seg(txep[i].mbuf); if (likely(m)) { if (likely(m->pool == free[0]->pool)) { From patchwork Wed Mar 20 22:01:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138650 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CEAFA43D0A; Wed, 20 Mar 2024 23:01:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D639C42E5B; Wed, 20 Mar 2024 23:01:43 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 398D342E0D for ; Wed, 20 Mar 2024 23:01:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 3164220B74C2; Wed, 20 Mar 2024 15:01:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3164220B74C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710972099; bh=OwutpoO7x1Ecuc6t7gje0mESlPxQXWC8ikjz/UEXY9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=otrelw7NQcLZCQW42lkew0yzq9w53rAoC+SxZ5AOxd+NPiTrOUdYNleGutTZ/iJJJ QTXETGE6fHt7Zfog+qghdxfHCWLWKQnZr5NQ876d0D0k4wLlIrNiPhhxiz6JDb4SHr qGYrEAsnIpAvBhCINldz8I038Mddl7lX1Qd5gOoY= 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 v7 2/4] mbuf: remove rte marker fields Date: Wed, 20 Mar 2024 15:01:36 -0700 Message-Id: <1710972098-2209-3-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710972098-2209-1-git-send-email-roretzla@linux.microsoft.com> References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1710972098-2209-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 RTE_MARKER typedefs are a GCC extension unsupported by MSVC. Remove RTE_MARKER fields from rte_mbuf struct. Maintain alignment of fields after removed cacheline1 marker by placing C11 alignas(RTE_CACHE_LINE_MIN_SIZE). Provide new rearm_data and rx_descriptor_fields1 fields in anonymous unions as single element arrays of with types matching the original markers to maintain API compatibility. Signed-off-by: Tyler Retzlaff --- doc/guides/rel_notes/release_24_03.rst | 2 + lib/mbuf/rte_mbuf.h | 4 +- lib/mbuf/rte_mbuf_core.h | 188 ++++++++++++++++++--------------- 3 files changed, 104 insertions(+), 90 deletions(-) diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst index 14826ea..4f18cca 100644 --- a/doc/guides/rel_notes/release_24_03.rst +++ b/doc/guides/rel_notes/release_24_03.rst @@ -216,6 +216,8 @@ Removed Items * acc101: Removed obsolete code for non productized HW variant. +* mbuf: ``RTE_MARKER`` fields ``cacheline0`` and ``cacheline1`` + have been removed from ``struct rte_mbuf``. API Changes ----------- diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h index 286b32b..4c4722e 100644 --- a/lib/mbuf/rte_mbuf.h +++ b/lib/mbuf/rte_mbuf.h @@ -108,7 +108,7 @@ static inline void rte_mbuf_prefetch_part1(struct rte_mbuf *m) { - rte_prefetch0(&m->cacheline0); + rte_prefetch0(m); } /** @@ -126,7 +126,7 @@ rte_mbuf_prefetch_part2(struct rte_mbuf *m) { #if RTE_CACHE_LINE_SIZE == 64 - rte_prefetch0(&m->cacheline1); + rte_prefetch0(RTE_PTR_ADD(m, RTE_CACHE_LINE_MIN_SIZE)); #else RTE_SET_USED(m); #endif diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h index 9f58076..665213c 100644 --- a/lib/mbuf/rte_mbuf_core.h +++ b/lib/mbuf/rte_mbuf_core.h @@ -465,8 +465,6 @@ enum { * The generic rte_mbuf, containing a packet mbuf. */ struct __rte_cache_aligned rte_mbuf { - RTE_MARKER cacheline0; - void *buf_addr; /**< Virtual address of segment buffer. */ #if RTE_IOVA_IN_MBUF /** @@ -488,116 +486,130 @@ struct __rte_cache_aligned rte_mbuf { #endif /* next 8 bytes are initialised on RX descriptor rearm */ - RTE_MARKER64 rearm_data; - uint16_t data_off; - - /** - * Reference counter. Its size should at least equal to the size - * of port field (16 bits), to support zero-copy broadcast. - * It should only be accessed using the following functions: - * rte_mbuf_refcnt_update(), rte_mbuf_refcnt_read(), and - * rte_mbuf_refcnt_set(). The functionality of these functions (atomic, - * or non-atomic) is controlled by the RTE_MBUF_REFCNT_ATOMIC flag. - */ - RTE_ATOMIC(uint16_t) refcnt; + union { + uint64_t rearm_data[1]; + __extension__ + struct { + uint16_t data_off; + + /** + * Reference counter. Its size should at least equal to the size + * of port field (16 bits), to support zero-copy broadcast. + * It should only be accessed using the following functions: + * rte_mbuf_refcnt_update(), rte_mbuf_refcnt_read(), and + * rte_mbuf_refcnt_set(). The functionality of these functions (atomic, + * or non-atomic) is controlled by the RTE_MBUF_REFCNT_ATOMIC flag. + */ + RTE_ATOMIC(uint16_t) refcnt; - /** - * Number of segments. Only valid for the first segment of an mbuf - * chain. - */ - uint16_t nb_segs; + /** + * Number of segments. Only valid for the first segment of an mbuf + * chain. + */ + uint16_t nb_segs; - /** Input port (16 bits to support more than 256 virtual ports). - * The event eth Tx adapter uses this field to specify the output port. - */ - uint16_t port; + /** Input port (16 bits to support more than 256 virtual ports). + * The event eth Tx adapter uses this field to specify the output port. + */ + uint16_t port; + }; + }; uint64_t ol_flags; /**< Offload features. */ /* remaining bytes are set on RX when pulling packet from descriptor */ - RTE_MARKER rx_descriptor_fields1; - - /* - * The packet type, which is the combination of outer/inner L2, L3, L4 - * and tunnel types. The packet_type is about data really present in the - * mbuf. Example: if vlan stripping is enabled, a received vlan packet - * would have RTE_PTYPE_L2_ETHER and not RTE_PTYPE_L2_VLAN because the - * vlan is stripped from the data. - */ union { - uint32_t packet_type; /**< L2/L3/L4 and tunnel information. */ + void *rx_descriptor_fields1[1]; __extension__ struct { - uint8_t l2_type:4; /**< (Outer) L2 type. */ - uint8_t l3_type:4; /**< (Outer) L3 type. */ - uint8_t l4_type:4; /**< (Outer) L4 type. */ - uint8_t tun_type:4; /**< Tunnel type. */ + /* + * The packet type, which is the combination of outer/inner L2, L3, L4 + * and tunnel types. The packet_type is about data really present in the + * mbuf. Example: if vlan stripping is enabled, a received vlan packet + * would have RTE_PTYPE_L2_ETHER and not RTE_PTYPE_L2_VLAN because the + * vlan is stripped from the data. + */ union { - uint8_t inner_esp_next_proto; - /**< ESP next protocol type, valid if - * RTE_PTYPE_TUNNEL_ESP tunnel type is set - * on both Tx and Rx. - */ + uint32_t packet_type; /**< L2/L3/L4 and tunnel information. */ __extension__ struct { - uint8_t inner_l2_type:4; - /**< Inner L2 type. */ - uint8_t inner_l3_type:4; - /**< Inner L3 type. */ + uint8_t l2_type:4; /**< (Outer) L2 type. */ + uint8_t l3_type:4; /**< (Outer) L3 type. */ + uint8_t l4_type:4; /**< (Outer) L4 type. */ + uint8_t tun_type:4; /**< Tunnel type. */ + union { + uint8_t inner_esp_next_proto; + /**< ESP next protocol type, valid if + * RTE_PTYPE_TUNNEL_ESP tunnel type is set + * on both Tx and Rx. + */ + __extension__ + struct { + uint8_t inner_l2_type:4; + /**< Inner L2 type. */ + uint8_t inner_l3_type:4; + /**< Inner L3 type. */ + }; + }; + uint8_t inner_l4_type:4; /**< Inner L4 type. */ }; }; - uint8_t inner_l4_type:4; /**< Inner L4 type. */ - }; - }; - uint32_t pkt_len; /**< Total pkt len: sum of all segments. */ - uint16_t data_len; /**< Amount of data in segment buffer. */ - /** VLAN TCI (CPU order), valid if RTE_MBUF_F_RX_VLAN is set. */ - uint16_t vlan_tci; + /* + * pkt_len is not actually part of rx_descriptor_fields1 + * but is included here to account for changes in alignment + * and offset for void * on 32-bit vs 64-bit targets. + */ + uint32_t pkt_len; /**< Total pkt len: sum of all segments. */ - union { - union { - uint32_t rss; /**< RSS hash result if RSS enabled */ - struct { + uint16_t data_len; /**< Amount of data in segment buffer. */ + /** VLAN TCI (CPU order), valid if RTE_MBUF_F_RX_VLAN is set. */ + uint16_t vlan_tci; + + union { union { + uint32_t rss; /**< RSS hash result if RSS enabled */ struct { - uint16_t hash; - uint16_t id; - }; - uint32_t lo; - /**< Second 4 flexible bytes */ - }; - uint32_t hi; - /**< First 4 flexible bytes or FD ID, dependent - * on RTE_MBUF_F_RX_FDIR_* flag in ol_flags. - */ - } fdir; /**< Filter identifier if FDIR enabled */ - struct rte_mbuf_sched sched; - /**< Hierarchical scheduler : 8 bytes */ - struct { - uint32_t reserved1; - uint16_t reserved2; - uint16_t txq; - /**< The event eth Tx adapter uses this field - * to store Tx queue id. - * @see rte_event_eth_tx_adapter_txq_set() - */ - } txadapter; /**< Eventdev ethdev Tx adapter */ - uint32_t usr; - /**< User defined tags. See rte_distributor_process() */ - } hash; /**< hash information */ - }; + union { + struct { + uint16_t hash; + uint16_t id; + }; + uint32_t lo; + /**< Second 4 flexible bytes */ + }; + uint32_t hi; + /**< First 4 flexible bytes or FD ID, dependent + * on RTE_MBUF_F_RX_FDIR_* flag in ol_flags. + */ + } fdir; /**< Filter identifier if FDIR enabled */ + struct rte_mbuf_sched sched; + /**< Hierarchical scheduler : 8 bytes */ + struct { + uint32_t reserved1; + uint16_t reserved2; + uint16_t txq; + /**< The event eth Tx adapter uses this field + * to store Tx queue id. + * @see rte_event_eth_tx_adapter_txq_set() + */ + } txadapter; /**< Eventdev ethdev Tx adapter */ + uint32_t usr; + /**< User defined tags. See rte_distributor_process() */ + } hash; /**< hash information */ + }; - /** Outer VLAN TCI (CPU order), valid if RTE_MBUF_F_RX_QINQ is set. */ - uint16_t vlan_tci_outer; + /** Outer VLAN TCI (CPU order), valid if RTE_MBUF_F_RX_QINQ is set. */ + uint16_t vlan_tci_outer; - uint16_t buf_len; /**< Length of segment buffer. */ + uint16_t buf_len; /**< Length of segment buffer. */ + }; + }; struct rte_mempool *pool; /**< Pool from which mbuf was allocated. */ /* second cache line - fields only used in slow path or on TX */ - alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1; - + alignas(RTE_CACHE_LINE_MIN_SIZE) #if RTE_IOVA_IN_MBUF /** * Next segment of scattered packet. Must be NULL in the last From patchwork Wed Mar 20 22:01:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138652 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EA20243D0A; Wed, 20 Mar 2024 23:02:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4ECA442E80; Wed, 20 Mar 2024 23:01:46 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 47CA842D80 for ; Wed, 20 Mar 2024 23:01:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 3F4DD20B74C3; Wed, 20 Mar 2024 15:01:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3F4DD20B74C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710972099; bh=c8TVE10xm+dCIIfDskM3KI3AI7/lj7EZXbyWrnvr/eo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qTKcdv+hddwkESEjCPCeNh964yJNBc02SxSSTOUfuUladzVO65uD4P0qXli+u9nFy W7fXOv9Ifz4jXB7/Hjw4ez8sOOXxtfeu8leqByK+5QmP+7/BCD1MSGPrVHplBedWf8 1MD/ejD2ZRqEs+rRVXE0PhiHQT1bqKqCqpFKzZJI= 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 v7 3/4] security: remove rte marker fields Date: Wed, 20 Mar 2024 15:01:37 -0700 Message-Id: <1710972098-2209-4-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710972098-2209-1-git-send-email-roretzla@linux.microsoft.com> References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1710972098-2209-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 RTE_MARKER typedefs are a GCC extension unsupported by MSVC. Remove RTE_MARKER fields from rte_mbuf struct. Maintain alignment of fields after removed cacheline1 marker by placing C11 alignas(RTE_CACHE_LINE_MIN_SIZE). Signed-off-by: Tyler Retzlaff Reviewed-by: Morten Brørup --- doc/guides/rel_notes/release_24_03.rst | 3 +++ lib/security/rte_security_driver.h | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst index 4f18cca..75d40d4 100644 --- a/doc/guides/rel_notes/release_24_03.rst +++ b/doc/guides/rel_notes/release_24_03.rst @@ -219,6 +219,9 @@ Removed Items * mbuf: ``RTE_MARKER`` fields ``cacheline0`` and ``cacheline1`` have been removed from ``struct rte_mbuf``. +* security: ``RTE_MARKER`` fields ``cacheline0`` and ``cacheline1`` + have been removed from ``struct rte_security_session``. + API Changes ----------- diff --git a/lib/security/rte_security_driver.h b/lib/security/rte_security_driver.h index 09829ab..18a1e3c 100644 --- a/lib/security/rte_security_driver.h +++ b/lib/security/rte_security_driver.h @@ -12,6 +12,8 @@ * RTE Security Common Definitions */ +#include + #ifdef __cplusplus extern "C" { #endif @@ -24,7 +26,6 @@ * Security session to be used by library for internal usage */ struct rte_security_session { - RTE_MARKER cacheline0; uint64_t opaque_data; /**< Opaque user defined data */ uint64_t fast_mdata; @@ -32,7 +33,7 @@ struct rte_security_session { rte_iova_t driver_priv_data_iova; /**< session private data IOVA address */ - alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1; + alignas(RTE_CACHE_LINE_MIN_SIZE) uint8_t driver_priv_data[]; /**< Private session material, variable size (depends on driver) */ }; From patchwork Wed Mar 20 22:01:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138651 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F71943D0A; Wed, 20 Mar 2024 23:01:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1653242E6C; Wed, 20 Mar 2024 23:01:45 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4B79D42E2D for ; Wed, 20 Mar 2024 23:01:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 4D75720B74C4; Wed, 20 Mar 2024 15:01:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4D75720B74C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710972099; bh=CHpIUheMylF7C9Q0UqPcL9wvaFQAGMZVoBG4WvjzJt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FRHZg6km8lF8H8vaWjDeBlML4z2UKLj1aVgr2pELZZfcJ7BoPJZz9+E+BvOlh9S7i YuxQZZ/q7XXseakgUT3sVh9sWw5LrgArRkanqOSClLsgXVxMVJ8NVlHhGsNmZKDty+ JVBjogGq/Pl7lvHFCW+NeZ5K1lIyWSx8Q6L2naj8= 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 v7 4/4] cryptodev: remove rte marker fields Date: Wed, 20 Mar 2024 15:01:38 -0700 Message-Id: <1710972098-2209-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710972098-2209-1-git-send-email-roretzla@linux.microsoft.com> References: <1706657173-26166-1-git-send-email-roretzla@linux.microsoft.com> <1710972098-2209-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 RTE_MARKER typedefs are a GCC extension unsupported by MSVC. Remove RTE_MARKER fields from rte_mbuf struct. Maintain alignment of fields after removed cacheline1 marker by placing C11 alignas(RTE_CACHE_LINE_MIN_SIZE). Signed-off-by: Tyler Retzlaff Reviewed-by: Morten Brørup --- doc/guides/rel_notes/release_24_03.rst | 3 +++ lib/cryptodev/cryptodev_pmd.h | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst index 75d40d4..d3e5abe 100644 --- a/doc/guides/rel_notes/release_24_03.rst +++ b/doc/guides/rel_notes/release_24_03.rst @@ -222,6 +222,9 @@ Removed Items * security: ``RTE_MARKER`` fields ``cacheline0`` and ``cacheline1`` have been removed from ``struct rte_security_session``. +* cryptodev: ``RTE_MARKER`` fields ``cacheline0`` and ``cacheline1`` + have been removed from ``struct cryptodev_driver``. + API Changes ----------- diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h index d195b81..9daf129 100644 --- a/lib/cryptodev/cryptodev_pmd.h +++ b/lib/cryptodev/cryptodev_pmd.h @@ -5,6 +5,8 @@ #ifndef _CRYPTODEV_PMD_H_ #define _CRYPTODEV_PMD_H_ +#include + #ifdef __cplusplus extern "C" { #endif @@ -139,7 +141,6 @@ struct cryptodev_driver { * has a fixed algo, key, op-type, digest_len etc. */ struct rte_cryptodev_sym_session { - RTE_MARKER cacheline0; uint64_t opaque_data; /**< Can be used for external metadata */ uint32_t sess_data_sz; @@ -151,7 +152,7 @@ struct rte_cryptodev_sym_session { rte_iova_t driver_priv_data_iova; /**< Session driver data IOVA address */ - alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1; + alignas(RTE_CACHE_LINE_MIN_SIZE) /**< Second cache line - start of the driver session data */ uint8_t driver_priv_data[]; /**< Driver specific session data, variable size */