[dpdk-dev] [PATCH v2] net/virtio: fix Virtio-PCI ops assignment

David Marchand david.marchand at redhat.com
Tue Feb 2 11:03:18 CET 2021


On Mon, Feb 1, 2021 at 9:33 PM Maxime Coquelin
<maxime.coquelin at redhat.com> wrote:
>
> VIRTIO_OPS() macro relies on the port ID stored in the
> virtio_hw struct. Issue is that it is used before being
> assigned at init time. It results in all devices setting
> ops on port ID 0, causing crash later when calling ops
> for port IDs other than 0.
>
> This patch ensures port ID assignment is done at early
> primary process probe time, before it is being used.
>
> Bugzilla ID: 631
> Fixes: 512e27eeb743 ("net/virtio: move PCI specific dev init to PCI ethdev init")
>
> Reported-by: Wei Ling <weix.ling at intel.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Reviewed-by: David Marchand <david.marchand at redhat.com>


-- 
David Marchand



More information about the dev mailing list