net/vhost: fix interrupt mode
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 24 Jul 2020 14:45:30 +0000 (16:45 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 29 Jul 2020 22:41:24 +0000 (00:41 +0200)
commit3d4cd4be577c335f9f07c78d125686f5b073c5a5
treec6204e19785385ee0808779a5c60e2b1c5d58c68
parente97958398b2af45ae13f88abb8c54d672b62be51
net/vhost: fix interrupt mode

At .new_device() time, only the first vring pair is
now ready, other vrings are configured later.

Problem is that when application will setup and enable
interrupts, only the first queue pair Rx interrupt will
be enabled.

This patches fixes the issue by setting the number of
max interrupts to the number of Rx queues that will be
later initialized. Then, as soon as a Rx vring is ready
and interrupt enabled by the application, it removes the
corresponding uninitialized epoll event, and installs a
new one with the valid FD.

Fixes: 604052ae5395 ("net/vhost: support queue update")

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
drivers/net/vhost/rte_eth_vhost.c