All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 net-next] ipv6: rpl: Remove redundant skb_dst_drop().
@ 2023-07-10 21:35 Kuniyuki Iwashima
  2023-07-12 11:39 ` Simon Horman
  2023-07-13  0:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 6+ messages in thread
From: Kuniyuki Iwashima @ 2023-07-10 21:35 UTC (permalink / raw)
  To: David S. Miller, David Ahern, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Kuniyuki Iwashima, Kuniyuki Iwashima, netdev

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 <kuniyu@amazon.com>
---
 net/ipv6/exthdrs.c      | 2 --
 net/ipv6/rpl_iptunnel.c | 3 +--
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 202fc3aaa83c..f4bfccae003c 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -612,8 +612,6 @@ static int ipv6_rpl_srh_rcv(struct sk_buff *skb)
 
 	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 b1c028df686e..a013b92cbb86 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);
 	}
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 net-next] ipv6: rpl: Remove redundant skb_dst_drop().
  2023-07-10 21:35 [PATCH v1 net-next] ipv6: rpl: Remove redundant skb_dst_drop() Kuniyuki Iwashima
@ 2023-07-12 11:39 ` Simon Horman
  2023-07-12 14:42   ` David Ahern
  2023-07-13  0:20 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 6+ messages in thread
From: Simon Horman @ 2023-07-12 11:39 UTC (permalink / raw)
  To: Kuniyuki Iwashima
  Cc: David S. Miller, David Ahern, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Kuniyuki Iwashima, netdev

On Mon, Jul 10, 2023 at 02:35:11PM -0700, Kuniyuki Iwashima wrote:
> 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 <kuniyu@amazon.com>

Reviewed-by: Simon Horman <simon.horman@corigine.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 net-next] ipv6: rpl: Remove redundant skb_dst_drop().
  2023-07-12 11:39 ` Simon Horman
@ 2023-07-12 14:42   ` David Ahern
  2023-07-12 14:54     ` David Ahern
  2023-07-13  8:53     ` Simon Horman
  0 siblings, 2 replies; 6+ messages in thread
From: David Ahern @ 2023-07-12 14:42 UTC (permalink / raw)
  To: Simon Horman, Kuniyuki Iwashima
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Kuniyuki Iwashima, netdev

On 7/12/23 5:39 AM, Simon Horman wrote:
> On Mon, Jul 10, 2023 at 02:35:11PM -0700, Kuniyuki Iwashima wrote:
>> 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 <kuniyu@amazon.com>
> 
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
> 

I have been ignoring net-next patches since net-next status still shows
as closed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 net-next] ipv6: rpl: Remove redundant skb_dst_drop().
  2023-07-12 14:42   ` David Ahern
@ 2023-07-12 14:54     ` David Ahern
  2023-07-13  8:53     ` Simon Horman
  1 sibling, 0 replies; 6+ messages in thread
From: David Ahern @ 2023-07-12 14:54 UTC (permalink / raw)
  To: Simon Horman, Kuniyuki Iwashima
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Kuniyuki Iwashima, netdev

On 7/12/23 8:42 AM, David Ahern wrote:
> On 7/12/23 5:39 AM, Simon Horman wrote:
>> On Mon, Jul 10, 2023 at 02:35:11PM -0700, Kuniyuki Iwashima wrote:
>>> 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 <kuniyu@amazon.com>
>>
>> Reviewed-by: Simon Horman <simon.horman@corigine.com>
>>
> 
> I have been ignoring net-next patches since net-next status still shows
> as closed.

I was shown the error of my ways (i.e., pointed to the new URL for
net-next status)

Reviewed-by: David Ahern <dsahern@kernel.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 net-next] ipv6: rpl: Remove redundant skb_dst_drop().
  2023-07-10 21:35 [PATCH v1 net-next] ipv6: rpl: Remove redundant skb_dst_drop() Kuniyuki Iwashima
  2023-07-12 11:39 ` Simon Horman
@ 2023-07-13  0:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-07-13  0:20 UTC (permalink / raw)
  To: Kuniyuki Iwashima
  Cc: davem, dsahern, edumazet, kuba, pabeni, kuni1840, netdev

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 10 Jul 2023 14:35:11 -0700 you wrote:
> 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 <kuniyu@amazon.com>
> 
> [...]

Here is the summary with links:
  - [v1,net-next] ipv6: rpl: Remove redundant skb_dst_drop().
    https://git.kernel.org/netdev/net-next/c/c5ec13e38af5

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v1 net-next] ipv6: rpl: Remove redundant skb_dst_drop().
  2023-07-12 14:42   ` David Ahern
  2023-07-12 14:54     ` David Ahern
@ 2023-07-13  8:53     ` Simon Horman
  1 sibling, 0 replies; 6+ messages in thread
From: Simon Horman @ 2023-07-13  8:53 UTC (permalink / raw)
  To: David Ahern
  Cc: Kuniyuki Iwashima, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Kuniyuki Iwashima, netdev

On Wed, Jul 12, 2023 at 08:42:27AM -0600, David Ahern wrote:
> On 7/12/23 5:39 AM, Simon Horman wrote:
> > On Mon, Jul 10, 2023 at 02:35:11PM -0700, Kuniyuki Iwashima wrote:
> >> 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 <kuniyu@amazon.com>
> > 
> > Reviewed-by: Simon Horman <simon.horman@corigine.com>
> > 
> 
> I have been ignoring net-next patches since net-next status still shows
> as closed.

Yes, sorry that I may have been a bit hasty there.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-13  8:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 21:35 [PATCH v1 net-next] ipv6: rpl: Remove redundant skb_dst_drop() Kuniyuki Iwashima
2023-07-12 11:39 ` Simon Horman
2023-07-12 14:42   ` David Ahern
2023-07-12 14:54     ` David Ahern
2023-07-13  8:53     ` Simon Horman
2023-07-13  0:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.