DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
	Steve Yang <stevex.yang@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Olivier Matz <olivier.matz@6wind.com>,
	Lance Richardson <lance.richardson@broadcom.com>,
	Igor Romanov <Igor.Romanov@oktetlabs.ru>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix MTU after device configure
Date: Fri, 13 Nov 2020 16:01:29 +0000	[thread overview]
Message-ID: <084f5e74-ea7f-fa92-7399-92765e0aa883@intel.com> (raw)
In-Reply-To: <336c632d-a0b0-464d-09a1-881c2b3f74ff@oktetlabs.ru>

On 11/13/2020 2:53 PM, Andrew Rybchenko wrote:
> On 11/13/20 2:44 PM, Ferruh Yigit wrote:
>> In 'rte_eth_dev_configure()', if 'DEV_RX_OFFLOAD_JUMBO_FRAME' is not set
>> the max frame size is limited to 'RTE_ETHER_MAX_LEN' (1518).
>> This is mistake because for the PMDs that has frame size bigger than
>> "RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN" (18 bytes), the MTU becomes
>> less than 1500, causing a valid frame with 1500 bytes payload to be
>> dropped.
>> Since 'rte_eth_dev_set_mtu()' works as expected, it is called after
>> 'rte_eth_dev_configure()' to fix the MTU.
>> It may look redundant to set MTU after 'rte_eth_dev_configure()', both
>> with default values, but it is not, the resulting MTU config can be
>> different in the device based on frame overhead of the PMD.
>> And instead of setting the MTU to default value, it is first get via
>> 'rte_eth_dev_get_mtu()' and set again, this is to cover cases MTU
>> changed from testpmd command line.
>> 'rte_eth_dev_set_mtu()', '-ENOTSUP' error is ignored to prevent
>> irrelevant warning messages for the virtual PMDs.
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>> Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>
> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Tested-by: Igor Romanov <igor.romanov@oktetlabs.ru>

Applied to dpdk-next-net/main, thanks.

  reply	other threads:[~2020-11-13 16:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-05 18:09 [dpdk-dev] [RFC] " Ferruh Yigit
2020-11-11 12:58 ` Ferruh Yigit
2020-11-13 10:37 ` Zhang, Qi Z
2020-11-13 11:44 ` [dpdk-dev] [PATCH] " Ferruh Yigit
2020-11-13 14:53   ` Andrew Rybchenko
2020-11-13 16:01     ` Ferruh Yigit [this message]
2020-11-16 18:50   ` Ferruh Yigit
2020-11-16 20:24     ` Thomas Monjalon

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=084f5e74-ea7f-fa92-7399-92765e0aa883@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=Igor.Romanov@oktetlabs.ru \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=lance.richardson@broadcom.com \
    --cc=olivier.matz@6wind.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stevex.yang@intel.com \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.com \


* 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).