[dpdk-stable] patch 'net/virtio: fix wrong Rx/Tx method for secondary process' has been queued to stable release 16.11.1

Yuanhan Liu yuanhan.liu at linux.intel.com
Wed Feb 15 07:26:44 CET 2017


Hi,

FYI, your patch has been queued to stable release 16.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
yet. It will be pushed if I get no objections before 02/18/17.
So please shout if anyone has objections.

Thanks.

	--yliu

---
>From 5ddf76c864fa577d394067e85e493126a8a0ca1e Mon Sep 17 00:00:00 2001
From: Yuanhan Liu <yuanhan.liu at linux.intel.com>
Date: Fri, 6 Jan 2017 18:16:16 +0800
Subject: [PATCH] net/virtio: fix wrong Rx/Tx method for secondary process

[ upstream commit d4be35a91340b8474bd5f8b6bcaa26084bb30c9f ]

If the primary enables the vector Rx/Tx path, the current code would
let the secondary always choose the non vector Rx/Tx path. This results
to a Rx/Tx method mismatch between primary and secondary process. Werid
errors then may happen, something like:

    PMD: virtio_xmit_pkts() tx: virtqueue_enqueue error: -14

Fix it by choosing the correct Rx/Tx callbacks for the secondary process.
That is, use vector path if it's given.

Fixes: 8d8393fb1861 ("virtio: pick simple Rx/Tx")

Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 85ae147..4047da5 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1306,7 +1306,12 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
 	eth_dev->tx_pkt_burst = &virtio_xmit_pkts;
 
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
-		rx_func_get(eth_dev);
+		if (hw->use_simple_rxtx) {
+			eth_dev->tx_pkt_burst = virtio_xmit_pkts_simple;
+			eth_dev->rx_pkt_burst = virtio_recv_pkts_vec;
+		} else {
+			rx_func_get(eth_dev);
+		}
 		return 0;
 	}
 
-- 
1.9.0



More information about the stable mailing list