* [dpdk-dev] [PATCH v1] app/testpmd: fix fwd between two failsafe devices
@ 2017-11-06 14:19 Ophir Munk
2017-11-07 13:31 ` [dpdk-dev] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports Ophir Munk
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Ophir Munk @ 2017-11-06 14:19 UTC (permalink / raw)
To: Jingjing Wu; +Cc: Gaetan Rivet, Ophir
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 adjacent ports 0 and 1. This commit fixes this bug.
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.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 7bc721f..cd2ac11 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1905,7 +1905,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) {
@@ -1913,7 +1913,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.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports
2017-11-06 14:19 [dpdk-dev] [PATCH v1] app/testpmd: fix fwd between two failsafe devices Ophir Munk
@ 2017-11-07 13:31 ` Ophir Munk
2017-11-07 13:47 ` Ophir Munk
2017-11-07 13:52 ` Ophir Munk
2 siblings, 0 replies; 7+ messages in thread
From: Ophir Munk @ 2017-11-07 13:31 UTC (permalink / raw)
To: Jingjing Wu; +Cc: Gaetan Rivet, Ophir
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")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
v1:
=========
original patch
v2:
========
Update commit message. Update title to indicate the fix is for any non
consecutive ports and not just for failsafe devices.
---
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 7bc721f..cd2ac11 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1905,7 +1905,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) {
@@ -1913,7 +1913,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.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports
2017-11-06 14:19 [dpdk-dev] [PATCH v1] app/testpmd: fix fwd between two failsafe devices Ophir Munk
2017-11-07 13:31 ` [dpdk-dev] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports Ophir Munk
@ 2017-11-07 13:47 ` Ophir Munk
2017-11-07 13:52 ` Ophir Munk
2 siblings, 0 replies; 7+ messages in thread
From: Ophir Munk @ 2017-11-07 13:47 UTC (permalink / raw)
To: Jingjing Wu; +Cc: Gaetan Rivet, Ophir
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")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
v1:
=========
original patch
v2:
========
Update commit message. Update title to indicate the fix is for any non
consecutive ports and not just for failsafe devices.
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 7bc721f..cd2ac11 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1905,7 +1905,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) {
@@ -1913,7 +1913,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.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports
2017-11-06 14:19 [dpdk-dev] [PATCH v1] app/testpmd: fix fwd between two failsafe devices Ophir Munk
2017-11-07 13:31 ` [dpdk-dev] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports Ophir Munk
2017-11-07 13:47 ` Ophir Munk
@ 2017-11-07 13:52 ` Ophir Munk
2017-11-07 14:26 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2017-11-07 17:43 ` De Lara Guarch, Pablo
2 siblings, 2 replies; 7+ messages in thread
From: Ophir Munk @ 2017-11-07 13:52 UTC (permalink / raw)
To: Jingjing Wu; +Cc: Gaetan Rivet, Ophir
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")
Cc: stable@dpdk.org
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Raslan Darawsheh <rasland@mellanox.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 7bc721f..cd2ac11 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1905,7 +1905,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) {
@@ -1913,7 +1913,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.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports
2017-11-07 13:52 ` Ophir Munk
@ 2017-11-07 14:26 ` Thomas Monjalon
2017-11-07 17:43 ` De Lara Guarch, Pablo
1 sibling, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2017-11-07 14:26 UTC (permalink / raw)
To: dev; +Cc: Ophir Munk, Jingjing Wu, rasland, pablo.de.lara.guarch
It is a really basic bug in testpmd.
Someone to review it quickly please?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports
2017-11-07 13:52 ` Ophir Munk
2017-11-07 14:26 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2017-11-07 17:43 ` De Lara Guarch, Pablo
2017-11-07 20:42 ` Thomas Monjalon
1 sibling, 1 reply; 7+ messages in thread
From: De Lara Guarch, Pablo @ 2017-11-07 17:43 UTC (permalink / raw)
To: Ophir Munk, Wu, Jingjing
Cc: Gaetan Rivet, Ophir Munk <ophirmu@mellanox.com
> -----Original Message-----
> From: stable [mailto:stable-bounces@dpdk.org] On Behalf Of Ophir Munk
> Sent: Tuesday, November 7, 2017 1:53 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: Gaetan Rivet <gaetan.rivet@6wind.com>; Ophir Munk
> <ophirmu@mellanox.com; dev@dpdk.org; Thomas Monjalon
> <thomas@monjalon.net>; Olga Shern <olgas@mellanox.com>;
> stable@dpdk.org; Raslan Darawsheh <rasland@mellanox.com>
> Subject: [dpdk-stable] [PATCH v2] app/testpmd: fix forwarding between
> non consecutive ports
>
> 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")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports
2017-11-07 17:43 ` De Lara Guarch, Pablo
@ 2017-11-07 20:42 ` Thomas Monjalon
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2017-11-07 20:42 UTC (permalink / raw)
To: Ophir Munk; +Cc: dev, De Lara Guarch, Pablo, Wu, Jingjing
07/11/2017 18:43, De Lara Guarch, Pablo:
> From: Ophir Munk
> >
> > 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")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> > Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
>
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-11-07 20:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 14:19 [dpdk-dev] [PATCH v1] app/testpmd: fix fwd between two failsafe devices Ophir Munk
2017-11-07 13:31 ` [dpdk-dev] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports Ophir Munk
2017-11-07 13:47 ` Ophir Munk
2017-11-07 13:52 ` Ophir Munk
2017-11-07 14:26 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2017-11-07 17:43 ` De Lara Guarch, Pablo
2017-11-07 20:42 ` Thomas Monjalon
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).