* [dpdk-stable] [PATCH 1/3] net/virtio-user: fix multiple queue for vhost-kernel
[not found] <20180921125244.27861-1-tiwei.bie@intel.com>
@ 2018-09-21 12:52 ` Tiwei Bie
2018-09-27 11:47 ` Maxime Coquelin
2018-09-21 12:52 ` [dpdk-stable] [PATCH 2/3] net/virtio: add the missing supported features Tiwei Bie
1 sibling, 1 reply; 4+ messages in thread
From: Tiwei Bie @ 2018-09-21 12:52 UTC (permalink / raw)
To: maxime.coquelin, zhihong.wang, dev; +Cc: stable
The multiple queue support in vhost-kernel is broken because
the dev->vhostfd is only available for vhost-user. We should
always try to enable queue pairs when it's not in server mode.
Fixes: 201a41651715 ("net/virtio-user: fix multiple queues fail in server mode")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 869e96f87..55a82e4b0 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -549,13 +549,11 @@ virtio_user_handle_mq(struct virtio_user_dev *dev, uint16_t q_pairs)
/* Server mode can't enable queue pairs if vhostfd is invalid,
* always return 0 in this case.
*/
- if (dev->vhostfd >= 0) {
+ if (!dev->is_server || dev->vhostfd >= 0) {
for (i = 0; i < q_pairs; ++i)
ret |= dev->ops->enable_qp(dev, i, 1);
for (i = q_pairs; i < dev->max_queue_pairs; ++i)
ret |= dev->ops->enable_qp(dev, i, 0);
- } else if (!dev->is_server) {
- ret = ~0;
}
dev->queue_pairs = q_pairs;
--
2.18.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-stable] [PATCH 2/3] net/virtio: add the missing supported features
[not found] <20180921125244.27861-1-tiwei.bie@intel.com>
2018-09-21 12:52 ` [dpdk-stable] [PATCH 1/3] net/virtio-user: fix multiple queue for vhost-kernel Tiwei Bie
@ 2018-09-21 12:52 ` Tiwei Bie
2018-09-27 11:49 ` Maxime Coquelin
1 sibling, 1 reply; 4+ messages in thread
From: Tiwei Bie @ 2018-09-21 12:52 UTC (permalink / raw)
To: maxime.coquelin, zhihong.wang, dev; +Cc: stable
The virtio features VIRTIO_NET_F_CSUM, VIRTIO_NET_F_HOST_TSO4
and VIRTIO_NET_F_HOST_TSO6 are supported by the virtio PMD.
But they are missing in the supported feature set. And since
below commit:
commit 4174a7b59d05 ("net/virtio: improve Tx offload features negotiation")
Virtio PMD will announce the Tx offloading capabilities based
on the features read from the device. And virtio-user won't
report the features which are not in virtio-PMD's supported
feature set. So since that commit, virtio-user won't announce
the DEV_TX_OFFLOAD_UDP_CKSUM, DEV_TX_OFFLOAD_TCP_CKSUM and
DEV_TX_OFFLOAD_TCP_TSO offloading capabilities even if the
vhost backend supports them.
This patch adds these missing features, and virtio-user will
report them if the backend supports them.
Fixes: 142678d42959 ("net/virtio-user: fix wrongly get/set features")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
---
drivers/net/virtio/virtio_ethdev.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
index b726ad108..e0f80e5a4 100644
--- a/drivers/net/virtio/virtio_ethdev.h
+++ b/drivers/net/virtio/virtio_ethdev.h
@@ -40,7 +40,10 @@
(VIRTIO_PMD_DEFAULT_GUEST_FEATURES | \
1u << VIRTIO_NET_F_GUEST_CSUM | \
1u << VIRTIO_NET_F_GUEST_TSO4 | \
- 1u << VIRTIO_NET_F_GUEST_TSO6)
+ 1u << VIRTIO_NET_F_GUEST_TSO6 | \
+ 1u << VIRTIO_NET_F_CSUM | \
+ 1u << VIRTIO_NET_F_HOST_TSO4 | \
+ 1u << VIRTIO_NET_F_HOST_TSO6)
/*
* CQ function prototype
--
2.18.0
^ permalink raw reply [flat|nested] 4+ messages in thread