From: Kuniyuki Iwashima Date: Mon, 10 Jul 2023 21:35:11 +0000 (-0700) Subject: ipv6: rpl: Remove redundant skb_dst_drop(). X-Git-Tag: v6.6.7~2079^2~408 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5ec13e38af5527f69f647c46ce15ebaa6b35e6c;p=platform%2Fkernel%2Flinux-starfive.git ipv6: rpl: Remove redundant skb_dst_drop(). RPL code has a pattern where skb_dst_drop() is called before ip6_route_input(). However, ip6_route_input() calls skb_dst_drop() internally, so we need not call skb_dst_drop() before ip6_route_input(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20230710213511.5364-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski --- diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 202fc3a..f4bfcca 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -612,8 +612,6 @@ looped_back: kfree(buf); - skb_dst_drop(skb); - ip6_route_input(skb); if (skb_dst(skb)->error) { diff --git a/net/ipv6/rpl_iptunnel.c b/net/ipv6/rpl_iptunnel.c index b1c028d..a013b92 100644 --- a/net/ipv6/rpl_iptunnel.c +++ b/net/ipv6/rpl_iptunnel.c @@ -272,8 +272,6 @@ static int rpl_input(struct sk_buff *skb) dst = dst_cache_get(&rlwt->cache); preempt_enable(); - skb_dst_drop(skb); - if (!dst) { ip6_route_input(skb); dst = skb_dst(skb); @@ -284,6 +282,7 @@ static int rpl_input(struct sk_buff *skb) preempt_enable(); } } else { + skb_dst_drop(skb); skb_dst_set(skb, dst); }