[dpdk-dev] [RFC 1/6] ethdev: add min/max MTU to device info

Andrew Rybchenko arybchenko at solarflare.com
Mon Feb 25 08:40:30 CET 2019


On 2/20/19 6:57 PM, Ian Stokes wrote:
> From: Stephen Hemminger <stephen at networkplumber.org>
>
> This addresses the usability issue raised by OVS at DPDK Userspace
> summit. It adds general min/max mtu into device info. For compatiablity,
> and to save space, it fits in a hole in existing structure.
>
> The initial version sets max mtu to normal Ethernet, it is up to
> PMD to set larger value if it supports Jumbo frames.
>
> Also remove the deprecation notice introduced in 18.11 regarding this
> change.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> Signed-off-by: Ian Stokes <ian.stokes at intel.com>
> ---

[...]

> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
> index 0d192a24b..f089af94d 100644
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> @@ -2527,6 +2527,8 @@ rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info)
>   	dev_info->rx_desc_lim = lim;
>   	dev_info->tx_desc_lim = lim;
>   	dev_info->device = dev->device;
> +	dev_info->min_mtu = ETHER_MIN_MTU;
> +	dev_info->max_mtu = ETHER_MTU;

I think it should be set to UINT16_MAX to avoid breakage of jumbo frame
support just after the patch. When all in tree drivers are updated, it 
can be
set to ETHER_MTU, but it should in with UINT16_MAX value.

with above issue fixed
Acked-by: Andrew Rybchenko <arybchenko at solarflare.com>



More information about the dev mailing list