On Thu, 26 Aug 2021 20:46:47 +0300 Igor Ryzhov <iryz...@nfware.com> wrote:
> Could you please clarify where exactly do I need to use rtnl lock? > From what I understand, netif_carrier_on/off can be called without the lock. Just a basic concern. The new stuff looks ok. If you follow what current upstream virtio is doing, it should be safe. See drivers/net/virtio/virtio_net.c, looks like more is needed? Do you call ethtool_validate_speed() and ethtool_validate_duplex()? Also, in virtio the driver does stop/wakeup of tx queues on carrier change.