On Thu, 27 Jun 2024 10:44:02 +0000 Konstantin Taranov <kotaranov@xxxxxxxxxxxxx> wrote: > > > > I don't want to be first and only one driver that uses this flag outside of > > netdev. So please add new function to netdev part of mana driver to return > > right ndev. > > > > Something like that: > > struct net_device *mana__get_netdev(struct mana_context *mc) { > > struct net_device *ndev; > > > > if (mana_ndev_is_slave(mc->ports[0])) > > ndev = netdev_master_upper_dev_get_rcu(mc->ports[0]); > > else > > ndev = mc->ports[0]; > > > > return ndev; > > } > > > > And get Acks from netdev maintainers (Jakub, David, Eric, Paolo). > > Ok. Makes sense. > I will just call it more exact: > mana_get_not_slave_netdev_rcu() Please don't introduce more usages of the term "slave". Better to stick to VF.