On Thu, May 17, 2018 at 4:27 AM, <[email protected]> wrote:
> From: Lucas Alvares Gomes <[email protected]>
>
> The commit [0] partially fixed the problem but in RHEL 7.5 neither
> .{min, max}_mtu or 'ndo_change_mtu' were being set/implemented for
> vport-internal_dev.c.
>
Thanks Lucas for finding this bug and the fix. I take a look RHEL
7.5 kernel again, if neither ndo_change_mtu() or ndo_change_mtu_rh74()
is not implemented it should use dev_set_mtu() in ./net/core/dev.c. I
also found that the {min,max}_mtu is set in ./net/ethernet/eth.c
void ether_setup_rh(struct net_device *dev)
{
ether_setup(dev);
dev->extended->min_mtu = ETH_MIN_MTU;
dev->extended->max_mtu = ETH_DATA_LEN;
}
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;
Thanks,
-Yi-Hung
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev