DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Steve Yang <stevex.yang@intel.com>, dev@dpdk.org
Cc: wenzhuo.lu@intel.com, xiaoyun.li@intel.com,
	bernard.iremonger@intel.com, thomas@monjalon.net,
	andrew.rybchenko@oktetlabs.ru, qiming.yang@intel.com
Subject: Re: [dpdk-dev] [PATCH v3 3/3] app/testpmd: fix dynamic config error
Date: Fri, 22 Jan 2021 17:15:06 +0000	[thread overview]
Message-ID: <ed84ebc6-c69c-8497-5e83-89a8053ef4e1@intel.com> (raw)
In-Reply-To: <564fad2d-3861-f4e3-2129-c0c6b3638d74@intel.com>

On 1/22/2021 5:04 PM, Ferruh Yigit wrote:
> On 1/22/2021 9:01 AM, Steve Yang wrote:
>> The offloads of 'tx/rx_conf' didn't keep up with the corresponding
>> offloads of 'dev_conf' if rx queue capability was 0, it would cause
>> the configuration invalid.
>>
>> For example:
>> Configuring 'max-pkt-len' would change 'rx_offloads' in dev_conf while
>> rx_conf.offloads of each queue still kept the old value.
>> It would cause the failure of offloads check in 'rte_eth_rx_queue_setup'.
>>
>> This patch applied tx/rx offloads configuration for each queue
>> once it changed and corresponding tx/rx queue capability was 0.
>>
>> Fixes: 5e91aeef218c ("app/testpmd: fix offload flags after port config")
>>
>> Signed-off-by: Steve Yang <stevex.yang@intel.com>
>> ---
>>   app/test-pmd/testpmd.c | 12 ++++++++++--
>>   1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
>> index a2c9aad960..8307c7f9e9 100644
>> --- a/app/test-pmd/testpmd.c
>> +++ b/app/test-pmd/testpmd.c
>> @@ -3296,7 +3296,11 @@ rxtx_port_config(struct rte_port *port)
>>       for (qid = 0; qid < nb_rxq; qid++) {
>>           offloads = port->rx_conf[qid].offloads;
>>           port->rx_conf[qid] = port->dev_info.default_rxconf;
>> -        if (offloads != 0)
>> +        if (port->dev_info.rx_queue_offload_capa == 0 &&
>> +            offloads != port->dev_conf.rxmode.offloads)
>> +            port->rx_conf[qid].offloads =
>> +                port->dev_conf.rxmode.offloads;
>> +        else if (offloads != 0)
>>               port->rx_conf[qid].offloads = offloads;
> 
> I am still concerned to use port offloads to set the queue specific offloads, 
> this may lead unexpected result.
> 
> Below is what Steve provided as reproduce steps [1], I think that is application 
> (testpmd) miss-configuration to update 'max-pkt-len' but not update the 
> JUMBO_FRAME offload flag and MTU accordingly.
> 
> What do you think update the JUMBO_FRAME offload flag (both for port and queues) 
> according and set MTU according on the testpmd command where 'max-pkt-len' is 
> set? This is more like your first version.
> 
> 
> 
> [1]
> ----------------------------------------------
> # x86_64-native-linuxapp-gcc/app/dpdk-testpmd  -c 0xf -n 4  -- -i 
> --max-pkt-len=9000 --tx-offloads=0x8000 --rxq=4 --txq=4 --disable-rss
> testpmd>  set verbose 3
> testpmd>  start
> testpmd>  stop
> testpmd>  port stop all
> testpmd>  port config all max-pkt-len 1518
> testpmd> port start all
> Configuring Port 0 (socket 1)
> Ethdev port_id=0 rx_queue_id=0, new added offloads 0x800 must be within 
> per-queue offload capabilities 0x0 in rte_eth_rx_queue_setup()
> Fail to configure port 0 rx queues//<-- Fail error info;
> ------------------------------------------------
> 

Indeed first patch of this series solves the MTU problem with "port config all 
max-pkt-len" command (although it ignores 'max_rx_pkt_len' is only valid when 
JUMBO_FRAME flag is set)

