diff mbox series

[net,v2] ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags

Message ID 1604028728-31100-1-git-send-email-wenxu@ucloud.cn
State Accepted
Delegated to: David Miller
Headers show
Series [net,v2] ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags | expand

Checks

Context Check Description
jkicinski/cover_letter success Link
jkicinski/fixes_present success Link
jkicinski/patch_count success Link
jkicinski/tree_selection success Clearly marked for net
jkicinski/subject_prefix success Link
jkicinski/source_inline success Was 0 now: 0
jkicinski/verify_signedoff success Link
jkicinski/module_param success Was 0 now: 0
jkicinski/build_32bit success Errors and warnings before: 0 this patch: 0
jkicinski/kdoc success Errors and warnings before: 0 this patch: 0
jkicinski/verify_fixes success Link
jkicinski/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
jkicinski/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
jkicinski/header_inline success Link
jkicinski/stable success Stable not CCed

Commit Message

wenxu Oct. 30, 2020, 3:32 a.m. UTC
From: wenxu <wenxu@ucloud.cn>

The tunnel dvice such as vxlan, bareudp  and geneve in the lwt mode set
the outer df only based TUNNEL_DONT_FRAGMENT. 
And this is also the some behavior for gre device before switching to use 
ip_md_tunnel_xmit as the following patch.

962924f ip_gre: Refactor collect metatdata mode tunnel xmit to 
ip_md_tunnel_xmit

When the ip_gre in lwt mode xmit with ip_md_tunnel_xmi changed the rule and
make the discrepancy between handling of DF by different tunnels. So in the
ip_md_tunnel_xmit should follow the same rule like other tunnels.

Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel")
Signed-off-by: wenxu <wenxu@ucloud.cn>
---
v2: amend the commit message

 net/ipv4/ip_tunnel.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Jakub Kicinski Nov. 1, 2020, 12:22 a.m. UTC | #1
On Fri, 30 Oct 2020 11:32:08 +0800 wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
> 
> The tunnel dvice such as vxlan, bareudp  and geneve in the lwt mode set
> the outer df only based TUNNEL_DONT_FRAGMENT. 
> And this is also the some behavior for gre device before switching to use 
> ip_md_tunnel_xmit as the following patch.
> 
> 962924f ip_gre: Refactor collect metatdata mode tunnel xmit to 
> ip_md_tunnel_xmit
> 
> When the ip_gre in lwt mode xmit with ip_md_tunnel_xmi changed the rule and
> make the discrepancy between handling of DF by different tunnels. So in the
> ip_md_tunnel_xmit should follow the same rule like other tunnels.
> 
> Fixes: cfc7381b3002 ("ip_tunnel: add collect_md mode to IPIP tunnel")
> Signed-off-by: wenxu <wenxu@ucloud.cn>

Applied, thanks.
patchwork-bot+netdevbpf@kernel.org Nov. 1, 2020, 12:30 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Fri, 30 Oct 2020 11:32:08 +0800 you wrote:
> From: wenxu <wenxu@ucloud.cn>
> 
> The tunnel dvice such as vxlan, bareudp  and geneve in the lwt mode set
> the outer df only based TUNNEL_DONT_FRAGMENT.
> And this is also the some behavior for gre device before switching to use
> ip_md_tunnel_xmit as the following patch.
> 
> [...]

Here is the summary with links:
  - [net,v2] ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags
    https://git.kernel.org/netdev/net/c/20149e9eb68c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 8b04d1d..ee65c92 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -608,9 +608,6 @@  void ip_md_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
 			ttl = ip4_dst_hoplimit(&rt->dst);
 	}
 
-	if (!df && skb->protocol == htons(ETH_P_IP))
-		df = inner_iph->frag_off & htons(IP_DF);
-
 	headroom += LL_RESERVED_SPACE(rt->dst.dev) + rt->dst.header_len;
 	if (headroom > dev->needed_headroom)
 		dev->needed_headroom = headroom;