Skip to content

Commit

Permalink
dispatcher: add cache guard to per-lcore struct
Browse files Browse the repository at this point in the history
Add cache guard to per-lcore data structures to prevent false sharing
in scenarios where a next-N-lines (or similar) hardware prefetcher is
used.

Signed-off-by: Mattias Rönnblom <[email protected]>
Reviewed-by: Morten Brørup <[email protected]>
  • Loading branch information
m-ronnblom authored and tmonjalo committed Feb 22, 2024
1 parent 461c287 commit a7ba9d0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/dispatcher/rte_dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ struct rte_dispatcher_lcore {
struct rte_dispatcher_lcore_port ports[EVD_MAX_PORTS_PER_LCORE];
struct rte_dispatcher_handler handlers[EVD_MAX_HANDLERS];
struct rte_dispatcher_stats stats;
RTE_CACHE_GUARD;
} __rte_cache_aligned;

struct rte_dispatcher {
Expand Down

0 comments on commit a7ba9d0

Please sign in to comment.