* [PATCH 0/2] two bugfix for testpmd DCB
@ 2025-11-06 0:29 Chengwen Feng
2025-11-06 0:29 ` [PATCH 1/2] app/testpmd: fix invalid txp when setup DCB forward Chengwen Feng
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Chengwen Feng @ 2025-11-06 0:29 UTC (permalink / raw)
To: thomas, stephen; +Cc: dev, aman.deep.singh, liuyonglong, yangxingui, lihuisong
Two bugfix which found when enhance testpmd DCB function.
Chengwen Feng (2):
app/testpmd: fix invalid txp when setup DCB forward
app/testpmd: fix wrong Rx queues when setup DCB forward
app/test-pmd/config.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] app/testpmd: fix invalid txp when setup DCB forward
2025-11-06 0:29 [PATCH 0/2] two bugfix for testpmd DCB Chengwen Feng
@ 2025-11-06 0:29 ` Chengwen Feng
2025-11-06 0:29 ` [PATCH 2/2] app/testpmd: fix wrong Rx queues " Chengwen Feng
2025-11-06 1:24 ` [PATCH 0/2] two bugfix for testpmd DCB Stephen Hemminger
2 siblings, 0 replies; 4+ messages in thread
From: Chengwen Feng @ 2025-11-06 0:29 UTC (permalink / raw)
To: thomas, stephen; +Cc: dev, aman.deep.singh, liuyonglong, yangxingui, lihuisong
The txp maybe invalid (e.g. start with only one port but set with 1),
this commit fix it by get txp from fwd_topology_tx_port_get() function.
An added benefit is that the DCB test also supports '--port-topology'
parameter.
Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
app/test-pmd/config.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 3ce2a14a1b..0f687018c7 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -5187,7 +5187,7 @@ dcb_fwd_config_setup(void)
/* reinitialize forwarding streams */
init_fwd_streams();
sm_id = 0;
- txp = 1;
+ txp = fwd_topology_tx_port_get(rxp);
/* get the dcb info on the first RX and TX ports */
(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[rxp], &rxp_dcb_info);
(void)rte_eth_dev_get_dcb_info(fwd_ports_ids[txp], &txp_dcb_info);
@@ -5235,11 +5235,8 @@ dcb_fwd_config_setup(void)
rxp++;
if (rxp >= nb_fwd_ports)
return;
+ txp = fwd_topology_tx_port_get(rxp);
/* get the dcb information on next RX and TX ports */
- if ((rxp & 0x1) == 0)
- txp = (portid_t) (rxp + 1);
- else
- txp = (portid_t) (rxp - 1);
rte_eth_dev_get_dcb_info(fwd_ports_ids[rxp], &rxp_dcb_info);
rte_eth_dev_get_dcb_info(fwd_ports_ids[txp], &txp_dcb_info);
}
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/2] app/testpmd: fix wrong Rx queues when setup DCB forward
2025-11-06 0:29 [PATCH 0/2] two bugfix for testpmd DCB Chengwen Feng
2025-11-06 0:29 ` [PATCH 1/2] app/testpmd: fix invalid txp when setup DCB forward Chengwen Feng
@ 2025-11-06 0:29 ` Chengwen Feng
2025-11-06 1:24 ` [PATCH 0/2] two bugfix for testpmd DCB Stephen Hemminger
2 siblings, 0 replies; 4+ messages in thread
From: Chengwen Feng @ 2025-11-06 0:29 UTC (permalink / raw)
To: thomas, stephen; +Cc: dev, aman.deep.singh, liuyonglong, yangxingui, lihuisong
The nb_rx_queue should get from rxp_dcb_info not txp_dcb_info, this
commit fix it.
Fixes: 1a572499beb6 ("app/testpmd: setup DCB forwarding based on traffic class")
Cc: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
app/test-pmd/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 0f687018c7..8557371488 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -5205,7 +5205,7 @@ dcb_fwd_config_setup(void)
fwd_lcores[lc_id]->stream_idx;
rxq = rxp_dcb_info.tc_queue.tc_rxq[i][tc].base;
txq = txp_dcb_info.tc_queue.tc_txq[i][tc].base;
- nb_rx_queue = txp_dcb_info.tc_queue.tc_rxq[i][tc].nb_queue;
+ nb_rx_queue = rxp_dcb_info.tc_queue.tc_rxq[i][tc].nb_queue;
nb_tx_queue = txp_dcb_info.tc_queue.tc_txq[i][tc].nb_queue;
for (j = 0; j < nb_rx_queue; j++) {
struct fwd_stream *fs;
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 0/2] two bugfix for testpmd DCB
2025-11-06 0:29 [PATCH 0/2] two bugfix for testpmd DCB Chengwen Feng
2025-11-06 0:29 ` [PATCH 1/2] app/testpmd: fix invalid txp when setup DCB forward Chengwen Feng
2025-11-06 0:29 ` [PATCH 2/2] app/testpmd: fix wrong Rx queues " Chengwen Feng
@ 2025-11-06 1:24 ` Stephen Hemminger
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2025-11-06 1:24 UTC (permalink / raw)
To: Chengwen Feng
Cc: thomas, dev, aman.deep.singh, liuyonglong, yangxingui, lihuisong
On Thu, 6 Nov 2025 08:29:18 +0800
Chengwen Feng <fengchengwen@huawei.com> wrote:
> Two bugfix which found when enhance testpmd DCB function.
>
> Chengwen Feng (2):
> app/testpmd: fix invalid txp when setup DCB forward
> app/testpmd: fix wrong Rx queues when setup DCB forward
>
> app/test-pmd/config.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
Queued to next-net
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-06 1:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-06 0:29 [PATCH 0/2] two bugfix for testpmd DCB Chengwen Feng
2025-11-06 0:29 ` [PATCH 1/2] app/testpmd: fix invalid txp when setup DCB forward Chengwen Feng
2025-11-06 0:29 ` [PATCH 2/2] app/testpmd: fix wrong Rx queues " Chengwen Feng
2025-11-06 1:24 ` [PATCH 0/2] two bugfix for testpmd DCB Stephen Hemminger
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).