[dpdk-stable] patch 'app/testpmd: fix MTU after device configure' has been queued to LTS release 18.11.11

David Marchand david.marchand at redhat.com
Mon Nov 23 19:35:02 CET 2020


On Mon, Nov 23, 2020 at 6:13 PM Kevin Traynor <ktraynor at redhat.com> wrote:
> From 922feed76bd5d8fe06b95a56afabd3a95987b047 Mon Sep 17 00:00:00 2001
> From: Ferruh Yigit <ferruh.yigit at intel.com>
> Date: Fri, 13 Nov 2020 11:44:00 +0000
> Subject: [PATCH] app/testpmd: fix MTU after device configure
>
> [ upstream commit 1c21ee95cf5298fe7b6a8b7d8a997ff3c402a08f ]
>
> 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.
>
> Fixes: af75078fece3 ("first public release")
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
> Reviewed-by: Qi Zhang <qi.z.zhang at intel.com>
> Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
> Tested-by: Igor Romanov <igor.romanov at oktetlabs.ru>

Hey Kevin,

This patch has been reverted in rc5.


-- 
David Marchand



More information about the stable mailing list