DPDK patches and discussions
 help / color / mirror / Atom feed
From: Lijun Ou <oulijun@huawei.com>
To: <ferruh.yigit@intel.com>
Cc: <dev@dpdk.org>, <linuxarm@openeuler.org>
Subject: [dpdk-dev] [PATCH 2/3] app/testpmd: remove forwarding config from parsing Rx and Tx
Date: Fri, 5 Mar 2021 08:55:56 +0800	[thread overview]
Message-ID: <1614905757-33791-3-git-send-email-oulijun@huawei.com> (raw)
In-Reply-To: <1614905757-33791-1-git-send-email-oulijun@huawei.com>

From: Huisong Li <lihuisong@huawei.com>

The "fwd_config_setup()" function does release and apply for
memory of forwarding flows, and re-establish these flows when
rxq/txq or rxd/txd is changed. The function is also called by
"start_packet_forwarding()" when user executes "start" cmd.
All changes for rxq/txq or rxd/txd can be updated uniformly
when this command is executed. Therefore, it is a little
redundant in the "cmd_config_rx_tx_parsed" function.

In addition, the forwarding flows under one TC is configured
based on number of queues allocated to TC. And number of queues
allocated to TC is updated after calling  "rte_eth_dev_configure"
again. If the number of queues is reduced after configuring the
DCB, and then, release and apply for flow memory, and reinitialize
the forwarding flows under the DCB mode based on the old TC
information. As a result, null pointer may be accessed.

Like:
set nbcore 4
port stop all
port config 0 dcb vt off 4 pfc on
port start all
port stop all
port config all rxq 8
port config all txq 8

At the moment, a segmentation fault occurs.

Fixes: ce8d561418d4 ("app/testpmd: add port configuration settings")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
---
 app/test-pmd/cmdline.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 832ae70..8b0f7d5 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1837,8 +1837,6 @@ cmd_config_rx_tx_parsed(void *parsed_result,
 		return;
 	}
 
-	fwd_config_setup();
-
 	init_port_config();
 
 	cmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1);
-- 
2.7.4


  parent reply	other threads:[~2021-03-05  0:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05  0:55 [dpdk-dev] [PATCH 0/3] testpmd updates Lijun Ou
2021-03-05  0:55 ` [dpdk-dev] [PATCH 1/3] app/testpmd: support Tx mbuf free on demand cmd Lijun Ou
2021-03-05  0:55 ` Lijun Ou [this message]
2021-03-05  3:21   ` [dpdk-dev] [PATCH 2/3] app/testpmd: remove forwarding config from parsing Rx and Tx Li, Xiaoyun
2021-03-05  6:12     ` oulijun
2021-03-05  0:55 ` [dpdk-dev] [PATCH 3/3] app/testpmd: fix mixed use of RX/Rx/TX/Tx in testpmd Lijun Ou
2021-03-05  3:25   ` Li, Xiaoyun
2021-03-05  6:13     ` oulijun
2021-03-05  3:18 ` [dpdk-dev] [PATCH 0/3] testpmd updates Li, Xiaoyun
2021-03-05  6:14   ` oulijun
2021-03-05 10:22 [dpdk-dev] [PATCH 0/3] Fixes for testpmd Lijun Ou
2021-03-05 10:22 ` [dpdk-dev] [PATCH 2/3] app/testpmd: remove forwarding config from parsing Rx and Tx Lijun Ou
2021-03-23  7:50   ` Li, Xiaoyun
2021-03-24  1:00     ` oulijun
2021-03-24  1:44       ` Li, Xiaoyun
2021-03-25  3:03         ` oulijun
2021-03-29  1:53           ` Li, Xiaoyun
2021-04-02  1:44             ` oulijun
2021-04-02  2:33               ` Li, Xiaoyun
2021-04-12 10:35   ` Ferruh Yigit
2021-04-12 12:20     ` oulijun

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=1614905757-33791-3-git-send-email-oulijun@huawei.com \
    --to=oulijun@huawei.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=linuxarm@openeuler.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).