2016-10-07 15:01, David Marchand: > If a pci probe operation creates a port but, for any reason, fails to > finish this operation and decides to delete the newly created port, then > the last created port id can not be trusted anymore and any subsequent > attach operations will fail. > > This problem was noticed while working on a vm that had a virtio-net > management interface bound to the virtio-net kernel driver and no port > whitelisted in the commandline: [...] > Two solutions: > - either update the last created port index to something invalid > (when freeing a ethdev port), > - or rely on the port count, before and after the eal attach. > > The latter solution seems (well not really more robust but at least) > less fragile than the former. > We still have some issues with drivers that create multiple ethdev > ports with a single probe operation, but this was already the case. > > Fixes: b0fb26685570 ("ethdev: convert to EAL hotplug") > > Reported-by: Daniel Mrzyglod <danielx.t.mrzyglod at intel.com> > Signed-off-by: David Marchand <david.marchand at 6wind.com>
Series applied, thanks