[2/3] net/virtio: add the missing supported features
diff mbox series

Message ID 20180921125244.27861-3-tiwei.bie@intel.com
State Accepted, archived
Delegated to: Maxime Coquelin
Headers show
Series
  • Some fixes and doc updates for virtio-user
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Tiwei Bie Sept. 21, 2018, 12:52 p.m. UTC
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(-)

Comments

Maxime Coquelin Sept. 27, 2018, 11:49 a.m. UTC | #1
On 09/21/2018 02:52 PM, Tiwei Bie wrote:
> 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(-)

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Patch
diff mbox series

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