* [PATCH net-next] net: remove skb_free_datagram_locked()
@ 2024-03-25 13:41 Eric Dumazet
2024-03-25 19:04 ` Simon Horman
2024-03-26 14:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2024-03-25 13:41 UTC (permalink / raw
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: netdev, eric.dumazet, Eric Dumazet, Jason Xing
Last user of skb_free_datagram_locked() went away in 2016
with commit 850cbaddb52d ("udp: use it's own memory
accounting schema").
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
---
include/linux/skbuff.h | 6 ------
net/core/datagram.c | 19 -------------------
2 files changed, 25 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 0c7c67b3a87b2351a3a65408c6d00b6eadf583bb..b945af8a620881ad07ed465cc1c46a2cf6d95333 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -4063,12 +4063,6 @@ int skb_copy_datagram_from_iter(struct sk_buff *skb, int offset,
struct iov_iter *from, int len);
int zerocopy_sg_from_iter(struct sk_buff *skb, struct iov_iter *frm);
void skb_free_datagram(struct sock *sk, struct sk_buff *skb);
-void __skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb, int len);
-static inline void skb_free_datagram_locked(struct sock *sk,
- struct sk_buff *skb)
-{
- __skb_free_datagram_locked(sk, skb, 0);
-}
int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, unsigned int flags);
int skb_copy_bits(const struct sk_buff *skb, int offset, void *to, int len);
int skb_store_bits(struct sk_buff *skb, int offset, const void *from, int len);
diff --git a/net/core/datagram.c b/net/core/datagram.c
index a8b625abe242c657dca8cd0188c236553757c6b2..e614cfd8e14a50a08c764dfed30c2e0838413a93 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -324,25 +324,6 @@ void skb_free_datagram(struct sock *sk, struct sk_buff *skb)
}
EXPORT_SYMBOL(skb_free_datagram);
-void __skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb, int len)
-{
- bool slow;
-
- if (!skb_unref(skb)) {
- sk_peek_offset_bwd(sk, len);
- return;
- }
-
- slow = lock_sock_fast(sk);
- sk_peek_offset_bwd(sk, len);
- skb_orphan(skb);
- unlock_sock_fast(sk, slow);
-
- /* skb is now orphaned, can be freed outside of locked section */
- __kfree_skb(skb);
-}
-EXPORT_SYMBOL(__skb_free_datagram_locked);
-
int __sk_queue_drop_skb(struct sock *sk, struct sk_buff_head *sk_queue,
struct sk_buff *skb, unsigned int flags,
void (*destructor)(struct sock *sk,
--
2.44.0.396.g6e790dbe36-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: remove skb_free_datagram_locked()
2024-03-25 13:41 [PATCH net-next] net: remove skb_free_datagram_locked() Eric Dumazet
@ 2024-03-25 19:04 ` Simon Horman
2024-03-26 14:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-03-25 19:04 UTC (permalink / raw
To: Eric Dumazet
Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, netdev,
eric.dumazet, Jason Xing
On Mon, Mar 25, 2024 at 01:41:55PM +0000, Eric Dumazet wrote:
> Last user of skb_free_datagram_locked() went away in 2016
> with commit 850cbaddb52d ("udp: use it's own memory
> accounting schema").
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Not that it really matters, but I think this function had just one last
user until: 4af8b42e5629 ("SUNRPC: Remove dead code in svc_tcp_release_rqst()")
In any case, this looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: remove skb_free_datagram_locked()
2024-03-25 13:41 [PATCH net-next] net: remove skb_free_datagram_locked() Eric Dumazet
2024-03-25 19:04 ` Simon Horman
@ 2024-03-26 14:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-26 14:50 UTC (permalink / raw
To: Eric Dumazet; +Cc: davem, kuba, pabeni, netdev, eric.dumazet, kerneljasonxing
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Mon, 25 Mar 2024 13:41:55 +0000 you wrote:
> Last user of skb_free_datagram_locked() went away in 2016
> with commit 850cbaddb52d ("udp: use it's own memory
> accounting schema").
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
>
> [...]
Here is the summary with links:
- [net-next] net: remove skb_free_datagram_locked()
https://git.kernel.org/netdev/net-next/c/6e0631203503
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] 3+ messages in thread
end of thread, other threads:[~2024-03-26 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-25 13:41 [PATCH net-next] net: remove skb_free_datagram_locked() Eric Dumazet
2024-03-25 19:04 ` Simon Horman
2024-03-26 14:50 ` 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.