[dpdk-dev] [PATCH] examples/flow_filtering: add Tx queues setup process

Wei Zhao wei.zhao1 at intel.com
Tue Dec 26 10:21:04 CET 2017


This example do not has the process of set up tx queues, but
some NIC start up process will be blocked if this is no tx queue
and only rx queues. So add tx queues setup process in main code.

Signed-off-by: Wei Zhao <wei.zhao1 at intel.com>
---
 examples/flow_filtering/main.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/examples/flow_filtering/main.c b/examples/flow_filtering/main.c
index 7d739b4..b5c7677 100644
--- a/examples/flow_filtering/main.c
+++ b/examples/flow_filtering/main.c
@@ -173,6 +173,17 @@ init_port(void)
 		}
 	}
 
+	for (i = 0; i < nr_queues; i++) {
+		ret = rte_eth_tx_queue_setup(port_id, i, 512,
+				rte_eth_dev_socket_id(port_id),
+				NULL);
+		if (ret < 0) {
+			rte_exit(EXIT_FAILURE,
+				":: Tx queue setup failed: err=%d, port=%u\n",
+				ret, port_id);
+		}
+	}
+
 	rte_eth_promiscuous_enable(port_id);
 	ret = rte_eth_dev_start(port_id);
 	if (ret < 0) {
-- 
2.9.3



More information about the dev mailing list