[dpdk-dev] [RFC 1/6] ethdev: add min/max MTU to device info
Ian Stokes
ian.stokes at intel.com
Wed Feb 27 22:48:50 CET 2019
On 2/25/2019 7:40 AM, Andrew Rybchenko wrote:
> 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>
>
Thanks for the feedback Andrew, I've made the change and submitted a v1
of the series (link below), I've added your ack to this patch
specifically in the series also if that's ok.
http://mails.dpdk.org/archives/dev/2019-February/125319.html
Thanks
Ian
More information about the dev
mailing list