DPDK patches and discussions
 help / color / mirror / Atom feed
* [RFC PATCH] eventdev: ensure 16-byte alignment for events
@ 2023-10-05 11:51 Bruce Richardson
  2023-10-05 12:06 ` Bruce Richardson
                   ` (5 more replies)
  0 siblings, 6 replies; 27+ messages in thread
From: Bruce Richardson @ 2023-10-05 11:51 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, Jerin Jacob

The event structure in DPDK is 16-bytes in size, and events are
regularly passed as parameters directly rather than being passed as
pointers. To help compiler optimize correctly, we can explicitly request
16-byte alignment for events, which means that we should be able
to do aligned vector loads/stores (e.g. with SSE or Neon) when working
with those events.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/eventdev/rte_eventdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
index 2ba8a7b090..bb0d59b059 100644
--- a/lib/eventdev/rte_eventdev.h
+++ b/lib/eventdev/rte_eventdev.h
@@ -1344,7 +1344,7 @@ struct rte_event {
 		struct rte_event_vector *vec;
 		/**< Event vector pointer. */
 	};
-};
+} __rte_aligned(16);
 
 /* Ethdev Rx adapter capability bitmap flags */
 #define RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT	0x1
-- 
2.39.2


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2024-01-19 22:30 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05 11:51 [RFC PATCH] eventdev: ensure 16-byte alignment for events Bruce Richardson
2023-10-05 12:06 ` Bruce Richardson
2023-10-05 13:11   ` Jerin Jacob
2023-10-05 13:15     ` Bruce Richardson
2023-10-06  7:19       ` Jerin Jacob
2023-10-05 12:12 ` Morten Brørup
2023-10-05 13:02   ` Bruce Richardson
2023-10-06  9:37 ` [PATCH v2] " Bruce Richardson
2023-10-06  9:45 ` [PATCH v3] " Bruce Richardson
2023-10-06 10:13   ` Morten Brørup
2023-10-06 10:16     ` Jerin Jacob
2023-10-06 10:19       ` Bruce Richardson
2023-10-06 10:24         ` Jerin Jacob
2023-10-06 10:27           ` Bruce Richardson
2023-10-06 10:16     ` Bruce Richardson
2023-10-06 10:35       ` Morten Brørup
2023-10-06 10:44         ` Bruce Richardson
2023-10-06 10:29 ` [PATCH v4] " Bruce Richardson
2023-11-12  0:01   ` Stephen Hemminger
2023-11-12  8:30     ` Morten Brørup
2023-11-12 23:31       ` Stephen Hemminger
2023-11-13  7:58         ` Morten Brørup
2024-01-19 21:05           ` Tyler Retzlaff
2023-10-06 12:15 ` [RFC PATCH] " Mattias Rönnblom
2023-10-06 12:19   ` Bruce Richardson
2023-10-06 12:29     ` Mattias Rönnblom
2024-01-19 22:30   ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).