[dpdk-dev] [PATCH 1/4] net/virtio: fix interrupt unregistering for listening socket

Xia, Chenbo chenbo.xia at intel.com
Wed Apr 7 09:21:50 CEST 2021


> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Thursday, March 25, 2021 4:32 PM
> To: Ilya Maximets <i.maximets at ovn.org>
> Cc: Xia, Chenbo <chenbo.xia at intel.com>; dev at dpdk.org; Adrian Moreno
> <amorenoz at redhat.com>; Stefan Hajnoczi <stefanha at redhat.com>; Julia Suvorova
> <jusual at redhat.com>; stable at dpdk.org; Yang, Zhiyong <zhiyong.yang at intel.com>
> Subject: Re: [PATCH 1/4] net/virtio: fix interrupt unregistering for listening
> socket
> 
> 
> 
> On 3/17/21 9:25 PM, Ilya Maximets wrote:
> > virtio_user_dev_server_reconnect() is typically called from the
> > interrupt context while checking the link state:
> >
> >   vhost_user_update_link_state()
> >   --> virtio_user_dev_server_reconnect()
> >
> > Under this conditions callback unregistering always fails.  This means
> > that listenfd is never unregistered and continue to trigger interrupts.
> > For example, if second client will try to connect to the same socket,
> > the server will receive interrupts infinitely because it will not
> > accept them while listen fd is readable and generates epoll events.
> >
> > Fix that by moving reconfiguration of interrupts out of the
> > interrupt context to alarm handler.
> >
> > 'virtio_user_dev_delayed_handler' renamed to
> > 'virtio_user_dev_delayed_disconnect_handler' to better reflect its
> > purpose.
> >
> > Additionally improved error logging around interrupt management.
> >
> > Fixes: bd8f50a45d0f ("net/virtio-user: support server mode")
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
> > ---
> >
> > CC: Zhiyong Yang <zhiyong.yang at intel.com>
> >
> >  drivers/net/virtio/virtio_user/vhost_user.c   |  4 +-
> >  .../net/virtio/virtio_user/virtio_user_dev.c  | 70 ++++++++++++++-----
> >  .../net/virtio/virtio_user/virtio_user_dev.h  |  2 +-
> >  3 files changed, 57 insertions(+), 19 deletions(-)
> >
> 
> Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> 
> Thanks,
> Maxime

This patch is applied to next-virtio/main with below fix:

In virtio_user_dev_delayed_intr_reconfig_handler, change 'dev->port_id' to 'dev->hw.port_id'

Thanks


More information about the dev mailing list