[dpdk-dev] [PATCH] net/vdev_netvsc: handle removal of associated pci device
Stephen Hemminger
stephen at networkplumber.org
Sun Sep 6 20:33:09 CEST 2020
On Sun, 6 Sep 2020 12:38:18 +0000
Matan Azrad <matan at nvidia.com> wrote:
> Hi Stephen
>
> From: Stephen Hemminger:
> > The vdev_netvsc was not detecting when the associated PCI device
> > (SRIOV) was removed. Because of that it would keep feeding the same
> > (removed) device to failsafe PMD which would then unsuccessfully try and
> > probe for it.
> >
> > Change to use a mark/sweep method to detect that PCI device was
> > removed, and also only tell failsafe about new PCI devices.
> > Vdev_netvsc does not have to keep stuffing the pipe with the same already
> > existing PCI device.
>
> As I know, the vdev_netvsc driver doesn't call to failsafe if the PCI device is not detected by the readlink command(considered as removed)...
> Am I missing something?
The original code is broken because ctx_yield is not cleared, it keeps sending the same value.
It looks like device removal and add was never tested.
If you test removal you will see that vdev_netvsc:
1. Sends same PCI device repeatedly to failsafe (every alarm call)
This is harmless, but useless.
2. When device is removed, keeps doing #1
More information about the dev
mailing list