From patchwork Wed Mar 20 15:36:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138492 X-Patchwork-Delegate: david.marchand@redhat.com 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 1793443D05; Wed, 20 Mar 2024 16:38:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A28441151; Wed, 20 Mar 2024 16:38:24 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8C79340ED3 for ; Wed, 20 Mar 2024 16:38:21 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 823E120B74C1; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 823E120B74C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949100; bh=McTkgwcKHcfGbIrjr9Hf0n+LgSioUjdwzqKBvYIdP8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TjC0zIcggh4yBOUbcCxIyatBD94AG0k81d/08+KuBioxaY6UpgknRLxlrvdF6qnmg hynAup4yOh4LuP0noLeTOz5rH+Y3pFI6/vNY4DjIkSyJLLxM3RZLO5WYuvJZ4Dvshh JbmugkDKSBoMQhOHeP+EmTJ4B4Nu/IH+GnTwaxps= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 01/83] examples: move alignment attribute on types Date: Wed, 20 Mar 2024 08:36:54 -0700 Message-Id: <1710949096-5786-2-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff Reviewed-by: Morten Brørup --- examples/bbdev_app/main.c | 8 +++--- examples/bond/main.c | 2 +- examples/distributor/main.c | 32 +++++++++++----------- examples/eventdev_pipeline/pipeline_common.h | 8 +++--- examples/ip_fragmentation/main.c | 4 +-- examples/ip_pipeline/thread.c | 4 +-- examples/ip_reassembly/main.c | 4 +-- examples/ipsec-secgw/ipsec-secgw.c | 4 +-- examples/ipsec-secgw/ipsec-secgw.h | 8 +++--- examples/ipsec-secgw/ipsec.h | 22 +++++++-------- examples/ipsec-secgw/ipsec_worker.h | 4 +-- examples/ipv4_multicast/main.c | 4 +-- examples/l2fwd-crypto/main.c | 12 ++++---- examples/l2fwd-event/l2fwd_common.h | 8 +++--- examples/l2fwd-event/l2fwd_poll.h | 4 +-- examples/l2fwd-jobstats/main.c | 8 +++--- examples/l2fwd-keepalive/main.c | 8 +++--- examples/l2fwd-macsec/main.c | 12 ++++---- examples/l2fwd/main.c | 12 ++++---- examples/l3fwd-graph/main.c | 8 +++--- examples/l3fwd-power/main.c | 24 ++++++++-------- examples/l3fwd-power/main.h | 4 +-- examples/l3fwd-power/perf_core.c | 4 +-- examples/l3fwd/l3fwd.h | 8 +++--- examples/l3fwd/l3fwd_em.c | 4 +-- examples/l3fwd/main.c | 4 +-- examples/link_status_interrupt/main.c | 8 +++--- .../multi_process/client_server_mp/shared/common.h | 8 +++--- examples/multi_process/symmetric_mp/main.c | 4 +-- examples/ntb/ntb_fwd.c | 4 +-- examples/packet_ordering/main.c | 16 +++++------ examples/pipeline/thread.c | 4 +-- examples/qos_sched/app_thread.c | 2 +- examples/qos_sched/main.h | 4 +-- examples/server_node_efd/shared/common.h | 12 ++++---- examples/vhost/main.h | 4 +-- examples/vhost_blk/vhost_blk.h | 4 +-- examples/vhost_crypto/main.c | 4 +-- examples/vm_power_manager/power_manager.c | 4 +-- 39 files changed, 151 insertions(+), 151 deletions(-) diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c index 16599ae..d4c686c 100644 --- a/examples/bbdev_app/main.c +++ b/examples/bbdev_app/main.c @@ -120,16 +120,16 @@ struct app_config_params { uint16_t num_dec_cores; }; -struct lcore_statistics { +struct __rte_cache_aligned lcore_statistics { unsigned int enqueued; unsigned int dequeued; unsigned int rx_lost_packets; unsigned int enc_to_dec_lost_packets; unsigned int tx_lost_packets; -} __rte_cache_aligned; +}; /** each lcore configuration */ -struct lcore_conf { +struct __rte_cache_aligned lcore_conf { uint64_t core_type; unsigned int port_id; @@ -148,7 +148,7 @@ struct lcore_conf { struct rte_ring *enc_to_dec_ring; struct lcore_statistics *lcore_stats; -} __rte_cache_aligned; +}; struct stats_lcore_params { struct lcore_conf *lconf; diff --git a/examples/bond/main.c b/examples/bond/main.c index 8528abf..9f38b63 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -346,7 +346,7 @@ struct global_flag_stru_t { */ static int lcore_main(__rte_unused void *arg1) { - struct rte_mbuf *pkts[MAX_PKT_BURST] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_mbuf *pkts[MAX_PKT_BURST]; struct rte_ether_addr dst_addr; struct rte_ether_addr bond_mac_addr; diff --git a/examples/distributor/main.c b/examples/distributor/main.c index 542f76c..ddbc387 100644 --- a/examples/distributor/main.c +++ b/examples/distributor/main.c @@ -44,39 +44,39 @@ unsigned int num_workers; static volatile struct app_stats { - struct { + alignas(RTE_CACHE_LINE_SIZE) struct { uint64_t rx_pkts; uint64_t returned_pkts; uint64_t enqueued_pkts; uint64_t enqdrop_pkts; - } rx __rte_cache_aligned; - int pad1 __rte_cache_aligned; + } rx; + alignas(RTE_CACHE_LINE_SIZE) int pad1; - struct { + alignas(RTE_CACHE_LINE_SIZE) struct { uint64_t in_pkts; uint64_t ret_pkts; uint64_t sent_pkts; uint64_t enqdrop_pkts; - } dist __rte_cache_aligned; - int pad2 __rte_cache_aligned; + } dist; + alignas(RTE_CACHE_LINE_SIZE) int pad2; - struct { + alignas(RTE_CACHE_LINE_SIZE) struct { uint64_t dequeue_pkts; uint64_t tx_pkts; uint64_t enqdrop_pkts; - } tx __rte_cache_aligned; - int pad3 __rte_cache_aligned; + } tx; + alignas(RTE_CACHE_LINE_SIZE) int pad3; - uint64_t worker_pkts[64] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint64_t worker_pkts[64]; - int pad4 __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) int pad4; - uint64_t worker_bursts[64][8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint64_t worker_bursts[64][8]; - int pad5 __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) int pad5; - uint64_t port_rx_pkts[64] __rte_cache_aligned; - uint64_t port_tx_pkts[64] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint64_t port_rx_pkts[64]; + alignas(RTE_CACHE_LINE_SIZE) uint64_t port_tx_pkts[64]; } app_stats; struct app_stats prev_app_stats; @@ -642,7 +642,7 @@ struct lcore_params { * port, otherwise we send traffic from 0 to 1, 2 to 3, and vice versa */ const unsigned xor_val = (rte_eth_dev_count_avail() > 1); - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_mbuf *buf[8]; for (i = 0; i < 8; i++) buf[i] = NULL; diff --git a/examples/eventdev_pipeline/pipeline_common.h b/examples/eventdev_pipeline/pipeline_common.h index 28b6ab8..21b4c7e 100644 --- a/examples/eventdev_pipeline/pipeline_common.h +++ b/examples/eventdev_pipeline/pipeline_common.h @@ -24,10 +24,10 @@ #define BATCH_SIZE 16 #define MAX_NUM_CORE 64 -struct worker_data { +struct __rte_cache_aligned worker_data { uint8_t dev_id; uint8_t port_id; -} __rte_cache_aligned; +}; typedef int (*worker_loop)(void *); typedef void (*schedule_loop)(unsigned int); @@ -43,7 +43,7 @@ struct setup_data { opt_check check_opt; }; -struct fastpath_data { +struct __rte_cache_aligned fastpath_data { volatile int done; uint32_t evdev_service_id; uint32_t rxadptr_service_id; @@ -56,7 +56,7 @@ struct fastpath_data { uint64_t sched_core[MAX_NUM_CORE]; uint64_t worker_core[MAX_NUM_CORE]; struct setup_data cap; -} __rte_cache_aligned; +}; struct config_data { unsigned int active_cores; diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index 744a1aa..736eae6 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -135,12 +135,12 @@ struct rx_queue { #define MAX_RX_QUEUE_PER_LCORE 16 #define MAX_TX_QUEUE_PER_PORT 16 -struct lcore_queue_conf { +struct __rte_cache_aligned lcore_queue_conf { uint16_t n_rx_queue; uint16_t tx_queue_id[RTE_MAX_ETHPORTS]; struct rx_queue rx_queue_list[MAX_RX_QUEUE_PER_LCORE]; struct mbuf_table tx_mbufs[RTE_MAX_ETHPORTS]; -} __rte_cache_aligned; +}; struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; static struct rte_eth_conf port_conf = { diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c index b46f64b..8a912dc 100644 --- a/examples/ip_pipeline/thread.c +++ b/examples/ip_pipeline/thread.c @@ -63,7 +63,7 @@ struct pipeline_data { uint8_t buffer[TABLE_RULE_ACTION_SIZE_MAX]; }; -struct thread_data { +struct __rte_cache_aligned thread_data { struct rte_pipeline *p[THREAD_PIPELINES_MAX]; uint32_t n_pipelines; @@ -73,7 +73,7 @@ struct thread_data { uint64_t timer_period; /* Measured in CPU cycles. */ uint64_t time_next; uint64_t time_next_min; -} __rte_cache_aligned; +}; static struct thread_data thread_data[RTE_MAX_LCORE]; diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index bd0b1d3..c701907 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -148,14 +148,14 @@ struct tx_lcore_stat { #define MAX_TX_QUEUE_PER_PORT 16 #define MAX_RX_QUEUE_PER_PORT 128 -struct lcore_queue_conf { +struct __rte_cache_aligned lcore_queue_conf { uint16_t n_rx_queue; struct rx_queue rx_queue_list[MAX_RX_QUEUE_PER_LCORE]; uint16_t tx_queue_id[RTE_MAX_ETHPORTS]; struct rte_ip_frag_death_row death_row; struct mbuf_table *tx_mbufs[RTE_MAX_ETHPORTS]; struct tx_lcore_stat tx_stat; -} __rte_cache_aligned; +}; static struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; static struct rte_eth_conf port_conf = { diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index 45a3038..d7c18be 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -218,11 +218,11 @@ struct app_sa_prm app_sa_prm = { }; static const char *cfgfile; -struct lcore_params { +struct __rte_cache_aligned lcore_params { uint16_t port_id; uint8_t queue_id; uint8_t lcore_id; -} __rte_cache_aligned; +}; static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS]; diff --git a/examples/ipsec-secgw/ipsec-secgw.h b/examples/ipsec-secgw/ipsec-secgw.h index ec33a98..b4ef4b6 100644 --- a/examples/ipsec-secgw/ipsec-secgw.h +++ b/examples/ipsec-secgw/ipsec-secgw.h @@ -54,13 +54,13 @@ #define IPSEC_NAT_T_PORT 4500 #define MBUF_PTYPE_TUNNEL_ESP_IN_UDP (RTE_PTYPE_TUNNEL_ESP | RTE_PTYPE_L4_UDP) -struct traffic_type { +struct __rte_cache_aligned traffic_type { uint32_t num; struct rte_mbuf *pkts[MAX_PKTS]; const uint8_t *data[MAX_PKTS]; void *saptr[MAX_PKTS]; uint32_t res[MAX_PKTS]; -} __rte_cache_aligned; +}; struct ipsec_traffic { struct traffic_type ipsec; @@ -98,7 +98,7 @@ struct ipsec_sa_stats { uint64_t miss; }; -struct ipsec_core_statistics { +struct __rte_cache_aligned ipsec_core_statistics { uint64_t tx; uint64_t rx; uint64_t rx_call; @@ -126,7 +126,7 @@ struct ipsec_core_statistics { struct { uint64_t miss; } lpm6; -} __rte_cache_aligned; +}; extern struct ipsec_core_statistics core_statistics[RTE_MAX_LCORE]; diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h index bdcada1..4cf4c9d 100644 --- a/examples/ipsec-secgw/ipsec.h +++ b/examples/ipsec-secgw/ipsec.h @@ -112,7 +112,7 @@ enum { return (struct ipsec_sa *)i; } -struct ipsec_sa { +struct __rte_cache_aligned ipsec_sa { struct rte_ipsec_session sessions[IPSEC_SESSION_MAX]; uint32_t spi; struct cdev_qp *cqp[RTE_MAX_LCORE]; @@ -170,7 +170,7 @@ struct ipsec_sa { struct rte_flow_item_esp esp_spec; struct rte_flow *flow; struct rte_security_session_conf sess_conf; -} __rte_cache_aligned; +}; struct ipsec_xf { struct rte_crypto_sym_xform a; @@ -190,12 +190,12 @@ struct sa_ctx { struct ipsec_sa sa[]; }; -struct ipsec_mbuf_metadata { +struct __rte_cache_aligned ipsec_mbuf_metadata { struct ipsec_sa *sa; struct rte_crypto_op cop; struct rte_crypto_sym_op sym_cop; uint8_t buf[32]; -} __rte_cache_aligned; +}; #define IS_TRANSPORT(flags) ((flags) & TRANSPORT) @@ -224,7 +224,7 @@ struct cdev_qp { uint16_t qp; uint16_t in_flight; uint16_t len; - struct rte_crypto_op *buf[MAX_PKT_BURST] __rte_aligned(sizeof(void *)); + alignas(sizeof(void *)) struct rte_crypto_op *buf[MAX_PKT_BURST]; }; struct ipsec_ctx { @@ -235,7 +235,7 @@ struct ipsec_ctx { uint16_t nb_qps; uint16_t last_qp; struct cdev_qp tbl[MAX_QP_PER_LCORE]; - struct rte_mbuf *ol_pkts[MAX_PKT_BURST] __rte_aligned(sizeof(void *)); + alignas(sizeof(void *)) struct rte_mbuf *ol_pkts[MAX_PKT_BURST]; uint16_t ol_pkts_cnt; uint64_t ipv4_offloads; uint64_t ipv6_offloads; @@ -283,18 +283,18 @@ struct cnt_blk { uint32_t cnt; } __rte_packed; -struct lcore_rx_queue { +struct __rte_cache_aligned lcore_rx_queue { uint16_t port_id; uint8_t queue_id; void *sec_ctx; -} __rte_cache_aligned; +}; struct buffer { uint16_t len; - struct rte_mbuf *m_table[MAX_PKT_BURST] __rte_aligned(sizeof(void *)); + alignas(sizeof(void *)) struct rte_mbuf *m_table[MAX_PKT_BURST]; }; -struct lcore_conf { +struct __rte_cache_aligned lcore_conf { uint16_t nb_rx_queue; struct lcore_rx_queue rx_queue_list[MAX_RX_QUEUE_PER_LCORE]; uint16_t tx_queue_id[RTE_MAX_ETHPORTS]; @@ -308,7 +308,7 @@ struct lcore_conf { struct rte_mempool *pool_indir; struct rte_ip_frag_death_row dr; } frag; -} __rte_cache_aligned; +}; extern struct lcore_conf lcore_conf[RTE_MAX_LCORE]; diff --git a/examples/ipsec-secgw/ipsec_worker.h b/examples/ipsec-secgw/ipsec_worker.h index 8e937fd..8f6a1c0 100644 --- a/examples/ipsec-secgw/ipsec_worker.h +++ b/examples/ipsec-secgw/ipsec_worker.h @@ -37,11 +37,11 @@ struct route_table { /* * Conf required by event mode worker with tx internal port */ -struct lcore_conf_ev_tx_int_port_wrkr { +struct __rte_cache_aligned lcore_conf_ev_tx_int_port_wrkr { struct ipsec_ctx inbound; struct ipsec_ctx outbound; struct route_table rt; -} __rte_cache_aligned; +}; void ipsec_poll_mode_worker(void); void ipsec_poll_mode_wrkr_inl_pr(void); diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index 6d0a850..1eed645 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -98,13 +98,13 @@ struct mbuf_table { #define MAX_RX_QUEUE_PER_LCORE 16 #define MAX_TX_QUEUE_PER_PORT 16 -struct lcore_queue_conf { +struct __rte_cache_aligned lcore_queue_conf { uint64_t tx_tsc; uint16_t n_rx_queue; uint8_t rx_queue_list[MAX_RX_QUEUE_PER_LCORE]; uint16_t tx_queue_id[MAX_PORTS]; struct mbuf_table tx_mbufs[MAX_PORTS]; -} __rte_cache_aligned; +}; static struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; static struct rte_eth_conf port_conf = { diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 19db0a2..a441312 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -201,7 +201,7 @@ struct l2fwd_crypto_params { }; /** lcore configuration */ -struct lcore_queue_conf { +struct __rte_cache_aligned lcore_queue_conf { unsigned nb_rx_ports; uint16_t rx_port_list[MAX_RX_QUEUE_PER_LCORE]; @@ -210,7 +210,7 @@ struct lcore_queue_conf { struct op_buffer op_buf[RTE_CRYPTO_MAX_DEVS]; struct pkt_buffer pkt_buf[RTE_MAX_ETHPORTS]; -} __rte_cache_aligned; +}; struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; @@ -230,7 +230,7 @@ struct lcore_queue_conf { } session_pool_socket[RTE_MAX_NUMA_NODES]; /* Per-port statistics struct */ -struct l2fwd_port_statistics { +struct __rte_cache_aligned l2fwd_port_statistics { uint64_t tx; uint64_t rx; @@ -238,14 +238,14 @@ struct l2fwd_port_statistics { uint64_t crypto_dequeued; uint64_t dropped; -} __rte_cache_aligned; +}; -struct l2fwd_crypto_statistics { +struct __rte_cache_aligned l2fwd_crypto_statistics { uint64_t enqueued; uint64_t dequeued; uint64_t errors; -} __rte_cache_aligned; +}; struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS]; struct l2fwd_crypto_statistics crypto_statistics[RTE_CRYPTO_MAX_DEVS]; diff --git a/examples/l2fwd-event/l2fwd_common.h b/examples/l2fwd-event/l2fwd_common.h index 07f84cb..c56b3e7 100644 --- a/examples/l2fwd-event/l2fwd_common.h +++ b/examples/l2fwd-event/l2fwd_common.h @@ -59,11 +59,11 @@ #define VECTOR_TMO_NS_DEFAULT 1E6 /* 1ms */ /* Per-port statistics struct */ -struct l2fwd_port_statistics { +struct __rte_cache_aligned l2fwd_port_statistics { uint64_t dropped; uint64_t tx; uint64_t rx; -} __rte_cache_aligned; +}; /* Event vector attributes */ struct l2fwd_event_vector_params { @@ -72,7 +72,7 @@ struct l2fwd_event_vector_params { uint64_t timeout_ns; }; -struct l2fwd_resources { +struct __rte_cache_aligned l2fwd_resources { volatile uint8_t force_quit; uint8_t event_mode; uint8_t sched_type; @@ -91,7 +91,7 @@ struct l2fwd_resources { struct l2fwd_event_vector_params evt_vec; void *evt_rsrc; void *poll_rsrc; -} __rte_cache_aligned; +}; static __rte_always_inline void l2fwd_mac_updating(struct rte_mbuf *m, uint32_t dest_port_id, diff --git a/examples/l2fwd-event/l2fwd_poll.h b/examples/l2fwd-event/l2fwd_poll.h index d59b0c8..9d72008 100644 --- a/examples/l2fwd-event/l2fwd_poll.h +++ b/examples/l2fwd-event/l2fwd_poll.h @@ -9,10 +9,10 @@ typedef void (*poll_main_loop_cb)(struct l2fwd_resources *rsrc); -struct lcore_queue_conf { +struct __rte_cache_aligned lcore_queue_conf { uint32_t rx_port_list[MAX_RX_QUEUE_PER_LCORE]; uint32_t n_rx_port; -} __rte_cache_aligned; +}; struct l2fwd_poll_resources { poll_main_loop_cb poll_main_loop; diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c index 2653db4..cb7582a 100644 --- a/examples/l2fwd-jobstats/main.c +++ b/examples/l2fwd-jobstats/main.c @@ -67,7 +67,7 @@ #define MAX_RX_QUEUE_PER_LCORE 16 #define MAX_TX_QUEUE_PER_PORT 16 /* List of queues to be polled for given lcore. 8< */ -struct lcore_queue_conf { +struct __rte_cache_aligned lcore_queue_conf { unsigned n_rx_port; unsigned rx_port_list[MAX_RX_QUEUE_PER_LCORE]; uint64_t next_flush_time[RTE_MAX_ETHPORTS]; @@ -82,7 +82,7 @@ struct lcore_queue_conf { uint16_t stats_read_pending; rte_spinlock_t lock; -} __rte_cache_aligned; +}; /* >8 End of list of queues to be polled for given lcore. */ struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; @@ -97,11 +97,11 @@ struct lcore_queue_conf { struct rte_mempool *l2fwd_pktmbuf_pool = NULL; /* Per-port statistics struct */ -struct l2fwd_port_statistics { +struct __rte_cache_aligned l2fwd_port_statistics { uint64_t tx; uint64_t rx; uint64_t dropped; -} __rte_cache_aligned; +}; struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS]; /* 1 day max */ diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c index 1463cef..c3ead9e 100644 --- a/examples/l2fwd-keepalive/main.c +++ b/examples/l2fwd-keepalive/main.c @@ -69,10 +69,10 @@ #define MAX_RX_QUEUE_PER_LCORE 16 #define MAX_TX_QUEUE_PER_PORT 16 -struct lcore_queue_conf { +struct __rte_cache_aligned lcore_queue_conf { unsigned n_rx_port; unsigned rx_port_list[MAX_RX_QUEUE_PER_LCORE]; -} __rte_cache_aligned; +}; struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS]; @@ -86,11 +86,11 @@ struct lcore_queue_conf { struct rte_mempool *l2fwd_pktmbuf_pool = NULL; /* Per-port statistics struct */ -struct l2fwd_port_statistics { +struct __rte_cache_aligned l2fwd_port_statistics { uint64_t tx; uint64_t rx; uint64_t dropped; -} __rte_cache_aligned; +}; struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS]; /* A tsc-based timer responsible for triggering statistics printout */ diff --git a/examples/l2fwd-macsec/main.c b/examples/l2fwd-macsec/main.c index a5d7a84..294ee11 100644 --- a/examples/l2fwd-macsec/main.c +++ b/examples/l2fwd-macsec/main.c @@ -72,10 +72,10 @@ /* list of enabled ports */ static uint32_t l2fwd_dst_ports[RTE_MAX_ETHPORTS]; -struct port_pair_params { +struct __rte_cache_aligned port_pair_params { #define NUM_PORTS 2 uint16_t port[NUM_PORTS]; -} __rte_cache_aligned; +}; static struct port_pair_params port_pair_params_array[RTE_MAX_ETHPORTS / 2]; static struct port_pair_params *port_pair_params; @@ -86,10 +86,10 @@ struct port_pair_params { #define MAX_RX_QUEUE_PER_LCORE 16 #define MAX_TX_QUEUE_PER_PORT 16 /* List of queues to be polled for a given lcore. 8< */ -struct lcore_queue_conf { +struct __rte_cache_aligned lcore_queue_conf { unsigned int n_rx_port; unsigned int rx_port_list[MAX_RX_QUEUE_PER_LCORE]; -} __rte_cache_aligned; +}; struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; /* >8 End of list of queues to be polled for a given lcore. */ @@ -105,11 +105,11 @@ struct lcore_queue_conf { struct rte_mempool *l2fwd_pktmbuf_pool; /* Per-port statistics struct */ -struct l2fwd_port_statistics { +struct __rte_cache_aligned l2fwd_port_statistics { uint64_t tx; uint64_t rx; uint64_t dropped; -} __rte_cache_aligned; +}; struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS]; #define MAX_TIMER_PERIOD 86400 /* 1 day max */ diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 96fb331..c6fafdd 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -69,10 +69,10 @@ /* list of enabled ports */ static uint32_t l2fwd_dst_ports[RTE_MAX_ETHPORTS]; -struct port_pair_params { +struct __rte_cache_aligned port_pair_params { #define NUM_PORTS 2 uint16_t port[NUM_PORTS]; -} __rte_cache_aligned; +}; static struct port_pair_params port_pair_params_array[RTE_MAX_ETHPORTS / 2]; static struct port_pair_params *port_pair_params; @@ -83,10 +83,10 @@ struct port_pair_params { #define MAX_RX_QUEUE_PER_LCORE 16 #define MAX_TX_QUEUE_PER_PORT 16 /* List of queues to be polled for a given lcore. 8< */ -struct lcore_queue_conf { +struct __rte_cache_aligned lcore_queue_conf { unsigned n_rx_port; unsigned rx_port_list[MAX_RX_QUEUE_PER_LCORE]; -} __rte_cache_aligned; +}; struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; /* >8 End of list of queues to be polled for a given lcore. */ @@ -101,11 +101,11 @@ struct lcore_queue_conf { struct rte_mempool * l2fwd_pktmbuf_pool = NULL; /* Per-port statistics struct */ -struct l2fwd_port_statistics { +struct __rte_cache_aligned l2fwd_port_statistics { uint64_t tx; uint64_t rx; uint64_t dropped; -} __rte_cache_aligned; +}; struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS]; #define MAX_TIMER_PERIOD 86400 /* 1 day max */ diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index 96cb1c8..ec4d8c9 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -97,22 +97,22 @@ struct lcore_rx_queue { static uint8_t model_conf = RTE_GRAPH_MODEL_DEFAULT; /* Lcore conf */ -struct lcore_conf { +struct __rte_cache_aligned lcore_conf { uint16_t n_rx_queue; struct lcore_rx_queue rx_queue_list[MAX_RX_QUEUE_PER_LCORE]; struct rte_graph *graph; char name[RTE_GRAPH_NAMESIZE]; rte_graph_t graph_id; -} __rte_cache_aligned; +}; static struct lcore_conf lcore_conf[RTE_MAX_LCORE]; -struct lcore_params { +struct __rte_cache_aligned lcore_params { uint16_t port_id; uint8_t queue_id; uint8_t lcore_id; -} __rte_cache_aligned; +}; static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS]; static struct lcore_params lcore_params_array_default[] = { diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index f4adcf4..fba11da 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -212,13 +212,13 @@ enum freq_scale_hint_t FREQ_HIGHEST = 2 }; -struct lcore_rx_queue { +struct __rte_cache_aligned lcore_rx_queue { uint16_t port_id; uint8_t queue_id; enum freq_scale_hint_t freq_up_hint; uint32_t zero_rx_packet_count; uint32_t idle_hint; -} __rte_cache_aligned; +}; #define MAX_RX_QUEUE_PER_LCORE 16 #define MAX_TX_QUEUE_PER_PORT RTE_MAX_ETHPORTS @@ -329,8 +329,8 @@ struct ipv6_l3fwd_route { #define L3FWD_HASH_ENTRIES 1024 -static uint16_t ipv4_l3fwd_out_if[L3FWD_HASH_ENTRIES] __rte_cache_aligned; -static uint16_t ipv6_l3fwd_out_if[L3FWD_HASH_ENTRIES] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE) uint16_t ipv4_l3fwd_out_if[L3FWD_HASH_ENTRIES]; +static alignas(RTE_CACHE_LINE_SIZE) uint16_t ipv6_l3fwd_out_if[L3FWD_HASH_ENTRIES]; #endif #if (APP_LOOKUP_METHOD == APP_LOOKUP_LPM) @@ -357,7 +357,7 @@ struct ipv4_l3fwd_route { static lookup_struct_t *ipv4_l3fwd_lookup_struct[NB_SOCKETS]; #endif -struct lcore_conf { +struct __rte_cache_aligned lcore_conf { uint16_t n_rx_queue; struct lcore_rx_queue rx_queue_list[MAX_RX_QUEUE_PER_LCORE]; uint16_t n_tx_port; @@ -366,9 +366,9 @@ struct lcore_conf { struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS]; lookup_struct_t * ipv4_lookup_struct; lookup_struct_t * ipv6_lookup_struct; -} __rte_cache_aligned; +}; -struct lcore_stats { +struct __rte_cache_aligned lcore_stats { /* total sleep time in ms since last frequency scaling down */ uint32_t sleep_time; /* number of long sleep recently */ @@ -399,10 +399,10 @@ struct lcore_stats { uint64_t fp_nfp[2]; enum busy_rate br; rte_spinlock_t telemetry_lock; -} __rte_cache_aligned; +}; -static struct lcore_conf lcore_conf[RTE_MAX_LCORE] __rte_cache_aligned; -static struct lcore_stats stats[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE) struct lcore_conf lcore_conf[RTE_MAX_LCORE]; +static alignas(RTE_CACHE_LINE_SIZE) struct lcore_stats stats[RTE_MAX_LCORE]; static struct rte_timer power_timers[RTE_MAX_LCORE]; static inline uint32_t power_idle_heuristic(uint32_t zero_rx_packet_count); @@ -832,9 +832,9 @@ static int is_done(void) * back to sleep again without log spamming. Avoid cache line sharing * to prevent threads stepping on each others' toes. */ - static struct { + static alignas(RTE_CACHE_LINE_SIZE) struct { bool wakeup; - } __rte_cache_aligned status[RTE_MAX_LCORE]; + } status[RTE_MAX_LCORE]; struct rte_epoll_event event[num]; int n, i; uint16_t port_id; diff --git a/examples/l3fwd-power/main.h b/examples/l3fwd-power/main.h index 258de98..e85e14b 100644 --- a/examples/l3fwd-power/main.h +++ b/examples/l3fwd-power/main.h @@ -7,11 +7,11 @@ #define MAX_LCORE_PARAMS 1024 -struct lcore_params { +struct __rte_cache_aligned lcore_params { uint16_t port_id; uint8_t queue_id; uint8_t lcore_id; -} __rte_cache_aligned; +}; extern struct lcore_params *lcore_params; extern uint16_t nb_lcore_params; diff --git a/examples/l3fwd-power/perf_core.c b/examples/l3fwd-power/perf_core.c index 41ef6d0..c8fc69e 100644 --- a/examples/l3fwd-power/perf_core.c +++ b/examples/l3fwd-power/perf_core.c @@ -20,12 +20,12 @@ static uint16_t hp_lcores[RTE_MAX_LCORE]; static uint16_t nb_hp_lcores; -struct perf_lcore_params { +struct __rte_cache_aligned perf_lcore_params { uint16_t port_id; uint8_t queue_id; uint8_t high_perf; uint8_t lcore_idx; -} __rte_cache_aligned; +}; static struct perf_lcore_params prf_lc_prms[MAX_LCORE_PARAMS]; static uint16_t nb_prf_lc_prms; diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h index e7ae0e5..f51da43 100644 --- a/examples/l3fwd/l3fwd.h +++ b/examples/l3fwd/l3fwd.h @@ -72,12 +72,12 @@ struct mbuf_table { struct rte_mbuf *m_table[MAX_PKT_BURST]; }; -struct lcore_rx_queue { +struct __rte_cache_aligned lcore_rx_queue { uint16_t port_id; uint8_t queue_id; -} __rte_cache_aligned; +}; -struct lcore_conf { +struct __rte_cache_aligned lcore_conf { uint16_t n_rx_queue; struct lcore_rx_queue rx_queue_list[MAX_RX_QUEUE_PER_LCORE]; uint16_t n_tx_port; @@ -86,7 +86,7 @@ struct lcore_conf { struct mbuf_table tx_mbufs[RTE_MAX_ETHPORTS]; void *ipv4_lookup_struct; void *ipv6_lookup_struct; -} __rte_cache_aligned; +}; extern volatile bool force_quit; diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c index 40e102b..d98e66e 100644 --- a/examples/l3fwd/l3fwd_em.c +++ b/examples/l3fwd/l3fwd_em.c @@ -208,8 +208,8 @@ return init_val; } -static uint8_t ipv4_l3fwd_out_if[L3FWD_HASH_ENTRIES] __rte_cache_aligned; -static uint8_t ipv6_l3fwd_out_if[L3FWD_HASH_ENTRIES] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE) uint8_t ipv4_l3fwd_out_if[L3FWD_HASH_ENTRIES]; +static alignas(RTE_CACHE_LINE_SIZE) uint8_t ipv6_l3fwd_out_if[L3FWD_HASH_ENTRIES]; static rte_xmm_t mask0; static rte_xmm_t mask1; diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 8d32ae1..ad28ba9 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -96,11 +96,11 @@ enum L3FWD_LOOKUP_MODE { struct parm_cfg parm_config; -struct lcore_params { +struct __rte_cache_aligned lcore_params { uint16_t port_id; uint8_t queue_id; uint8_t lcore_id; -} __rte_cache_aligned; +}; static struct lcore_params lcore_params_array[MAX_LCORE_PARAMS]; static struct lcore_params lcore_params_array_default[] = { diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c index a8423d5..ac9c7f6 100644 --- a/examples/link_status_interrupt/main.c +++ b/examples/link_status_interrupt/main.c @@ -66,11 +66,11 @@ #define MAX_RX_QUEUE_PER_LCORE 16 #define MAX_TX_QUEUE_PER_PORT 16 /* List of queues must be polled for a give lcore. 8< */ -struct lcore_queue_conf { +struct __rte_cache_aligned lcore_queue_conf { unsigned n_rx_port; unsigned rx_port_list[MAX_RX_QUEUE_PER_LCORE]; unsigned tx_queue_id; -} __rte_cache_aligned; +}; struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; /* >8 End of list of queues to be polled. */ @@ -90,11 +90,11 @@ struct lcore_queue_conf { struct rte_mempool * lsi_pktmbuf_pool = NULL; /* Per-port statistics struct */ -struct lsi_port_statistics { +struct __rte_cache_aligned lsi_port_statistics { uint64_t tx; uint64_t rx; uint64_t dropped; -} __rte_cache_aligned; +}; struct lsi_port_statistics port_statistics[RTE_MAX_ETHPORTS]; /* A tsc-based timer responsible for triggering statistics printout */ diff --git a/examples/multi_process/client_server_mp/shared/common.h b/examples/multi_process/client_server_mp/shared/common.h index 76beca0..b3f3a41 100644 --- a/examples/multi_process/client_server_mp/shared/common.h +++ b/examples/multi_process/client_server_mp/shared/common.h @@ -18,14 +18,14 @@ * themselves are written by the clients, so we have a distinct set, on different * cache lines for each client to use. */ -struct rx_stats{ +struct __rte_cache_aligned rx_stats { uint64_t rx[RTE_MAX_ETHPORTS]; -} __rte_cache_aligned; +}; -struct tx_stats{ +struct __rte_cache_aligned tx_stats { uint64_t tx[RTE_MAX_ETHPORTS]; uint64_t tx_drop[RTE_MAX_ETHPORTS]; -} __rte_cache_aligned; +}; struct port_info { uint16_t num_ports; diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c index 1ff8587..f7d8439 100644 --- a/examples/multi_process/symmetric_mp/main.c +++ b/examples/multi_process/symmetric_mp/main.c @@ -61,11 +61,11 @@ struct lcore_ports{ /* structure to record the rx and tx packets. Put two per cache line as ports * used in pairs */ -struct port_stats{ +struct __rte_aligned(RTE_CACHE_LINE_SIZE / 2) port_stats{ unsigned rx; unsigned tx; unsigned drop; -} __rte_aligned(RTE_CACHE_LINE_SIZE / 2); +}; static int proc_id = -1; static unsigned num_procs = 0; diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c index 95a6148..56c7672 100644 --- a/examples/ntb/ntb_fwd.c +++ b/examples/ntb/ntb_fwd.c @@ -24,10 +24,10 @@ #include "commands.h" /* Per-port statistics struct */ -struct ntb_port_statistics { +struct __rte_cache_aligned ntb_port_statistics { uint64_t tx; uint64_t rx; -} __rte_cache_aligned; +}; /* Port 0: NTB dev, Port 1: ethdev when iofwd. */ struct ntb_port_statistics ntb_port_stats[2]; diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c index f839db9..5ffdf72 100644 --- a/examples/packet_ordering/main.c +++ b/examples/packet_ordering/main.c @@ -58,19 +58,19 @@ struct send_thread_args { }; volatile struct app_stats { - struct { + alignas(RTE_CACHE_LINE_SIZE) struct { uint64_t rx_pkts; uint64_t enqueue_pkts; uint64_t enqueue_failed_pkts; - } rx __rte_cache_aligned; + } rx; - struct { + alignas(RTE_CACHE_LINE_SIZE) struct { uint64_t dequeue_pkts; uint64_t enqueue_pkts; uint64_t enqueue_failed_pkts; - } wkr __rte_cache_aligned; + } wkr; - struct { + alignas(RTE_CACHE_LINE_SIZE) struct { uint64_t dequeue_pkts; /* Too early pkts transmitted directly w/o reordering */ uint64_t early_pkts_txtd_woro; @@ -78,15 +78,15 @@ struct send_thread_args { uint64_t early_pkts_tx_failed_woro; uint64_t ro_tx_pkts; uint64_t ro_tx_failed_pkts; - } tx __rte_cache_aligned; + } tx; } app_stats; /* per worker lcore stats */ -struct wkr_stats_per { +struct __rte_cache_aligned wkr_stats_per { uint64_t deq_pkts; uint64_t enq_pkts; uint64_t enq_failed_pkts; -} __rte_cache_aligned; +}; static struct wkr_stats_per wkr_stats[RTE_MAX_LCORE] = { {0} }; /** diff --git a/examples/pipeline/thread.c b/examples/pipeline/thread.c index dc3ea73..cf2af55 100644 --- a/examples/pipeline/thread.c +++ b/examples/pipeline/thread.c @@ -47,13 +47,13 @@ struct block { void *block; }; -struct thread { +struct __rte_cache_aligned thread { struct rte_swx_pipeline *pipelines[THREAD_PIPELINES_MAX]; struct block *blocks[THREAD_BLOCKS_MAX]; volatile uint64_t n_pipelines; volatile uint64_t n_blocks; int enabled; -} __rte_cache_aligned; +}; static struct thread threads[RTE_MAX_LCORE]; diff --git a/examples/qos_sched/app_thread.c b/examples/qos_sched/app_thread.c index 059c470..e50cc33 100644 --- a/examples/qos_sched/app_thread.c +++ b/examples/qos_sched/app_thread.c @@ -62,7 +62,7 @@ app_rx_thread(struct thread_conf **confs) { uint32_t i, nb_rx; - struct rte_mbuf *rx_mbufs[burst_conf.rx_burst] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_mbuf *rx_mbufs[burst_conf.rx_burst]; struct thread_conf *conf; int conf_idx = 0; diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h index bc647ec..04e77a4 100644 --- a/examples/qos_sched/main.h +++ b/examples/qos_sched/main.h @@ -63,7 +63,7 @@ struct thread_stat }; -struct thread_conf +struct __rte_cache_aligned thread_conf { uint16_t rx_port; uint16_t tx_port; @@ -76,7 +76,7 @@ struct thread_conf #if APP_COLLECT_STAT struct thread_stat stat; #endif -} __rte_cache_aligned; +}; struct flow_conf diff --git a/examples/server_node_efd/shared/common.h b/examples/server_node_efd/shared/common.h index 130fd4f..e1ab7e6 100644 --- a/examples/server_node_efd/shared/common.h +++ b/examples/server_node_efd/shared/common.h @@ -20,19 +20,19 @@ * themselves are written by the nodes, so we have a distinct set, on different * cache lines for each node to use. */ -struct rx_stats { +struct __rte_cache_aligned rx_stats { uint64_t rx[RTE_MAX_ETHPORTS]; -} __rte_cache_aligned; +}; -struct tx_stats { +struct __rte_cache_aligned tx_stats { uint64_t tx[RTE_MAX_ETHPORTS]; uint64_t tx_drop[RTE_MAX_ETHPORTS]; -} __rte_cache_aligned; +}; -struct filter_stats { +struct __rte_cache_aligned filter_stats { uint64_t drop; uint64_t passed; -} __rte_cache_aligned; +}; struct shared_info { uint8_t num_nodes; diff --git a/examples/vhost/main.h b/examples/vhost/main.h index 2fcb837..c1c9a42 100644 --- a/examples/vhost/main.h +++ b/examples/vhost/main.h @@ -32,7 +32,7 @@ struct vhost_queue { uint16_t last_used_idx; }; -struct vhost_dev { +struct __rte_cache_aligned vhost_dev { /**< Number of memory regions for gpa to hpa translation. */ uint32_t nregions_hpa; /**< Device MAC address (Obtained on first TX packet). */ @@ -59,7 +59,7 @@ struct vhost_dev { #define MAX_QUEUE_PAIRS 4 struct vhost_queue queues[MAX_QUEUE_PAIRS * 2]; -} __rte_cache_aligned; +}; typedef uint16_t (*vhost_enqueue_burst_t)(struct vhost_dev *dev, uint16_t queue_id, struct rte_mbuf **pkts, diff --git a/examples/vhost_blk/vhost_blk.h b/examples/vhost_blk/vhost_blk.h index 975f0b4..649a52b 100644 --- a/examples/vhost_blk/vhost_blk.h +++ b/examples/vhost_blk/vhost_blk.h @@ -66,7 +66,7 @@ struct vhost_block_dev { uint8_t *data; }; -struct vhost_blk_ctrlr { +struct __rte_cache_aligned vhost_blk_ctrlr { uint8_t started; /** ID for vhost library. */ int vid; @@ -76,7 +76,7 @@ struct vhost_blk_ctrlr { struct vhost_block_dev *bdev; /** VM memory region */ struct rte_vhost_memory *mem; -} __rte_cache_aligned; +}; #define VHOST_BLK_MAX_IOVS 128 diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c index 02987eb..558c09a 100644 --- a/examples/vhost_crypto/main.c +++ b/examples/vhost_crypto/main.c @@ -42,7 +42,7 @@ struct lcore_option { uint16_t qid; }; -struct vhost_crypto_info { +struct __rte_cache_aligned vhost_crypto_info { int vids[MAX_NB_SOCKETS]; uint32_t nb_vids; struct rte_mempool *sess_pool; @@ -51,7 +51,7 @@ struct vhost_crypto_info { uint32_t qid; uint32_t nb_inflight_ops; volatile uint32_t initialized[MAX_NB_SOCKETS]; -} __rte_cache_aligned; +}; struct vhost_crypto_options { struct lcore_option los[MAX_NB_WORKER_CORES]; diff --git a/examples/vm_power_manager/power_manager.c b/examples/vm_power_manager/power_manager.c index 739372d..0355a7f 100644 --- a/examples/vm_power_manager/power_manager.c +++ b/examples/vm_power_manager/power_manager.c @@ -32,11 +32,11 @@ rte_spinlock_unlock(&global_core_freq_info[core_num].power_sl); \ } while (0) -struct freq_info { +struct __rte_cache_aligned freq_info { rte_spinlock_t power_sl; uint32_t freqs[RTE_MAX_LCORE_FREQS]; unsigned num_freqs; -} __rte_cache_aligned; +}; static struct freq_info global_core_freq_info[RTE_MAX_LCORE]; From patchwork Wed Mar 20 15:36:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138493 X-Patchwork-Delegate: david.marchand@redhat.com 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 7621F43D05; Wed, 20 Mar 2024 16:38:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EDA34427DE; Wed, 20 Mar 2024 16:38:25 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id CE467410FC for ; Wed, 20 Mar 2024 16:38:21 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 95B9920B74C2; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 95B9920B74C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949100; bh=w0TYssVe79JkvrU84hGeCvXLqNSWiM2YsUQ9rS3I998=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NzixOCVQ1C768ruXXaN8UjXDdtIy9dlOSFdgfSdaZG/T6CNKg0/BucJMBvdZG3kW5 cNrRxXWvsfcw/bOMddtTei+hOAGQFyrtxYARtvK9CQN90yDikSMWr/UvGYeZJ9aH5b LsXlkAdqoaLCW5Pq/FWyD1o4a+Rer3H3j+8Uxu88= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 02/83] net/ark: move alignment attribute on types Date: Wed, 20 Mar 2024 08:36:55 -0700 Message-Id: <1710949096-5786-3-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/ark/ark_ethdev_rx.c | 6 +++--- drivers/net/ark/ark_ethdev_tx.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c index 24f1c65..80e431f 100644 --- a/drivers/net/ark/ark_ethdev_rx.c +++ b/drivers/net/ark/ark_ethdev_rx.c @@ -28,7 +28,7 @@ static uint32_t eth_ark_rx_jumbo(struct ark_rx_queue *queue, static inline int eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue); /* ************************************************************************* */ -struct ark_rx_queue { +struct __rte_cache_aligned ark_rx_queue { /* array of mbufs to populate */ struct rte_mbuf **reserve_q; /* array of physical addresses of the mbuf data pointer */ @@ -60,10 +60,10 @@ struct ark_rx_queue { uint32_t unused; /* next cache line - fields written by device */ - RTE_MARKER cacheline1 __rte_cache_min_aligned; + alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1; volatile uint32_t prod_index; /* step 2 filled by FPGA */ -} __rte_cache_aligned; +}; /* ************************************************************************* */ static int diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c index 4792754..9c89c85 100644 --- a/drivers/net/ark/ark_ethdev_tx.c +++ b/drivers/net/ark/ark_ethdev_tx.c @@ -21,7 +21,7 @@ #endif /* ************************************************************************* */ -struct ark_tx_queue { +struct __rte_cache_aligned ark_tx_queue { union ark_tx_meta *meta_q; struct rte_mbuf **bufs; @@ -48,9 +48,9 @@ struct ark_tx_queue { uint16_t queue_index; /* next cache line - fields written by device */ - RTE_MARKER cacheline1 __rte_cache_min_aligned; + alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1; volatile int32_t cons_index; /* hw is done, can be freed */ -} __rte_cache_aligned; +}; /* Forward declarations */ static int eth_ark_tx_jumbo(struct ark_tx_queue *queue, From patchwork Wed Mar 20 15:36:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138494 X-Patchwork-Delegate: david.marchand@redhat.com 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 7096F43D05; Wed, 20 Mar 2024 16:38:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A0D4427DA; Wed, 20 Mar 2024 16:38:27 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E80E041132 for ; Wed, 20 Mar 2024 16:38:21 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id A889920B74C3; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A889920B74C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949100; bh=MBl/ulhxg1FfTbt4+y4wE9LaUwbefxSnJ01nEFu4BDs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RarZYw85ljI/NaAl3keCu3k2shX3OBP+iDCJoG8xAoLgk4n4Jcr+gPodrUETrp8kc eT1FbsG4CFaQ7II3cw3jScZwJBspXjXSNJbXP6oEOpxtInlH6PhsycLTU5TlA+8mVo i/aVKnwW0EbjAVPjWV+PRxies83YR2Zxf2QHXHsw= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 03/83] net/avp: move alignment attribute on types Date: Wed, 20 Mar 2024 08:36:56 -0700 Message-Id: <1710949096-5786-4-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/avp/avp_ethdev.c | 8 ++++---- drivers/net/avp/rte_avp_common.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index 53d9e38..6733462 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -154,7 +154,7 @@ static int avp_dev_stats_get(struct rte_eth_dev *dev, * Defines the AVP device attributes which are attached to an RTE ethernet * device */ -struct avp_dev { +struct __rte_cache_aligned avp_dev { uint32_t magic; /**< Memory validation marker */ uint64_t device_id; /**< Unique system identifier */ struct rte_ether_addr ethaddr; /**< Host specified MAC address */ @@ -190,12 +190,12 @@ struct avp_dev { void *sync_addr; /**< Req/Resp Mem address */ void *host_mbuf_addr; /**< (host) MBUF pool start address */ void *mbuf_addr; /**< MBUF pool start address */ -} __rte_cache_aligned; +}; /* RTE ethernet private data */ -struct avp_adapter { +struct __rte_cache_aligned avp_adapter { struct avp_dev avp; -} __rte_cache_aligned; +}; /* 32-bit MMIO register write */ diff --git a/drivers/net/avp/rte_avp_common.h b/drivers/net/avp/rte_avp_common.h index 908b31b..5ad71ac 100644 --- a/drivers/net/avp/rte_avp_common.h +++ b/drivers/net/avp/rte_avp_common.h @@ -100,7 +100,7 @@ struct rte_avp_fifo { /* * AVP packet buffer header used to define the exchange of packet data. */ -struct rte_avp_desc { +struct __rte_cache_aligned rte_avp_desc { uint64_t pad0; void *pkt_mbuf; /**< Reference to packet mbuf */ uint8_t pad1[14]; @@ -114,7 +114,7 @@ struct rte_avp_desc { uint32_t pad3; uint16_t vlan_tci; /**< VLAN Tag Control Identifier (CPU order). */ uint32_t pad4; -} __rte_packed __rte_cache_aligned; +} __rte_packed; /**{ AVP device features */ From patchwork Wed Mar 20 15:36:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138495 X-Patchwork-Delegate: david.marchand@redhat.com 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 E31FE43D05; Wed, 20 Mar 2024 16:38:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A2829427E1; Wed, 20 Mar 2024 16:38:28 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AB2ED402B9 for ; Wed, 20 Mar 2024 16:38:22 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id BC2F420B74C4; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BC2F420B74C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949100; bh=MaJeJeZi8YHuKYu/dJrZAhTnzLcWxPzzYCnyn9sTc8s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pFlhdwlriDs27HqciPMuqj9aiqa15aG6MxOuU1MYAkDd2gcNvCY/COBMljbrjJD9E mAodriOXvVdjwr5Mhmq4vNbYvcn6ITGv20kikHwTBQ7XltFAJdbTo3O/GbRrInmf5n EptYicQjVhAJLwwy48d+gs8Sv7GBwYoU7OwWpHAI= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 04/83] net/axgbe: move alignment attribute on types Date: Wed, 20 Mar 2024 08:36:57 -0700 Message-Id: <1710949096-5786-5-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/axgbe/axgbe_rxtx.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/axgbe/axgbe_rxtx.h b/drivers/net/axgbe/axgbe_rxtx.h index a218bf0..a326ba9 100644 --- a/drivers/net/axgbe/axgbe_rxtx.h +++ b/drivers/net/axgbe/axgbe_rxtx.h @@ -56,7 +56,7 @@ } write; }; -struct axgbe_rx_queue { +struct __rte_cache_aligned axgbe_rx_queue { /* membuf pool for rx buffers */ struct rte_mempool *mb_pool; /* H/w Rx buffer size configured in DMA */ @@ -101,7 +101,7 @@ struct axgbe_rx_queue { /* Number of mbufs allocated from pool*/ uint64_t mbuf_alloc; uint64_t offloads; /**< Rx offloads with RTE_ETH_RX_OFFLOAD_**/ -} __rte_cache_aligned; +}; /*Tx descriptor format */ struct axgbe_tx_desc { @@ -110,7 +110,7 @@ struct axgbe_tx_desc { uint32_t desc3; }; -struct axgbe_tx_queue { +struct __rte_cache_aligned axgbe_tx_queue { /* Port private data reference */ struct axgbe_port *pdata; /* Number of Tx descriptors in queue*/ @@ -150,7 +150,7 @@ struct axgbe_tx_queue { uint64_t bytes; uint64_t errors; uint64_t offloads; /**< Tx offload flags of RTE_ETH_TX_OFFLOAD_* */ -} __rte_cache_aligned; +}; /*Queue related APIs */ From patchwork Wed Mar 20 15:36:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138496 X-Patchwork-Delegate: david.marchand@redhat.com 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 D354B43D05; Wed, 20 Mar 2024 16:39:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC70F4281D; Wed, 20 Mar 2024 16:38:29 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E66CF41132 for ; Wed, 20 Mar 2024 16:38:22 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id CEEAF20B74C5; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CEEAF20B74C5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949100; bh=YPuEAnieJTiCNclI8DZAR0beU3cVHoIh4R0nMpks8LQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YbXphhve+/ZIrDqTkOZwuO7/Xz+btSc935cBRujo2p1dCCqGaKcIfq6VaYkDHXH7L T2zxyAu20lP/E6Cl4mG8AtCE0ruJUkdYCVToNAL93IDB8MYZOA4mQ6OJozZt1IjLTT ymZCXYZWe0fE6n3uWni/s2di0dgBjYEmOpmVI6uU= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 05/83] net/bnxt: move alignment attribute on types Date: Wed, 20 Mar 2024 08:36:58 -0700 Message-Id: <1710949096-5786-6-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/bnxt/bnxt_rxr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c index 3542975..957b7d6 100644 --- a/drivers/net/bnxt/bnxt_rxr.c +++ b/drivers/net/bnxt/bnxt_rxr.c @@ -473,7 +473,7 @@ static inline struct rte_mbuf *bnxt_tpa_end( return mbuf; } -uint32_t bnxt_ptype_table[BNXT_PTYPE_TBL_DIM] __rte_cache_aligned; +alignas(RTE_CACHE_LINE_SIZE) uint32_t bnxt_ptype_table[BNXT_PTYPE_TBL_DIM]; static void __rte_cold bnxt_init_ptype_table(void) From patchwork Wed Mar 20 15:36:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138497 X-Patchwork-Delegate: david.marchand@redhat.com 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 31AEA43D05; Wed, 20 Mar 2024 16:39:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3010942D0C; Wed, 20 Mar 2024 16:38:31 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 3B5BF41151 for ; Wed, 20 Mar 2024 16:38:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id E159420B74C6; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E159420B74C6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949100; bh=qhBAISTayZxczxR2oDbEGsOksT5bZ5TEYdfnJ1QvkPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LyVeqSb9pmKcrUPpUllL9eqwvkUW+s5Ir3x5Gk2nfRxet98IAQDUD+Gcrf7JWaT/y 9GaagZQYedvnUg/t6vZKixDGOCNTW50LFeSawCOz5XBReTvDyZ0zCTI8sqth9pZePQ b2frgWrTmG4NaC9ZB0uG1zzHGVVjy9kYctf8HJD4= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 06/83] net/bonding: move alignment attribute on types Date: Wed, 20 Mar 2024 08:36:59 -0700 Message-Id: <1710949096-5786-7-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/bonding/rte_eth_bond_8023ad.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.h b/drivers/net/bonding/rte_eth_bond_8023ad.h index 4c280c7..b2deb26 100644 --- a/drivers/net/bonding/rte_eth_bond_8023ad.h +++ b/drivers/net/bonding/rte_eth_bond_8023ad.h @@ -57,12 +57,12 @@ struct slow_protocol { } __rte_packed; /** Generic slow protocol frame type structure */ -struct slow_protocol_frame { +struct __rte_aligned(2) slow_protocol_frame { struct rte_ether_hdr eth_hdr; struct slow_protocol slow_protocol; -} __rte_packed __rte_aligned(2); +} __rte_packed; -struct port_params { +struct __rte_aligned(2) port_params { uint16_t system_priority; /**< System priority (unused in current implementation) */ struct rte_ether_addr system; @@ -73,18 +73,18 @@ struct port_params { /**< Priority of this (unused in current implementation) */ uint16_t port_number; /**< Port number. It corresponds to member port id. */ -} __rte_packed __rte_aligned(2); +} __rte_packed; -struct lacpdu_actor_partner_params { +struct __rte_aligned(2) lacpdu_actor_partner_params { uint8_t tlv_type_info; uint8_t info_length; struct port_params port_params; uint8_t state; uint8_t reserved_3[3]; -} __rte_packed __rte_aligned(2); +} __rte_packed; /** LACPDU structure (5.4.2 in 802.1AX documentation). */ -struct lacpdu { +struct __rte_aligned(2) lacpdu { uint8_t subtype; uint8_t version_number; @@ -99,15 +99,15 @@ struct lacpdu { uint8_t tlv_type_terminator; uint8_t terminator_length; uint8_t reserved_50[50]; -} __rte_packed __rte_aligned(2); +} __rte_packed; /** LACPDU frame: Contains ethernet header and LACPDU. */ -struct lacpdu_header { +struct __rte_aligned(2) lacpdu_header { struct rte_ether_hdr eth_hdr; struct lacpdu lacpdu; -} __rte_packed __rte_aligned(2); +} __rte_packed; -struct marker { +struct __rte_aligned(2) marker { uint8_t subtype; uint8_t version_number; @@ -121,12 +121,12 @@ struct marker { uint8_t tlv_type_terminator; uint8_t terminator_length; uint8_t reserved_90[90]; -} __rte_packed __rte_aligned(2); +} __rte_packed; -struct marker_header { +struct __rte_aligned(2) marker_header { struct rte_ether_hdr eth_hdr; struct marker marker; -} __rte_packed __rte_aligned(2); +} __rte_packed; struct rte_eth_bond_8023ad_conf { uint32_t fast_periodic_ms; From patchwork Wed Mar 20 15:37:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138498 X-Patchwork-Delegate: david.marchand@redhat.com 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 94E4A43D05; Wed, 20 Mar 2024 16:39:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA75B42D6B; Wed, 20 Mar 2024 16:38:32 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9D3AA41132 for ; Wed, 20 Mar 2024 16:38:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 00AEC20B74C7; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 00AEC20B74C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=KhW63UDpN0Qb+gf9s5KudzGUwjynbYsOuNWuPpy3Gzs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aM+s8SOckepRXB2sgWDVgB7xRU6yIePUeM+AzhLPss16ogajzcVFk022CXfuVPV9C 8HSsnJ6Jn76UTLlQuiMfh/Cs03RcCSPjH84RiPAwzdKGmHg8x7xlC3rbFt0kAeZFLK jsXQmUjHKg3xqaP22FBvguy9oBlf+QW4OqKBITPg= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 07/83] net/cxgbe: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:00 -0700 Message-Id: <1710949096-5786-8-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/cxgbe/base/adapter.h | 14 +++++++------- drivers/net/cxgbe/cxgbe_ofld.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/cxgbe/base/adapter.h b/drivers/net/cxgbe/base/adapter.h index 7bee5cf..d490c6f 100644 --- a/drivers/net/cxgbe/base/adapter.h +++ b/drivers/net/cxgbe/base/adapter.h @@ -155,12 +155,12 @@ struct sge_eth_rx_stats { /* Ethernet rx queue statistics */ u64 rx_drops; /* # of packets dropped due to no mem */ }; -struct sge_eth_rxq { /* a SW Ethernet Rx queue */ +struct __rte_cache_aligned sge_eth_rxq { /* a SW Ethernet Rx queue */ unsigned int flags; /* flags for state of the queue */ struct sge_rspq rspq; struct sge_fl fl; struct sge_eth_rx_stats stats; -} __rte_cache_aligned; +}; /* * Currently there are two types of coalesce WR. Type 0 needs 48 bytes per @@ -252,7 +252,7 @@ struct sge_eth_tx_stats { /* Ethernet tx queue statistics */ u64 coal_pkts; /* # of coalesced packets */ }; -struct sge_eth_txq { /* state for an SGE Ethernet Tx queue */ +struct __rte_cache_aligned sge_eth_txq { /* state for an SGE Ethernet Tx queue */ struct sge_txq q; struct rte_eth_dev *eth_dev; /* port that this queue belongs to */ struct rte_eth_dev_data *data; @@ -260,21 +260,21 @@ struct sge_eth_txq { /* state for an SGE Ethernet Tx queue */ rte_spinlock_t txq_lock; unsigned int flags; /* flags for state of the queue */ -} __rte_cache_aligned; +}; -struct sge_ctrl_txq { /* State for an SGE control Tx queue */ +struct __rte_cache_aligned sge_ctrl_txq { /* State for an SGE control Tx queue */ struct sge_txq q; /* txq */ struct adapter *adapter; /* adapter associated with this queue */ rte_spinlock_t ctrlq_lock; /* control queue lock */ u8 full; /* the Tx ring is full */ u64 txp; /* number of transmits */ struct rte_mempool *mb_pool; /* mempool to generate ctrl pkts */ -} __rte_cache_aligned; +}; struct sge { struct sge_eth_txq *ethtxq; struct sge_eth_rxq *ethrxq; - struct sge_rspq fw_evtq __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct sge_rspq fw_evtq; struct sge_ctrl_txq ctrlq[MAX_CTRL_QUEUES]; u16 max_ethqsets; /* # of available Ethernet queue sets */ diff --git a/drivers/net/cxgbe/cxgbe_ofld.h b/drivers/net/cxgbe/cxgbe_ofld.h index 33697c7..7a4e30d 100644 --- a/drivers/net/cxgbe/cxgbe_ofld.h +++ b/drivers/net/cxgbe/cxgbe_ofld.h @@ -65,7 +65,7 @@ struct tid_info { u32 hash_tids_in_use; u32 conns_in_use; - rte_spinlock_t atid_lock __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) rte_spinlock_t atid_lock; rte_spinlock_t ftid_lock; }; From patchwork Wed Mar 20 15:37:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138499 X-Patchwork-Delegate: david.marchand@redhat.com 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 5684343D05; Wed, 20 Mar 2024 16:39:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C850642D26; Wed, 20 Mar 2024 16:38:34 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DEF4641151 for ; Wed, 20 Mar 2024 16:38:23 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 13CDB20B74C8; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 13CDB20B74C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=FUzUwH4EwcIt2AOv6xHsQ12pxw+uGwJZNMcdWIKkP3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qWZxzaK2A+7xbjq+y2g9A/K4RKzc2/uPdKJzddwroD23qmaR0MJJ/G9v2aXjmV7Bt lWw68KOk/0UY7XzIpNmOhj5y2I7yHi7TuLcgMv7kImKb5ZYSOcqbZ7gfS0L8nP1OHK Jchs2APGJdPLT41DgZ53kVAM/MHbm4W8V1nqQgg0= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 08/83] net/e1000: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:01 -0700 Message-Id: <1710949096-5786-9-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/e1000/igb_rxtx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index 5cafd6f..d61eaad 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -705,8 +705,8 @@ struct igb_tx_queue { static inline uint32_t igb_rxd_pkt_info_to_pkt_type(uint16_t pkt_info) { - static const uint32_t - ptype_table[IGB_PACKET_TYPE_MAX] __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t + ptype_table[IGB_PACKET_TYPE_MAX] = { [IGB_PACKET_TYPE_IPV4] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4, [IGB_PACKET_TYPE_IPV4_EXT] = RTE_PTYPE_L2_ETHER | From patchwork Wed Mar 20 15:37:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138500 X-Patchwork-Delegate: david.marchand@redhat.com 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 8118943D05; Wed, 20 Mar 2024 16:39:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DBAB42D90; Wed, 20 Mar 2024 16:38:36 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 21CDA42670 for ; Wed, 20 Mar 2024 16:38:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 283AF20B74C9; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 283AF20B74C9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=0aB6JmLpOihvB1VggOe1DfVf7BpQWUxn68s+WLb285w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qicMmLJ7o3dwaw1Cd4jivPizdaRf0bIR+iI3+oGWEJh9jDrDpuvS1gGI741Wudrxb pkcKaHpYdAX4twcfXlnDvgOuldfcCcIj9KzPxg0Pa6s54i6jHGBm/tlDAawYUC0NtE uWpwEF+z8X4eRxHAajKA/VtqnnJ3WLeNpOAsA8kE= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 09/83] net/ena: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:02 -0700 Message-Id: <1710949096-5786-10-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/ena/ena_ethdev.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.h b/drivers/net/ena/ena_ethdev.h index 7513a3f..7d82d22 100644 --- a/drivers/net/ena/ena_ethdev.h +++ b/drivers/net/ena/ena_ethdev.h @@ -142,7 +142,7 @@ struct ena_stats_rx { u64 bad_req_id; }; -struct ena_ring { +struct __rte_cache_aligned ena_ring { u16 next_to_use; u16 next_to_clean; uint64_t last_cleanup_ticks; @@ -175,8 +175,7 @@ struct ena_ring { uint16_t rx_free_thresh; }; - struct ena_com_rx_buf_info ena_bufs[ENA_PKT_MAX_BUFS] - __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct ena_com_rx_buf_info ena_bufs[ENA_PKT_MAX_BUFS]; struct rte_mempool *mb_pool; unsigned int port_id; @@ -201,7 +200,7 @@ struct ena_ring { unsigned int numa_socket_id; uint32_t missing_tx_completion_threshold; -} __rte_cache_aligned; +}; enum ena_adapter_state { ENA_ADAPTER_STATE_FREE = 0, @@ -288,15 +287,15 @@ struct ena_adapter { /* OS defined structs */ struct rte_eth_dev_data *edev_data; - struct ena_com_dev ena_dev __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct ena_com_dev ena_dev; /* TX */ - struct ena_ring tx_ring[ENA_MAX_NUM_QUEUES] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct ena_ring tx_ring[ENA_MAX_NUM_QUEUES]; u32 max_tx_ring_size; u16 max_tx_sgl_size; /* RX */ - struct ena_ring rx_ring[ENA_MAX_NUM_QUEUES] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct ena_ring rx_ring[ENA_MAX_NUM_QUEUES]; u32 max_rx_ring_size; u16 max_rx_sgl_size; @@ -357,9 +356,9 @@ struct ena_adapter { * Helper variables for holding the information about the supported * metrics. */ - uint64_t metrics_stats[ENA_MAX_CUSTOMER_METRICS] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint64_t metrics_stats[ENA_MAX_CUSTOMER_METRICS]; uint16_t metrics_num; - struct ena_stats_srd srd_stats __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct ena_stats_srd srd_stats; }; int ena_mp_indirect_table_set(struct ena_adapter *adapter); From patchwork Wed Mar 20 15:37:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138502 X-Patchwork-Delegate: david.marchand@redhat.com 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 A934C43D05; Wed, 20 Mar 2024 16:39:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 039BC42D9D; Wed, 20 Mar 2024 16:38:39 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9F4CF427D9 for ; Wed, 20 Mar 2024 16:38:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 3BBFD20B74CA; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3BBFD20B74CA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=OqjqLYqbEpp+kAO7BvjhOTH6LwZk/Jg+SdSZRUXQN1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ot6hkS4hWIghT8xOJ8Xd0sckeFYyrp1ELzmyINIg1fIVnHR0KPl2iPfXZ3zSgyN4a nGDqHGfUcsnJGQH1Bc+ZEjq5CVPu6dJJBVoCO9bpN2VUwGf2y4pJq0lZhYSS1+meCl Cm7F8N4vZC5hNq+Da2BqFXDeE78ogj9D81UFvqXo= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 10/83] net/enic: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:03 -0700 Message-Id: <1710949096-5786-11-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/enic/enic_rxtx_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/enic/enic_rxtx_common.h b/drivers/net/enic/enic_rxtx_common.h index 9d6d347..c55eea4 100644 --- a/drivers/net/enic/enic_rxtx_common.h +++ b/drivers/net/enic/enic_rxtx_common.h @@ -114,7 +114,7 @@ * Also, as there is no tunnel type info (VXLAN, NVGRE, or GENEVE), set * RTE_PTYPE_TUNNEL_GRENAT.. */ - static const uint32_t cq_type_table[128] __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t cq_type_table[128] = { [0x00] = RTE_PTYPE_UNKNOWN, [0x01] = RTE_PTYPE_UNKNOWN | RTE_PTYPE_TUNNEL_GRENAT | From patchwork Wed Mar 20 15:37:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138501 X-Patchwork-Delegate: david.marchand@redhat.com 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 B5E7F43D05; Wed, 20 Mar 2024 16:39:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A38242D76; Wed, 20 Mar 2024 16:38:37 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B025F427DA for ; Wed, 20 Mar 2024 16:38:24 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 4E57020B74CB; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4E57020B74CB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=Y3TpXZGisWMFP2rpSvLRc6C81/GtQ3iDuPGTismtDvQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jB4WNN4YUF8BFlLlf9a4KDspaPhkc3Ho6Wy9M9uY1ITihvNVEu471no7Dl1JU68F6 NoHz7XnHF/5I2mUSEdWgpQxe1CZ0hplgJiEZcKI1ga1Ro5H76Pif4voVanIB8E6vs/ 8ss2OJcY9c6sPND4ptLroRYn1l4oi9ER9V3gPmic= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 11/83] net/fm10k: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:04 -0700 Message-Id: <1710949096-5786-12-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/fm10k/fm10k_rxtx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index c0841ab..690142b 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -53,9 +53,8 @@ static inline void dump_rxd(union fm10k_rx_desc *rxd) static inline void rx_desc_to_ol_flags(struct rte_mbuf *m, const union fm10k_rx_desc *d) { - static const uint32_t - ptype_table[FM10K_RXD_PKTTYPE_MASK >> FM10K_RXD_PKTTYPE_SHIFT] - __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t + ptype_table[FM10K_RXD_PKTTYPE_MASK >> FM10K_RXD_PKTTYPE_SHIFT] = { [FM10K_PKTTYPE_OTHER] = RTE_PTYPE_L2_ETHER, [FM10K_PKTTYPE_IPV4] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4, [FM10K_PKTTYPE_IPV4_EX] = RTE_PTYPE_L2_ETHER | From patchwork Wed Mar 20 15:37:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138503 X-Patchwork-Delegate: david.marchand@redhat.com 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 1025143D05; Wed, 20 Mar 2024 16:40:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D29442DA6; Wed, 20 Mar 2024 16:38:40 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 234F4427DD for ; Wed, 20 Mar 2024 16:38:25 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 62CBD20B74CC; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 62CBD20B74CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=bOIxsg6e0rY+m0tU/1VG2cVQsZ4wrYHxhMBrdTYbBrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jbfZXbqEYORxclzNEWhjc+h6SDThaxs3/tT6E2usP7jB+roAPXwWY4+fFnkBzEm23 VLHz/SUcoVFDmR1exntOobZiRXR3oJZ0AhadtbN5yeXwI6WPctxdtJnIL544ZTFcf7 v1c4ootLG5SlCc96HY5EDkcU46wQ/pldK9EIffN0= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 12/83] net/hinic: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:05 -0700 Message-Id: <1710949096-5786-13-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/hinic/hinic_pmd_rx.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/hinic/hinic_pmd_rx.h b/drivers/net/hinic/hinic_pmd_rx.h index 5c30339..2dde3ec 100644 --- a/drivers/net/hinic/hinic_pmd_rx.h +++ b/drivers/net/hinic/hinic_pmd_rx.h @@ -28,18 +28,18 @@ struct hinic_rq_ctrl { u32 ctrl_fmt; }; +#if defined(RTE_ARCH_ARM64) +struct __rte_cache_aligned hinic_rq_cqe { +#else struct hinic_rq_cqe { +#endif u32 status; u32 vlan_len; u32 offload_type; u32 rss_hash; u32 rsvd[4]; -#if defined(RTE_ARCH_ARM64) -} __rte_cache_aligned; -#else }; -#endif struct hinic_rq_cqe_sect { struct hinic_sge sge; From patchwork Wed Mar 20 15:37:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138504 X-Patchwork-Delegate: david.marchand@redhat.com 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 D92DD43D05; Wed, 20 Mar 2024 16:40:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE1C541132; Wed, 20 Mar 2024 16:38:41 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 75CD3427D9 for ; Wed, 20 Mar 2024 16:38:25 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 761CA20B74CD; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 761CA20B74CD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=psHhMMY7vlsBnwhew7L+peRaQsgswQPpCcIfdQOtppw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kVjA+REpzdbJ+yM6wj5Fv0+uIPLHJr4H2/z7AELvK2LS8b6JfXlFacVi5cYrPSP6k U5lH9uow8k90Zece8n68iOMF0VnLikeq/IApxWGrBOS6Zi9e+3g8t0N6aZmEaFl5ZX 7HDZkIAhC2iO/IrF+w22WV1NyDIsEgUsukd+Vx1U= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 13/83] net/hns3: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:06 -0700 Message-Id: <1710949096-5786-14-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/hns3/hns3_ethdev.h | 4 ++-- drivers/net/hns3/hns3_fdir.c | 4 ++-- drivers/net/hns3/hns3_rxtx.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h index e70c5ff..a4bc62a 100644 --- a/drivers/net/hns3/hns3_ethdev.h +++ b/drivers/net/hns3/hns3_ethdev.h @@ -767,7 +767,7 @@ struct hns3_ptype_table { * descriptor, it functions only when firmware report the capability of * HNS3_CAPS_RXD_ADV_LAYOUT_B and driver enabled it. */ - uint32_t ptype[HNS3_PTYPE_NUM] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint32_t ptype[HNS3_PTYPE_NUM]; }; #define HNS3_FIXED_MAX_TQP_NUM_MODE 0 @@ -872,7 +872,7 @@ struct hns3_adapter { uint64_t dev_caps_mask; uint16_t mbx_time_limit_ms; /* wait time for mbx message */ - struct hns3_ptype_table ptype_tbl __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct hns3_ptype_table ptype_tbl; }; enum hns3_dev_cap { diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c index d100e58..4843066 100644 --- a/drivers/net/hns3/hns3_fdir.c +++ b/drivers/net/hns3/hns3_fdir.c @@ -724,8 +724,8 @@ static int hns3_config_key(struct hns3_adapter *hns, struct hns3_fd_key_cfg *key_cfg; uint8_t *cur_key_x; uint8_t *cur_key_y; - uint8_t key_x[MAX_KEY_BYTES] __rte_aligned(4); - uint8_t key_y[MAX_KEY_BYTES] __rte_aligned(4); + alignas(4) uint8_t key_x[MAX_KEY_BYTES]; + alignas(4) uint8_t key_y[MAX_KEY_BYTES]; uint8_t vf_id = rule->vf_id; uint8_t meta_data_region; uint8_t tuple_size; diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h index e2ad42b..e975cd1 100644 --- a/drivers/net/hns3/hns3_rxtx.h +++ b/drivers/net/hns3/hns3_rxtx.h @@ -366,7 +366,7 @@ struct hns3_rx_queue { * The following fields are not accessed in the I/O path, so they are * placed at the end. */ - void *io_base __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) void *io_base; struct hns3_adapter *hns; uint64_t rx_ring_phys_addr; /* RX ring DMA address */ const struct rte_memzone *mz; @@ -540,7 +540,7 @@ struct hns3_tx_queue { * The following fields are not accessed in the I/O path, so they are * placed at the end. */ - void *io_base __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) void *io_base; struct hns3_adapter *hns; uint64_t tx_ring_phys_addr; /* TX ring DMA address */ const struct rte_memzone *mz; From patchwork Wed Mar 20 15:37:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138505 X-Patchwork-Delegate: david.marchand@redhat.com 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 7BA1943D05; Wed, 20 Mar 2024 16:40:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F3FCC42DB6; Wed, 20 Mar 2024 16:38:42 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C8E36427DA for ; Wed, 20 Mar 2024 16:38:25 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 8914C20B74CE; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8914C20B74CE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=tLbRkWlt6Y39z3f7IlpD2Vwyndc7EpDMJR2FsDwnpIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HQUzCkCsAsyspecwWbCkHGZEqzKMTCIJBahEllH8r3bbMr1t+1NOpc8HWuVgiPQsX sGX07lYBIU1rev72q6QrfCWQgqI8FBrRJMv0ZnP93/ahslWX7TfQeOlI4c0yXlbvGf n9NH0UXdo4zazjQUDh0lbHJP3vEZNSd/Y2vipoOs= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 14/83] net/i40e: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:07 -0700 Message-Id: <1710949096-5786-15-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/i40e/i40e_ethdev.h | 4 ++-- drivers/net/i40e/i40e_rxtx.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h index b9628ca..31fc926 100644 --- a/drivers/net/i40e/i40e_ethdev.h +++ b/drivers/net/i40e/i40e_ethdev.h @@ -1261,9 +1261,9 @@ struct i40e_adapter { struct rte_timecounter tx_tstamp_tc; /* ptype mapping table */ - uint32_t ptype_tbl[I40E_MAX_PKT_TYPE] __rte_cache_min_aligned; + alignas(RTE_CACHE_LINE_MIN_SIZE) uint32_t ptype_tbl[I40E_MAX_PKT_TYPE]; /* flow type to pctype mapping table */ - uint64_t pctypes_tbl[I40E_FLOW_TYPE_MAX] __rte_cache_min_aligned; + alignas(RTE_CACHE_LINE_MIN_SIZE) uint64_t pctypes_tbl[I40E_FLOW_TYPE_MAX]; uint64_t flow_types_mask; uint64_t pctypes_mask; diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h index 70320cf..2f2f890 100644 --- a/drivers/net/i40e/i40e_rxtx.h +++ b/drivers/net/i40e/i40e_rxtx.h @@ -279,7 +279,7 @@ uint16_t i40e_xmit_pkts_vec_avx512(void *tx_queue, static inline uint32_t i40e_get_default_pkt_type(uint8_t ptype) { - static const uint32_t type_table[UINT8_MAX + 1] __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t type_table[UINT8_MAX + 1] = { /* L2 types */ /* [0] reserved */ [1] = RTE_PTYPE_L2_ETHER, From patchwork Wed Mar 20 15:37:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138506 X-Patchwork-Delegate: david.marchand@redhat.com 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 F36F643D05; Wed, 20 Mar 2024 16:40:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 55F8742DBE; Wed, 20 Mar 2024 16:38:44 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 03097427DF for ; Wed, 20 Mar 2024 16:38:26 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 9BE0720B74CF; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9BE0720B74CF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=nXLQVFxQXSrktS8QoCGH6uk/aLKei0vI9p7oFrQeSYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kXmxuTFc1mscKYHc38FK1IIp1qg56Kd8RWhL3u4toA7tjhn4qWKtARP82LYOdXbUZ jX+/6emn9yhQIf1kVdsHnRorHzoogEKz3BMjErxbA1AkzobyTkzpqt3glx37n9RpVl bIZYU0/o6r14y0MDO5Y34IFqWh0lc67BStqLuqNw= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 15/83] net/iavf: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:08 -0700 Message-Id: <1710949096-5786-16-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/iavf/iavf.h | 2 +- drivers/net/iavf/iavf_rxtx.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index 824ae4a..7ab41c9 100644 --- a/drivers/net/iavf/iavf.h +++ b/drivers/net/iavf/iavf.h @@ -375,7 +375,7 @@ struct iavf_adapter { /* For vector PMD */ bool rx_vec_allowed; bool tx_vec_allowed; - uint32_t ptype_tbl[IAVF_MAX_PKT_TYPE] __rte_cache_min_aligned; + alignas(RTE_CACHE_LINE_MIN_SIZE) uint32_t ptype_tbl[IAVF_MAX_PKT_TYPE]; bool stopped; bool closed; bool no_poll; diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 0a5246d..59a0b9e 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -4449,8 +4449,7 @@ struct iavf_tx_context_desc_qws { static inline uint32_t iavf_get_default_ptype(uint16_t ptype) { - static const uint32_t ptype_tbl[IAVF_MAX_PKT_TYPE] - __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t ptype_tbl[IAVF_MAX_PKT_TYPE] = { /* L2 types */ /* [0] reserved */ [1] = RTE_PTYPE_L2_ETHER, From patchwork Wed Mar 20 15:37:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138507 X-Patchwork-Delegate: david.marchand@redhat.com 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 A37B443D05; Wed, 20 Mar 2024 16:40:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E86742DC7; Wed, 20 Mar 2024 16:38:45 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5C117427D9 for ; Wed, 20 Mar 2024 16:38:26 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id AF3FB20B74D0; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AF3FB20B74D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=3kK5PRKjnDJH4Nvh0JAQ/ro5afl9l4+Nd0Hyd8Voybc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FXgzfpo+LTPFar6cX3/Yvg3XciINoiNNPwt0QPiw3y3DO+Y1aGrBjnoDdnTu6mt1O pUxMe0cPoddUM4FHQx5cHQY8c18PMrDOyfYQMy4i07DN+6YB4aHCP+19apuqcmFzdn WIebTI+OAP4jLblHAbbimGazhedz5tACPbbHZu1c= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 16/83] net/ice: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:09 -0700 Message-Id: <1710949096-5786-17-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/ice/ice_ethdev.h | 2 +- drivers/net/ice/ice_rxtx.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h index 1a848b3..984479a 100644 --- a/drivers/net/ice/ice_ethdev.h +++ b/drivers/net/ice/ice_ethdev.h @@ -605,7 +605,7 @@ struct ice_adapter { bool tx_vec_allowed; bool tx_simple_allowed; /* ptype mapping table */ - uint32_t ptype_tbl[ICE_MAX_PKT_TYPE] __rte_cache_min_aligned; + alignas(RTE_CACHE_LINE_MIN_SIZE) uint32_t ptype_tbl[ICE_MAX_PKT_TYPE]; bool is_safe_mode; struct ice_devargs devargs; enum ice_pkg_type active_pkg_type; /* loaded ddp package type */ diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 13aabe9..95a2db3 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -4013,8 +4013,7 @@ static inline uint32_t ice_get_default_pkt_type(uint16_t ptype) { - static const uint32_t type_table[ICE_MAX_PKT_TYPE] - __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t type_table[ICE_MAX_PKT_TYPE] = { /* L2 types */ /* [0] reserved */ [1] = RTE_PTYPE_L2_ETHER, From patchwork Wed Mar 20 15:37:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138508 X-Patchwork-Delegate: david.marchand@redhat.com 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 4D8DF43D05; Wed, 20 Mar 2024 16:40:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E70B142DCD; Wed, 20 Mar 2024 16:38:46 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AAF39427DA for ; Wed, 20 Mar 2024 16:38:26 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C32E720B74D1; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C32E720B74D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=SMi6r034F/7KyVXzI4tvHiOYHJSK8ILZEp4lwwMKnXs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xoau80QGh9D/o84My41N9zP/92O2568tY0ydKpFaovuotNya588HxSJzSiIpgsDfl 7JTYK4yiSdfBpCaZ+RE8MXm21gXwa3ZLbgqBDckyzX8zujHBKHtQx6Lt44+Q3FHLIO Pk3oU5J1+hr1P8Yv5UdAGYPqG1QmaGvJAxiiq28g= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 17/83] net/igc: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:10 -0700 Message-Id: <1710949096-5786-18-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/igc/igc_txrx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c index 5c60e3e..d0cee1b 100644 --- a/drivers/net/igc/igc_txrx.c +++ b/drivers/net/igc/igc_txrx.c @@ -148,8 +148,8 @@ static inline uint32_t rx_desc_pkt_info_to_pkt_type(uint32_t pkt_info) { - static const uint32_t - ptype_table[IGC_PACKET_TYPE_MAX] __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t + ptype_table[IGC_PACKET_TYPE_MAX] = { [IGC_PACKET_TYPE_IPV4] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4, [IGC_PACKET_TYPE_IPV4_EXT] = RTE_PTYPE_L2_ETHER | From patchwork Wed Mar 20 15:37:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138509 X-Patchwork-Delegate: david.marchand@redhat.com 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 0670943D05; Wed, 20 Mar 2024 16:40:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39D1D42DD3; Wed, 20 Mar 2024 16:38:48 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DE850427D9 for ; Wed, 20 Mar 2024 16:38:26 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id D66D420B74D2; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D66D420B74D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=gwsC5yw8IUDqVrFARypIpizZmnQNuiMW+/LcvUU7Kxo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sHtTEnO4W3yfeIKor4A6rx7YkGWgjsk8Qbi36ZBmOt5ldygLHP0H4U/yfDPSeHcI4 BOTGcwDh+Rj0k8TjFr1jb+g7WrTejebp2Cjz2hx38gjzbSkPZYAhQYfHuUNPXUVauB ceVa42fe2ANBlIU4vsovt3mRMR8SjxnXHBMq3tEk= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 18/83] net/ionic: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:11 -0700 Message-Id: <1710949096-5786-19-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/ionic/ionic_lif.h | 2 +- drivers/net/ionic/ionic_rxtx.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ionic/ionic_lif.h b/drivers/net/ionic/ionic_lif.h index 591cf1a..f4a1b99 100644 --- a/drivers/net/ionic/ionic_lif.h +++ b/drivers/net/ionic/ionic_lif.h @@ -98,7 +98,7 @@ struct ionic_rx_qcq { struct ionic_rx_stats stats; /* cacheline4+ */ - struct rte_mbuf *mbs[IONIC_MBUF_BULK_ALLOC] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_mbuf *mbs[IONIC_MBUF_BULK_ALLOC]; struct ionic_admin_ctx admin_ctx; }; diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c index f0bd3ff..923f517 100644 --- a/drivers/net/ionic/ionic_rxtx.c +++ b/drivers/net/ionic/ionic_rxtx.c @@ -607,8 +607,7 @@ } #define IONIC_CSUM_FLAG_MASK (IONIC_RXQ_COMP_CSUM_F_VLAN - 1) -const uint64_t ionic_csum_flags[IONIC_CSUM_FLAG_MASK] - __rte_cache_aligned = { +const alignas(RTE_CACHE_LINE_SIZE) uint64_t ionic_csum_flags[IONIC_CSUM_FLAG_MASK] = { /* IP_BAD set */ [IONIC_RXQ_COMP_CSUM_F_IP_BAD] = RTE_MBUF_F_RX_IP_CKSUM_BAD, [IONIC_RXQ_COMP_CSUM_F_IP_BAD | IONIC_RXQ_COMP_CSUM_F_TCP_OK] = @@ -637,8 +636,7 @@ }; /* RTE_PTYPE_UNKNOWN is 0x0 */ -const uint32_t ionic_ptype_table[IONIC_RXQ_COMP_PKT_TYPE_MASK] - __rte_cache_aligned = { +const alignas(RTE_CACHE_LINE_SIZE) uint32_t ionic_ptype_table[IONIC_RXQ_COMP_PKT_TYPE_MASK] = { [IONIC_PKT_TYPE_NON_IP] = RTE_PTYPE_UNKNOWN, [IONIC_PKT_TYPE_IPV4] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4, [IONIC_PKT_TYPE_IPV4_TCP] = From patchwork Wed Mar 20 15:37:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138510 X-Patchwork-Delegate: david.marchand@redhat.com 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 13E9743D05; Wed, 20 Mar 2024 16:40:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F65942DD8; Wed, 20 Mar 2024 16:38:49 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 33112427E1 for ; Wed, 20 Mar 2024 16:38:27 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id EA04320B74D3; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EA04320B74D3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949101; bh=kWGTK3h2lWmAMl+srJFAEusMLOjB0I/LAL1gub4xbVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pJELZvBEn96lZ67Zn1YvfUL7IQ278s1ACu141zvziymR8poEzQtGt40qDA+Hpjen0 Syz+9t/sKbeJ5AIBYtN7uwTr6Uf5tCol3rPPgLcWB2WN6McCQTtNdxQV4Otb6MwIPR IFoXylFCIApD/Mhxccd493+2771/k6Ub7HXXbOS8= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 19/83] net/ixgbe: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:12 -0700 Message-Id: <1710949096-5786-20-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/ixgbe/ixgbe_ipsec.h | 4 ++-- drivers/net/ixgbe/ixgbe_rxtx.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ipsec.h b/drivers/net/ixgbe/ixgbe_ipsec.h index e218c0a..be39199 100644 --- a/drivers/net/ixgbe/ixgbe_ipsec.h +++ b/drivers/net/ixgbe/ixgbe_ipsec.h @@ -60,7 +60,7 @@ struct ipaddr { }; /** inline crypto crypto private session structure */ -struct ixgbe_crypto_session { +struct __rte_cache_aligned ixgbe_crypto_session { enum ixgbe_operation op; const uint8_t *key; uint32_t key_len; @@ -70,7 +70,7 @@ struct ixgbe_crypto_session { struct ipaddr src_ip; struct ipaddr dst_ip; struct rte_eth_dev *dev; -} __rte_cache_aligned; +}; struct ixgbe_crypto_rx_ip_table { struct ipaddr ip; diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index f6c17d4..3d39eaa 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -1101,8 +1101,8 @@ * Use 2 different table for normal packet and tunnel packet * to save the space. */ -const uint32_t - ptype_table[IXGBE_PACKET_TYPE_MAX] __rte_cache_aligned = { +const alignas(RTE_CACHE_LINE_SIZE) uint32_t + ptype_table[IXGBE_PACKET_TYPE_MAX] = { [IXGBE_PACKET_TYPE_ETHER] = RTE_PTYPE_L2_ETHER, [IXGBE_PACKET_TYPE_IPV4] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4, @@ -1187,8 +1187,8 @@ RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP, }; -const uint32_t - ptype_table_tn[IXGBE_PACKET_TYPE_TN_MAX] __rte_cache_aligned = { +const alignas(RTE_CACHE_LINE_SIZE) uint32_t + ptype_table_tn[IXGBE_PACKET_TYPE_TN_MAX] = { [IXGBE_PACKET_TYPE_NVGRE] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE | RTE_PTYPE_INNER_L2_ETHER, @@ -1429,7 +1429,7 @@ static inline uint64_t ixgbe_rxd_pkt_info_to_pkt_flags(uint16_t pkt_info) { - static uint64_t ip_rss_types_map[16] __rte_cache_aligned = { + static alignas(RTE_CACHE_LINE_SIZE) uint64_t ip_rss_types_map[16] = { 0, RTE_MBUF_F_RX_RSS_HASH, RTE_MBUF_F_RX_RSS_HASH, RTE_MBUF_F_RX_RSS_HASH, 0, RTE_MBUF_F_RX_RSS_HASH, 0, RTE_MBUF_F_RX_RSS_HASH, RTE_MBUF_F_RX_RSS_HASH, 0, 0, 0, From patchwork Wed Mar 20 15:37:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138511 X-Patchwork-Delegate: david.marchand@redhat.com 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 7952143D05; Wed, 20 Mar 2024 16:40:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 95DF342DDE; Wed, 20 Mar 2024 16:38:50 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 76095427E3 for ; Wed, 20 Mar 2024 16:38:27 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 0870420B74D4; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0870420B74D4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=i2WEzGi5y3WXZLsXfh4FI7AWyQ/6P4j9EKROdN6wcIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rhP0sr73fpPhgNcrUy455RjmfXOA+QWRA+yUXOm1vmAWUWKubQomd1esQz9LtTiFq xBiv4ysBDG60Zoc2ijCMb34/QY+YMEKib4WhlN27uYcdcP8aoCoDAXw9fo5ThHbHep OznDcXdcSbQPGvhlndy/4fb7tyRbJFy6uhQgVLDo= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 20/83] net/memif: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:13 -0700 Message-Id: <1710949096-5786-21-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/memif/memif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/memif/memif.h b/drivers/net/memif/memif.h index cb72c69..f5a4693 100644 --- a/drivers/net/memif/memif.h +++ b/drivers/net/memif/memif.h @@ -162,7 +162,7 @@ typedef struct __rte_packed __rte_aligned(128) } memif_desc_t; #define MEMIF_CACHELINE_ALIGN_MARK(mark) \ - RTE_MARKER mark __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) RTE_MARKER mark; typedef struct { MEMIF_CACHELINE_ALIGN_MARK(cacheline0); From patchwork Wed Mar 20 15:37:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138512 X-Patchwork-Delegate: david.marchand@redhat.com 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 1BC8D43D05; Wed, 20 Mar 2024 16:41:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF08B42DE2; Wed, 20 Mar 2024 16:38:51 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AF54C41157 for ; Wed, 20 Mar 2024 16:38:27 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 1B82620B74D5; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1B82620B74D5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=GBbV0I8HIPJHgoFMPQnLWwbhz4sx+0eT02bljMvzhss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gSptutuiicTG0TeGU47G+f8bS58Yty4cGy5F0Z53KUMxsVSfry+g5HkBjO9371mxe UCJepXVhdUBfL9u9wEBv5Mo8hdm4vyeKISFXGMjKL2jSf7uhiHBMSD25RCyhOMmOdA 0VzoJBSvFBtzr8WeWCtK3dqLbSDvaLkH4mdGPJgs= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 21/83] net/mlx5: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:14 -0700 Message-Id: <1710949096-5786-22-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/mlx5/hws/mlx5dr_send.h | 4 ++-- drivers/net/mlx5/mlx5.h | 6 +++--- drivers/net/mlx5/mlx5_flow.h | 4 ++-- drivers/net/mlx5/mlx5_hws_cnt.h | 14 +++++++------- drivers/net/mlx5/mlx5_rx.h | 4 ++-- drivers/net/mlx5/mlx5_rxtx.c | 6 +++--- drivers/net/mlx5/mlx5_tx.h | 10 +++++----- drivers/net/mlx5/mlx5_utils.h | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_send.h b/drivers/net/mlx5/hws/mlx5dr_send.h index c4eaea5..0c67a9e 100644 --- a/drivers/net/mlx5/hws/mlx5dr_send.h +++ b/drivers/net/mlx5/hws/mlx5dr_send.h @@ -144,7 +144,7 @@ struct mlx5dr_completed_poll { uint16_t mask; }; -struct mlx5dr_send_engine { +struct __rte_cache_aligned mlx5dr_send_engine { struct mlx5dr_send_ring send_ring[MLX5DR_NUM_SEND_RINGS]; /* For now 1:1 mapping */ struct mlx5dv_devx_uar *uar; /* Uar is shared between rings of a queue */ struct mlx5dr_completed_poll completed; @@ -153,7 +153,7 @@ struct mlx5dr_send_engine { uint16_t rings; uint16_t num_entries; bool err; -} __rte_cache_aligned; +}; struct mlx5dr_send_engine_post_ctrl { struct mlx5dr_send_engine *queue; diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 0091a24..3646d20 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -415,7 +415,7 @@ struct mlx5_hw_q_job { }; /* HW steering job descriptor LIFO pool. */ -struct mlx5_hw_q { +struct __rte_cache_aligned mlx5_hw_q { uint32_t job_idx; /* Free job index. */ uint32_t size; /* Job LIFO queue size. */ uint32_t ongoing_flow_ops; /* Number of ongoing flow operations. */ @@ -424,7 +424,7 @@ struct mlx5_hw_q { struct rte_ring *indir_iq; /* Indirect action SW in progress queue. */ struct rte_ring *flow_transfer_pending; struct rte_ring *flow_transfer_completed; -} __rte_cache_aligned; +}; #define MLX5_COUNTER_POOLS_MAX_NUM (1 << 15) @@ -1405,7 +1405,7 @@ struct mlx5_hws_cnt_svc_mng { uint32_t query_interval; rte_thread_t service_thread; uint8_t svc_running; - struct mlx5_hws_aso_mng aso_mng __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct mlx5_hws_aso_mng aso_mng; }; #define MLX5_FLOW_HW_TAGS_MAX 12 diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 34b5e0f..4b4b6f2 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -1654,9 +1654,9 @@ struct mlx5_matcher_info { RTE_ATOMIC(uint32_t) refcnt; }; -struct mlx5_dr_rule_action_container { +struct __rte_cache_aligned mlx5_dr_rule_action_container { struct mlx5dr_rule_action acts[MLX5_HW_MAX_ACTS]; -} __rte_cache_aligned; +}; struct rte_flow_template_table { LIST_ENTRY(rte_flow_template_table) next; diff --git a/drivers/net/mlx5/mlx5_hws_cnt.h b/drivers/net/mlx5/mlx5_hws_cnt.h index e005960..1cb0564 100644 --- a/drivers/net/mlx5/mlx5_hws_cnt.h +++ b/drivers/net/mlx5/mlx5_hws_cnt.h @@ -97,11 +97,11 @@ struct mlx5_hws_cnt_pool_caches { struct rte_ring *qcache[]; }; -struct mlx5_hws_cnt_pool { +struct __rte_cache_aligned mlx5_hws_cnt_pool { LIST_ENTRY(mlx5_hws_cnt_pool) next; - struct mlx5_hws_cnt_pool_cfg cfg __rte_cache_aligned; - struct mlx5_hws_cnt_dcs_mng dcs_mng __rte_cache_aligned; - uint32_t query_gen __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct mlx5_hws_cnt_pool_cfg cfg; + alignas(RTE_CACHE_LINE_SIZE) struct mlx5_hws_cnt_dcs_mng dcs_mng; + alignas(RTE_CACHE_LINE_SIZE) uint32_t query_gen; struct mlx5_hws_cnt *pool; struct mlx5_hws_cnt_raw_data_mng *raw_mng; struct rte_ring *reuse_list; @@ -110,7 +110,7 @@ struct mlx5_hws_cnt_pool { struct mlx5_hws_cnt_pool_caches *cache; uint64_t time_of_last_age_check; struct mlx5_priv *priv; -} __rte_cache_aligned; +}; /* HWS AGE status. */ enum { @@ -133,7 +133,7 @@ enum { }; /* HWS counter age parameter. */ -struct mlx5_hws_age_param { +struct __rte_cache_aligned mlx5_hws_age_param { uint32_t timeout; /* Aging timeout in seconds (atomically accessed). */ uint32_t sec_since_last_hit; /* Time in seconds since last hit (atomically accessed). */ @@ -149,7 +149,7 @@ struct mlx5_hws_age_param { cnt_id_t own_cnt_index; /* Counter action created specifically for this AGE action. */ void *context; /* Flow AGE context. */ -} __rte_packed __rte_cache_aligned; +} __rte_packed; /** diff --git a/drivers/net/mlx5/mlx5_rx.h b/drivers/net/mlx5/mlx5_rx.h index 2fce908..fb4d8e6 100644 --- a/drivers/net/mlx5/mlx5_rx.h +++ b/drivers/net/mlx5/mlx5_rx.h @@ -79,7 +79,7 @@ struct mlx5_eth_rxseg { }; /* RX queue descriptor. */ -struct mlx5_rxq_data { +struct __rte_cache_aligned mlx5_rxq_data { unsigned int csum:1; /* Enable checksum offloading. */ unsigned int hw_timestamp:1; /* Enable HW timestamp. */ unsigned int rt_timestamp:1; /* Realtime timestamp format. */ @@ -146,7 +146,7 @@ struct mlx5_rxq_data { uint32_t rxseg_n; /* Number of split segment descriptions. */ struct mlx5_eth_rxseg rxseg[MLX5_MAX_RXQ_NSEG]; /* Buffer split segment descriptions - sizes, offsets, pools. */ -} __rte_cache_aligned; +}; /* RX queue control descriptor. */ struct mlx5_rxq_ctrl { diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 54d410b..d3d4470 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -77,12 +77,12 @@ static_assert(MLX5_WQE_SIZE == 4 * MLX5_WSEG_SIZE, "invalid WQE size"); -uint32_t mlx5_ptype_table[] __rte_cache_aligned = { +alignas(RTE_CACHE_LINE_SIZE) uint32_t mlx5_ptype_table[] = { [0xff] = RTE_PTYPE_ALL_MASK, /* Last entry for errored packet. */ }; -uint8_t mlx5_cksum_table[1 << 10] __rte_cache_aligned; -uint8_t mlx5_swp_types_table[1 << 10] __rte_cache_aligned; +alignas(RTE_CACHE_LINE_SIZE) uint8_t mlx5_cksum_table[1 << 10]; +alignas(RTE_CACHE_LINE_SIZE) uint8_t mlx5_swp_types_table[1 << 10]; uint64_t rte_net_mlx5_dynf_inline_mask; diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h index b1e8ea1..107d7ab 100644 --- a/drivers/net/mlx5/mlx5_tx.h +++ b/drivers/net/mlx5/mlx5_tx.h @@ -83,9 +83,9 @@ enum mlx5_txcmp_code { extern uint64_t rte_net_mlx5_dynf_inline_mask; #define RTE_MBUF_F_TX_DYNF_NOINLINE rte_net_mlx5_dynf_inline_mask -extern uint32_t mlx5_ptype_table[] __rte_cache_aligned; -extern uint8_t mlx5_cksum_table[1 << 10] __rte_cache_aligned; -extern uint8_t mlx5_swp_types_table[1 << 10] __rte_cache_aligned; +extern alignas(RTE_CACHE_LINE_SIZE) uint32_t mlx5_ptype_table[]; +extern alignas(RTE_CACHE_LINE_SIZE) uint8_t mlx5_cksum_table[1 << 10]; +extern alignas(RTE_CACHE_LINE_SIZE) uint8_t mlx5_swp_types_table[1 << 10]; struct mlx5_txq_stats { #ifdef MLX5_PMD_SOFT_COUNTERS @@ -112,7 +112,7 @@ struct mlx5_txq_local { /* TX queue descriptor. */ __extension__ -struct mlx5_txq_data { +struct __rte_cache_aligned mlx5_txq_data { uint16_t elts_head; /* Current counter in (*elts)[]. */ uint16_t elts_tail; /* Counter of first element awaiting completion. */ uint16_t elts_comp; /* elts index since last completion request. */ @@ -173,7 +173,7 @@ struct mlx5_txq_data { struct mlx5_uar_data uar_data; struct rte_mbuf *elts[]; /* Storage for queued packets, must be the last field. */ -} __rte_cache_aligned; +}; /* TX queue control descriptor. */ __extension__ diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h index f3c0d76..b51d977 100644 --- a/drivers/net/mlx5/mlx5_utils.h +++ b/drivers/net/mlx5/mlx5_utils.h @@ -235,7 +235,7 @@ struct mlx5_indexed_trunk { uint32_t next; /* Next free trunk in free list. */ uint32_t free; /* Free entries available */ struct rte_bitmap *bmp; - uint8_t data[] __rte_cache_aligned; /* Entry data start. */ + alignas(RTE_CACHE_LINE_SIZE) uint8_t data[]; /* Entry data start. */ }; struct mlx5_indexed_cache { From patchwork Wed Mar 20 15:37:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138513 X-Patchwork-Delegate: david.marchand@redhat.com 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 DC42243D05; Wed, 20 Mar 2024 16:41:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C0D542DE8; Wed, 20 Mar 2024 16:38:53 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 0308D427E1 for ; Wed, 20 Mar 2024 16:38:28 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 302E020B74D6; Wed, 20 Mar 2024 08:38:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 302E020B74D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=udtTIjndc4YhI9LtuGNDC/c8aDScrd6spUh0embpgag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EqPadXApF1JS+GFhx90Gfyetxdc6wR09h0RBcBW1/lY7EXWJnriWfXagjTKlckchf 3SvIjxHAvbQuOua5ILtTYgOvCZ/+A2U+Y4oug8pNLmwt1hz3Ur62I2b/z17+TZCtj+ DjUJ2CDh7bEIn/zak0eWf8y1lwlOUYs8BTSPkCIE= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 22/83] net/mlx4: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:15 -0700 Message-Id: <1710949096-5786-23-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/mlx4/mlx4_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx4/mlx4_rxtx.c b/drivers/net/mlx4/mlx4_rxtx.c index 059e432..947cae4 100644 --- a/drivers/net/mlx4/mlx4_rxtx.c +++ b/drivers/net/mlx4/mlx4_rxtx.c @@ -62,7 +62,7 @@ struct tso_info { }; /** A table to translate Rx completion flags to packet type. */ -uint32_t mlx4_ptype_table[0x100] __rte_cache_aligned = { +alignas(RTE_CACHE_LINE_SIZE) uint32_t mlx4_ptype_table[0x100] = { /* * The index to the array should have: * bit[7] - MLX4_CQE_L2_TUNNEL From patchwork Wed Mar 20 15:37:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138514 X-Patchwork-Delegate: david.marchand@redhat.com 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 4996B43D05; Wed, 20 Mar 2024 16:41:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A181C42DED; Wed, 20 Mar 2024 16:38:54 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 3F627427E3 for ; Wed, 20 Mar 2024 16:38:28 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 440C520B74D7; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 440C520B74D7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=k0zy1y9bpx4Xh7v1cswiqHEZ6jeySz4oyG11jmaQLGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ACIoa+TQkcR4dw//jCQ7KftPlTavLGws6/+G6upoWEyLTXH5T6outq05LtGQbdim5 yIzMVDbdFw87c8GAkmmzsV876gIqEa6t++CizgvqFP4rAN56JnGaFC5kyNnInjIPaH UeCL4u0zFNMEhrwExwLXQ0WTH2UBVJlvRBkxgsQU= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 23/83] net/mvpp2: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:16 -0700 Message-Id: <1710949096-5786-24-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/mvpp2/mrvl_ethdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mvpp2/mrvl_ethdev.h b/drivers/net/mvpp2/mrvl_ethdev.h index 3b69a6e..178b510 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.h +++ b/drivers/net/mvpp2/mrvl_ethdev.h @@ -147,10 +147,10 @@ struct mrvl_priv { uint16_t bpool_init_size; /**< Configured BPool size */ /** Mapping for DPDK rx queue->(TC, MRVL relative inq) */ - struct { + alignas(RTE_CACHE_LINE_SIZE) struct { uint8_t tc; /**< Traffic Class */ uint8_t inq; /**< Relative in-queue number */ - } rxq_map[MRVL_PP2_RXQ_MAX] __rte_cache_aligned; + } rxq_map[MRVL_PP2_RXQ_MAX]; /* Configuration data, used sporadically. */ uint8_t pp_id; From patchwork Wed Mar 20 15:37:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138515 X-Patchwork-Delegate: david.marchand@redhat.com 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 406BD43D05; Wed, 20 Mar 2024 16:41:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B06E42DEF; Wed, 20 Mar 2024 16:38:56 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B4A3B427E6 for ; Wed, 20 Mar 2024 16:38:28 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 5857320B74D8; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5857320B74D8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=xNkuiZJI+XAkwz2up8RBRWur4/BjBqVQQhUD69Hrupo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nFmsYLZpbMNk4KQshpWboxDffiCGe5vmDySJtre3hj9MWkHgabPb8kJVsC1LqWa0b kSYMhucAb9SEIxZdcR03220j7mUjt6j1ZTFsHy+2iscPKzcBonlGy0OmpUOLZAZB5k ex8k+EpmciSx5JKnV2SK1xvxFDZnv6oxUnCPFTuk= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 24/83] net/netvsc: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:17 -0700 Message-Id: <1710949096-5786-25-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/netvsc/hn_var.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/netvsc/hn_var.h b/drivers/net/netvsc/hn_var.h index ba86129..0f638bc 100644 --- a/drivers/net/netvsc/hn_var.h +++ b/drivers/net/netvsc/hn_var.h @@ -94,12 +94,12 @@ struct hn_rx_queue { /* multi-packet data from host */ -struct hn_rx_bufinfo { +struct __rte_cache_aligned hn_rx_bufinfo { struct vmbus_channel *chan; struct hn_rx_queue *rxq; uint64_t xactid; struct rte_mbuf_ext_shared_info shinfo; -} __rte_cache_aligned; +}; #define HN_INVALID_PORT UINT16_MAX From patchwork Wed Mar 20 15:37:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138516 X-Patchwork-Delegate: david.marchand@redhat.com 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 7503243D05; Wed, 20 Mar 2024 16:41:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B22F42DF7; Wed, 20 Mar 2024 16:38:57 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D8611427E3 for ; Wed, 20 Mar 2024 16:38:28 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 6AFB220B74D9; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6AFB220B74D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=Z6HaPRBbSNYEwkXwlP+EZ40ujd5q07ddAWqqmmCdvf4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fAMEzz3sWEpYxUE0Yx9kjU1Y0P39z8/PEg5SystZK7Ej7Qcpr/w0+u0VxZNyX1wrY GVK5FARmRLPQPlbvqkcCizQAGHuER1KpFBDC/YjAgT5myTfjfbJ12QzU7UokJatm/C zPnPVcMQ8KjNhTzYbszSfSAq4eUAr9gUrSu3qfF4= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 25/83] net/nfp: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:18 -0700 Message-Id: <1710949096-5786-26-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/nfp/flower/nfp_flower_flow.c | 4 ++-- drivers/net/nfp/nfp_ipsec.h | 4 ++-- drivers/net/nfp/nfp_rxtx.h | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c index 086cc80..26ee920 100644 --- a/drivers/net/nfp/flower/nfp_flower_flow.c +++ b/drivers/net/nfp/flower/nfp_flower_flow.c @@ -141,11 +141,11 @@ struct nfp_mask_id_entry { uint8_t mask_id; }; -struct nfp_pre_tun_entry { +struct __rte_aligned(32) nfp_pre_tun_entry { uint16_t mac_index; uint16_t ref_cnt; struct rte_ether_addr mac_addr; -} __rte_aligned(32); +}; static inline struct nfp_flow_priv * nfp_flow_dev_to_priv(struct rte_eth_dev *dev) diff --git a/drivers/net/nfp/nfp_ipsec.h b/drivers/net/nfp/nfp_ipsec.h index 8fdb7fd..29ca27d 100644 --- a/drivers/net/nfp/nfp_ipsec.h +++ b/drivers/net/nfp/nfp_ipsec.h @@ -142,7 +142,7 @@ struct nfp_ipsec_msg { }; }; -struct nfp_ipsec_session { +struct __rte_cache_aligned nfp_ipsec_session { /** Opaque user defined data */ void *user_data; /** NFP sa_entries database parameter index */ @@ -155,7 +155,7 @@ struct nfp_ipsec_session { struct rte_security_ipsec_xform ipsec; /** Security session action type */ enum rte_security_session_action_type action; -} __rte_cache_aligned; +}; struct nfp_net_ipsec_data { int pkt_dynfield_offset; diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h index 6ecabc2..344005e 100644 --- a/drivers/net/nfp/nfp_rxtx.h +++ b/drivers/net/nfp/nfp_rxtx.h @@ -27,7 +27,7 @@ struct nfp_tx_ipsec_desc_msg { } esn; /**< Extended Sequence Number */ }; -struct nfp_net_txq { +struct __rte_aligned(64) nfp_net_txq { /** Backpointer to nfp_net structure */ struct nfp_net_hw *hw; @@ -77,7 +77,7 @@ struct nfp_net_txq { * in a cache line. */ uint64_t dma; -} __rte_aligned(64); +}; /* RX and freelist descriptor format */ #define PCIE_DESC_RX_DD (1 << 7) @@ -129,7 +129,7 @@ struct nfp_net_rx_desc { }; }; -struct nfp_net_rxq { +struct __rte_aligned(64) nfp_net_rxq { /** Backpointer to nfp_net structure */ struct nfp_net_hw *hw; @@ -197,7 +197,7 @@ struct nfp_net_rxq { /** DMA address of the queue */ uint64_t dma; -} __rte_aligned(64); +}; static inline void nfp_net_mbuf_alloc_failed(struct nfp_net_rxq *rxq) From patchwork Wed Mar 20 15:37:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138517 X-Patchwork-Delegate: david.marchand@redhat.com 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 AD5BB43D05; Wed, 20 Mar 2024 16:41:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FDFB42DFB; Wed, 20 Mar 2024 16:38:58 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1AEB5427E7 for ; Wed, 20 Mar 2024 16:38:29 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 7D6C620B74DA; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7D6C620B74DA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=rDaKGrQomcd6KjqV+sawFYq/+0NgWf3K5jmLAyxGQMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hfmFC7OUI/C1CGwRwnd5GCXZ8xH1EgwNi9KHPLhobS22SPX3X/Q8D1WxNs3/26FBC 0MTVOFssIS7vEv/2d5/LL6LKu9dp7rwjs5S9xUymv4AXhsnfHpDlxxSfxoA/fhdeAp zgisoYnsili5fl/Ft3Xs0FiWErEvhAcAFw3HWK+E= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 26/83] net/ngbe: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:19 -0700 Message-Id: <1710949096-5786-27-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/ngbe/ngbe_ptypes.c | 2 +- drivers/net/ngbe/ngbe_rxtx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ngbe/ngbe_ptypes.c b/drivers/net/ngbe/ngbe_ptypes.c index d823982..d633dbc 100644 --- a/drivers/net/ngbe/ngbe_ptypes.c +++ b/drivers/net/ngbe/ngbe_ptypes.c @@ -36,7 +36,7 @@ #define RTE_PTYPE_INNER_L3_NONE 0 #define RTE_PTYPE_INNER_L4_NONE 0 -static u32 ngbe_ptype_lookup[NGBE_PTID_MAX] __rte_cache_aligned = { +static alignas(RTE_CACHE_LINE_SIZE) u32 ngbe_ptype_lookup[NGBE_PTID_MAX] = { /* L2:0-3 L3:4-7 L4:8-11 TUN:12-15 EL2:16-19 EL3:20-23 EL2:24-27 */ /* L2: ETH */ TPTE(0x10, ETHER, NONE, NONE, NONE, NONE, NONE, NONE), diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c index 8a873b8..4aea70b 100644 --- a/drivers/net/ngbe/ngbe_rxtx.c +++ b/drivers/net/ngbe/ngbe_rxtx.c @@ -872,7 +872,7 @@ static inline uint64_t ngbe_rxd_pkt_info_to_pkt_flags(uint32_t pkt_info) { - static uint64_t ip_rss_types_map[16] __rte_cache_aligned = { + static alignas(RTE_CACHE_LINE_SIZE) uint64_t ip_rss_types_map[16] = { 0, RTE_MBUF_F_RX_RSS_HASH, RTE_MBUF_F_RX_RSS_HASH, RTE_MBUF_F_RX_RSS_HASH, 0, RTE_MBUF_F_RX_RSS_HASH, 0, RTE_MBUF_F_RX_RSS_HASH, RTE_MBUF_F_RX_RSS_HASH, 0, 0, 0, From patchwork Wed Mar 20 15:37:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138519 X-Patchwork-Delegate: david.marchand@redhat.com 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 69E6E43D05; Wed, 20 Mar 2024 16:41:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2318642E06; Wed, 20 Mar 2024 16:39:01 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B0207427E6 for ; Wed, 20 Mar 2024 16:38:29 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 9050320B74DB; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 9050320B74DB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=S99D2AGNm+fYP0Xju0+A80D8ETSHcPbGIU+YWWZ7+24=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P8SeSqZGrM3ERf2vSQQAGybyC+uN7qQrHBSImHjuVK95ajNTigyjyTwWcNI8KXgyq IsxnAvei0DH38uJWCBv4QSMLkUReqop3B32kIg1XkWo7dw/MQPZ0N69rIaL4435E7Y TuJnA8I2TFvxudvRIT6idayKlc1i4nWSFlobTbZ0= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 27/83] net/octeontx: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:20 -0700 Message-Id: <1710949096-5786-28-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/octeontx/octeontx_ethdev.c | 4 ++-- drivers/net/octeontx/octeontx_ethdev.h | 12 ++++++------ drivers/net/octeontx/octeontx_rxtx.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index bec54fd..e397136 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -36,9 +36,9 @@ #define OCTEONTX_QLM_MODE_SGMII 7 #define OCTEONTX_QLM_MODE_XFI 12 -struct evdev_priv_data { +struct __rte_cache_aligned evdev_priv_data { OFFLOAD_FLAGS; /*Sequence should not be changed */ -} __rte_cache_aligned; +}; struct octeontx_vdev_init_params { uint8_t nr_port; diff --git a/drivers/net/octeontx/octeontx_ethdev.h b/drivers/net/octeontx/octeontx_ethdev.h index 7e04fad..efd6cf5 100644 --- a/drivers/net/octeontx/octeontx_ethdev.h +++ b/drivers/net/octeontx/octeontx_ethdev.h @@ -105,7 +105,7 @@ struct octeontx_fc_info { }; /* Octeontx ethdev nic */ -struct octeontx_nic { +struct __rte_cache_aligned octeontx_nic { struct rte_eth_dev *dev; int node; int port_id; @@ -145,15 +145,15 @@ struct octeontx_nic { int print_flag; struct octeontx_fc_info fc; bool reconfigure; -} __rte_cache_aligned; +}; -struct octeontx_txq { +struct __rte_cache_aligned octeontx_txq { uint16_t queue_id; octeontx_dq_t dq; struct rte_eth_dev *eth_dev; -} __rte_cache_aligned; +}; -struct octeontx_rxq { +struct __rte_cache_aligned octeontx_rxq { uint16_t queue_id; uint16_t port_id; uint8_t evdev; @@ -161,7 +161,7 @@ struct octeontx_rxq { uint16_t ev_queues; uint16_t ev_ports; struct rte_mempool *pool; -} __rte_cache_aligned; +}; void octeontx_set_tx_function(struct rte_eth_dev *dev); diff --git a/drivers/net/octeontx/octeontx_rxtx.h b/drivers/net/octeontx/octeontx_rxtx.h index b6e3515..cd581f5 100644 --- a/drivers/net/octeontx/octeontx_rxtx.h +++ b/drivers/net/octeontx/octeontx_rxtx.h @@ -71,7 +71,7 @@ struct octeontx_send_hdr_s { union octeontx_send_hdr_w1_u w1; }; -static const uint32_t __rte_cache_aligned +static const alignas(RTE_CACHE_LINE_SIZE) uint32_t ptype_table[PTYPE_SIZE][PTYPE_SIZE][PTYPE_SIZE] = { [LC_NONE][LE_NONE][LF_NONE] = RTE_PTYPE_UNKNOWN, [LC_NONE][LE_NONE][LF_IPSEC_ESP] = RTE_PTYPE_UNKNOWN, From patchwork Wed Mar 20 15:37:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138518 X-Patchwork-Delegate: david.marchand@redhat.com 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 BCF1143D05; Wed, 20 Mar 2024 16:41:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEDB542E01; Wed, 20 Mar 2024 16:38:59 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9BEFB427E3 for ; Wed, 20 Mar 2024 16:38:29 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id A300E20B74DC; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A300E20B74DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=nhpert3vOHPX+mvgpcgBmqO/OusnbjOEURMwgqZ4v48=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QkswgzifywFImdiSwJeBO3exUjtzan/K+8+z95+HTLpTrb53NgFp+HiWV32JE4sdI LHEfH8jO9iPQI9OsNdB2Ff6Vz52Q2jvfv67sSZTs1s7cohVxwnPLmL6xSS53NhMqDf JKap+yQ6o7S42UGuJi9vFfLfuE5ZYUtL7slOI6ac= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 28/83] net/pfe: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:21 -0700 Message-Id: <1710949096-5786-29-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/pfe/base/pfe.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/pfe/base/pfe.h b/drivers/net/pfe/base/pfe.h index b9cf682..a97c47f 100644 --- a/drivers/net/pfe/base/pfe.h +++ b/drivers/net/pfe/base/pfe.h @@ -209,7 +209,7 @@ enum { #define UTIL_MASK BIT(UTIL_ID) #endif -struct pe_status { +struct __rte_aligned(16) pe_status { u32 cpu_state; u32 activity_counter; u32 rx; @@ -222,7 +222,7 @@ struct pe_status { u32 debug_indicator; u32 debug[16]; #endif -} __rte_aligned(16); +}; struct pe_sync_mailbox { u32 stop; From patchwork Wed Mar 20 15:37:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138520 X-Patchwork-Delegate: david.marchand@redhat.com 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 D906643D05; Wed, 20 Mar 2024 16:41:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33C0242E0D; Wed, 20 Mar 2024 16:39:02 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 07D0C42831 for ; Wed, 20 Mar 2024 16:38:30 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id B61E120B74DD; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B61E120B74DD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=8fextc6MgDv8yLR9Omil/LvCmtqEIMLAXauYrV0xoUw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VqteciFIjtSB+j70qCz+BbhJ7aV8mXAf/QpPHE9qJ2qtD/qZJJ6OQ6d/WwFSlcVdb /tNxY2rhCCOkQ8zqaB3q9CfDjqusjKwPQRu2D6AITkD+yT/YVzhZAl509ooZJvfHoh /6QhGC2y4st120RXtIGjgo8aL0I2wJJ1yKaGhav4= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 29/83] net/qede: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:22 -0700 Message-Id: <1710949096-5786-30-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/qede/qede_rxtx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c index c35585f..ede5fc8 100644 --- a/drivers/net/qede/qede_rxtx.c +++ b/drivers/net/qede/qede_rxtx.c @@ -38,7 +38,7 @@ static inline int qede_alloc_rx_buffer(struct qede_rx_queue *rxq) static inline int qede_alloc_rx_bulk_mbufs(struct qede_rx_queue *rxq, int count) { - void *obj_p[QEDE_MAX_BULK_ALLOC_COUNT] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) void *obj_p[QEDE_MAX_BULK_ALLOC_COUNT]; struct rte_mbuf *mbuf = NULL; struct eth_rx_bd *rx_bd; dma_addr_t mapping; @@ -1124,8 +1124,8 @@ static inline uint32_t qede_rx_cqe_to_pkt_type_inner(uint16_t flags) uint16_t val; /* Lookup table */ - static const uint32_t - ptype_lkup_tbl[QEDE_PKT_TYPE_MAX] __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t + ptype_lkup_tbl[QEDE_PKT_TYPE_MAX] = { [QEDE_PKT_TYPE_IPV4] = RTE_PTYPE_INNER_L3_IPV4 | RTE_PTYPE_INNER_L2_ETHER, [QEDE_PKT_TYPE_IPV6] = RTE_PTYPE_INNER_L3_IPV6 | @@ -1197,8 +1197,8 @@ static inline uint32_t qede_rx_cqe_to_pkt_type(uint16_t flags) uint16_t val; /* Lookup table */ - static const uint32_t - ptype_lkup_tbl[QEDE_PKT_TYPE_MAX] __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t + ptype_lkup_tbl[QEDE_PKT_TYPE_MAX] = { [QEDE_PKT_TYPE_IPV4] = RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L2_ETHER, [QEDE_PKT_TYPE_IPV6] = RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L2_ETHER, [QEDE_PKT_TYPE_IPV4_TCP] = RTE_PTYPE_L3_IPV4 | @@ -1398,8 +1398,8 @@ static inline uint32_t qede_rx_cqe_to_tunn_pkt_type(uint16_t flags) uint32_t val; /* Lookup table */ - static const uint32_t - ptype_tunn_lkup_tbl[QEDE_PKT_TYPE_TUNN_MAX_TYPE] __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint32_t + ptype_tunn_lkup_tbl[QEDE_PKT_TYPE_TUNN_MAX_TYPE] = { [QEDE_PKT_TYPE_UNKNOWN] = RTE_PTYPE_UNKNOWN, [QEDE_PKT_TYPE_TUNN_GENEVE] = RTE_PTYPE_TUNNEL_GENEVE, [QEDE_PKT_TYPE_TUNN_GRE] = RTE_PTYPE_TUNNEL_GRE, From patchwork Wed Mar 20 15:37:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138521 X-Patchwork-Delegate: david.marchand@redhat.com 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 D73DB43D05; Wed, 20 Mar 2024 16:41:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CE7242E11; Wed, 20 Mar 2024 16:39:03 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 35B6442B71 for ; Wed, 20 Mar 2024 16:38:30 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C8B4220B74DE; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C8B4220B74DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=PJ4ToXWHm3+iqm+mwphq+FEfkSI1iryFPPRYOJjJODs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a4i69wxrdGioUjS8Fz/RNMiFfJkwMfHHsbHkQxDnEZxWJbX39u7zKDDbhZWajHwO+ mASXd8kDFqrl9v8mBiGm2hOOw1068pNiqbV+ZIbvPMKIl7Xuo8jF7tgmIGhl1esHNt 3y5vYdaK47T7QUv/ldtOPP5nS6tFi7qUaReHkKR8= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 30/83] net/softnic: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:23 -0700 Message-Id: <1710949096-5786-31-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/softnic/rte_eth_softnic_internals.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h index a1c2309..d3975da 100644 --- a/drivers/net/softnic/rte_eth_softnic_internals.h +++ b/drivers/net/softnic/rte_eth_softnic_internals.h @@ -123,7 +123,7 @@ struct softnic_thread { /** * Data plane threads: context */ -struct softnic_thread_data { +struct __rte_cache_aligned softnic_thread_data { struct rte_swx_pipeline *p[THREAD_PIPELINES_MAX]; uint32_t n_pipelines; @@ -132,7 +132,7 @@ struct softnic_thread_data { uint64_t timer_period; /* Measured in CPU cycles. */ uint64_t time_next; uint64_t iter; -} __rte_cache_aligned; +}; /** * PMD Internals From patchwork Wed Mar 20 15:37:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138522 X-Patchwork-Delegate: david.marchand@redhat.com 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 0B26443D05; Wed, 20 Mar 2024 16:42:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87CE042E16; Wed, 20 Mar 2024 16:39:04 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6CC4B427E3 for ; Wed, 20 Mar 2024 16:38:30 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id DC00620B74DF; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DC00620B74DF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949102; bh=SH2vqqHLk7afDi7FIw6DamMbpf/hIXlBdC5V/JXkfCE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bGQcq/BT9M9ypTLlbzr9ab4uyMfyxBXRDDrw+pjHAO7x3b0HfxKQtn3oPQVeYMcuW jQhxcy/netgYrini0N4U4Be3ieDlDs/XkDiVAERNP1nUZwOhYk78tfBKMS4Zb6y00C RITv7MApZ5HPYz4QRSnufYRzCigdyk7/FyBbsUTE= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 31/83] net/tap: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:24 -0700 Message-Id: <1710949096-5786-32-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/tap/tap_bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/tap/tap_bpf.h b/drivers/net/tap/tap_bpf.h index 0d38bc1..d843792 100644 --- a/drivers/net/tap/tap_bpf.h +++ b/drivers/net/tap/tap_bpf.h @@ -50,7 +50,7 @@ enum bpf_map_type { }; /* union of anonymous structs used with TAP BPF commands */ -union bpf_attr { +union __rte_aligned(8) bpf_attr { /* BPF_MAP_CREATE command */ struct { __u32 map_type; @@ -84,7 +84,7 @@ enum bpf_map_type { __u32 kern_version; __u32 prog_flags; }; -} __rte_aligned(8); +}; #ifndef __NR_bpf # if defined(__i386__) From patchwork Wed Mar 20 15:37:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138523 X-Patchwork-Delegate: david.marchand@redhat.com 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 B51B343D05; Wed, 20 Mar 2024 16:42:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEAA842E1C; Wed, 20 Mar 2024 16:39:05 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B1C1042C24 for ; Wed, 20 Mar 2024 16:38:30 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id EFA3F20B74E1; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EFA3F20B74E1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=UsNPUTPzWyTTgKmBtkPZlLYSd05fWtVXPZhJ23dJ0HQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NRL2e0ivZpk7ZKCRPXpLRK6QvUi3Bc5Dx7oBpa0/d06m8ibzKRSJ6j8UcZZE5FPgP TEoiyzvkcd7+eRwPAvxG7pqFGikhGyBWoLN5u0b7LCOoxPp6NRzX4k8foHTs0elx/G sURfMNNfZpMnMVH82c1+Ult/VEA2x+Y2qneUNpaE= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 32/83] net/thunderx: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:25 -0700 Message-Id: <1710949096-5786-33-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/thunderx/nicvf_rxtx.c | 8 ++++---- drivers/net/thunderx/nicvf_struct.h | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c index defa551..74f43b9 100644 --- a/drivers/net/thunderx/nicvf_rxtx.c +++ b/drivers/net/thunderx/nicvf_rxtx.c @@ -76,7 +76,7 @@ uint32_t curr_head; uint32_t head = sq->head; struct rte_mbuf **txbuffs = sq->txbuffs; - void *obj_p[NICVF_MAX_TX_FREE_THRESH] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) void *obj_p[NICVF_MAX_TX_FREE_THRESH]; curr_head = nicvf_addr_read(sq->sq_head) >> 4; while (head != curr_head) { @@ -239,7 +239,7 @@ return i; } -static const uint32_t ptype_table[16][16] __rte_cache_aligned = { +static const alignas(RTE_CACHE_LINE_SIZE) uint32_t ptype_table[16][16] = { [L3_NONE][L4_NONE] = RTE_PTYPE_UNKNOWN, [L3_NONE][L4_IPSEC_ESP] = RTE_PTYPE_UNKNOWN, [L3_NONE][L4_IPFRAG] = RTE_PTYPE_L4_FRAG, @@ -342,7 +342,7 @@ static inline uint64_t __rte_hot nicvf_set_olflags(const cqe_rx_word0_t cqe_rx_w0) { - static const uint64_t flag_table[3] __rte_cache_aligned = { + static const alignas(RTE_CACHE_LINE_SIZE) uint64_t flag_table[3] = { RTE_MBUF_F_RX_IP_CKSUM_GOOD | RTE_MBUF_F_RX_L4_CKSUM_GOOD, RTE_MBUF_F_RX_IP_CKSUM_BAD | RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN, RTE_MBUF_F_RX_IP_CKSUM_GOOD | RTE_MBUF_F_RX_L4_CKSUM_BAD, @@ -363,7 +363,7 @@ struct rbdr_entry_t *desc = rbdr->desc; uint32_t qlen_mask = rbdr->qlen_mask; uintptr_t door = rbdr->rbdr_door; - void *obj_p[NICVF_MAX_RX_FREE_THRESH] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) void *obj_p[NICVF_MAX_RX_FREE_THRESH]; if (unlikely(rte_mempool_get_bulk(rxq->pool, obj_p, to_fill) < 0)) { rte_eth_devices[rxq->port_id].data->rx_mbuf_alloc_failed += diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h index 13cf8fe..cfcd942 100644 --- a/drivers/net/thunderx/nicvf_struct.h +++ b/drivers/net/thunderx/nicvf_struct.h @@ -14,7 +14,7 @@ #include #include -struct nicvf_rbdr { +struct __rte_cache_aligned nicvf_rbdr { uintptr_t rbdr_status; uintptr_t rbdr_door; struct rbdr_entry_t *desc; @@ -24,9 +24,9 @@ struct nicvf_rbdr { uint32_t next_tail; uint32_t head; uint32_t qlen_mask; -} __rte_cache_aligned; +}; -struct nicvf_txq { +struct __rte_cache_aligned nicvf_txq { union sq_entry_t *desc; nicvf_iova_addr_t phys; struct rte_mbuf **txbuffs; @@ -42,7 +42,7 @@ struct nicvf_txq { uint64_t offloads; uint16_t queue_id; uint16_t tx_free_thresh; -} __rte_cache_aligned; +}; union mbuf_initializer { struct { @@ -54,7 +54,7 @@ struct nicvf_txq { uint64_t value; }; -struct nicvf_rxq { +struct __rte_cache_aligned nicvf_rxq { RTE_MARKER rxq_fastpath_data_start; uint8_t rbptr_offset; uint16_t rx_free_thresh; @@ -76,9 +76,9 @@ struct nicvf_rxq { uint16_t queue_id; struct nicvf *nic; nicvf_iova_addr_t phys; -} __rte_cache_aligned; +}; -struct nicvf { +struct __rte_cache_aligned nicvf { uint8_t vf_id; uint8_t node; uintptr_t reg_base; @@ -111,7 +111,7 @@ struct nicvf { uint8_t sqs_count; #define MAX_SQS_PER_VF 11 struct nicvf *snicvf[MAX_SQS_PER_VF]; -} __rte_cache_aligned; +}; struct change_link_mode { bool enable; From patchwork Wed Mar 20 15:37:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138524 X-Patchwork-Delegate: david.marchand@redhat.com 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 7F3DB43D05; Wed, 20 Mar 2024 16:42:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D96AE42E1E; Wed, 20 Mar 2024 16:39:06 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E627342B71 for ; Wed, 20 Mar 2024 16:38:30 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 0F27420B74E0; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0F27420B74E0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=2xuIza1ayVsOHfG5OTuTEVGlFNIoGiJWiaIU3Z9ClSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fI4EGyqIzPvOgv6k83o7URuidB4Zt/OILx7Gj5PfDQlDimHCwK9XedPKExFozvzy5 Mj82hbJRTAa2SkpZ48C0cS5INSQKh7Ic5a/aZlckWNPAONfHghOqGsrOczMGoFwdOk jb1sxtns3WIuOZ0GbIqX4vnEbJvkemca5K6lbHHM= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 33/83] net/txgbe: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:26 -0700 Message-Id: <1710949096-5786-34-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/txgbe/txgbe_ipsec.h | 4 ++-- drivers/net/txgbe/txgbe_ptypes.c | 10 +++++----- drivers/net/txgbe/txgbe_rxtx.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ipsec.h b/drivers/net/txgbe/txgbe_ipsec.h index 995e29e..e93f9a3 100644 --- a/drivers/net/txgbe/txgbe_ipsec.h +++ b/drivers/net/txgbe/txgbe_ipsec.h @@ -44,7 +44,7 @@ struct ipaddr { }; /** inline crypto private session structure */ -struct txgbe_crypto_session { +struct __rte_cache_aligned txgbe_crypto_session { enum txgbe_operation op; const uint8_t *key; uint32_t key_len; @@ -54,7 +54,7 @@ struct txgbe_crypto_session { struct ipaddr src_ip; struct ipaddr dst_ip; struct rte_eth_dev *dev; -} __rte_cache_aligned; +}; struct txgbe_crypto_rx_ip_table { struct ipaddr ip; diff --git a/drivers/net/txgbe/txgbe_ptypes.c b/drivers/net/txgbe/txgbe_ptypes.c index c07977b..a8e7271 100644 --- a/drivers/net/txgbe/txgbe_ptypes.c +++ b/drivers/net/txgbe/txgbe_ptypes.c @@ -47,7 +47,7 @@ #define RTE_PTYPE_INNER_L3_NONE 0 #define RTE_PTYPE_INNER_L4_NONE 0 -static u32 txgbe_ptype_lookup[TXGBE_PTID_MAX] __rte_cache_aligned = { +static alignas(RTE_CACHE_LINE_SIZE) u32 txgbe_ptype_lookup[TXGBE_PTID_MAX] = { /* L2:0-3 L3:4-7 L4:8-11 TUN:12-15 EL2:16-19 EL3:20-23 EL2:24-27 */ /* L2: ETH */ TPTE(0x10, ETHER, NONE, NONE, NONE, NONE, NONE, NONE), @@ -393,8 +393,8 @@ u8 txgbe_encode_ptype(u32 ptype) * Use 2 different table for normal packet and tunnel packet * to save the space. */ -const u32 -txgbe_ptype_table[TXGBE_PTID_MAX] __rte_cache_aligned = { +const alignas(RTE_CACHE_LINE_SIZE) u32 +txgbe_ptype_table[TXGBE_PTID_MAX] = { [TXGBE_PT_ETHER] = RTE_PTYPE_L2_ETHER, [TXGBE_PT_IPV4] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4, @@ -478,8 +478,8 @@ u8 txgbe_encode_ptype(u32 ptype) RTE_PTYPE_INNER_L3_IPV6_EXT | RTE_PTYPE_INNER_L4_SCTP, }; -const u32 -txgbe_ptype_table_tn[TXGBE_PTID_MAX] __rte_cache_aligned = { +const alignas(RTE_CACHE_LINE_SIZE) u32 +txgbe_ptype_table_tn[TXGBE_PTID_MAX] = { [TXGBE_PT_NVGRE] = RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4_EXT_UNKNOWN | RTE_PTYPE_TUNNEL_GRE | RTE_PTYPE_INNER_L2_ETHER, diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 1cd4b25..2568bf0 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -1107,7 +1107,7 @@ static inline uint64_t txgbe_rxd_pkt_info_to_pkt_flags(uint32_t pkt_info) { - static uint64_t ip_rss_types_map[16] __rte_cache_aligned = { + static alignas(RTE_CACHE_LINE_SIZE) uint64_t ip_rss_types_map[16] = { 0, RTE_MBUF_F_RX_RSS_HASH, RTE_MBUF_F_RX_RSS_HASH, RTE_MBUF_F_RX_RSS_HASH, 0, RTE_MBUF_F_RX_RSS_HASH, 0, RTE_MBUF_F_RX_RSS_HASH, RTE_MBUF_F_RX_RSS_HASH, 0, 0, 0, From patchwork Wed Mar 20 15:37:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138525 X-Patchwork-Delegate: david.marchand@redhat.com 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 40D3443D05; Wed, 20 Mar 2024 16:42:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1381242E23; Wed, 20 Mar 2024 16:39:08 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 330B842D26 for ; Wed, 20 Mar 2024 16:38:31 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 229EF20B74E3; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 229EF20B74E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=obQnr9I35P4kyXQigQx7IfpC4k970QtfgaDwqEeFXms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mLHi3FpCplz5FajFCvz3egtxfCM2DvNysBLiPwKK9xHSjfM4yz2xrdmLitIBLwpGl lJzBv6H6kFHuRBs8nTX4OkRIu2DfkAwgeW+v9FSgRMWvdXpbFEB7b4oZ+ry8GLrwyF Kf+cpDxcMg4DJ++Ppm40TQiTn1vYf7MZh2pcrda8= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 34/83] net/virtio: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:27 -0700 Message-Id: <1710949096-5786-35-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/net/virtio/virtqueue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h index 5d0c039..75d70f1 100644 --- a/drivers/net/virtio/virtqueue.h +++ b/drivers/net/virtio/virtqueue.h @@ -261,11 +261,11 @@ struct virtio_net_hdr_mrg_rxbuf { #define VIRTIO_MAX_TX_INDIRECT 8 struct virtio_tx_region { struct virtio_net_hdr_mrg_rxbuf tx_hdr; - union { + union __rte_aligned(16) { struct vring_desc tx_indir[VIRTIO_MAX_TX_INDIRECT]; struct vring_packed_desc tx_packed_indir[VIRTIO_MAX_TX_INDIRECT]; - } __rte_aligned(16); + }; }; static inline int From patchwork Wed Mar 20 15:37:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138526 X-Patchwork-Delegate: david.marchand@redhat.com 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 C9F1643D05; Wed, 20 Mar 2024 16:42:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4019442E29; Wed, 20 Mar 2024 16:39:09 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 83E7542B71 for ; Wed, 20 Mar 2024 16:38:31 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 363A320B74E2; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 363A320B74E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=oBqJQsclkqi/d7AOk1x7xz65jY3U3IIMgwUBUSOOFQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=byG1vYt69t7osXXc6POGv0uAOF3l0qaN5q1W7E4Gf0bOY3EhrJk0W1Gz5Knh8IkZK Zn+Nh7H7xTwtqQ1T/zABolHMkWtt7J3z0AuUDBHeuHrZ8rTrZ5whnVszDhiAs/+6WB MqFee+iULmQfcorqLw9hYcOmjYBKAQbQK/k7XF1E= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 35/83] vdpa/mlx5: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:28 -0700 Message-Id: <1710949096-5786-36-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/vdpa/mlx5/mlx5_vdpa.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/mlx5/mlx5_vdpa.h b/drivers/vdpa/mlx5/mlx5_vdpa.h index 7b37c98..4ce6977 100644 --- a/drivers/vdpa/mlx5/mlx5_vdpa.h +++ b/drivers/vdpa/mlx5/mlx5_vdpa.h @@ -90,13 +90,13 @@ enum mlx5_vdpa_task_type { }; /* Generic task information and size must be multiple of 4B. */ -struct mlx5_vdpa_task { +struct __rte_aligned(4) mlx5_vdpa_task { struct mlx5_vdpa_priv *priv; enum mlx5_vdpa_task_type type; uint32_t *remaining_cnt; uint32_t *err_cnt; uint32_t idx; -} __rte_packed __rte_aligned(4); +} __rte_packed; /* Generic mlx5_vdpa_c_thread information. */ struct mlx5_vdpa_c_thread { From patchwork Wed Mar 20 15:37:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138527 X-Patchwork-Delegate: david.marchand@redhat.com 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 DB91D43D05; Wed, 20 Mar 2024 16:42:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8914942E30; Wed, 20 Mar 2024 16:39:10 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id C14C942D26 for ; Wed, 20 Mar 2024 16:38:31 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 48ED1208B323; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 48ED1208B323 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=g9i0roA0UAw+7WWcipPkB3TOCNP62LnfSPJEOfLEDRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ReBrCnwgxsb0t5mzxCEVDx1bl2V9ciEBdZ5cbzVi7IIHs2uTqA/gLt9qA7bNB+8Mp dXpjlQQYBRDuwwKeDLz00tcHAvBJjDPdScAO83wahUONPLUyiSTKV1/MY4W2MLsil5 tBKzX+6CkJDVwI52qLg/g1VbgHISBKSEEPPpM9bg= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 36/83] regex/cn9k: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:29 -0700 Message-Id: <1710949096-5786-37-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/regex/cn9k/cn9k_regexdev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regex/cn9k/cn9k_regexdev.h b/drivers/regex/cn9k/cn9k_regexdev.h index c715502..e24a800 100644 --- a/drivers/regex/cn9k/cn9k_regexdev.h +++ b/drivers/regex/cn9k/cn9k_regexdev.h @@ -21,7 +21,7 @@ /** * Device private data */ -struct cn9k_ree_data { +struct __rte_cache_aligned cn9k_ree_data { uint32_t regexdev_capa; uint64_t rule_flags; /**< Feature flags exposes HW/SW features for the given device */ @@ -39,6 +39,6 @@ struct cn9k_ree_data { /**< rules to be compiled */ uint16_t nb_rules; /**< number of rules */ -} __rte_cache_aligned; +}; #endif /* _CN9K_REGEXDEV_H_ */ From patchwork Wed Mar 20 15:37:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138528 X-Patchwork-Delegate: david.marchand@redhat.com 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 DE52A43D05; Wed, 20 Mar 2024 16:42:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97F4142D9F; Wed, 20 Mar 2024 16:39:11 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1ADCE42D2B for ; Wed, 20 Mar 2024 16:38:32 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 5D69120B57B4; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5D69120B57B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=FaA7vnk00Sjo8LDv+ek+9ga0l7osMfjnNC6eETjihIk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FZ+5ai+8LqsRjvdf/yolzzk6uBBRrcnrIQJQq49PgrURaeNHOmumTfz6Pi6Ad1yxt SfxnZAYG/wklXN55hfEy2g5S/lE8IeQ0u9Qs0Pd0R30j/ezgGmovQpDZliqqzRU6q4 0/k/1kCjmHOnNgijhuWsqUTtce0oQnxetAbILI3Y= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 37/83] raw/ntb: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:30 -0700 Message-Id: <1710949096-5786-38-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/raw/ntb/ntb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/raw/ntb/ntb.h b/drivers/raw/ntb/ntb.h index a30a6b6..563cedd 100644 --- a/drivers/raw/ntb/ntb.h +++ b/drivers/raw/ntb/ntb.h @@ -186,9 +186,9 @@ struct ntb_tx_queue { }; struct ntb_header { - uint16_t avail_cnt __rte_cache_aligned; - uint16_t used_cnt __rte_cache_aligned; - struct ntb_desc desc_ring[] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint16_t avail_cnt; + alignas(RTE_CACHE_LINE_SIZE) uint16_t used_cnt; + alignas(RTE_CACHE_LINE_SIZE) struct ntb_desc desc_ring[]; }; /* ntb private data. */ From patchwork Wed Mar 20 15:37:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138529 X-Patchwork-Delegate: david.marchand@redhat.com 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 2B4C743D05; Wed, 20 Mar 2024 16:42:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BED9C42E33; Wed, 20 Mar 2024 16:39:12 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5763342D2E for ; Wed, 20 Mar 2024 16:38:32 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 706CA20B56A6; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 706CA20B56A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=sM5h5PMgayaUcO07Eid+pHZE2KacEa1dCxFC4kmb7I8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ypi8mfq6wwTQ4Fg0XTbRHw2tJiASqsVbiT9ejxcIi88lsQEiC+q/aVlm6RSCPLpNU BGJICf5Keikjkq+gdJUGlksnCqaNc+TLpGhOVFGINM5HdzXV3A2krwFoADVCs2Iaqx S01PLdSHSdm0ryCIdnqjRNjPjdtkYIxt6F/GVCtk= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 38/83] ml/cnxk: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:31 -0700 Message-Id: <1710949096-5786-39-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/ml/cnxk/cnxk_ml_ops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ml/cnxk/cnxk_ml_ops.h b/drivers/ml/cnxk/cnxk_ml_ops.h index 7b49793..e348cc4 100644 --- a/drivers/ml/cnxk/cnxk_ml_ops.h +++ b/drivers/ml/cnxk/cnxk_ml_ops.h @@ -19,7 +19,7 @@ #endif /* Request structure */ -struct cnxk_ml_req { +struct __rte_aligned(ROC_ALIGN) cnxk_ml_req { /* Device specific request */ union { /* CN10K */ @@ -39,7 +39,7 @@ struct cnxk_ml_req { /* Op */ struct rte_ml_op *op; -} __rte_aligned(ROC_ALIGN); +}; /* Request queue */ struct cnxk_ml_queue { From patchwork Wed Mar 20 15:37:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138530 X-Patchwork-Delegate: david.marchand@redhat.com 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 285A243D05; Wed, 20 Mar 2024 16:42:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E259442E38; Wed, 20 Mar 2024 16:39:13 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A1CE642D2B for ; Wed, 20 Mar 2024 16:38:32 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 84C0920B56B1; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 84C0920B56B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=e8K3/fCNWaLCpU5OGyKr7b3zu+A452SY4UE3/4TD0HM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LKa46PrbnO3JY/Jeq6gI5oHQtOzefxmOGR+fnA+PWsxncLWNR9g4qyD2SO8n9s6uw /xfP6H+d8LP1kVszr5Sn1Ie717mMHmzocknsK/VCxTuGWrAgOliURbnGeB/JlinC6b AQUQiMAxsdSqjTXNUjZysHLc9zyzZT7+TTGQB1Zs= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 39/83] mempool/cnxk: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:32 -0700 Message-Id: <1710949096-5786-40-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/mempool/cnxk/cn10k_mempool_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mempool/cnxk/cn10k_mempool_ops.c b/drivers/mempool/cnxk/cn10k_mempool_ops.c index 2a5aad0..a5be0cc 100644 --- a/drivers/mempool/cnxk/cn10k_mempool_ops.c +++ b/drivers/mempool/cnxk/cn10k_mempool_ops.c @@ -21,13 +21,13 @@ enum batch_op_status { struct batch_op_mem { unsigned int sz; enum batch_op_status status; - uint64_t objs[BATCH_ALLOC_SZ] __rte_aligned(ROC_ALIGN); + alignas(ROC_ALIGN) uint64_t objs[BATCH_ALLOC_SZ]; }; struct batch_op_data { uint64_t lmt_addr; uint32_t max_async_batch; - struct batch_op_mem mem[RTE_MAX_LCORE] __rte_aligned(ROC_ALIGN); + alignas(ROC_ALIGN) struct batch_op_mem mem[RTE_MAX_LCORE]; }; static struct batch_op_data **batch_op_data_tbl; From patchwork Wed Mar 20 15:37:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138531 X-Patchwork-Delegate: david.marchand@redhat.com 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 0474243D05; Wed, 20 Mar 2024 16:42:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C9E942E3D; Wed, 20 Mar 2024 16:39:15 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D521142D6A for ; Wed, 20 Mar 2024 16:38:32 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 98B6C20B92B3; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 98B6C20B92B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=rAmdMIlDzVz94bIaSSmaf8XCASEToTiF/vG1x9WsSPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MhJMcH7HfNwBPwwcrX4Rqe05J+p84B0y4/W/1jV3/np43ynEtPDC1gR6FTL/w0cyC 3KPJRrfey6b1it0n3yMxr+dpIiEaFmCnPl+pDJys+eDZiBqyFPtpiCGY636IDy3mp0 Y3guHgozxwCKowuwpMdsXVtSOeVDc7E5cjKP/Q3w= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 40/83] event/sw: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:33 -0700 Message-Id: <1710949096-5786-41-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/event/sw/event_ring.h | 2 +- drivers/event/sw/iq_chunk.h | 4 ++-- drivers/event/sw/sw_evdev.h | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/event/sw/event_ring.h b/drivers/event/sw/event_ring.h index 2b86ca9..29db267 100644 --- a/drivers/event/sw/event_ring.h +++ b/drivers/event/sw/event_ring.h @@ -27,7 +27,7 @@ struct rob_ring { uint32_t size; uint32_t write_idx; uint32_t read_idx; - void *ring[0] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) void *ring[0]; }; static inline struct rob_ring * diff --git a/drivers/event/sw/iq_chunk.h b/drivers/event/sw/iq_chunk.h index 31d013e..7a7a878 100644 --- a/drivers/event/sw/iq_chunk.h +++ b/drivers/event/sw/iq_chunk.h @@ -11,10 +11,10 @@ #define IQ_ROB_NAMESIZE 12 -struct sw_queue_chunk { +struct __rte_cache_aligned sw_queue_chunk { struct rte_event events[SW_EVS_PER_Q_CHUNK]; struct sw_queue_chunk *next; -} __rte_cache_aligned; +}; static __rte_always_inline bool iq_empty(struct sw_iq *iq) diff --git a/drivers/event/sw/sw_evdev.h b/drivers/event/sw/sw_evdev.h index c7b943a..c6e649c 100644 --- a/drivers/event/sw/sw_evdev.h +++ b/drivers/event/sw/sw_evdev.h @@ -170,14 +170,14 @@ struct sw_port { int16_t num_ordered_qids; /** Ring and buffer for pulling events from workers for scheduling */ - struct rte_event_ring *rx_worker_ring __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_event_ring *rx_worker_ring; /** Ring and buffer for pushing packets to workers after scheduling */ struct rte_event_ring *cq_worker_ring; /* hole */ /* num releases yet to be completed on this port */ - uint16_t outstanding_releases __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint16_t outstanding_releases; uint16_t inflight_max; /* app requested max inflights for this port */ uint16_t inflight_credits; /* num credits this port has right now */ uint8_t implicit_release; /* release events before dequeuing */ @@ -191,7 +191,7 @@ struct sw_port { /* bucket values in 4s for shorter reporting */ /* History list structs, containing info on pkts egressed to worker */ - uint16_t hist_head __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint16_t hist_head; uint16_t hist_tail; uint16_t inflights; struct sw_hist_list_entry hist_list[SW_PORT_HIST_LIST]; @@ -221,7 +221,7 @@ struct sw_evdev { uint32_t xstats_count_mode_queue; /* Minimum burst size*/ - uint32_t sched_min_burst_size __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint32_t sched_min_burst_size; /* Port dequeue burst size*/ uint32_t sched_deq_burst_size; /* Refill pp buffers only once per scheduler call*/ @@ -231,9 +231,9 @@ struct sw_evdev { uint32_t sched_min_burst; /* Contains all ports - load balanced and directed */ - struct sw_port ports[SW_PORTS_MAX] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct sw_port ports[SW_PORTS_MAX]; - rte_atomic32_t inflights __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) rte_atomic32_t inflights; /* * max events in this instance. Cached here for performance. @@ -242,18 +242,18 @@ struct sw_evdev { uint32_t nb_events_limit; /* Internal queues - one per logical queue */ - struct sw_qid qids[RTE_EVENT_MAX_QUEUES_PER_DEV] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct sw_qid qids[RTE_EVENT_MAX_QUEUES_PER_DEV]; struct sw_queue_chunk *chunk_list_head; struct sw_queue_chunk *chunks; /* Cache how many packets are in each cq */ - uint16_t cq_ring_space[SW_PORTS_MAX] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint16_t cq_ring_space[SW_PORTS_MAX]; /* Array of pointers to load-balanced QIDs sorted by priority level */ struct sw_qid *qids_prioritized[RTE_EVENT_MAX_QUEUES_PER_DEV]; /* Stats */ - struct sw_point_stats stats __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct sw_point_stats stats; uint64_t sched_called; int32_t sched_quanta; uint64_t sched_no_iq_enqueues; From patchwork Wed Mar 20 15:37:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138532 X-Patchwork-Delegate: david.marchand@redhat.com 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 3290B43D05; Wed, 20 Mar 2024 16:43:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B0B742E41; Wed, 20 Mar 2024 16:39:16 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 336A842D72 for ; Wed, 20 Mar 2024 16:38:33 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id AC7E020B4900; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AC7E020B4900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=6KQvX8M3GB57twBuiX9Qr2mALJUveUuQ+VSxMtgeYJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DIRnr8f37syNIGtX5tkOQwSQ3PrBxUbBHYbwagVfw7yyEgYJbe2cE6PO+xQBKNDMZ 6V9W9aoqYaDsmqFYNqWbrq8CgOztFwtsNG24ZuknT5Np4vSnUmniem8g06ikKCBxHk wMdTl6gBiWmwJA4uoQ7k1Tn5teKV2B8z7xziTeN4= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 41/83] event/skeleton: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:34 -0700 Message-Id: <1710949096-5786-42-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/event/skeleton/skeleton_eventdev.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/event/skeleton/skeleton_eventdev.h b/drivers/event/skeleton/skeleton_eventdev.h index 9c1ed4e..283342a 100644 --- a/drivers/event/skeleton/skeleton_eventdev.h +++ b/drivers/event/skeleton/skeleton_eventdev.h @@ -24,17 +24,17 @@ rte_log(RTE_LOG_ERR, skeleton_eventdev_logtype, \ "%s(): " fmt "\n", __func__, ## args) -struct skeleton_eventdev { +struct __rte_cache_aligned skeleton_eventdev { uintptr_t reg_base; uint16_t device_id; uint16_t vendor_id; uint16_t subsystem_device_id; uint16_t subsystem_vendor_id; -} __rte_cache_aligned; +}; -struct skeleton_port { +struct __rte_cache_aligned skeleton_port { uint8_t port_id; -} __rte_cache_aligned; +}; static inline struct skeleton_eventdev * skeleton_pmd_priv(const struct rte_eventdev *eventdev) From patchwork Wed Mar 20 15:37:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138533 X-Patchwork-Delegate: david.marchand@redhat.com 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 1D7FA43D05; Wed, 20 Mar 2024 16:43:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E46542E46; Wed, 20 Mar 2024 16:39:17 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 726AA42D2B for ; Wed, 20 Mar 2024 16:38:33 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id BFBAD20B4902; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BFBAD20B4902 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=bZBr3JX1i1gD+5Ew99wNpLJ6OUDVkGp/dr9W0KBTmUI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ml++lwSwihr3DScWwvDZFPe/98rILEO39iUO/WYcvf93xqs6UKvqkeOLch6+fjidU 9LWNDk+jPPPw1oLYIghNQggu9dEKaoOkkVoV0JXYNodvXpq78GtDfoeKXfHC8fr52s ZhlPKc0uAfDRbrrY5arwZ9Vdt0WRPy+RjWeXrYD0= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 42/83] event/opdl: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:35 -0700 Message-Id: <1710949096-5786-43-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/event/opdl/opdl_evdev.h | 6 +++--- drivers/event/opdl/opdl_ring.c | 19 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/event/opdl/opdl_evdev.h b/drivers/event/opdl/opdl_evdev.h index 1ca166b..176990e 100644 --- a/drivers/event/opdl/opdl_evdev.h +++ b/drivers/event/opdl/opdl_evdev.h @@ -234,15 +234,15 @@ struct opdl_evdev { uint32_t nb_q_md; /* Internal queues - one per logical queue */ - struct opdl_queue - queue[RTE_EVENT_MAX_QUEUES_PER_DEV] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct opdl_queue + queue[RTE_EVENT_MAX_QUEUES_PER_DEV]; uint32_t nb_queues; struct opdl_stage_meta_data s_md[OPDL_PORTS_MAX]; /* Contains all ports - load balanced and directed */ - struct opdl_port ports[OPDL_PORTS_MAX] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct opdl_port ports[OPDL_PORTS_MAX]; uint32_t nb_ports; uint8_t q_map_ex_to_in[OPDL_INVALID_QID]; diff --git a/drivers/event/opdl/opdl_ring.c b/drivers/event/opdl/opdl_ring.c index da5ea02..e87ffd5 100644 --- a/drivers/event/opdl/opdl_ring.c +++ b/drivers/event/opdl/opdl_ring.c @@ -43,7 +43,7 @@ enum dep_type { * Care is needed when accessing and the layout is important, especially to * limit the adjacent cache-line HW prefetcher from impacting performance. */ -struct shared_state { +struct __rte_cache_aligned shared_state { /* Last known minimum sequence number of dependencies, used for multi * thread operation */ @@ -54,7 +54,7 @@ struct shared_state { struct opdl_stage *stage; /* back pointer */ uint32_t tail; /* Tail sequence number */ char _pad3[RTE_CACHE_LINE_SIZE * 2]; -} __rte_cache_aligned; +}; /* A structure to keep track of "unfinished" claims. This is only used for * stages that are threadsafe. Each lcore accesses its own instance of this @@ -63,7 +63,7 @@ struct shared_state { * forward the shared tail when the shared tail matches the tail value recorded * here. */ -struct claim_manager { +struct __rte_cache_aligned claim_manager { uint32_t num_to_disclaim; uint32_t num_claimed; uint32_t mgr_head; @@ -72,13 +72,13 @@ struct claim_manager { uint32_t head; uint32_t tail; } claims[OPDL_DISCLAIMS_PER_LCORE]; -} __rte_cache_aligned; +}; /* Context for each stage of opdl_ring. * Calculations on sequence numbers need to be done with other uint32_t values * so that results are modulus 2^32, and not undefined. */ -struct opdl_stage { +struct __rte_cache_aligned opdl_stage { struct opdl_ring *t; /* back pointer, set at init */ uint32_t num_slots; /* Number of slots for entries, set at init */ uint32_t index; /* ID for this stage, set at init */ @@ -99,14 +99,13 @@ struct opdl_stage { /* Direct dependencies of this stage */ struct shared_state **deps; /* Other stages read this! */ - struct shared_state shared __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct shared_state shared; /* For managing disclaims in multi-threaded processing stages */ - struct claim_manager pending_disclaims[RTE_MAX_LCORE] - __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct claim_manager pending_disclaims[RTE_MAX_LCORE]; uint32_t shadow_head; /* Shadow head for single-thread operation */ uint32_t queue_id; /* ID of Queue which is assigned to this stage */ uint32_t pos; /* Atomic scan position */ -} __rte_cache_aligned; +}; /* Context for opdl_ring */ struct opdl_ring { @@ -120,7 +119,7 @@ struct opdl_ring { /* Stages indexed by ID */ struct opdl_stage *stages; /* Memory for storing slot data */ - uint8_t slots[0] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint8_t slots[0]; }; From patchwork Wed Mar 20 15:37: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: 138534 X-Patchwork-Delegate: david.marchand@redhat.com 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 462E143D05; Wed, 20 Mar 2024 16:43:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57D6642E4C; Wed, 20 Mar 2024 16:39:18 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id BB80842D6A for ; Wed, 20 Mar 2024 16:38:33 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id D257F20B4924; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D257F20B4924 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=NnHYwivyrdHP2cfvjFkWyvGdWz81pLoHsP7lvTyHRkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K+7U9LjZ+oNPh9D/LywyyB8cAyTe2V3zzIRjre/stpsQ3KgHDKiW2VXu1KPjrnH27 CF4wQSDgnXHL7I0+iQqCC2vRV4C3IlOpgTkHRdxoScHNZUAJhjRzwifuWBNTgOW2ip doutw72H6nqmmBvwlkH7bBBatMWLRu0ugzvrauLs= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 43/83] event/octeontx: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:36 -0700 Message-Id: <1710949096-5786-44-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/event/octeontx/ssovf_evdev.h | 8 ++++---- drivers/event/octeontx/timvf_evdev.h | 8 ++++---- drivers/event/octeontx/timvf_worker.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h index 8a4cb20..293eb85 100644 --- a/drivers/event/octeontx/ssovf_evdev.h +++ b/drivers/event/octeontx/ssovf_evdev.h @@ -134,7 +134,7 @@ enum ssovf_type { OCTEONTX_SSO_HWS, /* SSO hardware workslot vf */ }; -struct ssovf_evdev { +struct __rte_cache_aligned ssovf_evdev { OFFLOAD_FLAGS; /*Sequence should not be changed */ uint8_t max_event_queues; uint8_t max_event_ports; @@ -150,10 +150,10 @@ struct ssovf_evdev { uint8_t *rxq_pool_rcnt; uint16_t tim_ring_cnt; uint16_t *tim_ring_ids; -} __rte_cache_aligned; +}; /* Event port aka HWS */ -struct ssows { +struct __rte_cache_aligned ssows { uint8_t cur_tt; uint8_t cur_grp; uint8_t swtag_req; @@ -162,7 +162,7 @@ struct ssows { uint8_t *grps[SSO_MAX_VHGRP]; uint8_t port; void *lookup_mem; -} __rte_cache_aligned; +}; static inline struct ssovf_evdev * ssovf_pmd_priv(const struct rte_eventdev *eventdev) diff --git a/drivers/event/octeontx/timvf_evdev.h b/drivers/event/octeontx/timvf_evdev.h index cef02cd..e7a63e4 100644 --- a/drivers/event/octeontx/timvf_evdev.h +++ b/drivers/event/octeontx/timvf_evdev.h @@ -123,7 +123,7 @@ enum timvf_clk_src { }; /* TIM_MEM_BUCKET */ -struct tim_mem_bucket { +struct __rte_aligned(8) tim_mem_bucket { uint64_t first_chunk; union { uint64_t w1; @@ -139,7 +139,7 @@ struct tim_mem_bucket { }; uint64_t current_chunk; uint64_t pad; -} __rte_packed __rte_aligned(8); +} __rte_packed; struct tim_mem_entry { uint64_t w0; @@ -160,7 +160,7 @@ struct timvf_ctrl_reg { struct tim_mem_bucket * const bkt, struct timvf_ring * const timr); -struct timvf_ring { +struct __rte_cache_aligned timvf_ring { bkt_id get_target_bkt; refill_chunk refill_chunk; struct rte_reciprocal_u64 fast_div; @@ -178,7 +178,7 @@ struct timvf_ring { uint64_t nb_timers; enum timvf_clk_src clk_src; uint16_t tim_ring_id; -} __rte_cache_aligned; +}; static __rte_always_inline uint32_t bkt_mod(const uint32_t rel_bkt, const uint32_t nb_bkts) diff --git a/drivers/event/octeontx/timvf_worker.c b/drivers/event/octeontx/timvf_worker.c index 50790e1..feb7c4d 100644 --- a/drivers/event/octeontx/timvf_worker.c +++ b/drivers/event/octeontx/timvf_worker.c @@ -146,7 +146,7 @@ uint16_t idx; uint16_t arr_idx = 0; struct timvf_ring *timr = adptr->data->adapter_priv; - struct tim_mem_entry entry[TIMVF_MAX_BURST] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct tim_mem_entry entry[TIMVF_MAX_BURST]; if (unlikely(!timeout_tick || timeout_tick >= timr->nb_bkts)) { const enum rte_event_timer_state state = timeout_tick ? From patchwork Wed Mar 20 15:37:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138535 X-Patchwork-Delegate: david.marchand@redhat.com 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 6882D43D05; Wed, 20 Mar 2024 16:43:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 835B742E4F; Wed, 20 Mar 2024 16:39:19 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1D0C742D72 for ; Wed, 20 Mar 2024 16:38:34 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id E7D6E20B479C; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E7D6E20B479C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949103; bh=9VdXkCfc+kpuuiTi0LR99LHro5py5KGUAS+O2UneT9U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MD2NjsSkRN+mwsuMzJXEsNILOUYp5HZUZfTwJzoIiS5HPCU9ibLxi7pei/GpJGv1e ieJouAoMTy/3wjR4hBzYXwt/VXO/AXwwh7qOxgvjhkqi60XhKN+lnGHaRvgcfgmK1H /yB0kzzsFfw5pQZ/PD+d/8XvStW82Iq/m70FDbPw= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 44/83] event/dsw: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:37 -0700 Message-Id: <1710949096-5786-45-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/event/dsw/dsw_evdev.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/event/dsw/dsw_evdev.h b/drivers/event/dsw/dsw_evdev.h index d745c89..3a5989f 100644 --- a/drivers/event/dsw/dsw_evdev.h +++ b/drivers/event/dsw/dsw_evdev.h @@ -131,7 +131,7 @@ enum dsw_migration_state { DSW_MIGRATION_STATE_UNPAUSING }; -struct dsw_port { +struct __rte_cache_aligned dsw_port { uint16_t id; /* Keeping a pointer here to avoid container_of() calls, which @@ -222,22 +222,22 @@ struct dsw_port { */ struct rte_event in_buffer[DSW_MAX_EVENTS]; - struct rte_event_ring *in_ring __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_event_ring *in_ring; - struct rte_ring *ctl_in_ring __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_ring *ctl_in_ring; /* Estimate of current port load. */ - int16_t load __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) int16_t load; /* Estimate of flows currently migrating to this port. */ - int32_t immigration_load __rte_cache_aligned; -} __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) int32_t immigration_load; +}; struct dsw_queue { uint8_t schedule_type; uint64_t serving_ports; uint16_t num_serving_ports; - uint8_t flow_to_port_map[DSW_MAX_FLOWS] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint8_t flow_to_port_map[DSW_MAX_FLOWS]; }; /* Limited by the size of the 'serving_ports' bitmask */ @@ -252,19 +252,19 @@ struct dsw_evdev { uint8_t num_queues; int32_t max_inflight; - int32_t credits_on_loan __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) int32_t credits_on_loan; }; #define DSW_CTL_PAUS_REQ (0) #define DSW_CTL_UNPAUS_REQ (1) #define DSW_CTL_CFM (2) -struct dsw_ctl_msg { +struct __rte_aligned(4) dsw_ctl_msg { uint8_t type; uint8_t originating_port_id; uint8_t qfs_len; struct dsw_queue_flow qfs[DSW_MAX_FLOWS_PER_MIGRATION]; -} __rte_aligned(4); +}; uint16_t dsw_event_enqueue(void *port, const struct rte_event *event); uint16_t dsw_event_enqueue_burst(void *port, From patchwork Wed Mar 20 15:37:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138536 X-Patchwork-Delegate: david.marchand@redhat.com 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 2B31C43D05; Wed, 20 Mar 2024 16:43:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3FF442E52; Wed, 20 Mar 2024 16:39:20 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4BF4C42D7A for ; Wed, 20 Mar 2024 16:38:34 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 06F6F20B9C37; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 06F6F20B9C37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=nVy1cBTgjdPcd43KAYDHM/dJBYE3Bfj93dkVneo1D2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jwn81nqFklMkBplAIO9kkhPsXT2fQ5hp50j1y/+H8VhgPgIhOLIJkwM+8w+34wtki q9/Oql24WGF0+KmhKmO9vIUNBq7S07pmxds9588dnM4XSN3Xdh6vwzVzRME/uuQ3eP BY+2Wme7mwqaorBwsnGvAhD6+/Rngpkp0Gh+aLgU= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 45/83] event/dlb2: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:38 -0700 Message-Id: <1710949096-5786-46-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/event/dlb2/dlb2_priv.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/event/dlb2/dlb2_priv.h b/drivers/event/dlb2/dlb2_priv.h index 31a3bee..49f1c66 100644 --- a/drivers/event/dlb2/dlb2_priv.h +++ b/drivers/event/dlb2/dlb2_priv.h @@ -429,13 +429,13 @@ enum dlb2_cos { DLB2_COS_NUM_VALS }; -struct dlb2_hw_dev { +struct __rte_cache_aligned dlb2_hw_dev { struct dlb2_config cfg; struct dlb2_hw_resource_info info; void *pf_dev; /* opaque pointer to PF PMD dev (struct dlb2_dev) */ uint32_t domain_id; rte_spinlock_t resource_lock; /* for MP support */ -} __rte_cache_aligned; +}; /* End HW related defines and structs */ @@ -516,13 +516,13 @@ struct dlb2_port_stats { struct dlb2_queue_stats queue[DLB2_MAX_NUM_QUEUES_ALL]; }; -struct dlb2_eventdev_port { +struct __rte_cache_aligned dlb2_eventdev_port { struct dlb2_port qm_port; /* hw specific data structure */ struct rte_event_port_conf conf; /* user-supplied configuration */ uint16_t inflight_credits; /* num credits this port has right now */ uint16_t credit_update_quanta; struct dlb2_eventdev *dlb2; /* backlink optimization */ - struct dlb2_port_stats stats __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct dlb2_port_stats stats; struct dlb2_event_queue_link link[DLB2_MAX_NUM_QIDS_PER_LDB_CQ]; int num_links; uint32_t id; /* port id */ @@ -539,7 +539,7 @@ struct dlb2_eventdev_port { uint8_t implicit_release; /* release events before dequeuing */ uint32_t cq_weight; /* DLB2.5 and above ldb ports only */ int cos_id; /*ldb port class of service */ -} __rte_cache_aligned; +}; struct dlb2_queue { uint32_t num_qid_inflights; /* User config */ @@ -624,14 +624,14 @@ struct dlb2_eventdev { uint16_t max_ldb_credits; uint16_t max_dir_credits; /* use __atomic builtins */ /* shared hw cred */ - uint32_t ldb_credit_pool __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint32_t ldb_credit_pool; /* use __atomic builtins */ /* shared hw cred */ - uint32_t dir_credit_pool __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint32_t dir_credit_pool; }; struct { uint16_t max_credits; /* use __atomic builtins */ /* shared hw cred */ - uint32_t credit_pool __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint32_t credit_pool; }; }; uint32_t cos_ports[DLB2_COS_NUM_VALS]; /* total ldb ports in each class */ From patchwork Wed Mar 20 15:37:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138555 X-Patchwork-Delegate: david.marchand@redhat.com 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 2B8F943D05; Wed, 20 Mar 2024 16:45:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A8A742ECA; Wed, 20 Mar 2024 16:39:45 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id CE49E42D2B for ; Wed, 20 Mar 2024 16:38:39 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 833F820B2001; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 833F820B2001 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=CiMF9MjvzAEs2Zz2EiPA67+HXbWcUihmmWGaZg+9Q/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sKX7KetAGwwK8xh0x321tfMjdWUsLN4I6Ulz1taB1jfF7OFm3zDTGT2bhjKdM5qUx RqzxRTSpehofDpzGoVaMDpt+uAOshlRlgNDyBgUV/QZKu+ENaKuZql4cp8rO2cnVAD QEUTkx8NW0/830mKos9rCZbxgXFxiJFAksG0Nakw= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 46/83] event/cnxk: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:39 -0700 Message-Id: <1710949096-5786-47-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/event/cnxk/cn10k_eventdev.h | 8 ++++---- drivers/event/cnxk/cnxk_eventdev.h | 24 ++++++++++++------------ drivers/event/cnxk/cnxk_tim_evdev.h | 4 ++-- drivers/event/cnxk/cnxk_tim_worker.c | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/event/cnxk/cn10k_eventdev.h b/drivers/event/cnxk/cn10k_eventdev.h index e79b68e..3721214 100644 --- a/drivers/event/cnxk/cn10k_eventdev.h +++ b/drivers/event/cnxk/cn10k_eventdev.h @@ -8,7 +8,7 @@ #define CN10K_SSO_DEFAULT_STASH_OFFSET -1 #define CN10K_SSO_DEFAULT_STASH_LENGTH 2 -struct cn10k_sso_hws { +struct __rte_cache_aligned cn10k_sso_hws { uint64_t base; uint32_t gw_wdata; void *lookup_mem; @@ -19,15 +19,15 @@ struct cn10k_sso_hws { struct cnxk_timesync_info **tstamp; uint64_t meta_aura; /* Add Work Fastpath data */ - int64_t *fc_mem __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) int64_t *fc_mem; int64_t *fc_cache_space; uintptr_t aw_lmt; uintptr_t grp_base; int32_t xaq_lmt; /* Tx Fastpath data */ - uintptr_t lmt_base __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uintptr_t lmt_base; uint64_t lso_tun_fmt; uint8_t tx_adptr_data[]; -} __rte_cache_aligned; +}; #endif /* __CN10K_EVENTDEV_H__ */ diff --git a/drivers/event/cnxk/cnxk_eventdev.h b/drivers/event/cnxk/cnxk_eventdev.h index fa99ded..ece4939 100644 --- a/drivers/event/cnxk/cnxk_eventdev.h +++ b/drivers/event/cnxk/cnxk_eventdev.h @@ -80,7 +80,7 @@ struct cnxk_sso_stash { uint16_t stash_length; }; -struct cnxk_sso_evdev { +struct __rte_cache_aligned cnxk_sso_evdev { struct roc_sso sso; uint8_t max_event_queues; uint8_t max_event_ports; @@ -124,10 +124,10 @@ struct cnxk_sso_evdev { uint32_t gw_mode; uint16_t stash_cnt; struct cnxk_sso_stash *stash_parse_data; -} __rte_cache_aligned; +}; /* Event port a.k.a GWS */ -struct cn9k_sso_hws { +struct __rte_cache_aligned cn9k_sso_hws { uint64_t base; uint64_t gw_wdata; void *lookup_mem; @@ -136,15 +136,15 @@ struct cn9k_sso_hws { /* PTP timestamp */ struct cnxk_timesync_info **tstamp; /* Add Work Fastpath data */ - uint64_t xaq_lmt __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint64_t xaq_lmt; uint64_t *fc_mem; uintptr_t grp_base; /* Tx Fastpath data */ - uint64_t lso_tun_fmt __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint64_t lso_tun_fmt; uint8_t tx_adptr_data[]; -} __rte_cache_aligned; +}; -struct cn9k_sso_hws_dual { +struct __rte_cache_aligned cn9k_sso_hws_dual { uint64_t base[2]; /* Ping and Pong */ uint64_t gw_wdata; void *lookup_mem; @@ -154,18 +154,18 @@ struct cn9k_sso_hws_dual { /* PTP timestamp */ struct cnxk_timesync_info **tstamp; /* Add Work Fastpath data */ - uint64_t xaq_lmt __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint64_t xaq_lmt; uint64_t *fc_mem; uintptr_t grp_base; /* Tx Fastpath data */ - uint64_t lso_tun_fmt __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint64_t lso_tun_fmt; uint8_t tx_adptr_data[]; -} __rte_cache_aligned; +}; -struct cnxk_sso_hws_cookie { +struct __rte_cache_aligned cnxk_sso_hws_cookie { const struct rte_eventdev *event_dev; bool configured; -} __rte_cache_aligned; +}; static inline int parse_kvargs_flag(const char *key, const char *value, void *opaque) diff --git a/drivers/event/cnxk/cnxk_tim_evdev.h b/drivers/event/cnxk/cnxk_tim_evdev.h index b91fcb3..6cf10db 100644 --- a/drivers/event/cnxk/cnxk_tim_evdev.h +++ b/drivers/event/cnxk/cnxk_tim_evdev.h @@ -123,7 +123,7 @@ struct cnxk_tim_bkt { uint64_t pad; }; -struct cnxk_tim_ring { +struct __rte_cache_aligned cnxk_tim_ring { uint16_t nb_chunk_slots; uint32_t nb_bkts; uintptr_t tbase; @@ -149,7 +149,7 @@ struct cnxk_tim_ring { uint64_t nb_chunks; uint64_t chunk_sz; enum roc_tim_clk_src clk_src; -} __rte_cache_aligned; +}; struct cnxk_tim_ent { uint64_t w0; diff --git a/drivers/event/cnxk/cnxk_tim_worker.c b/drivers/event/cnxk/cnxk_tim_worker.c index 944490d..1f2f2fe 100644 --- a/drivers/event/cnxk/cnxk_tim_worker.c +++ b/drivers/event/cnxk/cnxk_tim_worker.c @@ -92,7 +92,7 @@ const uint64_t timeout_tick, const uint16_t nb_timers, const uint8_t flags) { - struct cnxk_tim_ent entry[CNXK_TIM_MAX_BURST] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct cnxk_tim_ent entry[CNXK_TIM_MAX_BURST]; struct cnxk_tim_ring *tim_ring = adptr->data->adapter_priv; uint16_t set_timers = 0; uint16_t arr_idx = 0; From patchwork Wed Mar 20 15:37:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138556 X-Patchwork-Delegate: david.marchand@redhat.com 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 B4C9543D05; Wed, 20 Mar 2024 16:45:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B854542ECE; Wed, 20 Mar 2024 16:39:46 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 1373342D9A for ; Wed, 20 Mar 2024 16:38:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 96BDE20B2002; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 96BDE20B2002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=b4YZNhk8pPf+r+CLv5+iYJrUO9Ir4MgqtAt4BbZq+IU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oao1SMq6xkKkj70jkMT0ZNWB0vdrgVf3U8gBsTT03MgkC2AcwnYhWp2IGUFtJ+tfJ xQx/fNaI/7Y01/2b3xirDFjC6intNQEB/SQ3U8UiXyMm9M2DJwtmuSHFP9DT+KkCSc Z0DehujubZIWsBuhqZIgrQi44H7i4wdbcm/w0kp8= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 47/83] dma/skeleton: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:40 -0700 Message-Id: <1710949096-5786-48-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/dma/skeleton/skeleton_dmadev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/skeleton/skeleton_dmadev.h b/drivers/dma/skeleton/skeleton_dmadev.h index c9bf315..cfd37d1 100644 --- a/drivers/dma/skeleton/skeleton_dmadev.h +++ b/drivers/dma/skeleton/skeleton_dmadev.h @@ -73,13 +73,13 @@ struct skeldma_hw { struct rte_ring *desc_completed; /* Cache delimiter for dataplane API's operation data */ - char cache1 __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) char cache1; uint16_t ridx; /* ring idx */ uint16_t last_ridx; uint64_t submitted_count; /* Cache delimiter for cpuwork thread's operation data */ - char cache2 __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) char cache2; volatile uint32_t zero_req_count; uint64_t completed_count; }; From patchwork Wed Mar 20 15:37:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138557 X-Patchwork-Delegate: david.marchand@redhat.com 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 931D243D05; Wed, 20 Mar 2024 16:45:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CEFB242ED2; Wed, 20 Mar 2024 16:39:47 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 59F7C42DA3 for ; Wed, 20 Mar 2024 16:38:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id AA5DD20B2005; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com AA5DD20B2005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=JczMSvGj09kj1YeDDvv8aAFwWabjgTagvGCb6K35blo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eUyEJd+45No1xPXpE/NfKPHP/TNLK3sUPNuOnFwBmMhFl/6t6BixeHyRj2LlwY7L0 qax82jzsGJx1kLZYfPrSGWUmBF/tzKX1JBZONA+xU39EwhT1TTgtjkaoYzDSMFTsOX T4xyxd/KKYRZvR8iCgpoOGm8O/Bs0Y1RaIaL115k= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 48/83] dma/ioat: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:41 -0700 Message-Id: <1710949096-5786-49-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/dma/ioat/ioat_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/ioat/ioat_internal.h b/drivers/dma/ioat/ioat_internal.h index 4fa19eb..f4285c5 100644 --- a/drivers/dma/ioat/ioat_internal.h +++ b/drivers/dma/ioat/ioat_internal.h @@ -12,7 +12,7 @@ struct ioat_dmadev { struct rte_dma_vchan_conf qcfg; struct rte_dma_stats stats; - volatile uint16_t *doorbell __rte_cache_aligned; + volatile alignas(RTE_CACHE_LINE_SIZE) uint16_t *doorbell; phys_addr_t status_addr; phys_addr_t ring_addr; @@ -25,7 +25,7 @@ struct ioat_dmadev { unsigned int failure; /* Used to store chanerr for error handling. */ /* To report completions, the device will write status back here. */ - volatile uint64_t status __rte_cache_aligned; + volatile alignas(RTE_CACHE_LINE_SIZE) uint64_t status; /* Pointer to the register bar. */ volatile struct ioat_registers *regs; From patchwork Wed Mar 20 15:37:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138559 X-Patchwork-Delegate: david.marchand@redhat.com 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 0012343D05; Wed, 20 Mar 2024 16:46:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21EA942EDA; Wed, 20 Mar 2024 16:39:50 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 98CBB42D2B for ; Wed, 20 Mar 2024 16:38:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id BEFC120B2007; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com BEFC120B2007 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=LIlUwOcsHY/zNtE1/hZMur9uSUBKnRGW0NSvlq7Sdro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rs5qe94mXRGPFfJo2LooCct8FP2fWrlF6vXmg5FkF8mpfNc63djpAgQsPgeI+zEJM f8rRTORyBULhc4T4gAI6djaYTB2znF/BL6jNE1uVZXRS43NU913QNMGIi4hMeVeFeX b5zYAYaHJmejgxDC+zg2Ir9p6OyF6il/u2kDxkWg= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 49/83] dma/idxd: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:42 -0700 Message-Id: <1710949096-5786-50-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/dma/idxd/idxd_hw_defs.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/dma/idxd/idxd_hw_defs.h b/drivers/dma/idxd/idxd_hw_defs.h index 7113d22..435c1cd 100644 --- a/drivers/dma/idxd/idxd_hw_defs.h +++ b/drivers/dma/idxd/idxd_hw_defs.h @@ -26,7 +26,7 @@ enum rte_idxd_ops { * Hardware descriptor used by DSA hardware, for both bursts and * for individual operations. */ -struct idxd_hw_desc { +struct __rte_aligned(64) idxd_hw_desc { uint32_t pasid; uint32_t op_flags; rte_iova_t completion; @@ -43,7 +43,7 @@ struct idxd_hw_desc { /* remaining 26 bytes are reserved */ uint16_t reserved[13]; -} __rte_aligned(64); +}; #define IDXD_COMP_STATUS_INCOMPLETE 0 #define IDXD_COMP_STATUS_SUCCESS 1 @@ -55,7 +55,7 @@ struct idxd_hw_desc { /** * Completion record structure written back by DSA */ -struct idxd_completion { +struct __rte_aligned(32) idxd_completion { uint8_t status; uint8_t result; /* 16-bits pad here */ @@ -63,7 +63,7 @@ struct idxd_completion { rte_iova_t fault_address; uint32_t invalid_flags; -} __rte_aligned(32); +}; /*** Definitions for Intel(R) Data Streaming Accelerator ***/ @@ -83,20 +83,20 @@ enum rte_idxd_cmds { /* General bar0 registers */ struct rte_idxd_bar0 { - uint32_t __rte_cache_aligned version; /* offset 0x00 */ - uint64_t __rte_aligned(0x10) gencap; /* offset 0x10 */ - uint64_t __rte_aligned(0x10) wqcap; /* offset 0x20 */ - uint64_t __rte_aligned(0x10) grpcap; /* offset 0x30 */ - uint64_t __rte_aligned(0x08) engcap; /* offset 0x38 */ - uint64_t __rte_aligned(0x10) opcap; /* offset 0x40 */ - uint64_t __rte_aligned(0x20) offsets[2]; /* offset 0x60 */ - uint32_t __rte_aligned(0x20) gencfg; /* offset 0x80 */ - uint32_t __rte_aligned(0x08) genctrl; /* offset 0x88 */ - uint32_t __rte_aligned(0x10) gensts; /* offset 0x90 */ - uint32_t __rte_aligned(0x08) intcause; /* offset 0x98 */ - uint32_t __rte_aligned(0x10) cmd; /* offset 0xA0 */ - uint32_t __rte_aligned(0x08) cmdstatus; /* offset 0xA8 */ - uint64_t __rte_aligned(0x20) swerror[4]; /* offset 0xC0 */ + alignas(RTE_CACHE_LINE_SIZE) uint32_t version; /* offset 0x00 */ + alignas(0x10) uint64_t gencap; /* offset 0x10 */ + alignas(0x10) uint64_t wqcap; /* offset 0x20 */ + alignas(0x10) uint64_t grpcap; /* offset 0x30 */ + alignas(0x08) uint64_t engcap; /* offset 0x38 */ + alignas(0x10) uint64_t opcap; /* offset 0x40 */ + alignas(0x20) uint64_t offsets[2]; /* offset 0x60 */ + alignas(0x20) uint32_t gencfg; /* offset 0x80 */ + alignas(0x08) uint32_t genctrl; /* offset 0x88 */ + alignas(0x10) uint32_t gensts; /* offset 0x90 */ + alignas(0x08) uint32_t intcause; /* offset 0x98 */ + alignas(0x10) uint32_t cmd; /* offset 0xA0 */ + alignas(0x08) uint32_t cmdstatus; /* offset 0xA8 */ + alignas(0x20) uint64_t swerror[4]; /* offset 0xC0 */ }; /* workqueue config is provided by array of uint32_t. */ @@ -118,7 +118,7 @@ enum rte_idxd_wqcfg { #define WQ_STATE_MASK 0x3 struct rte_idxd_grpcfg { - uint64_t grpwqcfg[4] __rte_cache_aligned; /* 64-byte register set */ + alignas(RTE_CACHE_LINE_SIZE) uint64_t grpwqcfg[4]; /* 64-byte register set */ uint64_t grpengcfg; /* offset 32 */ uint32_t grpflags; /* offset 40 */ }; From patchwork Wed Mar 20 15:37:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138558 X-Patchwork-Delegate: david.marchand@redhat.com 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 85E3D43D05; Wed, 20 Mar 2024 16:46:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EAC4B42ED6; Wed, 20 Mar 2024 16:39:48 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id CC07642D9A for ; Wed, 20 Mar 2024 16:38:40 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id D331C20B2004; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D331C20B2004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=Vt6IYNnb9TtdzvtZZe9Y6xYjD+Xs4+JDFBwEhwkXh+k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F99O+cZ2E3W0+ukC+Vz3dZDiBmHznC4RdkzFrxdiZsUHAi5JA7hhzUQE8ANaspCCX s1hdv5GVDzQlbbkILxrERKh3i3S0gr0hbDbg1bkURFZun/D30ApNtapitPWn7yFoCL 2vSU8KJt5gKsaVDcm8VeCvkBXNHvA790jRNfKYOU= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 50/83] crypto/uadk: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:43 -0700 Message-Id: <1710949096-5786-51-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/uadk/uadk_crypto_pmd_private.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/uadk/uadk_crypto_pmd_private.h b/drivers/crypto/uadk/uadk_crypto_pmd_private.h index 5a7dbff..7a35c94 100644 --- a/drivers/crypto/uadk/uadk_crypto_pmd_private.h +++ b/drivers/crypto/uadk/uadk_crypto_pmd_private.h @@ -9,7 +9,7 @@ /* Maximum length for digest (SHA-512 needs 64 bytes) */ #define DIGEST_LENGTH_MAX 64 -struct uadk_qp { +struct __rte_cache_aligned uadk_qp { /* Ring for placing process packets */ struct rte_ring *processed_pkts; /* Queue pair statistics */ @@ -23,7 +23,7 @@ struct uadk_qp { * by the user (using authentication verify operation) */ uint8_t temp_digest[DIGEST_LENGTH_MAX]; -} __rte_cache_aligned; +}; enum uadk_chain_order { UADK_CHAIN_ONLY_CIPHER, @@ -33,7 +33,7 @@ enum uadk_chain_order { UADK_CHAIN_NOT_SUPPORTED }; -struct uadk_crypto_session { +struct __rte_cache_aligned uadk_crypto_session { handle_t handle_cipher; handle_t handle_digest; enum uadk_chain_order chain_order; @@ -56,19 +56,19 @@ struct uadk_crypto_session { enum rte_crypto_auth_operation operation; uint16_t digest_length; } auth; -} __rte_cache_aligned; +}; enum uadk_crypto_version { UADK_CRYPTO_V2, UADK_CRYPTO_V3, }; -struct uadk_crypto_priv { +struct __rte_cache_aligned uadk_crypto_priv { bool env_cipher_init; bool env_auth_init; enum uadk_crypto_version version; unsigned int max_nb_qpairs; -} __rte_cache_aligned; +}; extern int uadk_crypto_logtype; From patchwork Wed Mar 20 15:37:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138561 X-Patchwork-Delegate: david.marchand@redhat.com 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 0BC9843D05; Wed, 20 Mar 2024 16:46:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74D7C42EE3; Wed, 20 Mar 2024 16:39:52 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2CA9842DA3 for ; Wed, 20 Mar 2024 16:38:41 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id E794420B2006; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E794420B2006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=65tsayf9+YFHXEI84ur5jPaGjHuv5c/X2ZttLJmV3Ms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oUfyY1H3sAJpRrj3j2q1Gp7nOWkU8YFKd0EqrE3raui8yy3DlspllR3sEyBkVCCh6 31ay/DJjKdwofAUfXEXeTb23KEeOY9TzIZ5SDg1pAX25lSlj73vF9gw/HDhLmM+K7R MARBzxeJxAmvhx2PifY8vr/gcVPSeVZ7GGigc/Wo= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 51/83] crypto/scheduler: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:44 -0700 Message-Id: <1710949096-5786-52-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/scheduler/scheduler_pkt_size_distr.c | 4 ++-- drivers/crypto/scheduler/scheduler_pmd_private.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/scheduler/scheduler_pkt_size_distr.c b/drivers/crypto/scheduler/scheduler_pkt_size_distr.c index 30bb5ce..1334a79 100644 --- a/drivers/crypto/scheduler/scheduler_pkt_size_distr.c +++ b/drivers/crypto/scheduler/scheduler_pkt_size_distr.c @@ -20,12 +20,12 @@ struct psd_scheduler_ctx { }; /** pkt size based scheduler queue pair context */ -struct psd_scheduler_qp_ctx { +struct __rte_cache_aligned psd_scheduler_qp_ctx { struct scheduler_worker primary_worker; struct scheduler_worker secondary_worker; uint32_t threshold; uint8_t deq_idx; -} __rte_cache_aligned; +}; /** scheduling operation variables' wrapping */ struct psd_schedule_op { diff --git a/drivers/crypto/scheduler/scheduler_pmd_private.h b/drivers/crypto/scheduler/scheduler_pmd_private.h index 2611027..0f0a6b4 100644 --- a/drivers/crypto/scheduler/scheduler_pmd_private.h +++ b/drivers/crypto/scheduler/scheduler_pmd_private.h @@ -27,7 +27,7 @@ struct scheduler_worker { uint8_t driver_id; }; -struct scheduler_ctx { +struct __rte_cache_aligned scheduler_ctx { void *private_ctx; /**< private scheduler context pointer */ @@ -55,15 +55,15 @@ struct scheduler_ctx { char *init_worker_names[RTE_CRYPTODEV_SCHEDULER_MAX_NB_WORKERS]; int nb_init_workers; -} __rte_cache_aligned; +}; -struct scheduler_qp_ctx { +struct __rte_cache_aligned scheduler_qp_ctx { void *private_qp_ctx; uint32_t max_nb_objs; struct rte_ring *order_ring; -} __rte_cache_aligned; +}; struct scheduler_session_ctx { uint32_t ref_cnt; From patchwork Wed Mar 20 15:37:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138560 X-Patchwork-Delegate: david.marchand@redhat.com 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 4E71343D05; Wed, 20 Mar 2024 16:46:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4222042E91; Wed, 20 Mar 2024 16:39:51 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7386B42670 for ; Wed, 20 Mar 2024 16:38:41 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 071D920B2003; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 071D920B2003 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=xZ3rGDGbZqwoOQ2QVYtyqlTgHzCxTRe06aaGu4bdkzM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b5Vk/t67uMKyrPgDFT7obJSqIja777C7g1YzitYqzbhdsx3NTH+D0qHaL1Nh8T6cP nRtiGwHpzauuhJlo/oe10mdJ3jSOtGx1tp1PuSiGDGkADAqjQ4mRhGwDEHFEpY7Yk3 NmFr29D/Mnv1nxC6jxMO/xokb5IKyJtP9CH4EpiE= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 52/83] crypto/qat: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:45 -0700 Message-Id: <1710949096-5786-53-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/qat/qat_asym.h | 15 +++++++-------- drivers/crypto/qat/qat_sym.h | 8 ++++---- drivers/crypto/qat/qat_sym_session.h | 10 +++++----- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/drivers/crypto/qat/qat_asym.h b/drivers/crypto/qat/qat_asym.h index 6628656..00275fa 100644 --- a/drivers/crypto/qat/qat_asym.h +++ b/drivers/crypto/qat/qat_asym.h @@ -18,7 +18,6 @@ typedef uint64_t large_int_ptr; #define MAX_PKE_PARAMS 8 #define QAT_PKE_MAX_LN_SIZE 512 -#define _PKE_ALIGN_ __rte_aligned(8) #define QAT_ASYM_MAX_PARAMS 8 #define QAT_ASYM_MODINV_NUM_IN_PARAMS 2 @@ -57,20 +56,20 @@ } \ } -struct qat_asym_op_cookie { +struct __rte_aligned(8) qat_asym_op_cookie { uint64_t error; uint32_t alg_bytesize; /*< Bytesize of algorithm */ uint32_t qat_func_alignsize; /*< Aligned bytesize of qat function */ rte_iova_t input_addr; rte_iova_t output_addr; - large_int_ptr input_params_ptrs[MAX_PKE_PARAMS] _PKE_ALIGN_; - large_int_ptr output_params_ptrs[MAX_PKE_PARAMS] _PKE_ALIGN_; - union { + alignas(8) large_int_ptr input_params_ptrs[MAX_PKE_PARAMS]; + alignas(8) large_int_ptr output_params_ptrs[MAX_PKE_PARAMS]; + union __rte_aligned(8) { uint8_t input_array[MAX_PKE_PARAMS][QAT_PKE_MAX_LN_SIZE]; uint8_t input_buffer[MAX_PKE_PARAMS * QAT_PKE_MAX_LN_SIZE]; - } _PKE_ALIGN_; - uint8_t output_array[MAX_PKE_PARAMS][QAT_PKE_MAX_LN_SIZE] _PKE_ALIGN_; -} _PKE_ALIGN_; + }; + alignas(8) uint8_t output_array[MAX_PKE_PARAMS][QAT_PKE_MAX_LN_SIZE]; +}; struct qat_asym_session { struct icp_qat_fw_pke_request req_tmpl; diff --git a/drivers/crypto/qat/qat_sym.h b/drivers/crypto/qat/qat_sym.h index 6616064..eedf5de 100644 --- a/drivers/crypto/qat/qat_sym.h +++ b/drivers/crypto/qat/qat_sym.h @@ -103,10 +103,10 @@ struct qat_sym_session; -struct qat_sym_sgl { +struct __rte_cache_aligned qat_sym_sgl { qat_sgl_hdr; struct qat_flat_buf buffers[QAT_SYM_SGL_MAX_NUMBER]; -} __rte_packed __rte_cache_aligned; +} __rte_packed; struct qat_sym_op_cookie { struct qat_sym_sgl qat_sgl_src; @@ -116,8 +116,8 @@ struct qat_sym_op_cookie { union { /* Used for Single-Pass AES-GMAC only */ struct { - struct icp_qat_hw_cipher_algo_blk cd_cipher - __rte_packed __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct icp_qat_hw_cipher_algo_blk cd_cipher + __rte_packed; phys_addr_t cd_phys_addr; } spc_gmac; } opt; diff --git a/drivers/crypto/qat/qat_sym_session.h b/drivers/crypto/qat/qat_sym_session.h index c41f8cc..f263477 100644 --- a/drivers/crypto/qat/qat_sym_session.h +++ b/drivers/crypto/qat/qat_sym_session.h @@ -92,7 +92,7 @@ typedef int (*qat_sym_build_request_t)(void *in_op, struct qat_sym_session *ctx, uint8_t *out_msg, void *op_cookie); /* Common content descriptor */ -struct qat_sym_cd { +struct __rte_cache_aligned qat_sym_cd { struct icp_qat_hw_cipher_algo_blk cipher; union { struct icp_qat_hw_auth_algo_blk hash; @@ -100,7 +100,7 @@ struct qat_sym_cd { struct icp_qat_hw_gen3_crc_cd crc_gen3; struct icp_qat_hw_gen4_crc_cd crc_gen4; }; -} __rte_packed __rte_cache_aligned; +} __rte_packed; struct qat_sym_session { enum icp_qat_fw_la_cmd_id qat_cmd; @@ -115,7 +115,7 @@ struct qat_sym_session { struct qat_sym_cd cd; uint8_t key_array[32]; }; - uint8_t prefix_state[QAT_PREFIX_TBL_SIZE] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint8_t prefix_state[QAT_PREFIX_TBL_SIZE]; uint8_t *cd_cur_ptr; union { phys_addr_t cd_paddr; @@ -153,8 +153,8 @@ struct qat_sym_session { qat_sym_build_request_t build_request[2]; #ifndef RTE_QAT_OPENSSL IMB_MGR *mb_mgr; - uint64_t expkey[4*15] __rte_aligned(16); - uint32_t dust[4*15] __rte_aligned(16); + alignas(16) uint64_t expkey[4 * 15]; + alignas(16) uint32_t dust[4 * 15]; uint8_t docsis_key_len; #endif }; From patchwork Wed Mar 20 15:37:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138562 X-Patchwork-Delegate: david.marchand@redhat.com 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 884DC43D05; Wed, 20 Mar 2024 16:46:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F08342EE9; Wed, 20 Mar 2024 16:39:53 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AF42B42DB1 for ; Wed, 20 Mar 2024 16:38:41 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 1A7E220B2008; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1A7E220B2008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=/8FZTg0mom4s6GvuamXVANlcZPh+3uaM8U2WYZ0ddNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b4jcydrKmiA2sJ+sdy5EKmPZxqY5P8B5BZrnx7xurq6YIxWWhTEMOQ8eUDHxzZzHr eH8ebmLkQiTSeNwEsfIqlsdFIa5br+1mMAuSd8ZOXm8UlvnpdOKPSabLtrZXSHnols sKQLzm0I/+NTJUhdnkZamy5uD3AalFdW3F+a4kpA= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 53/83] crypto/openssl: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:46 -0700 Message-Id: <1710949096-5786-54-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/openssl/openssl_pmd_private.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/openssl/openssl_pmd_private.h b/drivers/crypto/openssl/openssl_pmd_private.h index 334912d..0f038b2 100644 --- a/drivers/crypto/openssl/openssl_pmd_private.h +++ b/drivers/crypto/openssl/openssl_pmd_private.h @@ -62,7 +62,7 @@ struct openssl_private { }; /** OPENSSL crypto queue pair */ -struct openssl_qp { +struct __rte_cache_aligned openssl_qp { uint16_t id; /**< Queue Pair Identifier */ char name[RTE_CRYPTODEV_NAME_MAX_LEN]; @@ -78,10 +78,10 @@ struct openssl_qp { * by the driver when verifying a digest provided * by the user (using authentication verify operation) */ -} __rte_cache_aligned; +}; /** OPENSSL crypto private session structure */ -struct openssl_session { +struct __rte_cache_aligned openssl_session { enum openssl_chain_order chain_order; /**< chain order mode */ @@ -166,10 +166,10 @@ struct openssl_session { /**< digest length */ } auth; -} __rte_cache_aligned; +}; /** OPENSSL crypto private asymmetric session structure */ -struct openssl_asym_session { +struct __rte_cache_aligned openssl_asym_session { enum rte_crypto_asym_xform_type xfrm_type; union { struct rsa { @@ -213,7 +213,7 @@ struct openssl_asym_session { #endif } sm2; } u; -} __rte_cache_aligned; +}; /** Set and validate OPENSSL crypto session parameters */ extern int openssl_set_session_parameters(struct openssl_session *sess, From patchwork Wed Mar 20 15:37:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138563 X-Patchwork-Delegate: david.marchand@redhat.com 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 2B2CF43D05; Wed, 20 Mar 2024 16:46:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3BF242EEE; Wed, 20 Mar 2024 16:39:54 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 0F54C42DB2 for ; Wed, 20 Mar 2024 16:38:42 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2DD7820B200A; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2DD7820B200A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=ZWCTlYmWMfKDt9+EybD6IRY/Am5wYCiy7wI00vsByDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K2ufB51Z/FkdRhNoUZGqqJxIMF6ZL2gUxa+28h/kJikqm0LYkXwaQfAbxlV6jLHxn +YacsJ60gmajBhwaIpSMC4nHwOL67N894l9J3pPIcCpeXOM9tO22Pob+nxR5AWO4AR xWuRv5p1LdSb0I6I3Mg9ARNJUtgPfvFd33Itr/kQ= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 54/83] crypto/octeontx: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:47 -0700 Message-Id: <1710949096-5786-55-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/octeontx/otx_cryptodev_hw_access.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/octeontx/otx_cryptodev_hw_access.h b/drivers/crypto/octeontx/otx_cryptodev_hw_access.h index 4647d56..6e2afde 100644 --- a/drivers/crypto/octeontx/otx_cryptodev_hw_access.h +++ b/drivers/crypto/octeontx/otx_cryptodev_hw_access.h @@ -77,7 +77,7 @@ struct command_queue { /** * CPT VF device structure */ -struct cpt_vf { +struct __rte_cache_aligned cpt_vf { /** CPT instance */ struct cpt_instance instance; /** Register start address */ @@ -111,7 +111,7 @@ struct cpt_vf { /** Device name */ char dev_name[32]; -} __rte_cache_aligned; +}; /* * CPT Registers map for 81xx From patchwork Wed Mar 20 15:37:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138564 X-Patchwork-Delegate: david.marchand@redhat.com 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 200B143D05; Wed, 20 Mar 2024 16:46:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F397042EEA; Wed, 20 Mar 2024 16:39:55 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5322A42DA3 for ; Wed, 20 Mar 2024 16:38:42 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 420AA20B200B; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 420AA20B200B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=J8/fORwOHGhU1l9wWFqYfgOS0dUdyNlnFwN0jJIpI70=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EturVdBmtIRljak40ugKMt96v4LZn5ZGwhyF1Zh9WuNjXGDtwd6H31kmjC5+HtT34 C7i1z0Nk1U1L5QQX7anS45X51BFLuWM3EiTZuXvq9zTjKmmqBQ926qM8S5t7N1RUvh NIunJHXQ3W61AG3vlpSWzfkr1UfCArN5f+FiaHyM= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 55/83] crypto/null: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:48 -0700 Message-Id: <1710949096-5786-56-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/null/null_crypto_pmd_private.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/null/null_crypto_pmd_private.h b/drivers/crypto/null/null_crypto_pmd_private.h index ae34ce6..645a68d 100644 --- a/drivers/crypto/null/null_crypto_pmd_private.h +++ b/drivers/crypto/null/null_crypto_pmd_private.h @@ -22,7 +22,7 @@ struct null_crypto_private { }; /** NULL crypto queue pair */ -struct null_crypto_qp { +struct __rte_cache_aligned null_crypto_qp { uint16_t id; /**< Queue Pair Identifier */ char name[RTE_CRYPTODEV_NAME_MAX_LEN]; @@ -33,13 +33,13 @@ struct null_crypto_qp { /**< Session Mempool */ struct rte_cryptodev_stats qp_stats; /**< Queue pair statistics */ -} __rte_cache_aligned; +}; /** NULL crypto private session structure */ -struct null_crypto_session { +struct __rte_cache_aligned null_crypto_session { uint32_t reserved; -} __rte_cache_aligned; +}; /** Set and validate NULL crypto session parameters */ extern int From patchwork Wed Mar 20 15:37:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138565 X-Patchwork-Delegate: david.marchand@redhat.com 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 E329543D05; Wed, 20 Mar 2024 16:46:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B50B42EF6; Wed, 20 Mar 2024 16:39:57 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8B85742DB1 for ; Wed, 20 Mar 2024 16:38:42 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 5595F20B2009; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5595F20B2009 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=Jgahjv6C05NGSaofNeM8DHrQd8T6i9dr78364MvvjJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rTIZcYCckXOay+dUT+IPNQ+FN26mTJ1kQLVxJOhUPZeLQ7ZU1Kj3DtuHc4Y8si4tQ 3O1AEQZixPGA1DHB3Q3v8Fj2CNl10WEXDmxLMp+6AaaFSVc2Grt22IjFmXdKA79yZD 5COboFDmESttKHnCiSYlndOTR4Lot+15x348vH88= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 56/83] crypto/mvsam: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:49 -0700 Message-Id: <1710949096-5786-57-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/mvsam/mrvl_pmd_private.h | 12 ++++++------ drivers/crypto/mvsam/rte_mrvl_pmd.c | 12 +++++------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/crypto/mvsam/mrvl_pmd_private.h b/drivers/crypto/mvsam/mrvl_pmd_private.h index 719d73d..80ff229 100644 --- a/drivers/crypto/mvsam/mrvl_pmd_private.h +++ b/drivers/crypto/mvsam/mrvl_pmd_private.h @@ -44,7 +44,7 @@ struct mrvl_crypto_private { }; /** MRVL crypto queue pair structure. */ -struct mrvl_crypto_qp { +struct __rte_cache_aligned mrvl_crypto_qp { /** SAM CIO (MUSDK Queue Pair equivalent).*/ struct sam_cio *cio; @@ -59,10 +59,10 @@ struct mrvl_crypto_qp { /** CIO initialization parameters.*/ struct sam_cio_params cio_params; -} __rte_cache_aligned; +}; /** MRVL crypto private session structure. */ -struct mrvl_crypto_session { +struct __rte_cache_aligned mrvl_crypto_session { /** Crypto operations chain order. */ enum mrvl_crypto_chain_order chain_order; @@ -74,12 +74,12 @@ struct mrvl_crypto_session { /** Cipher IV offset. */ uint16_t cipher_iv_offset; -} __rte_cache_aligned; +}; -struct mrvl_crypto_src_table { +struct __rte_cache_aligned mrvl_crypto_src_table { uint16_t iter_ops; struct sam_buf_info src_bd[MRVL_MAX_SEGMENTS]; -} __rte_cache_aligned; +}; /** Set and validate MRVL crypto session parameters */ int diff --git a/drivers/crypto/mvsam/rte_mrvl_pmd.c b/drivers/crypto/mvsam/rte_mrvl_pmd.c index 1641da9..193b7fb 100644 --- a/drivers/crypto/mvsam/rte_mrvl_pmd.c +++ b/drivers/crypto/mvsam/rte_mrvl_pmd.c @@ -47,22 +47,20 @@ enum algo_supported { }; /** Map elements for cipher mapping.*/ -struct cipher_params_mapping { +/* We want to squeeze in multiple maps into the cache line. */ +struct __rte_aligned(32) cipher_params_mapping { enum algo_supported supported; /**< On/Off switch */ enum sam_cipher_alg cipher_alg; /**< Cipher algorithm */ enum sam_cipher_mode cipher_mode; /**< Cipher mode */ unsigned int max_key_len; /**< Maximum key length (in bytes)*/ -} -/* We want to squeeze in multiple maps into the cache line. */ -__rte_aligned(32); +}; /** Map elements for auth mapping.*/ -struct auth_params_mapping { +/* We want to squeeze in multiple maps into the cache line. */ +struct __rte_aligned(32) auth_params_mapping { enum algo_supported supported; /**< On/off switch */ enum sam_auth_alg auth_alg; /**< Auth algorithm */ } -/* We want to squeeze in multiple maps into the cache line. */ -__rte_aligned(32); /** * Map of supported cipher algorithms. From patchwork Wed Mar 20 15:37:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138566 X-Patchwork-Delegate: david.marchand@redhat.com 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 7C8C843D05; Wed, 20 Mar 2024 16:46:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73CA242EFC; Wed, 20 Mar 2024 16:39:58 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DA32242DB2 for ; Wed, 20 Mar 2024 16:38:42 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 68EFD20B200D; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 68EFD20B200D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=VYsXv4AXaBWHaTfQa8nJ2CZt7LUfvB9KPxyg1JF87Dc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fcaXNYKl8n0z5AgmuFoLW+yyF71PL8ppoo4MZKS/Cc1S8OEM1a0/1CLrNzAYihrju zS0VZdPkgRZ4XCcqXFCFL8C065/dt/9UWxhSA7xQKqzp+nC1U+yNnsbgqdfyhVe5jm R4rAr2NuT3OgPmrXLzRPSyQBWpJHRTJfUY8iBopY= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 57/83] crypto/mlx5: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:50 -0700 Message-Id: <1710949096-5786-58-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/mlx5/mlx5_crypto.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/mlx5/mlx5_crypto.h b/drivers/crypto/mlx5/mlx5_crypto.h index 36dacdc..5432484 100644 --- a/drivers/crypto/mlx5/mlx5_crypto.h +++ b/drivers/crypto/mlx5/mlx5_crypto.h @@ -80,12 +80,12 @@ struct mlx5_crypto_qp { uint16_t cpy_tag_op; }; -struct mlx5_crypto_dek { +struct __rte_cache_aligned mlx5_crypto_dek { struct mlx5_list_entry entry; /* Pointer to DEK hash list entry. */ struct mlx5_devx_obj *obj; /* Pointer to DEK DevX object. */ uint8_t data[MLX5_CRYPTO_KEY_LENGTH]; /* DEK key data. */ uint32_t size; /* key+keytag size. */ -} __rte_cache_aligned; +}; struct mlx5_crypto_devarg_params { bool login_devarg; From patchwork Wed Mar 20 15:37:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138537 X-Patchwork-Delegate: david.marchand@redhat.com 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 6706043D05; Wed, 20 Mar 2024 16:43:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC3F942E56; Wed, 20 Mar 2024 16:39:21 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id A512542D72 for ; Wed, 20 Mar 2024 16:38:34 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 1A27720B46ED; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1A27720B46ED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=ts3GbGSr2qidDho+YgQSyZ1WXAMy9OFNN0Rn30THZ+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jt+sBThwv1g65vQ5X73sgiDAUTpRYfyOy3eGvxb7da57VKemSfORxItikz8OpnMKt QHn/U1vQt7uPsZIdmCK+xzcVEOlcbPUHclx1HwHp85qsAwCphzaR+2CZsYbbWVQOxd 7oqewYYqXIGlPGMT12enk0F7POPVOJB9/fg1tq3M= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 58/83] crypto/ipsec_mb: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:51 -0700 Message-Id: <1710949096-5786-59-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/ipsec_mb/pmd_aesni_mb.c | 4 ++-- drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h | 24 ++++++++++++------------ drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h | 4 ++-- drivers/crypto/ipsec_mb/pmd_kasumi_priv.h | 4 ++-- drivers/crypto/ipsec_mb/pmd_snow3g_priv.h | 4 ++-- drivers/crypto/ipsec_mb/pmd_zuc_priv.h | 4 ++-- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c index 4de4866..69a5466 100644 --- a/drivers/crypto/ipsec_mb/pmd_aesni_mb.c +++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb.c @@ -32,8 +32,8 @@ struct aesni_mb_op_buf_data { { uint32_t i, length; - uint8_t ipad_buf[blocksize] __rte_aligned(16); - uint8_t opad_buf[blocksize] __rte_aligned(16); + alignas(16) uint8_t ipad_buf[blocksize]; + alignas(16) uint8_t opad_buf[blocksize]; /* Setup inner and outer pads */ memset(ipad_buf, HMAC_IPAD_VALUE, blocksize); diff --git a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h index 85994fe..eec8931 100644 --- a/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h +++ b/drivers/crypto/ipsec_mb/pmd_aesni_mb_priv.h @@ -848,7 +848,7 @@ struct aesni_mb_qp_data { } /** AES-NI multi-buffer private session structure */ -struct aesni_mb_session { +struct __rte_cache_aligned aesni_mb_session { IMB_JOB template_job; /*< Template job structure */ uint32_t session_id; @@ -869,9 +869,9 @@ struct aesni_mb_session { struct { union { struct { - uint32_t encode[60] __rte_aligned(16); + alignas(16) uint32_t encode[60]; /* *< encode key */ - uint32_t decode[60] __rte_aligned(16); + alignas(16) uint32_t decode[60]; /* *< decode key */ } expanded_aes_keys; /* *< Expanded AES keys - Allocating space to @@ -903,9 +903,9 @@ struct aesni_mb_session { /* *< auth operation generate or verify */ union { struct { - uint8_t inner[128] __rte_aligned(16); + alignas(16) uint8_t inner[128]; /* *< inner pad */ - uint8_t outer[128] __rte_aligned(16); + alignas(16) uint8_t outer[128]; /* *< outer pad */ } pads; /* *< HMAC Authentication pads - @@ -915,20 +915,20 @@ struct aesni_mb_session { */ struct { - uint32_t k1_expanded[44] __rte_aligned(16); + alignas(16) uint32_t k1_expanded[44]; /* *< k1 (expanded key). */ - uint8_t k2[16] __rte_aligned(16); + alignas(16) uint8_t k2[16]; /* *< k2. */ - uint8_t k3[16] __rte_aligned(16); + alignas(16) uint8_t k3[16]; /* *< k3. */ } xcbc; struct { - uint32_t expkey[60] __rte_aligned(16); + alignas(16) uint32_t expkey[60]; /* *< k1 (expanded key). */ - uint32_t skey1[4] __rte_aligned(16); + alignas(16) uint32_t skey1[4]; /* *< k2. */ - uint32_t skey2[4] __rte_aligned(16); + alignas(16) uint32_t skey2[4]; /* *< k3. */ } cmac; /* *< Expanded XCBC authentication keys */ @@ -943,7 +943,7 @@ struct aesni_mb_session { uint16_t req_digest_len; } auth; -} __rte_cache_aligned; +}; typedef void (*hash_one_block_t)(const void *data, void *digest); typedef void (*aes_keyexp_t)(const void *key, void *enc_exp_keys, diff --git a/drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h b/drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h index 842f62f..0eca63c 100644 --- a/drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h +++ b/drivers/crypto/ipsec_mb/pmd_chacha_poly_priv.h @@ -46,7 +46,7 @@ struct rte_cryptodev_capabilities chacha20_poly1305_capabilities[] = { uint8_t pmd_driver_id_chacha20_poly1305; /** CHACHA20 POLY1305 private session structure */ -struct chacha20_poly1305_session { +struct __rte_cache_aligned chacha20_poly1305_session { struct { uint16_t length; uint16_t offset; @@ -60,7 +60,7 @@ struct chacha20_poly1305_session { /**< Generated digest length */ uint8_t key[CHACHA20_POLY1305_KEY_SIZE]; enum ipsec_mb_operation op; -} __rte_cache_aligned; +}; struct chacha20_poly1305_qp_data { struct chacha20_poly1305_context_data chacha20_poly1305_ctx_data; diff --git a/drivers/crypto/ipsec_mb/pmd_kasumi_priv.h b/drivers/crypto/ipsec_mb/pmd_kasumi_priv.h index 8db1d1c..c2e28ea 100644 --- a/drivers/crypto/ipsec_mb/pmd_kasumi_priv.h +++ b/drivers/crypto/ipsec_mb/pmd_kasumi_priv.h @@ -61,14 +61,14 @@ }; /** KASUMI private session structure */ -struct kasumi_session { +struct __rte_cache_aligned kasumi_session { /* Keys have to be 16-byte aligned */ kasumi_key_sched_t pKeySched_cipher; kasumi_key_sched_t pKeySched_hash; enum ipsec_mb_operation op; enum rte_crypto_auth_operation auth_op; uint16_t cipher_iv_offset; -} __rte_cache_aligned; +}; struct kasumi_qp_data { uint8_t temp_digest[KASUMI_DIGEST_LENGTH]; diff --git a/drivers/crypto/ipsec_mb/pmd_snow3g_priv.h b/drivers/crypto/ipsec_mb/pmd_snow3g_priv.h index ca1ce7f..9492a0b 100644 --- a/drivers/crypto/ipsec_mb/pmd_snow3g_priv.h +++ b/drivers/crypto/ipsec_mb/pmd_snow3g_priv.h @@ -65,14 +65,14 @@ }; /** SNOW 3G private session structure */ -struct snow3g_session { +struct __rte_cache_aligned snow3g_session { enum ipsec_mb_operation op; enum rte_crypto_auth_operation auth_op; snow3g_key_schedule_t pKeySched_cipher; snow3g_key_schedule_t pKeySched_hash; uint16_t cipher_iv_offset; uint16_t auth_iv_offset; -} __rte_cache_aligned; +}; struct snow3g_qp_data { uint8_t temp_digest[SNOW3G_DIGEST_LENGTH]; diff --git a/drivers/crypto/ipsec_mb/pmd_zuc_priv.h b/drivers/crypto/ipsec_mb/pmd_zuc_priv.h index 76fd675..a17a65a 100644 --- a/drivers/crypto/ipsec_mb/pmd_zuc_priv.h +++ b/drivers/crypto/ipsec_mb/pmd_zuc_priv.h @@ -64,14 +64,14 @@ }; /** ZUC private session structure */ -struct zuc_session { +struct __rte_cache_aligned zuc_session { enum ipsec_mb_operation op; enum rte_crypto_auth_operation auth_op; uint8_t pKey_cipher[ZUC_IV_KEY_LENGTH]; uint8_t pKey_hash[ZUC_IV_KEY_LENGTH]; uint16_t cipher_iv_offset; uint16_t auth_iv_offset; -} __rte_cache_aligned; +}; struct zuc_qp_data { From patchwork Wed Mar 20 15:37:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138538 X-Patchwork-Delegate: david.marchand@redhat.com 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 19CE243D05; Wed, 20 Mar 2024 16:43:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C62E242D78; Wed, 20 Mar 2024 16:39:22 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id F227E42D87 for ; Wed, 20 Mar 2024 16:38:34 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2DCCA20B46F2; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2DCCA20B46F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=0YFCt8oO91Q4dOJ6q2NQ6pG+z4rbi92JoPgVn8oVf7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DskiisbzEGnBn3gn9f0Du+JD4wBzPBVrJoR/nKwSj9TswMxxxYZqJXrIouMe7i/oC qlf64LKvJq4ZiKHahVQrFLvdW18pop/WWZRWff9QV5eT4SvERWXCPaxghh6h1YVzR1 DEj5UQ8+2qyQhEgLdz56xWK3cqMTQOKYuLQzGMOY= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 59/83] crypto/cnxk: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:52 -0700 Message-Id: <1710949096-5786-60-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/cnxk/cn10k_cryptodev_sec.h | 4 ++-- drivers/crypto/cnxk/cn10k_ipsec.h | 4 ++-- drivers/crypto/cnxk/cn10k_tls.h | 4 ++-- drivers/crypto/cnxk/cn9k_cryptodev_ops.c | 2 +- drivers/crypto/cnxk/cn9k_ipsec.h | 8 ++++---- drivers/crypto/cnxk/cnxk_cryptodev_ops.h | 4 ++-- drivers/crypto/cnxk/cnxk_se.h | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_sec.h b/drivers/crypto/cnxk/cn10k_cryptodev_sec.h index 878cf78..77faaa0 100644 --- a/drivers/crypto/cnxk/cn10k_cryptodev_sec.h +++ b/drivers/crypto/cnxk/cn10k_cryptodev_sec.h @@ -25,7 +25,7 @@ struct cn10k_tls_opt { uint16_t mac_len : 7; }; -struct cn10k_sec_session { +struct __rte_aligned(ROC_ALIGN) cn10k_sec_session { uint8_t rte_sess[SEC_SESS_SIZE]; /** PMD private space */ @@ -57,7 +57,7 @@ struct cn10k_sec_session { struct cn10k_ipsec_sa sa; struct cn10k_tls_record tls_rec; }; -} __rte_aligned(ROC_ALIGN); +}; static inline uint64_t cpt_inst_w7_get(struct roc_cpt *roc_cpt, void *cptr) diff --git a/drivers/crypto/cnxk/cn10k_ipsec.h b/drivers/crypto/cnxk/cn10k_ipsec.h index 0d1e14a..4e4e68f 100644 --- a/drivers/crypto/cnxk/cn10k_ipsec.h +++ b/drivers/crypto/cnxk/cn10k_ipsec.h @@ -18,14 +18,14 @@ /* Forward declaration */ struct cn10k_sec_session; -struct cn10k_ipsec_sa { +struct __rte_aligned(ROC_ALIGN) cn10k_ipsec_sa { union { /** Inbound SA */ struct roc_ot_ipsec_inb_sa in_sa; /** Outbound SA */ struct roc_ot_ipsec_outb_sa out_sa; }; -} __rte_aligned(ROC_ALIGN); +}; int cn10k_ipsec_session_create(struct cnxk_cpt_vf *vf, struct cnxk_cpt_qp *qp, struct rte_security_ipsec_xform *ipsec_xfrm, diff --git a/drivers/crypto/cnxk/cn10k_tls.h b/drivers/crypto/cnxk/cn10k_tls.h index 9635bdd..c6bd16d 100644 --- a/drivers/crypto/cnxk/cn10k_tls.h +++ b/drivers/crypto/cnxk/cn10k_tls.h @@ -16,14 +16,14 @@ /* Forward declaration */ struct cn10k_sec_session; -struct cn10k_tls_record { +struct __rte_aligned(ROC_ALIGN) cn10k_tls_record { union { /** Read SA */ struct roc_ie_ot_tls_read_sa read_sa; /** Write SA */ struct roc_ie_ot_tls_write_sa write_sa; }; -} __rte_aligned(ROC_ALIGN); +}; int cn10k_tls_record_session_update(struct cnxk_cpt_vf *vf, struct cnxk_cpt_qp *qp, struct cn10k_sec_session *sess, diff --git a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c index 125a464..96a75a7 100644 --- a/drivers/crypto/cnxk/cn9k_cryptodev_ops.c +++ b/drivers/crypto/cnxk/cn9k_cryptodev_ops.c @@ -126,7 +126,7 @@ cn9k_cpt_enqueue_burst(void *qptr, struct rte_crypto_op **ops, uint16_t nb_ops) { struct cpt_inflight_req *infl_req_1, *infl_req_2; - struct cpt_inst_s inst[2] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct cpt_inst_s inst[2]; struct rte_crypto_op *op_1, *op_2; uint16_t nb_allowed, count = 0; struct cnxk_cpt_qp *qp = qptr; diff --git a/drivers/crypto/cnxk/cn9k_ipsec.h b/drivers/crypto/cnxk/cn9k_ipsec.h index d28642e..4e8d815 100644 --- a/drivers/crypto/cnxk/cn9k_ipsec.h +++ b/drivers/crypto/cnxk/cn9k_ipsec.h @@ -11,18 +11,18 @@ #include "cnxk_security.h" #include "cnxk_security_ar.h" -struct cn9k_ipsec_sa { +struct __rte_aligned(8) cn9k_ipsec_sa { union { /** Inbound SA */ struct roc_ie_on_inb_sa in_sa; /** Outbound SA */ struct roc_ie_on_outb_sa out_sa; }; -} __rte_aligned(8); +}; #define SEC_SESS_SIZE sizeof(struct rte_security_session) -struct cn9k_sec_session { +struct __rte_cache_aligned cn9k_sec_session { uint8_t rte_sess[SEC_SESS_SIZE]; /** PMD private space */ @@ -57,7 +57,7 @@ struct cn9k_sec_session { struct cnxk_cpt_qp *qp; struct cn9k_ipsec_sa sa; -} __rte_cache_aligned; +}; void cn9k_sec_ops_override(void); diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h index e7bba25..46efc4a 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.h +++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.h @@ -42,7 +42,7 @@ struct cpt_qp_meta_info { #define CPT_OP_FLAGS_IPSEC_DIR_INBOUND (1 << 2) #define CPT_OP_FLAGS_IPSEC_INB_REPLAY (1 << 3) -struct cpt_inflight_req { +struct __rte_aligned(ROC_ALIGN) cpt_inflight_req { union cpt_res_s res; union { void *opaque; @@ -59,7 +59,7 @@ struct cpt_inflight_req { uint8_t *rptr; #endif void *qp; -} __rte_aligned(ROC_ALIGN); +}; PLT_STATIC_ASSERT(sizeof(struct cpt_inflight_req) == ROC_CACHE_LINE_SZ); diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h index c211884..6374718 100644 --- a/drivers/crypto/cnxk/cnxk_se.h +++ b/drivers/crypto/cnxk/cnxk_se.h @@ -31,7 +31,7 @@ enum cpt_dp_thread_type { #define SYM_SESS_SIZE sizeof(struct rte_cryptodev_sym_session) -struct cnxk_se_sess { +struct __rte_aligned(ROC_ALIGN) cnxk_se_sess { uint8_t rte_sess[SYM_SESS_SIZE]; uint8_t aes_gcm : 1; @@ -67,7 +67,7 @@ struct cnxk_se_sess { struct cnxk_cpt_qp *qp; struct roc_se_ctx roc_se_ctx; struct roc_cpt_lf *lf; -} __rte_aligned(ROC_ALIGN); +}; struct cnxk_sym_dp_ctx { struct cnxk_se_sess *sess; From patchwork Wed Mar 20 15:37:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138567 X-Patchwork-Delegate: david.marchand@redhat.com 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 EB2AA43D05; Wed, 20 Mar 2024 16:46:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96E7342F01; Wed, 20 Mar 2024 16:39:59 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 3214842DBB for ; Wed, 20 Mar 2024 16:38:43 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 7BF4D20B200E; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7BF4D20B200E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=OV0xoi1l7wdbj+utF//CpVLtCY+cWePoG1UnQ6yppsg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IGbCDVjb0pDlUsMuqnMr9BZhlrtZI/1Gsh/t6QmsuJdsqsvpSFVOWa7Nr7gJuuaOG lfVoGdbMQgyarBjidmCJv1cR9Sb4IIM05FbcZ1p65MXKNkOyc3Dthe8fMTHrc36HVq eXetmlinb3aZmdQmsUnNXpSiIfhjoDZt6gHaMWD4= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 60/83] crypto/ccp: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:53 -0700 Message-Id: <1710949096-5786-61-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/ccp/ccp_crypto.h | 4 ++-- drivers/crypto/ccp/ccp_dev.h | 8 ++++---- drivers/crypto/ccp/ccp_pmd_private.h | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/crypto/ccp/ccp_crypto.h b/drivers/crypto/ccp/ccp_crypto.h index d307f73..d0b417c 100644 --- a/drivers/crypto/ccp/ccp_crypto.h +++ b/drivers/crypto/ccp/ccp_crypto.h @@ -246,7 +246,7 @@ enum ccp_hash_op { }; /* CCP crypto private session structure */ -struct ccp_session { +struct __rte_cache_aligned ccp_session { bool auth_opt; enum ccp_cmd_order cmd_id; /**< chain order mode */ @@ -314,7 +314,7 @@ struct ccp_session { /**< AEAD Algorithm */ uint32_t reserved; -} __rte_cache_aligned; +}; extern uint8_t ccp_cryptodev_driver_id; diff --git a/drivers/crypto/ccp/ccp_dev.h b/drivers/crypto/ccp/ccp_dev.h index e3ec481..cd63830 100644 --- a/drivers/crypto/ccp/ccp_dev.h +++ b/drivers/crypto/ccp/ccp_dev.h @@ -178,7 +178,7 @@ static inline uint32_t ccp_pci_reg_read(void *base, int offset) /** * A structure describing a CCP command queue. */ -struct ccp_queue { +struct __rte_cache_aligned ccp_queue { struct ccp_device *dev; char memz_name[RTE_MEMZONE_NAMESIZE]; @@ -214,12 +214,12 @@ struct ccp_queue { /**< lsb assigned for sha ctx */ uint32_t sb_hmac; /**< lsb assigned for hmac ctx */ -} __rte_cache_aligned; +}; /** * A structure describing a CCP device. */ -struct ccp_device { +struct __rte_cache_aligned ccp_device { TAILQ_ENTRY(ccp_device) next; int id; /**< ccp dev id on platform */ @@ -237,7 +237,7 @@ struct ccp_device { /**< current queue index */ int hwrng_retries; /**< retry counter for CCP TRNG */ -} __rte_cache_aligned; +}; /**< CCP H/W engine related */ /** diff --git a/drivers/crypto/ccp/ccp_pmd_private.h b/drivers/crypto/ccp/ccp_pmd_private.h index 6704e39..390442f 100644 --- a/drivers/crypto/ccp/ccp_pmd_private.h +++ b/drivers/crypto/ccp/ccp_pmd_private.h @@ -46,7 +46,7 @@ struct ccp_private { }; /* CCP batch info */ -struct ccp_batch_info { +struct __rte_cache_aligned ccp_batch_info { struct rte_crypto_op *op[CCP_MAX_BURST]; /**< optable populated at enque time from app*/ int op_idx; @@ -66,10 +66,10 @@ struct ccp_batch_info { int lsb_buf_idx; uint16_t auth_ctr; /**< auth only ops batch for CPU based auth */ -} __rte_cache_aligned; +}; /**< CCP crypto queue pair */ -struct ccp_qp { +struct __rte_cache_aligned ccp_qp { uint16_t id; /**< Queue Pair Identifier */ char name[RTE_CRYPTODEV_NAME_MAX_LEN]; @@ -91,7 +91,7 @@ struct ccp_qp { * by the driver when verifying a digest provided * by the user (using authentication verify operation) */ -} __rte_cache_aligned; +}; /**< device specific operations function pointer structure */ From patchwork Wed Mar 20 15:37:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138539 X-Patchwork-Delegate: david.marchand@redhat.com 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 68B1F43D05; Wed, 20 Mar 2024 16:44:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 813E342E8C; Wed, 20 Mar 2024 16:39:27 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 6D40142D72 for ; Wed, 20 Mar 2024 16:38:35 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 41EE620B4715; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 41EE620B4715 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=pLU3AGkADrKTlC8eDmDKQBLA6eQ0Lgce0RmKDEBQ4f4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EKITY5yRipRdu1PDO8ObQH5+20riu2+sRaq6tEGS3kHpNMOATZlWuDzQKxSr+ohzq 2nfJ4MQMHa1KoIgQBHKQh6OWoqVTKbqXg3CO4UZDRHCYsiz36elmN3bxIxvoczWuHi a3P3KRoD6Il8d+77XpP9iT8PCRm1honqQKtFMRTs= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 61/83] crypto/caam_jr: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:54 -0700 Message-Id: <1710949096-5786-62-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/caam_jr/caam_jr_desc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/caam_jr/caam_jr_desc.h b/drivers/crypto/caam_jr/caam_jr_desc.h index 6fe6184..c85278b 100644 --- a/drivers/crypto/caam_jr/caam_jr_desc.h +++ b/drivers/crypto/caam_jr/caam_jr_desc.h @@ -261,15 +261,15 @@ struct load_command_s { * will be type-casted to this one * this one. */ -struct sec_sd_t { +struct __rte_aligned(64) sec_sd_t { uint32_t rsvd[MAX_DESC_SIZE_WORDS]; -} __rte_packed __rte_aligned(64); +} __rte_packed; /* Structure encompassing a job descriptor which processes * a single packet from a context. The job descriptor references * a shared descriptor from a SEC context. */ -struct sec_job_descriptor_t { +struct __rte_aligned(64) sec_job_descriptor_t { struct descriptor_header_s deschdr; dma_addr_t sd_ptr; struct seq_out_command_s seq_out; @@ -280,6 +280,6 @@ struct sec_job_descriptor_t { uint32_t in_ext_length; struct load_command_s load_dpovrd; uint32_t dpovrd; -} __rte_packed __rte_aligned(64); +} __rte_packed; #endif From patchwork Wed Mar 20 15:37:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138568 X-Patchwork-Delegate: david.marchand@redhat.com 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 9304B43D05; Wed, 20 Mar 2024 16:47:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF46F42F04; Wed, 20 Mar 2024 16:40:00 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 8061D42DB1 for ; Wed, 20 Mar 2024 16:38:43 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 8EE8120B200C; Wed, 20 Mar 2024 08:38:21 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8EE8120B200C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=cePxyiv1X3TRWwrfWtW8xTyvbQnoA5Jf1s6arivpPXM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VzAUQf0n6uMpXE7rZ4cy1IYRUs8A1NCPmGUw/jPeDAEm3GEMpYUlVS501F6fAfK9F 9BDqYUEr1/q38PGxecegudDKXrNNZ8t1hv8to3CsNTOfn0eI4JoKTVsJTeus6L8i/r Lou6Z5vOScrdKtqLnYGrmNGe3nyKyrBp58vvQ5Xw= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 62/83] crypto/bcmfs: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:55 -0700 Message-Id: <1710949096-5786-63-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/bcmfs/bcmfs_qp.h | 4 ++-- drivers/crypto/bcmfs/bcmfs_sym_session.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/bcmfs/bcmfs_qp.h b/drivers/crypto/bcmfs/bcmfs_qp.h index 57fe0a9..42adff9 100644 --- a/drivers/crypto/bcmfs/bcmfs_qp.h +++ b/drivers/crypto/bcmfs/bcmfs_qp.h @@ -76,7 +76,7 @@ struct bcmfs_queue { char memz_name[RTE_MEMZONE_NAMESIZE]; }; -struct bcmfs_qp { +struct __rte_cache_aligned bcmfs_qp { /* Queue-pair ID */ uint16_t qpair_id; /* Mapped IO address */ @@ -104,7 +104,7 @@ struct bcmfs_qp { /* a temporary buffer to keep message pointers */ struct bcmfs_qp_message *infl_msgs[BCMFS_MAX_REQS_BUFF]; -} __rte_cache_aligned; +}; /* Structure defining h/w queue pair operations */ struct bcmfs_hw_queue_pair_ops { diff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.h b/drivers/crypto/bcmfs/bcmfs_sym_session.h index 4a0a012..12e95f6 100644 --- a/drivers/crypto/bcmfs/bcmfs_sym_session.h +++ b/drivers/crypto/bcmfs/bcmfs_sym_session.h @@ -24,7 +24,7 @@ enum bcmfs_sym_chain_order { }; /* BCMFS_SYM crypto private session structure */ -struct bcmfs_sym_session { +struct __rte_cache_aligned bcmfs_sym_session { enum bcmfs_sym_chain_order chain_order; /* Cipher Parameters */ @@ -83,7 +83,7 @@ struct bcmfs_sym_session { } aead; bool cipher_first; -} __rte_cache_aligned; +}; int bcmfs_process_crypto_op(struct rte_crypto_op *op, From patchwork Wed Mar 20 15:37:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138540 X-Patchwork-Delegate: david.marchand@redhat.com 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 6FE5243D05; Wed, 20 Mar 2024 16:44:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97DD842EA0; Wed, 20 Mar 2024 16:39:28 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 9CF9D42D80 for ; Wed, 20 Mar 2024 16:38:35 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 552C220B4719; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 552C220B4719 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=OEkScrK9HlUYc1wCZcpac99+5cf83KpZJ9vDqWBaG/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=loWAZODGmMnE1jXb7I0tZBx11FSAQpkgxDKtwhOUdzmtIZP9QPMPR0Li05lRRmxrz uiKiNUBIO38hdkBnxpoKVvnTKY6C1YBNUDxPgBg3FxxEBSojt16XrJA6+bjXs4+kyi pLvWZav6PS48Jc/AR/AoRyxrLHRglHMHI7y89Vbk= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 63/83] crypto/armv8: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:56 -0700 Message-Id: <1710949096-5786-64-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/crypto/armv8/armv8_pmd_private.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/armv8/armv8_pmd_private.h b/drivers/crypto/armv8/armv8_pmd_private.h index 41292d8..c9bbcc2 100644 --- a/drivers/crypto/armv8/armv8_pmd_private.h +++ b/drivers/crypto/armv8/armv8_pmd_private.h @@ -99,7 +99,7 @@ struct armv8_crypto_private { }; /** ARMv8 crypto queue pair */ -struct armv8_crypto_qp { +struct __rte_cache_aligned armv8_crypto_qp { uint16_t id; /**< Queue Pair Identifier */ struct rte_ring *processed_ops; @@ -115,10 +115,10 @@ struct armv8_crypto_qp { * by the driver when verifying a digest provided * by the user (using authentication verify operation) */ -} __rte_cache_aligned; +}; /** ARMv8 crypto private session structure */ -struct armv8_crypto_session { +struct __rte_cache_aligned armv8_crypto_session { enum armv8_crypto_chain_order chain_order; /**< chain order mode */ crypto_func_t crypto_func; @@ -160,11 +160,9 @@ struct armv8_crypto_session { } auth; struct { - uint8_t i_key_pad[SHA_BLOCK_MAX] - __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint8_t i_key_pad[SHA_BLOCK_MAX]; /**< inner pad (max supported block length) */ - uint8_t o_key_pad[SHA_BLOCK_MAX] - __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint8_t o_key_pad[SHA_BLOCK_MAX]; /**< outer pad (max supported block length) */ uint8_t key[SHA_BLOCK_MAX]; /**< HMAC key (max supported block length)*/ @@ -174,7 +172,7 @@ struct armv8_crypto_session { /* Digest length */ } auth; -} __rte_cache_aligned; +}; /** Set and validate ARMv8 crypto session parameters */ extern int armv8_crypto_set_session_parameters( From patchwork Wed Mar 20 15:37:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138541 X-Patchwork-Delegate: david.marchand@redhat.com 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 034FD43D05; Wed, 20 Mar 2024 16:44:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC52742E74; Wed, 20 Mar 2024 16:39:29 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 0F8A442D89 for ; Wed, 20 Mar 2024 16:38:36 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 67D3220B468C; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 67D3220B468C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=RldJ5NVrNiXlgki/685fGh/8Jl+OfRPdtIHWioPMFsI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KXMJnrwIXnnHL5XsnEBZA0Wtnb1jmcFYi/jkys8+I+UOQSbfk3AtHr+yPoajo35Cd lIuqhfJ/Z6RI2v6M4uEMGtC2E34YAMNA2uQUh1xK9EW+d1Un9q0bj+Y1QwgXtR1VA7 gEQMLqXsdT7brSCeFMkJHtugls3LD3SKS5atIXj8= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 64/83] compress/zlib: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:57 -0700 Message-Id: <1710949096-5786-65-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/compress/zlib/zlib_pmd_private.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/compress/zlib/zlib_pmd_private.h b/drivers/compress/zlib/zlib_pmd_private.h index e36c5dc..46a33d4 100644 --- a/drivers/compress/zlib/zlib_pmd_private.h +++ b/drivers/compress/zlib/zlib_pmd_private.h @@ -30,7 +30,7 @@ struct zlib_private { struct rte_mempool *mp; }; -struct zlib_qp { +struct __rte_cache_aligned zlib_qp { struct rte_ring *processed_pkts; /**< Ring for placing process packets */ struct rte_compressdev_stats qp_stats; @@ -39,7 +39,7 @@ struct zlib_qp { /**< Queue Pair Identifier */ char name[RTE_COMPRESSDEV_NAME_MAX_LEN]; /**< Unique Queue Pair Name */ -} __rte_cache_aligned; +}; /* Algorithm handler function prototype */ typedef void (*comp_func_t)(struct rte_comp_op *op, z_stream *strm); @@ -47,19 +47,19 @@ struct zlib_qp { typedef int (*comp_free_t)(z_stream *strm); /** ZLIB Stream structure */ -struct zlib_stream { +struct __rte_cache_aligned zlib_stream { z_stream strm; /**< zlib stream structure */ comp_func_t comp; /**< Operation (compression/decompression) */ comp_free_t free; /**< Free Operation (compression/decompression) */ -} __rte_cache_aligned; +}; /** ZLIB private xform structure */ -struct zlib_priv_xform { +struct __rte_cache_aligned zlib_priv_xform { struct zlib_stream stream; -} __rte_cache_aligned; +}; int zlib_set_stream_parameters(const struct rte_comp_xform *xform, From patchwork Wed Mar 20 15:37:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138569 X-Patchwork-Delegate: david.marchand@redhat.com 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 8D0B843D05; Wed, 20 Mar 2024 16:47:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DB42542F0C; Wed, 20 Mar 2024 16:40:01 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id D21A242D9A for ; Wed, 20 Mar 2024 16:38:43 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id A22E520B200F; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A22E520B200F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=tP1wdVpChnE7xbGm4lqPeS3IkHcoRj2AAaNKAFrv2go=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cXE/BPcKWmvSzqCpcmY2kKM/iB7nmajXbyrrNP9hAiCqxS7bk5wePa8REi34Glnj1 QlrQX0s5Hj9o1kOdPV7ZLmi4BqZJ48gmrbHOvoj9OiRyhAGz7IifIarAilma2zUa6K raononaMSS1yMOw87D2mH+sNHxr6PDeiA6dz1jpE= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 65/83] compress/qat: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:58 -0700 Message-Id: <1710949096-5786-66-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/compress/qat/qat_comp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/compress/qat/qat_comp.h b/drivers/compress/qat/qat_comp.h index dc220cd..1da4770 100644 --- a/drivers/compress/qat/qat_comp.h +++ b/drivers/compress/qat/qat_comp.h @@ -50,10 +50,10 @@ struct array_of_ptrs { phys_addr_t pointer[0]; }; -struct qat_inter_sgl { +struct __rte_cache_aligned qat_inter_sgl { qat_sgl_hdr; struct qat_flat_buf buffers[QAT_NUM_BUFS_IN_IM_SGL]; -} __rte_packed __rte_cache_aligned; +} __rte_packed; struct qat_comp_op_cookie { From patchwork Wed Mar 20 15:37:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138542 X-Patchwork-Delegate: david.marchand@redhat.com 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 6DB8743D05; Wed, 20 Mar 2024 16:44:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DAE3D42E84; Wed, 20 Mar 2024 16:39:30 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4D8B642D92 for ; Wed, 20 Mar 2024 16:38:36 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 7B27B20B468E; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7B27B20B468E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=hyOtK5TELicOqG7+CVGOS2xwH4iJceRmC2PVCH789Io=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GLkDxsLEEnmMmnnxUPZnL6xEtA5VhubM1tGfGCir47DwPHP1mY8sq3DME1TOoPjOw 5tEqxH9q6v0/gOfceKxBZFcL+iXQLmeGwM6BgeWHsZRC4AxWn58tED6ldiWwZ2LBN1 8gzPKRlxm+bsIWuu9O/UA/aPXcf8zyxr/QUgjI8c= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 66/83] compress/octeontx: move alignment attribute on types Date: Wed, 20 Mar 2024 08:37:59 -0700 Message-Id: <1710949096-5786-67-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/compress/octeontx/otx_zip.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/compress/octeontx/otx_zip.h b/drivers/compress/octeontx/otx_zip.h index 7391360..bb19854 100644 --- a/drivers/compress/octeontx/otx_zip.h +++ b/drivers/compress/octeontx/otx_zip.h @@ -106,21 +106,21 @@ typedef int (*comp_func_t)(struct rte_comp_op *op, struct zipvf_qp *qp, struct zip_stream *zstrm, int num); /* Scatter gather list */ -struct zipvf_sginfo { +struct __rte_aligned(16) zipvf_sginfo { union zip_zptr_addr_s sg_addr; union zip_zptr_ctl_s sg_ctl; -} __rte_aligned(16); +}; /** * ZIP private stream structure */ -struct zip_stream { +struct __rte_cache_aligned zip_stream { union zip_inst_s *inst[ZIP_BURST_SIZE]; /* zip instruction pointer */ comp_func_t func; /* function to process comp operation */ void *bufs[MAX_BUFS_PER_STREAM * ZIP_BURST_SIZE]; -} __rte_cache_aligned; +}; /** @@ -140,7 +140,7 @@ struct zipvf_cmdq { /** * ZIP device queue structure */ -struct zipvf_qp { +struct __rte_cache_aligned zipvf_qp { struct zipvf_cmdq cmdq; /* Hardware instruction queue structure */ struct rte_ring *processed_pkts; @@ -158,12 +158,12 @@ struct zipvf_qp { /* SGL pointers */ uint64_t num_sgbuf; uint64_t enqed; -} __rte_cache_aligned; +}; /** * ZIP VF device structure. */ -struct zip_vf { +struct __rte_cache_aligned zip_vf { int vfid; /* vf index */ struct rte_pci_device *pdev; @@ -177,7 +177,7 @@ struct zip_vf { struct rte_mempool *zip_mp; struct rte_mempool *sg_mp; /* pointer to pools */ -} __rte_cache_aligned; +}; static inline int From patchwork Wed Mar 20 15:38:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138543 X-Patchwork-Delegate: david.marchand@redhat.com 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 88AA743D05; Wed, 20 Mar 2024 16:44:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D61D742E96; Wed, 20 Mar 2024 16:39:31 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 911B541611 for ; Wed, 20 Mar 2024 16:38:36 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 8E0B4208A7F7; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8E0B4208A7F7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=wJEGIwlX1Np6znMLceXzcVvNL95J6jat+eWHBmBKejs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CITJsD6cbu5PWmS/EPEDo70OPv4GPjEj0JrMUhwMXFlZXUlwrQ7ewC7FKcAAALhYS yQoN2AcZV31DoB+Mye+cXylY1fgTKv0A55mN5osXPrzzwg9LjRqSkAkxxYJqNxPsx5 nkdwTbCAXBQgN966H/oEghmKmScxvz1R7J//PZpM= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 67/83] compress/nitrox: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:00 -0700 Message-Id: <1710949096-5786-68-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/compress/nitrox/nitrox_comp_reqmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/compress/nitrox/nitrox_comp_reqmgr.c b/drivers/compress/nitrox/nitrox_comp_reqmgr.c index ca45c3e..89af855 100644 --- a/drivers/compress/nitrox/nitrox_comp_reqmgr.c +++ b/drivers/compress/nitrox/nitrox_comp_reqmgr.c @@ -304,7 +304,7 @@ struct nitrox_sgtable { struct nitrox_softreq { struct nitrox_zip_instr instr; - struct nitrox_zip_result zip_res __rte_aligned(8); + alignas(8) struct nitrox_zip_result zip_res; uint8_t decomp_threshold[NITROX_ZIP_MAX_ONFSIZE]; struct rte_comp_op *op; struct nitrox_sgtable src; From patchwork Wed Mar 20 15:38:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138570 X-Patchwork-Delegate: david.marchand@redhat.com 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 8614343D05; Wed, 20 Mar 2024 16:47:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F216842F0F; Wed, 20 Mar 2024 16:40:02 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 29D1542DBB for ; Wed, 20 Mar 2024 16:38:44 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id B4FED20B2010; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B4FED20B2010 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=qMsOY42Ga5dYedu0uRXyJB4ELFNHG//HgCLUwWeWBfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OZnZ4hXlHfYLY/zoJVY0cbqbNPJ4Dnm9tv9eKsl4YmkQh9FvXkldXNNne4RdqJLzf 9MVZEIcb4h3dz7vIYQkc9np301IXxw5aoOIB7kvNWRPbxN/h+b+EMTgBye+j7HKTLh Lg9NOeUc81NQhkvX3UshDdGOIH3eK1WaVknthHUo= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 68/83] compress/isal: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:01 -0700 Message-Id: <1710949096-5786-69-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/compress/isal/isal_compress_pmd_private.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/compress/isal/isal_compress_pmd_private.h b/drivers/compress/isal/isal_compress_pmd_private.h index 46e9fcf..c713a5b 100644 --- a/drivers/compress/isal/isal_compress_pmd_private.h +++ b/drivers/compress/isal/isal_compress_pmd_private.h @@ -19,7 +19,7 @@ struct isal_comp_private { }; /** ISA-L queue pair */ -struct isal_comp_qp { +struct __rte_cache_aligned isal_comp_qp { /* Queue Pair Identifier */ uint16_t id; /* Unique Queue Pair Name */ @@ -34,17 +34,17 @@ struct isal_comp_qp { struct inflate_state *state; /* Number of free elements on ring */ uint16_t num_free_elements; -} __rte_cache_aligned; +}; /** ISA-L private xform structure */ -struct isal_priv_xform { +struct __rte_cache_aligned isal_priv_xform { enum rte_comp_xform_type type; union { struct rte_comp_compress_xform compress; struct rte_comp_decompress_xform decompress; }; uint32_t level_buffer_size; -} __rte_cache_aligned; +}; /** Set and validate NULL comp private xform parameters */ extern int From patchwork Wed Mar 20 15:38:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138544 X-Patchwork-Delegate: david.marchand@redhat.com 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 7389943D05; Wed, 20 Mar 2024 16:44:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC09842E9E; Wed, 20 Mar 2024 16:39:32 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DE99C42D76 for ; Wed, 20 Mar 2024 16:38:36 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id A16E820B39DB; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A16E820B39DB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=JiILuWcAXrnGDRbZY8niYKQ1UcS20VxKMgV4kguYMmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o7DDnGm8r/aTE/unMb12NETHrrMwTKE4tuhcnEBpSX1tNhJJJjNt9+Bnky3RNwo9f WsUT4h9jNpB9ykO5euE9dqdHOrHrvsgtYC8Zhoz396fB+5s415OkhUbC8t3qhKqEeY 8uDzB9+3lR+l/DAFFgkwfbN8smtbnaibZnaUx6Wg= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 69/83] common/qat: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:02 -0700 Message-Id: <1710949096-5786-70-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/common/qat/qat_adf/icp_qat_hw.h | 8 ++++---- drivers/common/qat/qat_common.h | 4 ++-- drivers/common/qat/qat_qp.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/common/qat/qat_adf/icp_qat_hw.h b/drivers/common/qat/qat_adf/icp_qat_hw.h index 21ee3cf..1d61a0b 100644 --- a/drivers/common/qat/qat_adf/icp_qat_hw.h +++ b/drivers/common/qat/qat_adf/icp_qat_hw.h @@ -391,10 +391,10 @@ enum icp_qat_hw_cipher_convert { #define ICP_QAT_HW_CCM_MSG_LEN_MAX_FIELD_SIZE 4 #define ICP_QAT_HW_CCM_NONCE_OFFSET 1 -struct icp_qat_hw_cipher_algo_blk { +struct __rte_cache_aligned icp_qat_hw_cipher_algo_blk { struct icp_qat_hw_cipher_config cipher_config; uint8_t key[ICP_QAT_HW_CIPHER_MAX_KEY_SZ]; -} __rte_cache_aligned; +}; struct icp_qat_hw_gen2_crc_cd { uint32_t flags; @@ -423,10 +423,10 @@ struct icp_qat_hw_ucs_cipher_config { uint32_t reserved[3]; }; -struct icp_qat_hw_cipher_algo_blk20 { +struct __rte_cache_aligned icp_qat_hw_cipher_algo_blk20 { struct icp_qat_hw_ucs_cipher_config cipher_config; uint8_t key[ICP_QAT_HW_CIPHER_MAX_KEY_SZ]; -} __rte_cache_aligned; +}; enum icp_qat_hw_ucs_cipher_reflect_out { ICP_QAT_HW_CIPHER_UCS_REFLECT_OUT_DISABLED = 0, diff --git a/drivers/common/qat/qat_common.h b/drivers/common/qat/qat_common.h index 6d0f4ae..70d78ee 100644 --- a/drivers/common/qat/qat_common.h +++ b/drivers/common/qat/qat_common.h @@ -61,11 +61,11 @@ struct qat_flat_buf { } __extension__ -struct qat_sgl { +struct __rte_cache_aligned qat_sgl { qat_sgl_hdr; /* flexible array of flat buffers*/ struct qat_flat_buf buffers[0]; -} __rte_packed __rte_cache_aligned; +} __rte_packed; /** Common, i.e. not service-specific, statistics */ struct qat_common_stats { diff --git a/drivers/common/qat/qat_qp.h b/drivers/common/qat/qat_qp.h index ae18fb9..94590d3 100644 --- a/drivers/common/qat/qat_qp.h +++ b/drivers/common/qat/qat_qp.h @@ -81,7 +81,7 @@ typedef int (*qat_op_dequeue_t)(void **op, uint8_t *resp, void *op_cookie, #define QAT_BUILD_REQUEST_MAX_OPAQUE_SIZE 2 -struct qat_qp { +struct __rte_cache_aligned qat_qp { void *mmap_bar_addr; struct qat_queue tx_q; struct qat_queue rx_q; @@ -95,10 +95,10 @@ struct qat_qp { struct qat_pci_device *qat_dev; /**< qat device this qp is on */ uint32_t enqueued; - uint32_t dequeued __rte_aligned(4); + alignas(sizeof(uint32_t)) uint32_t dequeued; uint16_t max_inflights; uint16_t min_enq_burst_threshold; -} __rte_cache_aligned; +}; /** * Structure with data needed for creation of queue pair. From patchwork Wed Mar 20 15:38:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138545 X-Patchwork-Delegate: david.marchand@redhat.com 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 44A6C43D05; Wed, 20 Mar 2024 16:44:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03F2A42EA5; Wed, 20 Mar 2024 16:39:34 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2266D42D92 for ; Wed, 20 Mar 2024 16:38:37 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id B5C8220B39DC; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B5C8220B39DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=p0+0JCf6XTKVu6s2waYHxJBY0H1Qy5kG+c/99vpHdGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MlqpqDRwvfn+SNum/faNe1kv5V838jSeAoFPfcX2LrmDeaaVmuOzaccDWHF+O1I48 GCHr3zkL1izW56G/c0MBjb+skOpzxxtUj/a+sbpvLjHAqk/plGNqK5K+7Q/uATOnbj enlkvOA0zzGnE37W+af/BV/a/lGUgd5s6OOXLOFc= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 70/83] common/mlx5: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:03 -0700 Message-Id: <1710949096-5786-71-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/common/mlx5/linux/mlx5_glue.c | 2 +- drivers/common/mlx5/linux/mlx5_nl.c | 2 +- drivers/common/mlx5/mlx5_common_mr.h | 4 ++-- drivers/common/mlx5/mlx5_common_utils.h | 12 ++++++------ drivers/common/mlx5/mlx5_prm.h | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c index 6f858db..99761ea 100644 --- a/drivers/common/mlx5/linux/mlx5_glue.c +++ b/drivers/common/mlx5/linux/mlx5_glue.c @@ -1578,7 +1578,7 @@ #endif } -__rte_cache_aligned +alignas(RTE_CACHE_LINE_SIZE) const struct mlx5_glue *mlx5_glue = &(const struct mlx5_glue) { .version = MLX5_GLUE_VERSION, .fork_init = mlx5_glue_fork_init, diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c index 28a1f56..61192eb 100644 --- a/drivers/common/mlx5/linux/mlx5_nl.c +++ b/drivers/common/mlx5/linux/mlx5_nl.c @@ -1507,7 +1507,7 @@ struct mlx5_nl_port_info { struct ifinfomsg *ifm; char name[sizeof(MLX5_VMWA_VLAN_DEVICE_PFX) + 32]; - __rte_cache_aligned + alignas(RTE_CACHE_LINE_SIZE) uint8_t buf[NLMSG_ALIGN(sizeof(struct nlmsghdr)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)) + NLMSG_ALIGN(sizeof(struct nlattr)) * 8 + diff --git a/drivers/common/mlx5/mlx5_common_mr.h b/drivers/common/mlx5/mlx5_common_mr.h index 8789d40..aa10b68 100644 --- a/drivers/common/mlx5/mlx5_common_mr.h +++ b/drivers/common/mlx5/mlx5_common_mr.h @@ -91,7 +91,7 @@ struct mlx5_mr_share_cache { } __rte_packed; /* Multi-Packet RQ buffer header. */ -struct mlx5_mprq_buf { +struct __rte_cache_aligned mlx5_mprq_buf { struct rte_mempool *mp; uint16_t refcnt; /* Atomically accessed refcnt. */ struct rte_mbuf_ext_shared_info shinfos[]; @@ -100,7 +100,7 @@ struct mlx5_mprq_buf { * More memory will be allocated for the first stride head-room and for * the strides data. */ -} __rte_cache_aligned; +}; __rte_internal void mlx5_mprq_buf_free_cb(void *addr, void *opaque); diff --git a/drivers/common/mlx5/mlx5_common_utils.h b/drivers/common/mlx5/mlx5_common_utils.h index ae15119..44eba50 100644 --- a/drivers/common/mlx5/mlx5_common_utils.h +++ b/drivers/common/mlx5/mlx5_common_utils.h @@ -29,7 +29,7 @@ */ struct mlx5_list_entry { LIST_ENTRY(mlx5_list_entry) next; /* Entry pointers in the list. */ - uint32_t ref_cnt __rte_aligned(8); /* 0 means, entry is invalid. */ + alignas(8) uint32_t ref_cnt; /* 0 means, entry is invalid. */ uint32_t lcore_idx; union { struct mlx5_list_entry *gentry; @@ -37,10 +37,10 @@ struct mlx5_list_entry { }; } __rte_packed; -struct mlx5_list_cache { +struct __rte_cache_aligned mlx5_list_cache { LIST_HEAD(mlx5_list_head, mlx5_list_entry) h; uint32_t inv_cnt; /* Invalid entries counter. */ -} __rte_cache_aligned; +}; /** * Type of callback function for entry removal. @@ -243,9 +243,9 @@ int mlx5_list_unregister(struct mlx5_list *list, /********************* Hash List **********************/ /* Hash list bucket. */ -struct mlx5_hlist_bucket { +struct __rte_cache_aligned mlx5_hlist_bucket { struct mlx5_list_inconst l; -} __rte_cache_aligned; +}; /** * Hash list table structure @@ -257,7 +257,7 @@ struct mlx5_hlist { uint8_t flags; bool direct_key; /* Whether to use the key directly as hash index. */ struct mlx5_list_const l_const; /* List constant data. */ - struct mlx5_hlist_bucket buckets[] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct mlx5_hlist_bucket buckets[]; }; /** diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index c671c75..2bbbc44 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -319,12 +319,12 @@ enum mlx5_mpw_mode { }; /* WQE Control segment. */ -struct mlx5_wqe_cseg { +struct __rte_aligned(MLX5_WSEG_SIZE) mlx5_wqe_cseg { uint32_t opcode; uint32_t sq_ds; uint32_t flags; uint32_t misc; -} __rte_packed __rte_aligned(MLX5_WSEG_SIZE); +} __rte_packed; /* * WQE CSEG opcode field size is 32 bits, divided: From patchwork Wed Mar 20 15:38:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138546 X-Patchwork-Delegate: david.marchand@redhat.com 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 7E13D43D05; Wed, 20 Mar 2024 16:44:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 257CE42EA9; Wed, 20 Mar 2024 16:39:35 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 655DD42D2B for ; Wed, 20 Mar 2024 16:38:37 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C81B920B39D8; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C81B920B39D8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=9p8horJE2grnHv8Ccu8PLFbz1kEK11au7cdo01dxfjc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l7v2IWPUYgMNXb/9j1ca5TDwAgJ9e/2B/t4DfidpmKUUvkkitNNyPhI4LLnPIGiNu kfFTEpw+/71k034GKj0csxRXua1asBOkZY482u4PzBZGQ5x0xMF953dZmWVvvsG6MP BfMbQU4V/5RiVtHgK6+swgq/3W/W46MYhKJB2eqI= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 71/83] common/idpf: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:04 -0700 Message-Id: <1710949096-5786-72-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/common/idpf/idpf_common_device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/common/idpf/idpf_common_device.h b/drivers/common/idpf/idpf_common_device.h index 2b94f03..3834c1f 100644 --- a/drivers/common/idpf/idpf_common_device.h +++ b/drivers/common/idpf/idpf_common_device.h @@ -52,7 +52,7 @@ struct idpf_adapter { uint32_t cmd_retval; /* return value of the cmd response from cp */ uint8_t *mbx_resp; /* buffer to store the mailbox response from cp */ - uint32_t ptype_tbl[IDPF_MAX_PKT_TYPE] __rte_cache_min_aligned; + alignas(RTE_CACHE_LINE_MIN_SIZE) uint32_t ptype_tbl[IDPF_MAX_PKT_TYPE]; bool is_tx_singleq; /* true - single queue model, false - split queue model */ bool is_rx_singleq; /* true - single queue model, false - split queue model */ From patchwork Wed Mar 20 15:38:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138547 X-Patchwork-Delegate: david.marchand@redhat.com 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 B4AF643D05; Wed, 20 Mar 2024 16:44:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E1BB42EAC; Wed, 20 Mar 2024 16:39:36 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AB85F42D80 for ; Wed, 20 Mar 2024 16:38:37 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id DB92420B39F3; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DB92420B39F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949104; bh=ADnvf3Rddh03qxa1bx3Fhe9n46jyxEeKuU9iXtxBK1s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sZEKQgm1GwgekKDA3+z0/tCZQ4l0rC6VHmScdX+PtTG2iYGmryvrB8YqmMKfBJjMO 8gJgs2l1h0OCaCNC62ddd4SWtIAlFWo2uhJquIfayKTaJxggmhrEwgBvg7+3RbSZk0 yDS4XtA0N/q0+V1I78QU3BdfCQcaP9ElRE0Gsjdg= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 72/83] common/cpt: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:05 -0700 Message-Id: <1710949096-5786-73-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/common/cpt/cpt_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/common/cpt/cpt_common.h b/drivers/common/cpt/cpt_common.h index d70668a..6596cc0 100644 --- a/drivers/common/cpt/cpt_common.h +++ b/drivers/common/cpt/cpt_common.h @@ -41,7 +41,7 @@ struct pending_queue { unsigned int head; }; -struct cpt_request_info { +struct __rte_aligned(8) cpt_request_info { /** Data path fields */ uint64_t comp_baddr; volatile uint64_t *completion_addr; @@ -58,7 +58,7 @@ struct cpt_request_info { /** Control path fields */ uint64_t time_out; uint8_t extra_time; -} __rte_aligned(8); +}; static __rte_always_inline void pending_queue_push(struct pending_queue *q, void *rid, unsigned int off, From patchwork Wed Mar 20 15:38:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138571 X-Patchwork-Delegate: david.marchand@redhat.com 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 4D6A843D05; Wed, 20 Mar 2024 16:47:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 013C842F15; Wed, 20 Mar 2024 16:40:04 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7567C42DC1 for ; Wed, 20 Mar 2024 16:38:44 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C830220B2011; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C830220B2011 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=6mTqq3hHB5m0mUTYNJVhZ1ZkTPDcZY5a91MDARAS5DI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YKUENh8ziQpR/FVKhSRhVD6CGtSkizJ7mq38msWljG2ipFzHt1AtpEWQ39UHkTAG7 +N/F+OB9DYSYDGPKHWwNOkoB4RdDWyyHUEWWy6AB5GKnYs8Aa/iZUM9mPrESNTPOtB qEmPJGp3PKJqrnMRmS5XwnjPN7JJnIDOKLayYrFQ= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 73/83] bus/fslmc: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:06 -0700 Message-Id: <1710949096-5786-74-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index bd949ad..169c791 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -151,7 +151,7 @@ typedef void (dpaa2_queue_cb_dqrr_t)(struct qbman_swp *swp, typedef void (dpaa2_queue_cb_eqresp_free_t)(uint16_t eqresp_ci, struct dpaa2_queue *dpaa2_q); -struct dpaa2_queue { +struct __rte_cache_aligned dpaa2_queue { struct rte_mempool *mb_pool; /**< mbuf pool to populate RX ring. */ union { struct rte_eth_dev_data *eth_data; @@ -179,7 +179,7 @@ struct dpaa2_queue { uint16_t resv; uint64_t offloads; uint64_t lpbk_cntx; -} __rte_cache_aligned; +}; struct swp_active_dqs { struct qbman_result *global_active_dqs; From patchwork Wed Mar 20 15:38:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138548 X-Patchwork-Delegate: david.marchand@redhat.com 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 AEAF843D05; Wed, 20 Mar 2024 16:44:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E7D942EAF; Wed, 20 Mar 2024 16:39:37 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E165D42D92 for ; Wed, 20 Mar 2024 16:38:37 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id EE86220B39FE; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EE86220B39FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=Ili/k1vtbX2sG3XUTUpW77lGOLPZRYObGXLRJS0dq0s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fe6Mdw9V7+M8fKUoDyUfRPiVyAB2wxBJdGGWEPz6POdRfYfNYzop75C/TguFh6Qdt Cu+LJVjjiwo+aCxoR8IWLURtRQYDCe09VPGhPOvE4UvVIRVKp4lrPD4VPvHGtTtpKs jaIfls9mO4JFVYvL3wZ0xWTqzGTPRyqZxt4JNedo= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 74/83] baseband/turbo_sw: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:07 -0700 Message-Id: <1710949096-5786-75-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c index 8ddc7ff..574743a 100644 --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c @@ -72,7 +72,7 @@ struct turbo_sw_params { }; /* queue */ -struct turbo_sw_queue { +struct __rte_cache_aligned turbo_sw_queue { /* Ring for processed (encoded/decoded) operations which are ready to * be dequeued. */ @@ -95,7 +95,7 @@ struct turbo_sw_queue { uint8_t *adapter_output; /* Operation type of this queue */ enum rte_bbdev_op_type type; -} __rte_cache_aligned; +}; #ifdef RTE_BBDEV_SDK_AVX2 From patchwork Wed Mar 20 15:38:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138572 X-Patchwork-Delegate: david.marchand@redhat.com 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 A93B143D05; Wed, 20 Mar 2024 16:47:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2232F42F1D; Wed, 20 Mar 2024 16:40:05 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B5542427E4 for ; Wed, 20 Mar 2024 16:38:44 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id DB51C20B2012; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DB51C20B2012 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949106; bh=PhCpOyMdvwBLOnJvCSGMyAuJhSp71s+t4JMCfDNt1+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GqylekEbZWTHlcfBGj7CacwxEQ2EuXItQWSH+XwuFyy3ZAEhZpBe8nrDjeM8ux7rd GSocw3SHo8xIDPCgpQj4WstnWIHNlTLyiJAKjJivxaPNMSPsC5INlQv5gMeDm72Znp zVKu1bSTmsBuOUPCT+7z1aR/4Us/mYaD6KD8ISGE= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 75/83] baseband/null: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:08 -0700 Message-Id: <1710949096-5786-76-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/baseband/null/bbdev_null.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/baseband/null/bbdev_null.c b/drivers/baseband/null/bbdev_null.c index 662663c..75f7899 100644 --- a/drivers/baseband/null/bbdev_null.c +++ b/drivers/baseband/null/bbdev_null.c @@ -47,9 +47,9 @@ struct bbdev_private { }; /* queue */ -struct bbdev_queue { +struct __rte_cache_aligned bbdev_queue { struct rte_ring *processed_pkts; /* Ring for processed packets */ -} __rte_cache_aligned; +}; /* Get device info */ static void From patchwork Wed Mar 20 15:38:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138549 X-Patchwork-Delegate: david.marchand@redhat.com 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 1F36E43D05; Wed, 20 Mar 2024 16:45:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96D7C42EB2; Wed, 20 Mar 2024 16:39:38 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2AA4A42D95 for ; Wed, 20 Mar 2024 16:38:38 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 0D42020B39F4; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0D42020B39F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=SIV4vddfn7MblCCQUZj+B3zvPFXhkdmNuNvVk4ZvB5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kEdeRULFt1OoSZRdZKL1J9YMREH+1PuePU+jG7I218IeDfLXvncMyM9qDONT/Yd6O wpu0OYPvYfXwu5Ie4KseEQM1BdFLZ5d+0LwUVL7+WTz/V8M/Q6T/0AwRj0so8Ef91x cYC+tbchJYm4Fs7dbrNT2QfZInAdVBzkCwGWL+Q0= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 76/83] app/test: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:09 -0700 Message-Id: <1710949096-5786-77-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- app/test/test_cryptodev_aead_test_vectors.h | 6 +++--- app/test/test_cryptodev_blockcipher.h | 2 +- app/test/test_cryptodev_kasumi_test_vectors.h | 2 +- app/test/test_cryptodev_mixed_test_vectors.h | 2 +- app/test/test_cryptodev_security_docsis_test_vectors.h | 2 +- app/test/test_cryptodev_snow3g_test_vectors.h | 2 +- app/test/test_cryptodev_zuc_test_vectors.h | 2 +- app/test/test_distributor.c | 12 ++++++------ app/test/test_distributor_perf.c | 6 +++--- app/test/test_mempool_perf.c | 6 +++--- app/test/test_pmd_perf.c | 4 ++-- app/test/test_ring_stress_impl.h | 10 +++++----- app/test/test_rwlock.c | 8 ++++---- app/test/test_seqlock.c | 8 ++++---- app/test/test_ticketlock.c | 4 ++-- app/test/test_trace_perf.c | 8 ++++---- 16 files changed, 42 insertions(+), 42 deletions(-) diff --git a/app/test/test_cryptodev_aead_test_vectors.h b/app/test/test_cryptodev_aead_test_vectors.h index 35ae64c..e9b0590 100644 --- a/app/test/test_cryptodev_aead_test_vectors.h +++ b/app/test/test_cryptodev_aead_test_vectors.h @@ -47,7 +47,7 @@ struct aead_test_data { } key; struct { - uint8_t data[64] __rte_aligned(16); + alignas(16) uint8_t data[64]; unsigned len; } iv; @@ -79,7 +79,7 @@ struct gmac_test_data { } key; struct { - uint8_t data[64] __rte_aligned(16); + alignas(16) uint8_t data[64]; unsigned len; } iv; @@ -2025,7 +2025,7 @@ struct cryptodev_perf_test_data { } key; struct { - uint8_t data[64] __rte_aligned(16); + alignas(16) uint8_t data[64]; unsigned len; } iv; diff --git a/app/test/test_cryptodev_blockcipher.h b/app/test/test_cryptodev_blockcipher.h index e6f6c18..a73bee0 100644 --- a/app/test/test_cryptodev_blockcipher.h +++ b/app/test/test_cryptodev_blockcipher.h @@ -72,7 +72,7 @@ struct blockcipher_test_data { } cipher_key; struct { - uint8_t data[64] __rte_aligned(16); + alignas(16) uint8_t data[64]; unsigned int len; } iv; diff --git a/app/test/test_cryptodev_kasumi_test_vectors.h b/app/test/test_cryptodev_kasumi_test_vectors.h index f0a6d55..3b51704 100644 --- a/app/test/test_cryptodev_kasumi_test_vectors.h +++ b/app/test/test_cryptodev_kasumi_test_vectors.h @@ -12,7 +12,7 @@ struct kasumi_test_data { } key; struct { - uint8_t data[64] __rte_aligned(16); + alignas(16) uint8_t data[64]; unsigned int len; } cipher_iv; diff --git a/app/test/test_cryptodev_mixed_test_vectors.h b/app/test/test_cryptodev_mixed_test_vectors.h index 9c43131..25c4a48 100644 --- a/app/test/test_cryptodev_mixed_test_vectors.h +++ b/app/test/test_cryptodev_mixed_test_vectors.h @@ -32,7 +32,7 @@ struct mixed_cipher_auth_test_data { } cipher_key; struct { - uint8_t data[64] __rte_aligned(16); + alignas(16) uint8_t data[64]; unsigned int len; /* length must be in Bytes */ } cipher_iv; diff --git a/app/test/test_cryptodev_security_docsis_test_vectors.h b/app/test/test_cryptodev_security_docsis_test_vectors.h index aa7f56a..7e9909b 100644 --- a/app/test/test_cryptodev_security_docsis_test_vectors.h +++ b/app/test/test_cryptodev_security_docsis_test_vectors.h @@ -21,7 +21,7 @@ struct docsis_test_data { } key; struct { - uint8_t data[16] __rte_aligned(16); + alignas(16) uint8_t data[16]; unsigned int len; } iv; diff --git a/app/test/test_cryptodev_snow3g_test_vectors.h b/app/test/test_cryptodev_snow3g_test_vectors.h index 3b7e442..10db4f6 100644 --- a/app/test/test_cryptodev_snow3g_test_vectors.h +++ b/app/test/test_cryptodev_snow3g_test_vectors.h @@ -12,7 +12,7 @@ struct snow3g_test_data { } key; struct { - uint8_t data[64] __rte_aligned(16); + alignas(16) uint8_t data[64]; unsigned len; } cipher_iv; diff --git a/app/test/test_cryptodev_zuc_test_vectors.h b/app/test/test_cryptodev_zuc_test_vectors.h index cb1b51e..714d681 100644 --- a/app/test/test_cryptodev_zuc_test_vectors.h +++ b/app/test/test_cryptodev_zuc_test_vectors.h @@ -12,7 +12,7 @@ struct wireless_test_data { } key; struct { - uint8_t data[64] __rte_aligned(16); + alignas(16) uint8_t data[64]; unsigned len; } cipher_iv; diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index d2037b7..13357b9 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -53,9 +53,9 @@ struct worker_params { static volatile unsigned worker_idx; static volatile unsigned zero_idx; -struct worker_stats { +struct __rte_cache_aligned worker_stats { volatile unsigned handled_packets; -} __rte_cache_aligned; +}; struct worker_stats worker_stats[RTE_MAX_LCORE]; /* returns the total count of the number of packets handled by the worker @@ -87,7 +87,7 @@ struct worker_stats { static int handle_work(void *arg) { - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_mbuf *buf[8]; struct worker_params *wp = arg; struct rte_distributor *db = wp->dist; unsigned int num; @@ -306,7 +306,7 @@ struct worker_stats { static int handle_work_with_free_mbufs(void *arg) { - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_mbuf *buf[8]; struct worker_params *wp = arg; struct rte_distributor *d = wp->dist; unsigned int i; @@ -375,7 +375,7 @@ struct worker_stats { static int handle_work_for_shutdown_test(void *arg) { - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_mbuf *buf[8]; struct worker_params *wp = arg; struct rte_distributor *d = wp->dist; unsigned int num; @@ -592,7 +592,7 @@ struct worker_stats { static int handle_and_mark_work(void *arg) { - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_mbuf *buf[8]; struct worker_params *wp = arg; struct rte_distributor *db = wp->dist; unsigned int num, i; diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c index ca86845..c0ad39d 100644 --- a/app/test/test_distributor_perf.c +++ b/app/test/test_distributor_perf.c @@ -33,9 +33,9 @@ static volatile int quit; static volatile unsigned worker_idx; -struct worker_stats { +struct __rte_cache_aligned worker_stats { volatile unsigned handled_packets; -} __rte_cache_aligned; +}; static struct worker_stats worker_stats[RTE_MAX_LCORE]; /* @@ -122,7 +122,7 @@ struct worker_stats { unsigned int num = 0; int i; unsigned int id = __atomic_fetch_add(&worker_idx, 1, __ATOMIC_RELAXED); - struct rte_mbuf *buf[8] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) struct rte_mbuf *buf[8]; for (i = 0; i < 8; i++) buf[i] = NULL; diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c index 96de347..a42a772 100644 --- a/app/test/test_mempool_perf.c +++ b/app/test/test_mempool_perf.c @@ -101,9 +101,9 @@ static int use_constant_values; /* number of enqueues / dequeues */ -struct mempool_test_stats { +struct __rte_cache_aligned mempool_test_stats { uint64_t enq_count; -} __rte_cache_aligned; +}; static struct mempool_test_stats stats[RTE_MAX_LCORE]; @@ -124,7 +124,7 @@ struct mempool_test_stats { test_loop(struct rte_mempool *mp, struct rte_mempool_cache *cache, unsigned int x_keep, unsigned int x_get_bulk, unsigned int x_put_bulk) { - void *obj_table[MAX_KEEP] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) void *obj_table[MAX_KEEP]; unsigned int idx; unsigned int i; int ret; diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index f6d97f2..35fa068 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -94,12 +94,12 @@ enum { LCORE_USED, }; -struct lcore_conf { +struct __rte_cache_aligned lcore_conf { uint8_t status; uint8_t socketid; uint16_t nb_ports; uint16_t portlist[RTE_MAX_ETHPORTS]; -} __rte_cache_aligned; +}; struct lcore_conf lcore_conf[RTE_MAX_LCORE]; diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h index 2dec897..202d47d 100644 --- a/app/test/test_ring_stress_impl.h +++ b/app/test/test_ring_stress_impl.h @@ -24,7 +24,7 @@ enum { WRK_CMD_RUN, }; -static uint32_t wrk_cmd __rte_cache_aligned = WRK_CMD_STOP; +static alignas(RTE_CACHE_LINE_SIZE) uint32_t wrk_cmd = WRK_CMD_STOP; /* test run-time in seconds */ static const uint32_t run_time = 60; @@ -41,14 +41,14 @@ struct lcore_stat { } op; }; -struct lcore_arg { +struct __rte_cache_aligned lcore_arg { struct rte_ring *rng; struct lcore_stat stats; -} __rte_cache_aligned; +}; -struct ring_elem { +struct __rte_cache_aligned ring_elem { uint32_t cnt[RTE_CACHE_LINE_SIZE / sizeof(uint32_t)]; -} __rte_cache_aligned; +}; /* * redefinable functions diff --git a/app/test/test_rwlock.c b/app/test/test_rwlock.c index 5079895..e8767da 100644 --- a/app/test/test_rwlock.c +++ b/app/test/test_rwlock.c @@ -42,7 +42,7 @@ enum { LC_TYPE_WRLOCK, }; -static struct { +static alignas(RTE_CACHE_LINE_SIZE) struct { rte_rwlock_t lock; uint64_t tick; @@ -50,9 +50,9 @@ enum { uint8_t u8[RTE_CACHE_LINE_SIZE]; uint64_t u64[RTE_CACHE_LINE_SIZE / sizeof(uint64_t)]; } data; -} __rte_cache_aligned try_rwlock_data; +} try_rwlock_data; -struct try_rwlock_lcore { +struct __rte_cache_aligned try_rwlock_lcore { int32_t rc; int32_t type; struct { @@ -60,7 +60,7 @@ struct try_rwlock_lcore { uint64_t fail; uint64_t success; } stat; -} __rte_cache_aligned; +}; static struct try_rwlock_lcore try_lcore_data[RTE_MAX_LCORE]; diff --git a/app/test/test_seqlock.c b/app/test/test_seqlock.c index 873bd60..bab8b0f 100644 --- a/app/test/test_seqlock.c +++ b/app/test/test_seqlock.c @@ -12,13 +12,13 @@ #include "test.h" -struct data { +struct __rte_cache_aligned data { rte_seqlock_t lock; uint64_t a; - uint64_t b __rte_cache_aligned; - uint64_t c __rte_cache_aligned; -} __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint64_t b; + alignas(RTE_CACHE_LINE_SIZE) uint64_t c; +}; struct reader { struct data *data; diff --git a/app/test/test_ticketlock.c b/app/test/test_ticketlock.c index 1fbbedb..7a6cb4c 100644 --- a/app/test/test_ticketlock.c +++ b/app/test/test_ticketlock.c @@ -95,8 +95,8 @@ } static rte_ticketlock_t lk = RTE_TICKETLOCK_INITIALIZER; -static uint64_t lcount __rte_cache_aligned; -static uint64_t lcore_count[RTE_MAX_LCORE] __rte_cache_aligned; +static alignas(RTE_CACHE_LINE_SIZE) uint64_t lcount; +static alignas(RTE_CACHE_LINE_SIZE) uint64_t lcore_count[RTE_MAX_LCORE]; static uint64_t time_cost[RTE_MAX_LCORE]; #define MAX_LOOP 10000 diff --git a/app/test/test_trace_perf.c b/app/test/test_trace_perf.c index a6dd075..8257cc0 100644 --- a/app/test/test_trace_perf.c +++ b/app/test/test_trace_perf.c @@ -14,17 +14,17 @@ struct test_data; -struct lcore_data { +struct __rte_cache_aligned lcore_data { volatile bool done; volatile bool started; uint64_t total_cycles; uint64_t total_calls; -} __rte_cache_aligned; +}; -struct test_data { +struct __rte_cache_aligned test_data { unsigned int nb_workers; struct lcore_data ldata[]; -} __rte_cache_aligned; +}; #define STEP 100 #define CENT_OPS(OP) do { \ From patchwork Wed Mar 20 15:38:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138550 X-Patchwork-Delegate: david.marchand@redhat.com 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 6778643D05; Wed, 20 Mar 2024 16:45:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D771242EB6; Wed, 20 Mar 2024 16:39:39 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 65CB742D80 for ; Wed, 20 Mar 2024 16:38:38 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2129320B3775; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2129320B3775 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=v89UDOXAUV/tHg+MWHCRdiRLqcbtXNrM5AA4AcsSguU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g59brII2EToIQJHsZxlY9hyTOroqi8j2prn/m+IsP/zDeLOq2RvlKAnyh+aIg8qi5 SOwyUmF1LqE7l9lv82cGE0rsIGMKQS4cehSsiOkC36Ma80qwFIC2EJL54c/zYJAWw3 ug1g3XyyMxDHEEq95oYCK3Pow25b3a+lUo2hKFaU= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 77/83] app/test-pipeline: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:10 -0700 Message-Id: <1710949096-5786-78-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- app/test-pipeline/main.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pipeline/main.h b/app/test-pipeline/main.h index 9df157d..ee9c58a 100644 --- a/app/test-pipeline/main.h +++ b/app/test-pipeline/main.h @@ -18,7 +18,7 @@ struct app_mbuf_array { #define APP_MAX_PORTS 4 #endif -struct app_params { +struct __rte_cache_aligned app_params { /* CPU cores */ uint32_t core_rx; uint32_t core_worker; @@ -56,7 +56,7 @@ struct app_params { /* App behavior */ uint32_t pipeline_type; -} __rte_cache_aligned; +}; extern struct app_params app; From patchwork Wed Mar 20 15:38:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138573 X-Patchwork-Delegate: david.marchand@redhat.com 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 6614243D05; Wed, 20 Mar 2024 16:47:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6226642F29; Wed, 20 Mar 2024 16:40:06 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 0BC0A42DC4 for ; Wed, 20 Mar 2024 16:38:45 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id EDF0E20B2013; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com EDF0E20B2013 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949107; bh=SSXHgMkod+2G0jkPebll2CO8JJGtpzoHFddDdLa8liU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PGyQf/r2p7Z5/t/EFb1N1WXYilzqwajmZx+g8tf9bgYH4yowjQrxng5terwzSt/PY 3rzsFDU5biV8PmABZV+fskuqWFMWozspyhpeZYSCgVVoADGTAvMmuwSasx9bfnVoXe bL1vRVv5UDiDslwic45ILLb4xHjsNPhbkDtjlJ/I= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 78/83] app/test-mldev: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:11 -0700 Message-Id: <1710949096-5786-79-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- app/test-mldev/test_device_ops.h | 4 ++-- app/test-mldev/test_inference_common.h | 4 ++-- app/test-mldev/test_model_ops.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/test-mldev/test_device_ops.h b/app/test-mldev/test_device_ops.h index be78b17..2e0173e 100644 --- a/app/test-mldev/test_device_ops.h +++ b/app/test-mldev/test_device_ops.h @@ -9,9 +9,9 @@ #include "test_common.h" -struct test_device { +struct __rte_cache_aligned test_device { /* common data */ struct test_common cmn; -} __rte_cache_aligned; +}; #endif /* TEST_DEVICE_OPS_H */ diff --git a/app/test-mldev/test_inference_common.h b/app/test-mldev/test_inference_common.h index 3f4ba32..1c9ad90 100644 --- a/app/test-mldev/test_inference_common.h +++ b/app/test-mldev/test_inference_common.h @@ -37,7 +37,7 @@ struct ml_core_args { uint64_t end_cycles; }; -struct test_inference { +struct __rte_cache_aligned test_inference { /* common data */ struct test_common cmn; @@ -59,7 +59,7 @@ struct test_inference { struct rte_ml_dev_xstats_map *xstats_map; uint64_t *xstats_values; int xstats_size; -} __rte_cache_aligned; +}; bool test_inference_cap_check(struct ml_options *opt); int test_inference_opt_check(struct ml_options *opt); diff --git a/app/test-mldev/test_model_ops.h b/app/test-mldev/test_model_ops.h index 19645a1..83bfd76 100644 --- a/app/test-mldev/test_model_ops.h +++ b/app/test-mldev/test_model_ops.h @@ -9,12 +9,12 @@ #include "test_model_common.h" -struct test_model_ops { +struct __rte_cache_aligned test_model_ops { /* common data */ struct test_common cmn; /* test specific data */ struct ml_model model[ML_TEST_MAX_MODELS]; -} __rte_cache_aligned; +}; #endif /* TEST_MODEL_OPS_H */ From patchwork Wed Mar 20 15:38:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138551 X-Patchwork-Delegate: david.marchand@redhat.com 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 DCA1843D05; Wed, 20 Mar 2024 16:45:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A01B42EBB; Wed, 20 Mar 2024 16:39:41 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B0BF0427DD for ; Wed, 20 Mar 2024 16:38:38 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 3454920B371E; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3454920B371E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=TNPzGNpI+xWeIIIN25Ir/LUIKmB6azDq6K3NE9x9qys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KP2NUko2nncPBCSs+uqchE6oB3crKef+RFkK4iKrz7a37cUejy2n0nodewfGYDgfB oecmhxQ06/Hccmt+dHydRDtHZ2ZeGJIY9t0ZNQXGoRN/fVT2ytlQ6yJiQ09kcST/9B Qmz3U4uS4JRh6HOmyIc3S8tNinFdFmFvcUsO58YU= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 79/83] app/test-flow-perf: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:12 -0700 Message-Id: <1710949096-5786-80-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- app/test-flow-perf/actions_gen.c | 51 ++++++++++++++++++++++------------------ app/test-flow-perf/items_gen.c | 22 +++++++++-------- app/test-flow-perf/main.c | 8 +++---- 3 files changed, 44 insertions(+), 37 deletions(-) diff --git a/app/test-flow-perf/actions_gen.c b/app/test-flow-perf/actions_gen.c index f1d5931..b5336e8 100644 --- a/app/test-flow-perf/actions_gen.c +++ b/app/test-flow-perf/actions_gen.c @@ -62,7 +62,8 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_mark mark_actions[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) + struct rte_flow_action_mark mark_actions[RTE_MAX_LCORE]; uint32_t counter = para.counter; do { @@ -79,7 +80,8 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_queue queue_actions[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) + struct rte_flow_action_queue queue_actions[RTE_MAX_LCORE]; do { queue_actions[para.core_idx].index = para.queue; @@ -109,7 +111,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct action_rss_data *rss_data[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct action_rss_data *rss_data[RTE_MAX_LCORE]; uint16_t queue; @@ -208,7 +210,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_mac set_macs[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_mac set_macs[RTE_MAX_LCORE]; uint32_t mac = para.counter; uint16_t i; @@ -231,7 +233,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_mac set_macs[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_mac set_macs[RTE_MAX_LCORE]; uint32_t mac = para.counter; uint16_t i; @@ -254,7 +256,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_ipv4 set_ipv4[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_ipv4 set_ipv4[RTE_MAX_LCORE]; uint32_t ip = para.counter; /* Fixed value */ @@ -273,7 +275,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_ipv4 set_ipv4[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_ipv4 set_ipv4[RTE_MAX_LCORE]; uint32_t ip = para.counter; /* Fixed value */ @@ -292,7 +294,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_ipv6 set_ipv6[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_ipv6 set_ipv6[RTE_MAX_LCORE]; uint32_t ipv6 = para.counter; uint8_t i; @@ -315,7 +317,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_ipv6 set_ipv6[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_ipv6 set_ipv6[RTE_MAX_LCORE]; uint32_t ipv6 = para.counter; uint8_t i; @@ -338,7 +340,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_tp set_tp[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_tp set_tp[RTE_MAX_LCORE]; uint32_t tp = para.counter; /* Fixed value */ @@ -359,7 +361,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_tp set_tp[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_tp set_tp[RTE_MAX_LCORE]; uint32_t tp = para.counter; /* Fixed value */ @@ -381,7 +383,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static rte_be32_t value[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) rte_be32_t value[RTE_MAX_LCORE]; uint32_t ack_value = para.counter; /* Fixed value */ @@ -399,7 +401,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static rte_be32_t value[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) rte_be32_t value[RTE_MAX_LCORE]; uint32_t ack_value = para.counter; /* Fixed value */ @@ -417,7 +419,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static rte_be32_t value[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) rte_be32_t value[RTE_MAX_LCORE]; uint32_t seq_value = para.counter; /* Fixed value */ @@ -435,7 +437,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static rte_be32_t value[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) rte_be32_t value[RTE_MAX_LCORE]; uint32_t seq_value = para.counter; /* Fixed value */ @@ -453,7 +455,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_ttl set_ttl[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_ttl set_ttl[RTE_MAX_LCORE]; uint32_t ttl_value = para.counter; /* Fixed value */ @@ -482,7 +484,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_dscp set_dscp[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_dscp set_dscp[RTE_MAX_LCORE]; uint32_t dscp_value = para.counter; /* Fixed value */ @@ -503,7 +505,7 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct rte_flow_action_set_dscp set_dscp[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_set_dscp set_dscp[RTE_MAX_LCORE]; uint32_t dscp_value = para.counter; /* Fixed value */ @@ -770,7 +772,8 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct action_raw_encap_data *action_encap_data[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) + struct action_raw_encap_data *action_encap_data[RTE_MAX_LCORE]; uint64_t encap_data = para.encap_data; uint8_t *header; uint8_t i; @@ -807,7 +810,8 @@ struct action_rss_data { uint8_t actions_counter, struct additional_para para) { - static struct action_raw_decap_data *action_decap_data[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) + struct action_raw_decap_data *action_decap_data[RTE_MAX_LCORE]; uint64_t decap_data = para.decap_data; uint8_t *header; uint8_t i; @@ -844,7 +848,8 @@ struct action_rss_data { uint8_t actions_counter, __rte_unused struct additional_para para) { - static struct rte_flow_action_vxlan_encap vxlan_encap[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) + struct rte_flow_action_vxlan_encap vxlan_encap[RTE_MAX_LCORE]; static struct rte_flow_item items[5]; static struct rte_flow_item_eth item_eth; static struct rte_flow_item_ipv4 item_ipv4; @@ -900,8 +905,8 @@ struct action_rss_data { uint8_t actions_counter, __rte_unused struct additional_para para) { - static struct rte_flow_action_meter - meters[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_action_meter + meters[RTE_MAX_LCORE]; meters[para.core_idx].mtr_id = para.counter; actions[actions_counter].type = RTE_FLOW_ACTION_TYPE_METER; diff --git a/app/test-flow-perf/items_gen.c b/app/test-flow-perf/items_gen.c index 8592834..4ae7250 100644 --- a/app/test-flow-perf/items_gen.c +++ b/app/test-flow-perf/items_gen.c @@ -52,8 +52,8 @@ struct additional_para { add_ipv4(struct rte_flow_item *items, uint8_t items_counter, struct additional_para para) { - static struct rte_flow_item_ipv4 ipv4_specs[RTE_MAX_LCORE] __rte_cache_aligned; - static struct rte_flow_item_ipv4 ipv4_masks[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_item_ipv4 ipv4_specs[RTE_MAX_LCORE]; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_item_ipv4 ipv4_masks[RTE_MAX_LCORE]; uint8_t ti = para.core_idx; ipv4_specs[ti].hdr.src_addr = RTE_BE32(para.src_ip); @@ -69,8 +69,8 @@ struct additional_para { add_ipv6(struct rte_flow_item *items, uint8_t items_counter, struct additional_para para) { - static struct rte_flow_item_ipv6 ipv6_specs[RTE_MAX_LCORE] __rte_cache_aligned; - static struct rte_flow_item_ipv6 ipv6_masks[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_item_ipv6 ipv6_specs[RTE_MAX_LCORE]; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_item_ipv6 ipv6_masks[RTE_MAX_LCORE]; uint8_t ti = para.core_idx; uint8_t i; @@ -118,8 +118,8 @@ struct additional_para { uint8_t items_counter, struct additional_para para) { - static struct rte_flow_item_vxlan vxlan_specs[RTE_MAX_LCORE] __rte_cache_aligned; - static struct rte_flow_item_vxlan vxlan_masks[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_item_vxlan vxlan_specs[RTE_MAX_LCORE]; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_item_vxlan vxlan_masks[RTE_MAX_LCORE]; uint8_t ti = para.core_idx; uint32_t vni_value; uint8_t i; @@ -145,8 +145,10 @@ struct additional_para { uint8_t items_counter, __rte_unused struct additional_para para) { - static struct rte_flow_item_vxlan_gpe vxlan_gpe_specs[RTE_MAX_LCORE] __rte_cache_aligned; - static struct rte_flow_item_vxlan_gpe vxlan_gpe_masks[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) + struct rte_flow_item_vxlan_gpe vxlan_gpe_specs[RTE_MAX_LCORE]; + static alignas(RTE_CACHE_LINE_SIZE) + struct rte_flow_item_vxlan_gpe vxlan_gpe_masks[RTE_MAX_LCORE]; uint8_t ti = para.core_idx; uint32_t vni_value; uint8_t i; @@ -189,8 +191,8 @@ struct additional_para { uint8_t items_counter, __rte_unused struct additional_para para) { - static struct rte_flow_item_geneve geneve_specs[RTE_MAX_LCORE] __rte_cache_aligned; - static struct rte_flow_item_geneve geneve_masks[RTE_MAX_LCORE] __rte_cache_aligned; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_item_geneve geneve_specs[RTE_MAX_LCORE]; + static alignas(RTE_CACHE_LINE_SIZE) struct rte_flow_item_geneve geneve_masks[RTE_MAX_LCORE]; uint8_t ti = para.core_idx; uint32_t vni_value; uint8_t i; diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c index e224ef6..07ddfe0 100644 --- a/app/test-flow-perf/main.c +++ b/app/test-flow-perf/main.c @@ -113,7 +113,7 @@ struct stream { int rx_queue; }; -struct lcore_info { +struct __rte_cache_aligned lcore_info { int mode; int streams_nb; struct stream streams[MAX_STREAMS]; @@ -122,7 +122,7 @@ struct lcore_info { uint64_t tx_drops; uint64_t rx_pkts; struct rte_mbuf *pkts[MAX_PKT_BURST]; -} __rte_cache_aligned; +}; static struct lcore_info lcore_infos[RTE_MAX_LCORE]; @@ -131,14 +131,14 @@ struct used_cpu_time { double deletion[MAX_PORTS][RTE_MAX_LCORE]; }; -struct multi_cores_pool { +struct __rte_cache_aligned multi_cores_pool { uint32_t cores_count; uint32_t rules_count; struct used_cpu_time meters_record; struct used_cpu_time flows_record; int64_t last_alloc[RTE_MAX_LCORE]; int64_t current_alloc[RTE_MAX_LCORE]; -} __rte_cache_aligned; +}; static struct multi_cores_pool mc_pool = { .cores_count = 1, From patchwork Wed Mar 20 15:38:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138552 X-Patchwork-Delegate: david.marchand@redhat.com 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 8F1BE43D05; Wed, 20 Mar 2024 16:45:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3191442EBE; Wed, 20 Mar 2024 16:39:42 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 01F6F42D9A for ; Wed, 20 Mar 2024 16:38:39 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 46E53208B324; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 46E53208B324 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=HICI3sSArcDJ9jWFDmNo9bPjBBobtkTIOMhkDEyevEQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Omu6pDNhKH18dLUvMyWStd26fgjoHbHIDCbxfMsKwI/llqm9C0gnIxRMxwNBuBKEh jIf5I9cCAZoXSwdk2NRstaHFUTkyQ4FRNtFe6sFgS7tBIF18/dsrLefRI7hy1eLl7N 0+yVuY/OzPx1KE905CD0yAoykbHpJXxvC5DdsWIs= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 80/83] app/test-eventdev: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:13 -0700 Message-Id: <1710949096-5786-81-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- app/test-eventdev/test_order_common.h | 4 ++-- app/test-eventdev/test_perf_common.h | 24 ++++++++++++------------ app/test-eventdev/test_pipeline_common.h | 18 +++++++++--------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/test-eventdev/test_order_common.h b/app/test-eventdev/test_order_common.h index 1507265..d4cbc5c 100644 --- a/app/test-eventdev/test_order_common.h +++ b/app/test-eventdev/test_order_common.h @@ -39,7 +39,7 @@ struct prod_data { struct test_order *t; }; -struct test_order { +struct __rte_cache_aligned test_order { /* Don't change the offset of "err". Signal handler use this memory * to terminate all lcores work. */ @@ -60,7 +60,7 @@ struct test_order { uint32_t *producer_flow_seq; uint32_t *expected_flow_seq; struct evt_options *opt; -} __rte_cache_aligned; +}; static inline void order_flow_id_copy_from_mbuf(struct test_order *t, struct rte_event *event) diff --git a/app/test-eventdev/test_perf_common.h b/app/test-eventdev/test_perf_common.h index 2b4f572..bc627de 100644 --- a/app/test-eventdev/test_perf_common.h +++ b/app/test-eventdev/test_perf_common.h @@ -31,13 +31,13 @@ struct test_perf; -struct worker_data { +struct __rte_cache_aligned worker_data { uint64_t processed_pkts; uint64_t latency; uint8_t dev_id; uint8_t port_id; struct test_perf *t; -} __rte_cache_aligned; +}; struct crypto_adptr_data { uint8_t cdev_id; @@ -51,16 +51,16 @@ struct dma_adptr_data { void **dma_op; }; -struct prod_data { +struct __rte_cache_aligned prod_data { uint8_t dev_id; uint8_t port_id; uint8_t queue_id; struct crypto_adptr_data ca; struct dma_adptr_data da; struct test_perf *t; -} __rte_cache_aligned; +}; -struct test_perf { +struct __rte_cache_aligned test_perf { /* Don't change the offset of "done". Signal handler use this memory * to terminate all lcores work. */ @@ -74,17 +74,17 @@ struct test_perf { struct prod_data prod[EVT_MAX_PORTS]; struct worker_data worker[EVT_MAX_PORTS]; struct evt_options *opt; - uint8_t sched_type_list[EVT_MAX_STAGES] __rte_cache_aligned; - struct rte_event_timer_adapter *timer_adptr[ - RTE_EVENT_TIMER_ADAPTER_NUM_MAX] __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint8_t sched_type_list[EVT_MAX_STAGES]; + alignas(RTE_CACHE_LINE_SIZE) struct rte_event_timer_adapter *timer_adptr[ + RTE_EVENT_TIMER_ADAPTER_NUM_MAX]; struct rte_mempool *ca_op_pool; struct rte_mempool *ca_sess_pool; struct rte_mempool *ca_asym_sess_pool; struct rte_mempool *ca_vector_pool; struct rte_mempool *da_op_pool; -} __rte_cache_aligned; +}; -struct perf_elt { +struct __rte_cache_aligned perf_elt { union { struct rte_event_timer tim; struct { @@ -92,7 +92,7 @@ struct perf_elt { uint64_t timestamp; }; }; -} __rte_cache_aligned; +}; #define BURST_SIZE 16 #define MAX_PROD_ENQ_BURST_SIZE 128 @@ -111,7 +111,7 @@ struct perf_elt { const uint8_t nb_stages = t->opt->nb_stages;\ const uint8_t laststage = nb_stages - 1;\ uint8_t cnt = 0;\ - void *bufs[16] __rte_cache_aligned;\ + alignas(RTE_CACHE_LINE_SIZE) void *bufs[16];\ int const sz = RTE_DIM(bufs);\ uint8_t stage;\ struct perf_elt *pe = NULL;\ diff --git a/app/test-eventdev/test_pipeline_common.h b/app/test-eventdev/test_pipeline_common.h index 2b7f3e7..cb6375f 100644 --- a/app/test-eventdev/test_pipeline_common.h +++ b/app/test-eventdev/test_pipeline_common.h @@ -31,14 +31,14 @@ struct test_pipeline; -struct worker_data { +struct __rte_cache_aligned worker_data { uint64_t processed_pkts; uint8_t dev_id; uint8_t port_id; struct test_pipeline *t; -} __rte_cache_aligned; +}; -struct test_pipeline { +struct __rte_cache_aligned test_pipeline { /* Don't change the offset of "done". Signal handler use this memory * to terminate all lcores work. */ @@ -52,8 +52,8 @@ struct test_pipeline { struct rte_mempool *pool[RTE_MAX_ETHPORTS]; struct worker_data worker[EVT_MAX_PORTS]; struct evt_options *opt; - uint8_t sched_type_list[EVT_MAX_STAGES] __rte_cache_aligned; -} __rte_cache_aligned; + alignas(RTE_CACHE_LINE_SIZE) uint8_t sched_type_list[EVT_MAX_STAGES]; +}; #define BURST_SIZE 16 @@ -62,7 +62,7 @@ struct test_pipeline { struct test_pipeline *t = w->t; \ const uint8_t dev = w->dev_id; \ const uint8_t port = w->port_id; \ - struct rte_event ev __rte_cache_aligned + alignas(RTE_CACHE_LINE_SIZE) struct rte_event ev #define PIPELINE_WORKER_SINGLE_STAGE_BURST_INIT \ int i; \ @@ -70,7 +70,7 @@ struct test_pipeline { struct test_pipeline *t = w->t; \ const uint8_t dev = w->dev_id; \ const uint8_t port = w->port_id; \ - struct rte_event ev[BURST_SIZE + 1] __rte_cache_aligned + alignas(RTE_CACHE_LINE_SIZE) struct rte_event ev[BURST_SIZE + 1] #define PIPELINE_WORKER_MULTI_STAGE_INIT \ struct worker_data *w = arg; \ @@ -81,7 +81,7 @@ struct test_pipeline { const uint8_t last_queue = t->opt->nb_stages - 1; \ uint8_t *const sched_type_list = &t->sched_type_list[0]; \ const uint8_t nb_stages = t->opt->nb_stages + 1; \ - struct rte_event ev __rte_cache_aligned + alignas(RTE_CACHE_LINE_SIZE) struct rte_event ev #define PIPELINE_WORKER_MULTI_STAGE_BURST_INIT \ int i; \ @@ -93,7 +93,7 @@ struct test_pipeline { const uint8_t last_queue = t->opt->nb_stages - 1; \ uint8_t *const sched_type_list = &t->sched_type_list[0]; \ const uint8_t nb_stages = t->opt->nb_stages + 1; \ - struct rte_event ev[BURST_SIZE + 1] __rte_cache_aligned + alignas(RTE_CACHE_LINE_SIZE) struct rte_event ev[BURST_SIZE + 1] static __rte_always_inline void pipeline_fwd_event(struct rte_event *ev, uint8_t sched) From patchwork Wed Mar 20 15:38:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138574 X-Patchwork-Delegate: david.marchand@redhat.com 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 607FE43D05; Wed, 20 Mar 2024 16:47:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 887F042F33; Wed, 20 Mar 2024 16:40:07 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 5BBA6427E4 for ; Wed, 20 Mar 2024 16:38:45 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 0C35D20B2014; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 0C35D20B2014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949107; bh=srr42xJy+jHrF39AeNPNXzzY5OfpWktMMQRGL43dI0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hMUajcQPfWYU+EnW4jU17k1zu94N71a3ipBi7rN7SoF313G7LjyXBhpUswXLk//NN enqFnoNTeI3Ymaj8CsIxJoulBornEWiv1HvPNZhi0HZQC/VW/DgzIaXsg7Huhs+xkw o7NIoHgMhlqhzI3k8smUmXRMF2x+qFNErLRvxNns= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 81/83] app/pdump: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:14 -0700 Message-Id: <1710949096-5786-82-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- app/pdump/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/pdump/main.c b/app/pdump/main.c index a9205e1..3bdbb8d 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -106,7 +106,7 @@ struct pdump_stats { uint64_t freed_pkts; }; -struct pdump_tuples { +struct __rte_cache_aligned pdump_tuples { /* cli params */ uint16_t port; char *device_id; @@ -133,7 +133,7 @@ struct pdump_tuples { /* stats */ struct pdump_stats stats; -} __rte_cache_aligned; +}; static struct pdump_tuples pdump_t[APP_ARG_TCPDUMP_MAX_TUPLES]; struct parse_val { From patchwork Wed Mar 20 15:38:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138553 X-Patchwork-Delegate: david.marchand@redhat.com 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 82F0743D05; Wed, 20 Mar 2024 16:45:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5110E42EC1; Wed, 20 Mar 2024 16:39:43 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 42DDB42D9F for ; Wed, 20 Mar 2024 16:38:39 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 5BC5320B24D0; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5BC5320B24D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=MK5+5gLapt7KicUFSwl+41P3VqF28QdLwsq1p84F1RA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MkL9o5OWgl7LfzkYTGRwqOVQXrpi2cl+ym45MAew93/KE1eg5bEDFJ+Hn2Ct9TGNC QKDeDupGFPlUMlmyaDwoNigDaeFtv4cCk5+7lvIYzrcgeA1TWIjBsnJ2h4ssy/S3JZ gA5NxkmOi3cihNFW+YgodDBz+2SEqKFzHYQ37OgA= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 82/83] app/graph: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:15 -0700 Message-Id: <1710949096-5786-83-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- app/graph/ethdev_rx.h | 4 ++-- app/graph/ethdev_rx_priv.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/graph/ethdev_rx.h b/app/graph/ethdev_rx.h index ec3c972..f8c8f1f 100644 --- a/app/graph/ethdev_rx.h +++ b/app/graph/ethdev_rx.h @@ -17,13 +17,13 @@ struct lcore_rx_queue { char node_name[RTE_NODE_NAMESIZE]; }; -struct lcore_conf { +struct __rte_cache_aligned lcore_conf { uint16_t n_rx_queue; struct lcore_rx_queue rx_queue_list[ETHDEV_RX_QUEUE_PER_LCORE_MAX]; struct rte_graph *graph; char name[RTE_GRAPH_NAMESIZE]; rte_graph_t graph_id; -} __rte_cache_aligned; +}; uint8_t ethdev_rx_num_rx_queues_get(uint16_t port); diff --git a/app/graph/ethdev_rx_priv.h b/app/graph/ethdev_rx_priv.h index d714f83..a76ebac 100644 --- a/app/graph/ethdev_rx_priv.h +++ b/app/graph/ethdev_rx_priv.h @@ -14,10 +14,10 @@ #define MAX_JUMBO_PKT_LEN 9600 #define NB_SOCKETS 8 -struct lcore_params { +struct __rte_cache_aligned lcore_params { uint16_t port_id; uint8_t queue_id; uint8_t lcore_id; -} __rte_cache_aligned; +}; #endif From patchwork Wed Mar 20 15:38:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tyler Retzlaff X-Patchwork-Id: 138554 X-Patchwork-Delegate: david.marchand@redhat.com 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 0092D43D05; Wed, 20 Mar 2024 16:45:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 774F642EC7; Wed, 20 Mar 2024 16:39:44 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 83920427DD for ; Wed, 20 Mar 2024 16:38:39 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 6FCAD20B2000; Wed, 20 Mar 2024 08:38:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6FCAD20B2000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1710949105; bh=G/npDWzwqnGGy7BuotOfFMMT5K773xE3/q+ZxMAjmQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ceCm0kcVpzrQjWbs8PpRslPEqMdGiRY0rm20ztlnxG02+zqBsqaL16eLfY4ix/PNV UtPIwHl0zqY3H9CO39+IbbJTqSmVpXfBd5D+Qn2zka5LB/AUEcTWvghWaCiIvYGEIo FzSdcekEYTTsUi4k4gzspq168qTadYHfBPJgbX/A= From: Tyler Retzlaff To: dev@dpdk.org Cc: =?utf-8?q?Mattias_R=C3=B6nnblom?= , "Min Hu (Connor)" , =?utf-8?q?Morten_Br=C3=B8rup?= , Abdullah Sevincer , Ajit Khaparde , Akhil Goyal , Alok Prasad , Amit Bernstein , Anatoly Burakov , Andrew Boyer , Andrew Rybchenko , Ankur Dwivedi , Anoob Joseph , Ashish Gupta , Ashwin Sekhar T K , Bruce Richardson , Byron Marohn , Chaoyong He , Chas Williams , Chenbo Xia , Chengwen Feng , Conor Walsh , Cristian Dumitrescu , Dariusz Sosnowski , David Hunt , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Fan Zhang , Gagandeep Singh , Guoyang Zhou , Harman Kalra , Harry van Haaren , Hemant Agrawal , Honnappa Nagarahalli , Hyong Youb Kim , Jakub Grajciar , Jerin Jacob , Jian Wang , Jiawen Wu , Jie Hai , Jingjing Wu , John Daley , John Miller , Joyce Kong , Junfeng Guo , Kai Ji , Kevin Laatz , Kiran Kumar K , Konstantin Ananyev , Lee Daly , Liang Ma , Liron Himi , Long Li , Maciej Czekaj , Matan Azrad , Matt Peters , Maxime Coquelin , Michael Shamis , Nagadheeraj Rottela , Nicolas Chautru , Nithin Dabilpuram , Ori Kam , Pablo de Lara , Pavan Nikhilesh , Peter Mccarthy , Radu Nicolau , Rahul Lakkireddy , Rakesh Kudurumalla , Raveendra Padasalagi , Reshma Pattan , Ron Beider , Ruifeng Wang , Sachin Saxena , Selwin Sebastian , Shai Brandes , Shepard Siegel , Shijith Thotton , Sivaprasad Tummala , Somnath Kotur , Srikanth Yalavarthi , Stephen Hemminger , Steven Webster , Suanming Mou , Sunil Kumar Kori , Sunil Uttarwar , Sunila Sahu , Tejasree Kondoj , Viacheslav Ovsiienko , Vikas Gupta , Volodymyr Fialko , Wajeeh Atrash , Wisam Jaddo , Xiaoyun Wang , Yipeng Wang , Yisen Zhuang , Yuying Zhang , Zhangfei Gao , Zhirun Yan , Ziyang Xuan , Tyler Retzlaff Subject: [PATCH 83/83] bus/dpaa: move alignment attribute on types Date: Wed, 20 Mar 2024 08:38:16 -0700 Message-Id: <1710949096-5786-84-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1710949096-5786-1-git-send-email-roretzla@linux.microsoft.com> References: <1710949096-5786-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 Move location of __rte_aligned(a) to new conventional location. The new placement between {struct,union} and the tag allows the desired alignment to be imparted on the type regardless of the toolchain being used for both C and C++. Additionally, it avoids confusion by Doxygen when generating documentation. Signed-off-by: Tyler Retzlaff --- drivers/bus/dpaa/base/qbman/qman.c | 3 +-- drivers/bus/dpaa/include/fsl_bman.h | 4 ++-- drivers/bus/dpaa/include/fsl_qman.h | 20 ++++++++++---------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c index 83db0a5..6d2fbdc 100644 --- a/drivers/bus/dpaa/base/qbman/qman.c +++ b/drivers/bus/dpaa/base/qbman/qman.c @@ -95,8 +95,7 @@ struct qman_portal { * to 2 ** 10 to ensure DQRR index calculations based shadow copy * address (6 bits for address shift + 4 bits for the DQRR size). */ - struct qm_dqrr_entry shadow_dqrr[QM_DQRR_SIZE] - __rte_aligned(1024); + alignas(1024) struct qm_dqrr_entry shadow_dqrr[QM_DQRR_SIZE]; #endif }; diff --git a/drivers/bus/dpaa/include/fsl_bman.h b/drivers/bus/dpaa/include/fsl_bman.h index 6719a4e..34d7eb3 100644 --- a/drivers/bus/dpaa/include/fsl_bman.h +++ b/drivers/bus/dpaa/include/fsl_bman.h @@ -41,7 +41,7 @@ static inline void bman_depletion_fill(struct bman_depletion *c) * pool id specific to this buffer is needed (BM_RCR_VERB_CMD_BPID_MULTI, * BM_MCC_VERB_ACQUIRE), the 'bpid' field is used. */ -struct bm_buffer { +struct __rte_aligned(8) bm_buffer { union { struct { #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ @@ -67,7 +67,7 @@ struct bm_buffer { }; u64 opaque; }; -} __rte_aligned(8); +}; static inline u64 bm_buffer_get64(const struct bm_buffer *buf) { return buf->addr; diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h index 5953309..acdfb45 100644 --- a/drivers/bus/dpaa/include/fsl_qman.h +++ b/drivers/bus/dpaa/include/fsl_qman.h @@ -124,7 +124,7 @@ enum qm_fd_format { #define QM_FD_COMPOUND QM_FD_FORMAT_COMPOUND /* "Frame Descriptor (FD)" */ -struct qm_fd { +struct __rte_aligned(8) qm_fd { union { struct { #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ @@ -200,7 +200,7 @@ struct qm_fd { u32 cmd; u32 status; }; -} __rte_aligned(8); +}; #define QM_FD_DD_NULL 0x00 #define QM_FD_PID_MASK 0x3f static inline u64 qm_fd_addr_get64(const struct qm_fd *fd) @@ -330,9 +330,9 @@ struct __rte_aligned(8) qm_dqrr_entry { /* "ERN Message Response" */ /* "FQ State Change Notification" */ -struct qm_mr_entry { +struct __rte_aligned(8) qm_mr_entry { union { - struct { + alignas(8) struct { u8 verb; u8 dca; u16 seqnum; @@ -341,8 +341,8 @@ struct qm_mr_entry { u32 fqid; /* 24-bit */ u32 tag; struct qm_fd fd; /* this has alignment 8 */ - } __packed __rte_aligned(8) ern; - struct { + } __packed ern; + alignas(8) struct { u8 verb; #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ u8 colour:2; /* See QM_MR_DCERN_COLOUR_* */ @@ -359,18 +359,18 @@ struct qm_mr_entry { u32 fqid; /* 24-bit */ u32 tag; struct qm_fd fd; /* this has alignment 8 */ - } __packed __rte_aligned(8) dcern; - struct { + } __packed dcern; + alignas(8) struct { u8 verb; u8 fqs; /* Frame Queue Status */ u8 __reserved1[6]; u32 fqid; /* 24-bit */ u32 contextB; u8 __reserved2[16]; - } __packed __rte_aligned(8) fq; /* FQRN/FQRNI/FQRL/FQPN */ + } __packed fq; /* FQRN/FQRNI/FQRL/FQPN */ }; u8 __reserved2[32]; -} __packed __rte_aligned(8); +} __packed; #define QM_MR_VERB_VBIT 0x80 /* * ERNs originating from direct-connect portals ("dcern") use 0x20 as a verb