On Sat, 1 Dec 2018 14:12:54 +0300 Igor Ryzhov <iryz...@nfware.com> wrote:
> Hi Stephen, > > I also do not see the point of the current implementation of ethtool > support. > That's why I sent this patch – it enables ethtool_ops for all devices, > independent of the underlying driver. > Right now only .get_link is supported, but I am thinking about > implementation of a larger set of functions, using req/resp queue, like > netdev_ops functions are working. > > Regarding the KNI itself, we use it as Linux mirror of physical port for: > 1. Port configuration from Linux – such functions as set_mac, change_mtu, > etc. And ethtool_ops will be used the same way. > 2. Passing control-plane packets to Linux. > > Can virtio user be used the same way, as a mirror of physical port? > > Best regards, > Igor In Linux if device does not supply get_link the base code does the right thing u32 ethtool_op_get_link(struct net_device *dev) { return netif_carrier_ok(dev) ? 1 : 0; } Doing set_mac, change_mtu and ethtool_ops in virtio_user should be possible but probably not implemented.