We see that k8s weave-net tries to create veth with mtu = 65535 for some
reason, which is allowed in newer mainstream (and vz8) kernel with patch
[1], but not allowed in RHEL7. Before this patch in RH7 ether_setup_rh
sets it to ETH_DATA_LEN (1500).

We already have similar hunk increasing mtu in br_dev_setup() from [1],
so let's also port the hunk from veth_setup().

https://jira.sw.ru/browse/PSBM-130575

(cherry-pick one hunk from commit 91572088e3fd ("net: use core MTU range
checking in core net infra")) [1]
Signed-off-by: Pavel Tikhomirov <[email protected]>
---
 drivers/net/veth.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 4bbe6cc762f9..b42a3f5fe3df 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -411,6 +411,7 @@ static void veth_setup(struct net_device *dev)
                             ~(NETIF_F_HW_VLAN_CTAG_TX | 
NETIF_F_HW_VLAN_STAG_TX);
        dev->extended->needs_free_netdev = true;
        dev->extended->priv_destructor = veth_dev_free;
+       dev->extended->max_mtu = ETH_MAX_MTU;
 
        dev->hw_features = VETH_FEATURES;
        dev->hw_enc_features = VETH_FEATURES;
-- 
2.31.1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to