From 21ebc4d8cd2aaa8a70d210f4c04c1027d9376e72 Mon Sep 17 00:00:00 2001 From: Jesper Dangaard Brouer Date: Sun, 15 Nov 2020 15:56:31 +0100 Subject: [PATCH] traffic-pacing-edt: Align map struct to cache-line size Signed-off-by: Jesper Dangaard Brouer --- traffic-pacing-edt/edt_pacer02.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/traffic-pacing-edt/edt_pacer02.c b/traffic-pacing-edt/edt_pacer02.c index c742d27..b8f22c9 100644 --- a/traffic-pacing-edt/edt_pacer02.c +++ b/traffic-pacing-edt/edt_pacer02.c @@ -26,7 +26,7 @@ struct edt_val { __u64 t_last; __u64 t_horizon_drop; __u64 t_horizon_ecn; -}; +} __aligned(64); /* Align struct to cache-size to avoid false-sharing */ /* The tc tool (iproute2) use another ELF map layout than libbpf (struct * bpf_map_def), see struct bpf_elf_map from iproute2.