Subject: Re: [PATCH bpf-next 1/2] xdp: Move devmap bulk queue into struct net_device

From: Jesper Dangaard Brouer <[email-masked]>
Date: Fri, 10 Jan 2020 17:08:24 +0100

On Fri, 10 Jan 2020 15:22:02 +0100
Toke Høiland-Jørgensen <[email-masked]> wrote:

> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index 2741aa35bec6..1b2bc2a7522e 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
[...]
> @@ -1993,6 +1994,8 @@ struct net_device {
>  	spinlock_t		tx_global_lock;
>  	int			watchdog_timeo;
>  
> +	struct xdp_dev_bulk_queue __percpu *xdp_bulkq;
> +
>  #ifdef CONFIG_XPS
>  	struct xps_dev_maps __rcu *xps_cpus_map;
>  	struct xps_dev_maps __rcu *xps_rxqs_map;

We need to check that the cache-line for this location in struct
net_device is not getting updated (write operation) from different CPUs.

The test you ran was a single queue single CPU test, which will not
show any regression for that case.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer