DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wei Zhao <wei.zhao1@intel.com>
To: dev@dpdk.org
Cc: wenzhuo.lu@intel.com, Wei Zhao <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH] examples/flow_filtering: add Tx queues setup process
Date: Tue, 26 Dec 2017 17:21:04 +0800	[thread overview]
Message-ID: <20171226092104.82707-1-wei.zhao1@intel.com> (raw)

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@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

             reply	other threads:[~2017-12-26  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-26  9:21 Wei Zhao [this message]
2017-12-26 10:03 ` Zhao1, Wei
2017-12-26 14:08   ` Ori Kam
2017-12-27  8:43     ` Zhao1, Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171226092104.82707-1-wei.zhao1@intel.com \
    --to=wei.zhao1@intel.com \
    --cc=dev@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).