netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v1] net: af_unix: clean up spurious drop reasons
@ 2024-11-16  9:42 Donald Hunter
  2024-11-18 18:01 ` Kuniyuki Iwashima
  0 siblings, 1 reply; 3+ messages in thread
From: Donald Hunter @ 2024-11-16  9:42 UTC (permalink / raw)
  To: netdev, Jakub Kicinski, David S. Miller, Eric Dumazet,
	Paolo Abeni, Simon Horman, Kuniyuki Iwashima
  Cc: donald.hunter, Donald Hunter

Use consume_skb() instead of kfree_skb() in the happy paths to clean up
spurious NOT_SPECIFIED drop reasons.

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
---
 net/unix/af_unix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 001ccc55ef0f..90bb8556ea04 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1705,7 +1705,7 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
 		unix_state_unlock(other);
 
 out:
-	kfree_skb(skb);
+	consume_skb(skb);
 	if (newsk)
 		unix_release_sock(newsk, 0);
 	if (other)
@@ -2174,7 +2174,7 @@ static int unix_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
 		unix_state_unlock(sk);
 	unix_state_unlock(other);
 out_free:
-	kfree_skb(skb);
+	consume_skb(skb);
 out:
 	if (other)
 		sock_put(other);
-- 
2.47.0


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

* Re: [PATCH net-next v1] net: af_unix: clean up spurious drop reasons
  2024-11-16  9:42 [PATCH net-next v1] net: af_unix: clean up spurious drop reasons Donald Hunter
@ 2024-11-18 18:01 ` Kuniyuki Iwashima
  2024-11-18 22:46   ` Donald Hunter
  0 siblings, 1 reply; 3+ messages in thread
From: Kuniyuki Iwashima @ 2024-11-18 18:01 UTC (permalink / raw)
  To: donald.hunter
  Cc: davem, donald.hunter, edumazet, horms, kuba, kuniyu, netdev,
	pabeni

From: Donald Hunter <donald.hunter@gmail.com>
Date: Sat, 16 Nov 2024 09:42:36 +0000
> Use consume_skb() instead of kfree_skb() in the happy paths to clean up

Both are the unhappy paths and kfree_skb() should be used.

I have some local patches for drop reasons for AF_UNIX and
can post them after net-next is open if needed.


> spurious NOT_SPECIFIED drop reasons.
> 
> Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
> ---
>  net/unix/af_unix.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
> index 001ccc55ef0f..90bb8556ea04 100644
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -1705,7 +1705,7 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
>  		unix_state_unlock(other);
>  
>  out:
> -	kfree_skb(skb);
> +	consume_skb(skb);
>  	if (newsk)
>  		unix_release_sock(newsk, 0);
>  	if (other)
> @@ -2174,7 +2174,7 @@ static int unix_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
>  		unix_state_unlock(sk);
>  	unix_state_unlock(other);
>  out_free:
> -	kfree_skb(skb);
> +	consume_skb(skb);
>  out:
>  	if (other)
>  		sock_put(other);
> -- 
> 2.47.0

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

* Re: [PATCH net-next v1] net: af_unix: clean up spurious drop reasons
  2024-11-18 18:01 ` Kuniyuki Iwashima
@ 2024-11-18 22:46   ` Donald Hunter
  0 siblings, 0 replies; 3+ messages in thread
From: Donald Hunter @ 2024-11-18 22:46 UTC (permalink / raw)
  To: Kuniyuki Iwashima
  Cc: donald.hunter, davem, edumazet, horms, kuba, netdev, pabeni

On Mon, 18 Nov 2024 at 18:03, Kuniyuki Iwashima <kuniyu@amazon.com> wrote:
>
> From: Donald Hunter <donald.hunter@gmail.com>
> Date: Sat, 16 Nov 2024 09:42:36 +0000
> > Use consume_skb() instead of kfree_skb() in the happy paths to clean up
>
> Both are the unhappy paths and kfree_skb() should be used.
>
> I have some local patches for drop reasons for AF_UNIX and
> can post them after net-next is open if needed.

It would be really helpful if you could share the drop reasons you
have assigned to these. I am seeing ~100/s coming from containerd
which I will need to investigate if it is any kind of error condition.

Thanks,
Donald.


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

end of thread, other threads:[~2024-11-18 22:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-16  9:42 [PATCH net-next v1] net: af_unix: clean up spurious drop reasons Donald Hunter
2024-11-18 18:01 ` Kuniyuki Iwashima
2024-11-18 22:46   ` Donald Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).