Skip to contentSkip to conversation

examples/flow_filtering: add Tx queues setup process

PATCH Superseded Wei Zhao 2 participants 4 messages Dec 26, 2017 – Dec 27, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Wei Zhao

author
#0 lore raw

PATCH 1/1 examples/flow_filtering: add Tx queues setup process

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.

---
 examples/flow_filtering/main.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
examples/flow_filtering/main.c +11 -0
index 7d739b4..b5c7677 100644
@@ -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) {
Signature · 1 line
2.9.3
author
#1 lore raw

Add maintainer [email protected] into cc list.

Quoted 42 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, December 26, 2017 5:21 PM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] examples/flow_filtering: add Tx queues setup process

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.

---
 examples/flow_filtering/main.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
examples/flow_filtering/main.c +11 -0
index 7d739b4..b5c7677 100644
@@ -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

#2 lore raw

Hi Wei,

Your patch looks good, but there is an ack patch that deals with offloads.
http://dpdk.org/ml/archives/dev/2017-December/083639.html

Please update your patch to support the new tx offloads.

Regards,
Ori

Quoted 52 lines

-----Original Message-----
From: Zhao1, Wei [mailto:[email protected]]
Sent: Tuesday, December 26, 2017 12:03 PM
To: Ori Kam <[email protected]>
Cc: Lu, Wenzhuo <[email protected]>; [email protected]
Subject: RE: [PATCH] examples/flow_filtering: add Tx queues setup process

Add maintainer [email protected] into cc list.

Quoted 42 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, December 26, 2017 5:21 PM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] examples/flow_filtering: add Tx queues setup process

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.

---
 examples/flow_filtering/main.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
(quoted diff) +0 -0

b/examples/flow_filtering/main.c index 7d739b4..b5c7677 100644

examples/flow_filtering/main.c +11 -0
@@ -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

author
#3 lore raw

Hi, Ori Kam

Thank you for your suggestion.
I have commit a v2 to DPDK.org.

https://dpdk.org/dev/patchwork/patch/32768/

Quoted 72 lines

-----Original Message-----
From: Ori Kam [mailto:[email protected]]
Sent: Tuesday, December 26, 2017 10:09 PM
To: Zhao1, Wei <[email protected]>
Cc: Lu, Wenzhuo <[email protected]>; [email protected]
Subject: RE: [PATCH] examples/flow_filtering: add Tx queues setup process

Hi Wei,

Your patch looks good, but there is an ack patch that deals with offloads.
http://dpdk.org/ml/archives/dev/2017-December/083639.html

Please update your patch to support the new tx offloads.

Regards,
Ori

Quoted 54 lines

-----Original Message-----
From: Zhao1, Wei [mailto:[email protected]]
Sent: Tuesday, December 26, 2017 12:03 PM
To: Ori Kam <[email protected]>
Cc: Lu, Wenzhuo <[email protected]>; [email protected]
Subject: RE: [PATCH] examples/flow_filtering: add Tx queues setup process

Add maintainer [email protected] into cc list.

Quoted 43 lines

-----Original Message-----
From: Zhao1, Wei
Sent: Tuesday, December 26, 2017 5:21 PM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Zhao1, Wei <[email protected]>
Subject: [PATCH] examples/flow_filtering: add Tx queues setup process

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.

---
 examples/flow_filtering/main.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
(quoted diff) +0 -0

b/examples/flow_filtering/main.c index 7d739b4..b5c7677 100644

examples/flow_filtering/main.c +11 -0
@@ -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