diff mbox series

[ovs-dev,1/2] ip_gre: fix IFLA_MTU ignored on NEWLINK

Message ID 1533678533-18145-1-git-send-email-gvrose8192@gmail.com
State Accepted
Headers show
Series [ovs-dev,1/2] ip_gre: fix IFLA_MTU ignored on NEWLINK | expand

Commit Message

Gregory Rose Aug. 7, 2018, 9:48 p.m. UTC
From: Xin Long <lucien.xin@gmail.com>

Upstream commit:
    From: Xin Long <lucien.xin@gmail.com>
    Date: Tue, 27 Feb 2018 19:19:39 +0800
    Subject: [PATCH] ip_gre: fix IFLA_MTU ignored on NEWLINK

    It's safe to remove the setting of dev's needed_headroom and mtu in
    __gre_tunnel_init, as discussed in [1], ip_tunnel_newlink can do it
    properly.

    Now Eric noticed that it could cover the mtu value set in do_setlink
    when creating a ip_gre dev. It makes IFLA_MTU param not take effect.

    So this patch is to remove them to make IFLA_MTU work, as in other
    ipv4 tunnels.

      [1]: https://patchwork.ozlabs.org/patch/823504/

    Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
    Reported-by: Eric Garver <e@erig.me>
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Part of this commit already made it into __gre_tunnel_init but
the piece for erspan_tunnel_init did not make it in so fix that
now.

Cc: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
---
 datapath/linux/compat/ip_gre.c | 2 --
 1 file changed, 2 deletions(-)

Comments

0-day Robot Aug. 7, 2018, 10:35 p.m. UTC | #1
Bleep bloop.  Greetings Greg Rose, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: Too many signoffs; are you missing Co-authored-by lines?
Lines checked: 55, Warnings: 0, Errors: 1


Please check this out.  If you feel there has been an error, please email aconole@bytheb.org

Thanks,
0-day Robot
diff mbox series

Patch

diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c
index 1ab7981..47ee525 100644
--- a/datapath/linux/compat/ip_gre.c
+++ b/datapath/linux/compat/ip_gre.c
@@ -1039,8 +1039,6 @@  static int erspan_tunnel_init(struct net_device *dev)
 		       erspan_hdr_len(tunnel->erspan_ver);
 	t_hlen = tunnel->hlen + sizeof(struct iphdr);
 
-	dev->needed_headroom = LL_MAX_HEADER + t_hlen + 4;
-	dev->mtu = ETH_DATA_LEN - t_hlen - 4;
 	dev->features		|= GRE_FEATURES;
 	dev->hw_features	|= GRE_FEATURES;
 	dev->priv_flags		|= IFF_LIVE_ADDR_CHANGE;