[dpdk-dev,v4,19/20] net/virtio: by default disable packed virtqueues
Checks
Commit Message
Disable packed virtqueues for now and make it dependend on a build-time
config option. This can be reverted once we have missing features like
indirect descriptors implemented.
Signed-off-by: Jens Freimann <jfreimann@redhat.com>
---
config/common_base | 1 +
drivers/net/virtio/virtio_ethdev.c | 14 +++++++++-----
drivers/net/virtio/virtio_ethdev.h | 1 +
3 files changed, 11 insertions(+), 5 deletions(-)
@@ -365,6 +365,7 @@ CONFIG_RTE_LIBRTE_VIRTIO_PMD=y
CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_RX=n
CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_TX=n
CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP=n
+CONFIG_RTE_LIBRTE_VIRTIO_PQ=n
#
# Compile virtio device emulation inside virtio PMD driver
@@ -1233,6 +1233,10 @@ virtio_negotiate_features(struct virtio_hw *hw, uint64_t req_features)
req_features &= ~(1ULL << VIRTIO_NET_F_MTU);
}
+#ifdef RTE_LIBRTE_VIRTIO_PQ
+ req_features |= (1ull << VIRTIO_F_RING_PACKED);
+#endif
+
/*
* Negotiate features: Subset of device feature bits are written back
* guest feature bits.
@@ -1391,11 +1395,7 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev)
{
struct virtio_hw *hw = eth_dev->data->dev_private;
- if (hw->use_simple_rx) {
- PMD_INIT_LOG(INFO, "virtio: using simple Rx path on port %u",
- eth_dev->data->port_id);
- eth_dev->rx_pkt_burst = virtio_recv_pkts_vec;
- } else if (vtpci_packed_queue(hw)) {
+ if (vtpci_packed_queue(hw)) {
if (vtpci_with_feature(hw, VIRTIO_NET_F_MRG_RXBUF))
eth_dev->rx_pkt_burst = &virtio_recv_mergeable_pkts;
else
@@ -1405,6 +1405,10 @@ set_rxtx_funcs(struct rte_eth_dev *eth_dev)
"virtio: using mergeable buffer Rx path on port %u",
eth_dev->data->port_id);
eth_dev->rx_pkt_burst = &virtio_recv_mergeable_pkts;
+ } else if (hw->use_simple_rx) {
+ PMD_INIT_LOG(INFO, "virtio: using simple Rx path on port %u",
+ eth_dev->data->port_id);
+ eth_dev->rx_pkt_burst = virtio_recv_pkts_vec;
} else {
PMD_INIT_LOG(INFO, "virtio: using standard Rx path on port %u",
eth_dev->data->port_id);
@@ -36,6 +36,7 @@
1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE | \
1u << VIRTIO_RING_F_INDIRECT_DESC | \
1ULL << VIRTIO_F_VERSION_1 | \
+ 1ULL << VIRTIO_F_RING_PACKED | \
1ULL << VIRTIO_F_IOMMU_PLATFORM)
#define VIRTIO_PMD_SUPPORTED_GUEST_FEATURES \