From patchwork Sat May 19 00:49:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Rose X-Patchwork-Id: 916696 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gHQL35lJ"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40nmnx3PkHz9s4w for ; Sat, 19 May 2018 10:56:37 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 99E96D54; Sat, 19 May 2018 00:50:25 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 11BE9CD8 for ; Sat, 19 May 2018 00:50:07 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-pl0-f66.google.com (mail-pl0-f66.google.com [209.85.160.66]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C35F6473 for ; Sat, 19 May 2018 00:50:06 +0000 (UTC) Received: by mail-pl0-f66.google.com with SMTP id az12-v6so5496156plb.8 for ; Fri, 18 May 2018 17:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kquidjQ5Vnu6ceI5R0QyNVt1ojyw0m3pIIJCds7JAoQ=; b=gHQL35lJ2PqacDCkSfrMv5Qf35xskWHOgaqvYyNoZ6x9lXNAdCDpSwocXBp6z2O8/c FCbfa36C6xgqHpHG+vNwV/10dZRRmEtB/8+T5di0MNcO8Cnn0+VCYmAlXXfbBVVsYKY3 UqqVQgqZ/xhP8elgnuBZaE0U1KA3O1XV3x7Dr2/BecyCsob2YnD/2/i+mn8HyjkYbt4p ZIf2QJgccot6gxmq0DEUrvSsTpS23uyr+9LpB/xBRxZRl8M6EK4CScUgKZCiyd+Sdxeq bMC0e74R15y7bPAMz/0debFhu+GsZZoj4wLcqEu+/HjC7EkpNlki013mCIPPlPFRPukY QtTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kquidjQ5Vnu6ceI5R0QyNVt1ojyw0m3pIIJCds7JAoQ=; b=krmJHDjNf88BFXTTBYVTFLHnVlKZi5t7oKj8ZrA5xymTafyZrplVA4h3zPSOCKk+PA 1N3B5z7/Rn0FTF9ksMA4tlgQMfRDFg3tAxklK6n75Owgac498W99+QMniaOUWOE2m6eT d8MD8F/HxS4tUEDGcP1bwPhZsAmTOkbm/xL1jWFJhxvurKVMro1SzkdeTxeGOqhBYK2h lvYnnkPHHdZ9LL1yHX66uU0PAWmRSeh9k1og4xX1FW5Di6UNBJtFyGDSBobJQAAu5zUU MxVHvdkEDCvBATGEfuAPX0cxR9dsB4aLCHEFwJoSdaIZXyQInNUMJyCq8oZ3GPRkrsKt ijlQ== X-Gm-Message-State: ALKqPwc6s30We4UtMM31sCvLr5suiJhGF+JZBw7Le/CQzJYtALfIW2rv l5ib0Nf7uCxEGcaTv6o/iPk+mg== X-Google-Smtp-Source: AB8JxZrnpC/qRqWzPYxB2GftUnas5E7sOe1Ver/5xn8QWbQn0ti3My/eVYMdoOLsLiBbuNN/8joFSA== X-Received: by 2002:a17:902:8:: with SMTP id 8-v6mr11351065pla.287.1526691006152; Fri, 18 May 2018 17:50:06 -0700 (PDT) Received: from gizo.domain (97-115-125-157.ptld.qwest.net. [97.115.125.157]) by smtp.gmail.com with ESMTPSA id 131-v6sm13536685pfa.128.2018.05.18.17.50.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 17:50:05 -0700 (PDT) From: Greg Rose To: dev@openvswitch.org Date: Fri, 18 May 2018 17:49:22 -0700 Message-Id: <1526690988-29912-15-git-send-email-gvrose8192@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1526690988-29912-1-git-send-email-gvrose8192@gmail.com> References: <1526690988-29912-1-git-send-email-gvrose8192@gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Xin Long Subject: [ovs-dev] [PATCH V3 14/40] ip_gre: remove the incorrect mtu limit for ipgre tap X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Xin Long Upstream commit: commit cfddd4c33c254954927942599d299b3865743146 Author: Xin Long Date: Mon Dec 18 14:24:35 2017 +0800 ip_gre: remove the incorrect mtu limit for ipgre tap ipgre tap driver calls ether_setup(), after commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which is [68, 1500] by default. It causes the dev mtu of the ipgre tap device to not be greater than 1500, this limit value is not correct for ipgre tap device. Besides, it's .change_mtu already does the right check. So this patch is just to set max_mtu as 0, and leave the check to it's .change_mtu. Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") Reported-by: Jianlin Shi Signed-off-by: Xin Long Signed-off-by: David S. Miller Cc: Xin Long Signed-off-by: Greg Rose Acked-by: William Tu --- datapath/linux/compat/ip_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c index 028586c..f849971 100644 --- a/datapath/linux/compat/ip_gre.c +++ b/datapath/linux/compat/ip_gre.c @@ -367,6 +367,7 @@ static int gre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *unused_tpi) if (unlikely(tpi.proto == htons(ETH_P_ERSPAN))) { if (erspan_rcv(skb, &tpi, hdr_len) == PACKET_RCVD) return 0; + goto drop; } if (ipgre_rcv(skb, &tpi, hdr_len) == PACKET_RCVD) @@ -390,7 +391,6 @@ static int gre_rcv(struct sk_buff *skb, const struct tnl_ptk_info *__tpi) if (ipgre_rcv(skb, &tpi, 0) == PACKET_RCVD) return 0; - drop: kfree_skb(skb); @@ -1182,6 +1182,7 @@ static void ipgre_tunnel_setup(struct net_device *dev) static void ipgre_tap_setup(struct net_device *dev) { ether_setup(dev); + dev->max_mtu = 0; dev->netdev_ops = &gre_tap_netdev_ops; dev->priv_flags |= IFF_LIVE_ADDR_CHANGE; ip_tunnel_setup(dev, gre_tap_net_id);