[ovs-dev] [PATCH] datapath: RHEL 7.5 ndo_change_mtu backward compatibility

Yi-Hung Wei yihung.wei at gmail.com
Tue Jun 12 00:56:01 UTC 2018


On Fri, May 18, 2018 at 1:41 AM, Lucas Alvares Gomes
<lucasagomes at gmail.com> wrote:
>> But as mentioned in ovs commit 6c0bf091 ("datapath: use core MTU range
>> checking in core net infra"), it might be the case that my commit [0]
>> does not set max_mtu correctly.  How about the fix in the following?
>> From what I tested, without the fix, min_mtu: 64, max_mtu: 1500, with
>> that fix, min_mtu:64 and max_mtu: 65535.
>>
>>> As pointed out by commit [0], the ndo_change_mtu function pointer has been
>>> moved from 'struct net_device_ops' to 'struct net_device_ops_extended'
>>> on RHEL 7.5.
>>>
>>> So this patch fixes the backport issue by setting the
>>> .extended.ndo_change_mtu when necessary.
>>>
>>> [0] 39ca338374abe367e28a2247bac9159695f19710
>>
>> --- a/datapath/vport-internal_dev.c
>> +++ b/datapath/vport-internal_dev.c
>> @@ -169,6 +169,8 @@ static void do_setup(struct net_device *netdev)
>>
>>  #ifdef HAVE_NET_DEVICE_WITH_MAX_MTU
>>         netdev->max_mtu = ETH_MAX_MTU;
>> +#elif HAVE_RHEL7_MAX_MTU
>> +       netdev->extended->max_mtu = ETH_MAX_MTU;
>>  #endif
>>         netdev->netdev_ops = &internal_dev_netdev_ops;
>
> Cool! I will give this a go and see if it works.
>
> Cheers,
> Lucas

Hi Lucas,

I format the patch and post in here:
https://patchwork.ozlabs.org/patch/927995/ Could you help to take a
look?

Thanks,

-Yi-Hung


More information about the dev mailing list