On Wed, Nov 18, 2026 at 3:43 PM David Marchand
<[email protected]> wrote:
>
> On Wed, 18 Nov 2026 at 09:28, Isaac Boukris <[email protected]> wrote:
> >  drivers/net/virtio/virtio_ethdev.c | 18 ++++++++++++++----
> >  1 file changed, 14 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/net/virtio/virtio_ethdev.c 
> > b/drivers/net/virtio/virtio_ethdev.c
> > index f2302089ee..8600f3899a 100644
> > --- a/drivers/net/virtio/virtio_ethdev.c
> > +++ b/drivers/net/virtio/virtio_ethdev.c
> > @@ -1455,10 +1455,20 @@ virtio_configure_intr(struct rte_eth_dev *dev)
> >                 return -ENOTSUP;
> >         }
> >
> > -       ret = rte_intr_efd_enable(dev->intr_handle, 
> > dev->data->nb_rx_queues);
> > -       if (ret < 0) {
> > -               PMD_INIT_LOG(ERR, "Fail to create eventfd");
> > -               return ret;
> > +       /* On reinitialization, release the eventfds if the number of Rx 
> > queues changed. */
> > +       if (rte_intr_type_get(dev->intr_handle) == 
> > RTE_INTR_HANDLE_VFIO_MSIX &&
>
> This still does not feel right to me.
>
>
> > +           rte_intr_dp_is_en(dev->intr_handle) &&
> > +           rte_intr_nb_efd_get(dev->intr_handle) != 
> > dev->data->nb_rx_queues) {
> > +               virtio_intr_disable(dev);
> > +               rte_intr_efd_disable(dev->intr_handle);
>
> So what happens here iiuc.
>
> For vdev, event FDs are filled by the driver (contrary to MSIX /
> rte_intr_efd_enable) in the virtio-user probe function for example.
> But we have an asymmetry in EAL, where rte_intr_efd_enable is not
> changing the handle for VDEV, but calling rte_intr_efd_disable breaks
> it resetting nb_efd to 0.
>
> Not resetting to 0 in rte_intr_efd_disable for vdev would break
> rte_intr_dp_is_en.
> And it probably has subtle implications on other part of this API...
>
> We should not be building a workaround in drivers, but correctly
> fixing this now in net/virtio is risky:
> - the virtio driver should probably not be calling rte_intr_efd_enable
> here in code common to PCI and VDEV ethdevs.
>   VDEV sets up the interrupt handle once and for all during probing,
> and PCI should be doing the same.
> - or.. calls to rte_intr_efd_disable are missing in the
> virtio_dev_init common code.
>
>
> Taking a step back now.
> The initial eventfd leak fix in EAL changed assumptions for drivers,
> with the expectation now being that the drivers properly
> enable/disable.
> I saw one driver (net/iavf) change on that topic, which is really
> little when compared to the number of users in-tree.
> We likely have bugs in other drivers that were not caught by validation.
>
> Given that we are in rc3 (rc4 by eow), I am for deferring the virtio
> changes to the next release and instead reverting the EAL fix in this
> release until we get a proper pass on each maintainer before
> reapplying.
> I'll send a patch in that direction.

I agree with deferring these changes to the next release, there is a significant
risk of regressions here, and the EAL changes being backported, could also
introduce regressions in  the stable branches.

Maxime
>
> --
> David Marchand
>

Reply via email to