990912e676
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>