Update DPDK version from 19.11 to 20.11 and also support hns3 PMD for Kunpeng 920 and Kunpeng 930. Signed-off-by: speech_white <humin29@huawei.com>
108 lines
3.0 KiB
Diff
108 lines
3.0 KiB
Diff
From 118f18c9ab370a30a25ef548d1dee2b125bcfc16 Mon Sep 17 00:00:00 2001
|
|
From: Huisong Li <lihuisong@huawei.com>
|
|
Date: Wed, 28 Apr 2021 14:40:44 +0800
|
|
Subject: [PATCH 186/189] app/testpmd: verify DCB config during forward config
|
|
|
|
Currently, the check for doing DCB test is assigned to
|
|
start_packet_forwarding(), which will be called when
|
|
run "start" cmd. But fwd_config_setup() is used in many
|
|
scenarios, such as, "port config all rxq".
|
|
|
|
This patch moves the check from start_packet_forwarding()
|
|
to fwd_config_setup().
|
|
|
|
Fixes: 7741e4cf16c0 ("app/testpmd: VMDq and DCB updates")
|
|
Cc: stable@dpdk.org
|
|
|
|
Signed-off-by: Huisong Li <lihuisong@huawei.com>
|
|
Signed-off-by: Lijun Ou <oulijun@huawei.com>
|
|
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
|
|
---
|
|
app/test-pmd/config.c | 23 +++++++++++++++++++++--
|
|
app/test-pmd/testpmd.c | 19 -------------------
|
|
2 files changed, 21 insertions(+), 21 deletions(-)
|
|
|
|
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
|
|
index c3f9431..7af13f6 100644
|
|
--- a/app/test-pmd/config.c
|
|
+++ b/app/test-pmd/config.c
|
|
@@ -3345,6 +3345,10 @@ icmp_echo_config_setup(void)
|
|
void
|
|
fwd_config_setup(void)
|
|
{
|
|
+ struct rte_port *port;
|
|
+ portid_t pt_id;
|
|
+ unsigned int i;
|
|
+
|
|
cur_fwd_config.fwd_eng = cur_fwd_eng;
|
|
if (strcmp(cur_fwd_eng->fwd_mode_name, "icmpecho") == 0) {
|
|
icmp_echo_config_setup();
|
|
@@ -3352,9 +3356,24 @@ fwd_config_setup(void)
|
|
}
|
|
|
|
if ((nb_rxq > 1) && (nb_txq > 1)){
|
|
- if (dcb_config)
|
|
+ if (dcb_config) {
|
|
+ for (i = 0; i < nb_fwd_ports; i++) {
|
|
+ pt_id = fwd_ports_ids[i];
|
|
+ port = &ports[pt_id];
|
|
+ if (!port->dcb_flag) {
|
|
+ printf("In DCB mode, all forwarding ports must "
|
|
+ "be configured in this mode.\n");
|
|
+ return;
|
|
+ }
|
|
+ }
|
|
+ if (nb_fwd_lcores == 1) {
|
|
+ printf("In DCB mode,the nb forwarding cores "
|
|
+ "should be larger than 1.\n");
|
|
+ return;
|
|
+ }
|
|
+
|
|
dcb_fwd_config_setup();
|
|
- else
|
|
+ } else
|
|
rss_fwd_config_setup();
|
|
}
|
|
else
|
|
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
|
|
index e55d986..f9155ae 100644
|
|
--- a/app/test-pmd/testpmd.c
|
|
+++ b/app/test-pmd/testpmd.c
|
|
@@ -2112,9 +2112,7 @@ start_packet_forwarding(int with_tx_first)
|
|
{
|
|
port_fwd_begin_t port_fwd_begin;
|
|
port_fwd_end_t port_fwd_end;
|
|
- struct rte_port *port;
|
|
unsigned int i;
|
|
- portid_t pt_id;
|
|
|
|
if (strcmp(cur_fwd_eng->fwd_mode_name, "rxonly") == 0 && !nb_rxq)
|
|
rte_exit(EXIT_FAILURE, "rxq are 0, cannot use rxonly fwd mode\n");
|
|
@@ -2137,23 +2135,6 @@ start_packet_forwarding(int with_tx_first)
|
|
printf("Packet forwarding already started\n");
|
|
return;
|
|
}
|
|
-
|
|
- if (dcb_config) {
|
|
- for (i = 0; i < nb_fwd_ports; i++) {
|
|
- pt_id = fwd_ports_ids[i];
|
|
- port = &ports[pt_id];
|
|
- if (!port->dcb_flag) {
|
|
- printf("In DCB mode, all forwarding ports must "
|
|
- "be configured in this mode.\n");
|
|
- return;
|
|
- }
|
|
- }
|
|
- if (nb_fwd_lcores == 1) {
|
|
- printf("In DCB mode,the nb forwarding cores "
|
|
- "should be larger than 1.\n");
|
|
- return;
|
|
- }
|
|
- }
|
|
test_done = 0;
|
|
|
|
fwd_config_setup();
|
|
--
|
|
2.7.4
|
|
|