DPDK patches and discussions
 help / color / mirror / Atom feed
From: Lance Richardson <lance.richardson@broadcom.com>
To: Steve Yang <stevex.yang@intel.com>
Cc: dev@dpdk.org, "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	xiaoyun.li@intel.com,  "Iremonger,
	Bernard" <bernard.iremonger@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	 Ferruh Yigit <ferruh.yigit@intel.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	 "Yang, Qiming" <qiming.yang@intel.com>
Subject: Re: [dpdk-dev] [PATCH v4 2/2] app/testpmd: fix max-pkt-len option invalid
Date: Mon, 25 Jan 2021 10:46:07 -0500	[thread overview]
Message-ID: <CADyeNEBhU4fNbTRaiFr+bj+t6oiPKkwjyAyKQ9upufJ_HDYhGA@mail.gmail.com> (raw)
In-Reply-To: <20210125083202.38267-3-stevex.yang@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2649 bytes --]

On Mon, Jan 25, 2021 at 3:35 AM Steve Yang <stevex.yang@intel.com> wrote:
>
> Moved the setting of 'DEV_RX_OFFLOAD_JUMBO_FRAME' from
> 'cmd_config_max_pkt_len_parsed()' to 'init_config()' caused fail the case
> where 'max_rx_pkt_len' is changed from the command line via
> "port config all max-pkt-len".
>
> The 'init_config()' function is only called when testpmd is started,
> but the DEV_RX_OFFLOAD_JUMBO_FRAME setting needs to be recomputed whenever
> 'max_rx_pkt_len' changes.
>
> Define the 'update_jumbo_frame_offload()' function for both 'init_config()'
> and 'cmd_config_max_pkt_len_parsed()', and detect if 'max_rx_pkt_len'
> should be update to 1500 + overhead as default configuration. At the same
> time, the offloads of rx queue also should update the value once port
> offloads changed (e.g.: disabled JUMBO_FRAME offload via changed
> max-pkt-len, reproduce steps [1]), otherwise, it would cause unexpected
> result.
>
> [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>  port stop all
> testpmd>  port config all max-pkt-len 1518  port start all
>
> // Got fail error info without this patch
> 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;
> --------------------------------------------------------------------------
>
> Fixes: 761c4d6690 ("app/testpmd: fix max Rx packet length for VLAN packets")
>
> Signed-off-by: Steve Yang <stevex.yang@intel.com>
> ---
>  app/test-pmd/cmdline.c    |  1 +
>  app/test-pmd/parameters.c |  1 +
>  app/test-pmd/testpmd.c    | 63 ++++++++++++++++++++++++++++-----------
>  app/test-pmd/testpmd.h    |  2 ++
>  4 files changed, 50 insertions(+), 17 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index 89034c8b72..8b6b7b6206 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -1901,6 +1901,7 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
>                         printf("Unknown parameter\n");
>                         return;
>                 }
> +               update_jumbo_frame_offload(pid, false);

I'm probably missing something, but why isn't this a matter of simply calling
port_mtu_set() here (with mtu computed from max pkt len) and keeping
init_config() as currently implemented?

>         }
>
>         init_port_config();

  parent reply	other threads:[~2021-01-25 15:46 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
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 [this message]
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=CADyeNEBhU4fNbTRaiFr+bj+t6oiPKkwjyAyKQ9upufJ_HDYhGA@mail.gmail.com \
    --to=lance.richardson@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --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).