[Devel] [PATCH RHEL7 COMMIT] net/veth: Increase veth max_mtu for k8s and weave-net

Vasily Averin vvs at virtuozzo.com
Tue Jun 15 16:05:25 MSK 2021


The commit is pushed to "branch-rh7-3.10.0-1160.31.1.vz7.181.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.31.1.vz7.181.3
------>
commit 581ddd55b1d267502eb801b12cff389d65d775c3
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date:   Tue Jun 15 16:05:25 2021 +0300

    net/veth: Increase veth max_mtu for k8s and weave-net
    
    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 <ptikhomirov at virtuozzo.com>
---
 drivers/net/veth.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 4bbe6cc..b42a3f5 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;


More information about the Devel mailing list