And second patch updates the JUMBO_FRAME flag in the command function, same as I 
suggested above.
Only if second patch extended to update JUMBO_FRAME flag for all queues in 
'update_jumbo_frame_offload()', this patch can be dropped, what do you think?

  reply	other threads:[~2021-01-22 17:15 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22  8:13 [dpdk-dev] [PATCH v1] app/testpmd: fix dynamic config error for max-pkt-len Steve Yang
2020-12-23  2:27 ` Li, Xiaoyun
2020-12-23  8:51 ` [dpdk-dev] [PATCH v2] app/testpmd: fix dynamic config error Steve Yang
2020-12-23  9:00   ` Li, Xiaoyun
2021-01-13  8:13   ` Chen, BoX C
2021-01-19 15:44   ` Ferruh Yigit
2021-01-22  9:01   ` [dpdk-dev] [PATCH v3 0/3] fix 'max-pkt-len' errors Steve Yang
2021-01-22  9:01     ` [dpdk-dev] [PATCH v3 1/3] ethdev: fix MTU doesn't update when jumbo frame disabled Steve Yang
2021-01-25  7:12       ` Huisong Li
     [not found]         ` <DM6PR11MB43628A600BAAEC75FFF1343BF9BD9@DM6PR11MB4362.namprd11.prod.outlook.com>
2021-01-25 12:38           ` Ferruh Yigit
2021-01-22  9:01     ` [dpdk-dev] [PATCH v3 2/3] app/testpmd: fix max-pkt-len option invalid Steve Yang
2021-01-22  9:01     ` [dpdk-dev] [PATCH v3 3/3] app/testpmd: fix dynamic config error Steve Yang
2021-01-22 17:04       ` Ferruh Yigit
2021-01-22 17:15         ` Ferruh Yigit [this message]
2021-01-25  8:32     ` [dpdk-dev] [PATCH v4 0/2] fix 'max-pkt-len' errors Steve Yang
2021-01-25  8:32       ` [dpdk-dev] [PATCH v4 1/2] ethdev: fix MTU doesn't update when jumbo frame disabled Steve Yang
2021-01-25 12:41         ` Ferruh Yigit
2021-01-25  8:32       ` [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix max-pkt-len option invalid Steve Yang
2021-01-25 14:45         ` Ferruh Yigit
2021-01-25 15:46         ` Lance Richardson
2021-01-25 17:57           ` Ferruh Yigit
2021-01-25 18:15       ` [dpdk-dev] [PATCH v5] app/testpmd: fix setting maximum packet length Ferruh Yigit
2021-01-25 19:41         ` Lance Richardson
2021-01-26  0:44           ` Ferruh Yigit
2021-01-26  3:22             ` Lance Richardson
2021-01-26  3:45             ` Lance Richardson
2021-01-26  7:54               ` Li, Xiaoyun
2021-01-26 11:01               ` Ferruh Yigit
2021-01-28 21:36                 ` Lance Richardson
2021-01-28 22:12                   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2021-01-26  9:02         ` [dpdk-dev] " Wisam Monther
2021-01-27  3:04         ` Li, Xiaoyun
2021-01-28  1:57           ` Chen, BoX C
2021-01-28  9:18         ` Wisam Monther
2021-01-28  9:26           ` Ferruh Yigit
2021-01-28 11:08             ` Wisam Monther
2021-01-28 12:07         ` [dpdk-dev] [PATCH v6] " Ferruh Yigit
2021-01-29  9:34           ` Ferruh Yigit

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=ed84ebc6-c69c-8497-5e83-89a8053ef4e1@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    --cc=stevex.yang@intel.com \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiaoyun.li@intel.com \
    /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).