diff mbox series

[net-next,v2,04/12] gtp: drop unnecessary call to skb_dst_drop

Message ID 20201211122612.869225-5-jonas@norrbonn.se (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series gtp: IPv6 support | expand

Checks

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

Commit Message

Jonas Bonn Dec. 11, 2020, 12:26 p.m. UTC
The call to skb_dst_drop() is already done as part of udp_tunnel_xmit().

Signed-off-by: Jonas Bonn <jonas@norrbonn.se>
---
 drivers/net/gtp.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Harald Welte Dec. 12, 2020, 9:50 a.m. UTC | #1
On Fri, Dec 11, 2020 at 01:26:04PM +0100, Jonas Bonn wrote:
> The call to skb_dst_drop() is already done as part of udp_tunnel_xmit().

I must be blind, can you please point out where exactly this happens?

I don't see any skb_dst_drop in udp_tunnel_xmit_skb, and 
in iptunnel_xmit() there's only a skb_dst_set (which doesn't call skb_dst_drop internally)
Jonas Bonn Dec. 12, 2020, 11:38 a.m. UTC | #2
On 12/12/2020 10:50, Harald Welte wrote:
> On Fri, Dec 11, 2020 at 01:26:04PM +0100, Jonas Bonn wrote:
>> The call to skb_dst_drop() is already done as part of udp_tunnel_xmit().
> 
> I must be blind, can you please point out where exactly this happens?

It's in skb_scrub_packet() which is called by iptunnel_xmit().

/Jonas

> 
> I don't see any skb_dst_drop in udp_tunnel_xmit_skb, and
> in iptunnel_xmit() there's only a skb_dst_set (which doesn't call skb_dst_drop internally)
>
diff mbox series

Patch

diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index e4e57c0552ee..04d9de385549 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -515,8 +515,6 @@  static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev,
 		goto err_rt;
 	}
 
-	skb_dst_drop(skb);
-
 	/* This is similar to tnl_update_pmtu(). */
 	df = iph->frag_off;
 	if (df) {