DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/virtio: include host features supported in guest
@ 2020-05-14 11:56 Gowrishankar Muthukrishnan
  2020-05-14 12:18 ` Maxime Coquelin
  0 siblings, 1 reply; 4+ messages in thread
From: Gowrishankar Muthukrishnan @ 2020-05-14 11:56 UTC (permalink / raw)
  To: dev; +Cc: Maxime Coquelin, Flavio Leitner, Tiwei Bie, Zhihong Wang

Virtio pmd driver can not benefit from tso and csum offload
as they are not included in negotiation check with host. Add
them in virtio dev init and let negotiation decide the fate.

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukr@redhat.com>

--
This patch has been tested with TSO tests in OVS-DPDK:

https://patchwork.ozlabs.org/project/openvswitch/list/?series=176886

## ------------------------------- ##
## openvswitch 2.13.90 test suite. ##
## ------------------------------- ##

OVS-DPDK unit tests

  1: OVS-DPDK - EAL init                             ok
  2: OVS-DPDK - add standard DPDK port               ok
  3: OVS-DPDK - add vhost-user-client port           ok
  4: OVS-DPDK - ping vhost-user ports                ok
  5: OVS-DPDK - ping vhost-user-client ports         ok
  6: OVS-DPDK - validate tso negotiation             ok

## ------------- ##
## Test results. ##
## ------------- ##

All 6 tests were successful.

---
 drivers/net/virtio/virtio_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 044eb10..91f6f16 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1914,7 +1914,7 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,
 	}
 
 	/* reset device and negotiate default features */
-	ret = virtio_init_device(eth_dev, VIRTIO_PMD_DEFAULT_GUEST_FEATURES);
+	ret = virtio_init_device(eth_dev, VIRTIO_PMD_SUPPORTED_GUEST_FEATURES);
 	if (ret < 0)
 		goto err_virtio_init;
 
@@ -2064,7 +2064,7 @@ static int eth_virtio_pci_remove(struct rte_pci_device *pci_dev)
 	int ret;
 
 	PMD_INIT_LOG(DEBUG, "configure");
-	req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES;
+	req_features = VIRTIO_PMD_SUPPORTED_GUEST_FEATURES;
 
 	if (rxmode->mq_mode != ETH_MQ_RX_NONE) {
 		PMD_DRV_LOG(ERR,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-16  5:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 11:56 [dpdk-dev] [PATCH] net/virtio: include host features supported in guest Gowrishankar Muthukrishnan
2020-05-14 12:18 ` Maxime Coquelin
2020-05-15 16:35   ` Gowrishankar Muthukrishnan
2020-05-16  5:57     ` Gowrishankar Muthukrishnan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).