Hi Sebastian, On 18/09/2023 17.36, Sebastian Andrzej Siewior wrote:
Hi, I've been looking at the drivers/ XDP users and noticed that some XDP_REDIRECT user don't invoke xdp_do_flush() at the end.
I'm wondering if we could detect (and WARN) in the net core e.g. net_rx_action() that a driver is missing a flush? The idea could be to check the per CPU (struct) bpf_redirect_info. Or check (per CPU) dev_flush_list. If some is worried about performance implications, then we can hide this under CONFIG_DEBUG_NET.
v1…v2: https://lore.kernel.org/all/20230908135748.794163-1-bigeasy@xxxxxxxxxxxxx - Collected tags. - Dropped the #4 patch which was touching cpu_map_bpf_prog_run() because it is not needed.
For the fixes in this set: Acked-by: Jesper Dangaard Brouer <hawk@xxxxxxxxxx> Thanks for fixing these! - at it can lead to strange to debug cases. --Jesper