[dpdk-stable] patch 'app/testpmd: fix forwarding between non consecutive ports' has been queued to LTS release 16.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Nov 10 17:09:55 CET 2017


Hi,

FYI, your patch has been queued to LTS release 16.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/12/17. So please
shout if anyone has objections.

Thanks.

Kind regards,
Luca Boccassi

---
>From f7d56b8e49954dd481db419361a51322c91b77d4 Mon Sep 17 00:00:00 2001
From: Ophir Munk <ophirmu at mellanox.com>
Date: Tue, 7 Nov 2017 13:52:30 +0000
Subject: [PATCH] app/testpmd: fix forwarding between non consecutive ports

[ upstream commit fafee5e9caaf439b29a6e10600e91b8de81eff66 ]

When defining two failsafe devices in testpmd the port numbers of the
failsafe devices may not be consecutive.
For example: if failsafe device includes a PCI device and a TAP device
then failsafe port numbers would be 0 and 3.
Port 0 - failsafe #1 device
Port 1 - PCI #1 device
Port 2 - TAP #1 device
Port 3 - failsafe #2 device
Port 4 - PCI #2 device
Port 5 - TAP #2 device

If forwarding is defined between the failsafe devices including a peer
address the forwarding should be between peer addresses of ports 0
and 3. Instead testpmd establishes forwarding between peer addresses
of consecutive ports 0 and 1. This commit fixes this bug.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
Signed-off-by: Raslan Darawsheh <rasland at mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
---
 app/test-pmd/config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 56a7ec679..c50b62efd 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1199,7 +1199,7 @@ simple_fwd_config_setup(void)
 		fwd_streams[i]->rx_queue  = 0;
 		fwd_streams[i]->tx_port   = fwd_ports_ids[j];
 		fwd_streams[i]->tx_queue  = 0;
-		fwd_streams[i]->peer_addr = j;
+		fwd_streams[i]->peer_addr = fwd_streams[i]->tx_port;
 		fwd_streams[i]->retry_enabled = retry_enabled;
 
 		if (port_topology == PORT_TOPOLOGY_PAIRED) {
@@ -1207,7 +1207,7 @@ simple_fwd_config_setup(void)
 			fwd_streams[j]->rx_queue  = 0;
 			fwd_streams[j]->tx_port   = fwd_ports_ids[i];
 			fwd_streams[j]->tx_queue  = 0;
-			fwd_streams[j]->peer_addr = i;
+			fwd_streams[j]->peer_addr = fwd_streams[j]->tx_port;
 			fwd_streams[j]->retry_enabled = retry_enabled;
 		}
 	}
-- 
2.11.0



More information about the stable mailing list