From: Phil Sutter <p...@nwl.cc> Date: Tue, 20 Dec 2016 23:26:21 +0100
> The idea for this was born when testing VF support in iproute2 which was > impeded by hardware requirements. In fact, not every VF-capable hardware > driver implements all netdev ops, so testing the interface is still hard > to do even with a well-sorted hardware shelf. > > To overcome this and allow for testing the user-kernel interface, this > patch allows to turn dummy into a PF with a configurable amount of VFs. > > Due to the assumption that all PFs are PCI devices, this implementation > is not completely straightforward: In order to allow for > rtnl_fill_ifinfo() to see the dummy VFs, a fake PCI parent device is > attached to the dummy netdev. This has to happen at the right spot so > register_netdevice() does not get confused. This patch abuses > ndo_fix_features callback for that. In ndo_uninit callback, the fake > parent is removed again for the same purpose. > > Joint work with Sabrina Dubroca. > > Signed-off-by: Sabrina Dubroca <s...@queasysnail.net> > Signed-off-by: Phil Sutter <p...@nwl.cc> Please resubmit when net-next opens back up, thanks.