History

xdp: Make cpumap flush_list common for all map instances

The cpumap flush list is used to track entries that need to flushed from via the xdp_do_flush_map() function. This list used to be per-map, but there is really no reason for that. Instead make the flush list global for all devmaps, which simplifies __cpu_map_flush() and cpu_map_alloc().

Björn Töpel committed 6 years ago

Commit cdfafe91 parent 96360003 files · +21 −21Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/bpf.h+2−2
@@ -966,7 +966,7 @@ int dev_map_generic_redirect(struct bpf_dtab_netdev *dst, struct sk_buff *skb, · 965 unmodified lines
966 struct bpf_prog *xdp_prog);966 struct bpf_prog *xdp_prog);
967 967
968struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key);968struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key);
969void __cpu_map_flush(struct bpf_map *map);969void __cpu_map_flush(void);
970int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, struct xdp_buff *xdp,970int cpu_map_enqueue(struct bpf_cpu_map_entry *rcpu, struct xdp_buff *xdp,
971 struct net_device *dev_rx);971 struct net_device *dev_rx);
972 972
@@ -1097,7 +1097,7 @@ struct bpf_cpu_map_entry *__cpu_map_lookup_elem(struct bpf_map *map, u32 key) · 124 unmodified lines
1097 return NULL;1097 return NULL;
1098}1098}
1099 1099
1100static inline void __cpu_map_flush(struct bpf_map *map)1100static inline void __cpu_map_flush(void)
1101{1101{
1102}1102}
1103 1103