From: Yuanhan Liu <yliu@fridaylinux.org>
To: Matan Azrad <matan@mellanox.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'app/testpmd: fix port topology in RSS forward config' has been queued to LTS release 17.11.1
Date: Wed, 7 Feb 2018 16:57:08 +0800 [thread overview]
Message-ID: <1517993838-26692-14-git-send-email-yliu@fridaylinux.org> (raw)
In-Reply-To: <1517993838-26692-1-git-send-email-yliu@fridaylinux.org>
Hi,
FYI, your patch has been queued to LTS release 17.11.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/09/18. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 1c5819ed8fb4fbbd675ceafd16b3ad6b2f5eb65a Mon Sep 17 00:00:00 2001
From: Matan Azrad <matan@mellanox.com>
Date: Mon, 5 Feb 2018 14:09:22 +0000
Subject: [PATCH] app/testpmd: fix port topology in RSS forward config
[ upstream commit 4deefb6f7107dd6a40900be4f1d6a6844a702505 ]
The testpmd user can configure port topology mode to define the port
topology between the testpmd forward ports(paired, chained and loop).
When multi-queue ports are configured by the user, the testpmd
streams are created by rss_fwd_config_setup() function, this function
doesn't take into account the chained topology mode and configures the
forward streams with paired topology mode in this case.
Configure the stream Tx port by dedicated function which calculates
a valid Tx port index as a function of the topology mode and the Rx
port index.
Fixes: af75078 ("first public release")
Signed-off-by: Matan Azrad <matan@mellanox.com>
---
app/test-pmd/config.c | 49 +++++++++++++++++++++++++++++++------------------
1 file changed, 31 insertions(+), 18 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 24451fc..a0f3c24 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1876,6 +1876,36 @@ setup_fwd_config_of_each_lcore(struct fwd_config *cfg)
}
}
+static portid_t
+fwd_topology_tx_port_get(portid_t rxp)
+{
+ static int warning_once = 1;
+
+ RTE_ASSERT(rxp < cur_fwd_config.nb_fwd_ports);
+
+ switch (port_topology) {
+ default:
+ case PORT_TOPOLOGY_PAIRED:
+ if ((rxp & 0x1) == 0) {
+ if (rxp + 1 < cur_fwd_config.nb_fwd_ports)
+ return rxp + 1;
+ if (warning_once) {
+ printf("\nWarning! port-topology=paired"
+ " and odd forward ports number,"
+ " the last port will pair with"
+ " itself.\n\n");
+ warning_once = 0;
+ }
+ return rxp;
+ }
+ return rxp - 1;
+ case PORT_TOPOLOGY_CHAINED:
+ return (rxp + 1) % cur_fwd_config.nb_fwd_ports;
+ case PORT_TOPOLOGY_LOOP:
+ return rxp;
+ }
+}
+
static void
simple_fwd_config_setup(void)
{
@@ -1938,11 +1968,6 @@ simple_fwd_config_setup(void)
* For the RSS forwarding test all streams distributed over lcores. Each stream
* being composed of a RX queue to poll on a RX port for input messages,
* associated with a TX queue of a TX port where to send forwarded packets.
- * All packets received on the RX queue of index "RxQj" of the RX port "RxPi"
- * are sent on the TX queue "TxQl" of the TX port "TxPk" according to the two
- * following rules:
- * - TxPk = (RxPi + 1) if RxPi is even, (RxPi - 1) if RxPi is odd
- * - TxQl = RxQj
*/
static void
rss_fwd_config_setup(void)
@@ -1974,19 +1999,7 @@ rss_fwd_config_setup(void)
struct fwd_stream *fs;
fs = fwd_streams[sm_id];
-
- if ((rxp & 0x1) == 0)
- txp = (portid_t) (rxp + 1);
- else
- txp = (portid_t) (rxp - 1);
- /*
- * if we are in loopback, simply send stuff out through the
- * ingress port
- */
- if (port_topology == PORT_TOPOLOGY_LOOP ||
- txp >= cur_fwd_config.nb_fwd_ports)
- txp = rxp;
-
+ txp = fwd_topology_tx_port_get(rxp);
fs->rx_port = fwd_ports_ids[rxp];
fs->rx_queue = rxq;
fs->tx_port = fwd_ports_ids[txp];
--
2.7.4
next prev parent reply other threads:[~2018-02-07 8:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 8:56 [dpdk-stable] patch 'mk: fix external build' " Yuanhan Liu
2018-02-07 8:56 ` [dpdk-stable] patch 'bus/vdev: continue probing after a device failure' " Yuanhan Liu
2018-02-07 8:56 ` [dpdk-stable] patch 'mempool: fix physical contiguous check' " Yuanhan Liu
2018-02-07 8:56 ` [dpdk-stable] patch 'usertools/devbind: fix kernel module reporting' " Yuanhan Liu
2018-02-07 8:56 ` [dpdk-stable] patch 'net/mlx4: fix drop flow resources leak' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'net/bonding: check error of MAC address setting' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'net/qede: fix few log messages' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'vhost: fix IOTLB pool out-of-memory handling' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'vhost: remove pending IOTLB entry if miss request failed' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'net/mlx4: fix Rx offload non-fragmented indication' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'net/mlx5: fix flow RSS configuration' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'net/mlx5: fix UAR remapping on non configured queues' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'app/testpmd: fix port index in RSS forward config' " Yuanhan Liu
2018-02-07 8:57 ` Yuanhan Liu [this message]
2018-02-07 8:57 ` [dpdk-stable] patch 'bus/fslmc: fix build with latest glibc' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'bus/dpaa: fix default IOVA mode' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'examples/ip_pipeline: fix timer period unit' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'test/bitmap: fix memory leak' " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'test/reorder: " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'test/ring: " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'test/ring_perf: " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'test/table: " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'test/timer_perf: " Yuanhan Liu
2018-02-07 8:57 ` [dpdk-stable] patch 'net/i40e: fix multiple DDP packages conflict' " Yuanhan Liu
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=1517993838-26692-14-git-send-email-yliu@fridaylinux.org \
--to=yliu@fridaylinux.org \
--cc=matan@mellanox.com \
--cc=stable@dpdk.org \
/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).