Subject: Re: [PATCH net-next 5/8] rtnetlink: do not depend on RTNL for many attributes

From: Simon Horman <[email-masked]>
Date: Sun, 5 May 2024 15:46:08 +0100

On Fri, May 03, 2024 at 07:20:56PM +0000, Eric Dumazet wrote:
> Following device fields can be read locklessly
> in rtnl_fill_ifinfo() :
> 
> type, ifindex, operstate, link_mode, mtu, min_mtu, max_mtu, group,
> promiscuity, allmulti, num_tx_queues, gso_max_segs, gso_max_size,
> gro_max_size, gso_ipv4_max_size, gro_ipv4_max_size, tso_max_size,
> tso_max_segs, num_rx_queues.

Hi Eric,

* Regarding mtu, as the comment you added to sruct net_device
  some time ago mentions, mtu is written in many places.

  I'm wondering if, in particular wrt ndo_change_mtu implementations,
  if some it is appropriate to add WRITE_ONCE() annotations.

* Likewise, is it appropriate to add WRITE_ONCE() to dev_set_group() ?