Ferruh Yigit 990912e676 ethdev: unify MTU checks
Both 'rte_eth_dev_configure()' & 'rte_eth_dev_set_mtu()' sets MTU but
have slightly different checks. Like one checks min MTU against
RTE_ETHER_MIN_MTU and other RTE_ETHER_MIN_LEN.

Checks moved into common function to unify the checks. Also this has
benefit to have common error logs.

Default 'dev_info->min_mtu' (the one set by ethdev if driver doesn't
provide one), changed to ('RTE_ETHER_MIN_LEN' - overhead). Previously it
was 'RTE_ETHER_MIN_MTU' which is min MTU for IPv4 packets. Since the
intention is to provide min MTU corresponding minimum frame size, new
default value suits better.

Suggested-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2021-10-18 19:20:21 +02:00
..
2021-08-17 08:37:52 +02:00
2021-08-17 08:37:52 +02:00
2021-10-20 08:22:41 +02:00
2021-10-18 19:20:21 +02:00
2021-10-13 22:14:59 +02:00
2021-10-05 17:03:37 +02:00
2021-07-05 15:11:30 +02:00
2021-10-08 14:58:11 +02:00
2021-08-17 08:37:52 +02:00
2021-08-17 08:37:52 +02:00
2021-08-17 08:37:52 +02:00
2021-09-30 17:38:13 +02:00
2021-08-17 08:37:52 +02:00
2021-08-17 08:37:52 +02:00
2021-10-17 14:07:03 +02:00
2021-08-17 08:37:52 +02:00
2021-10-20 10:03:55 +02:00
2021-08-17 08:37:52 +02:00
2021-10-13 22:14:59 +02:00
2021-10-20 10:00:16 +02:00
2021-08-17 08:37:52 +02:00
2021-08-17 08:37:52 +02:00
2021-08-17 08:37:52 +02:00
2021-10-05 17:03:37 +02:00
2021-08-17 08:37:52 +02:00
2021-10-20 10:00:16 +02:00