From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matan Azrad Subject: [PATCH 3/6] app/testpmd: fix forward ports Rx flush Date: Thu, 3 May 2018 10:31:45 +0000 Message-ID: <1525343508-29487-4-git-send-email-matan@mellanox.com> References: <1525343508-29487-1-git-send-email-matan@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain Cc: dev@dpdk.org, stable@dpdk.org To: Wenzhuo Lu , Jingjing Wu Return-path: In-Reply-To: <1525343508-29487-1-git-send-email-matan@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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