DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matan Azrad <matan@mellanox.com>
To: Wenzhuo Lu <wenzhuo.lu@intel.com>, Jingjing Wu <jingjing.wu@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 3/6] app/testpmd: fix forward ports Rx flush
Date: Thu,  3 May 2018 10:31:45 +0000	[thread overview]
Message-ID: <1525343508-29487-4-git-send-email-matan@mellanox.com> (raw)
In-Reply-To: <1525343508-29487-1-git-send-email-matan@mellanox.com>

A port Rx queue flush is done when the packet forwarding starts in
order to clean the port statistics for a new traffic session.

The flush operation is wrongly called before the update of the new
forward ports, and may fail due to flush operation for an invalid port
configured by the old session.

Move the new forward port setup to be done before the Rx queue flush.

Fixes: 7741e4cf16c0 ("app/testpmd: VMDq and DCB updates")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 app/test-pmd/testpmd.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 8ac2070..1d3ede1 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1249,10 +1249,6 @@ static void eth_dev_event_callback(char *device_name,
 		return;
 	}
 
-	if (init_fwd_streams() < 0) {
-		printf("Fail from init_fwd_streams()\n");
-		return;
-	}
 
 	if(dcb_test) {
 		for (i = 0; i < nb_fwd_ports; i++) {
@@ -1272,10 +1268,11 @@ static void eth_dev_event_callback(char *device_name,
 	}
 	test_done = 0;
 
+	fwd_config_setup();
+
 	if(!no_flush_rx)
 		flush_fwd_rx_queues();
 
-	fwd_config_setup();
 	pkt_fwd_config_display(&cur_fwd_config);
 	rxtx_config_display();
 
-- 
1.9.5

  parent reply	other threads:[~2018-05-03 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 10:31 [dpdk-dev] [PATCH 0/6] Testpmd: fix port hotplug Matan Azrad
2018-05-03 10:31 ` [dpdk-dev] [PATCH 1/6] app/testpmd: fix valid ports prints Matan Azrad
2018-05-03 10:31 ` [dpdk-dev] [PATCH 2/6] app/testpmd: fix forward ports update Matan Azrad
2018-05-03 10:31 ` Matan Azrad [this message]
2018-05-03 10:31 ` [dpdk-dev] [PATCH 4/6] app/testpmd: fix synchronic port hotplug Matan Azrad
2018-05-03 10:31 ` [dpdk-dev] [PATCH 5/6] app/testpmd: fix removed device link status asking Matan Azrad
2018-05-03 10:31 ` [dpdk-dev] [PATCH 6/6] app/testpmd: fix asynchronic port removal Matan Azrad
2018-05-14  2:22 ` [dpdk-dev] [PATCH 0/6] Testpmd: fix port hotplug Thomas Monjalon

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=1525343508-29487-4-git-send-email-matan@mellanox.com \
    --to=matan@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=stable@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).