diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-05-14 05:13:46 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-05-14 05:13:47 +0300 |
| commit | 18dc8e6d15d7a30888beec46a1e01ca0f98508fa (patch) | |
| tree | 103569c2758e9e5341cdd6d9ed3834644dba68d9 /include | |
| parent | 4ad2d53a88ed79e2596eac92f18561039bab10f5 (diff) | |
| parent | 150061a2065192d77a4f6518b6238be81dfb8321 (diff) | |
| download | linux-18dc8e6d15d7a30888beec46a1e01ca0f98508fa.tar.xz | |
Merge branch 'net-sched-refine-fq_codel-memory-limits'
Eric Dumazet says:
====================
net/sched: refine fq_codel memory limits
Packets that are associated with local sockets sk_wmem_alloc
do not really need additional memory control.
First patch makes is_skb_wmem() available to modules.
Second patch uses is_skb_wmem() in fq_codel.
====================
Link: https://patch.msgid.link/20260512094859.3673997-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/sock.h | 12 | ||||
| -rw-r--r-- | include/net/tcp.h | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index dccd3738c368..219917959b54 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1850,8 +1850,18 @@ static inline struct sock *sk_clone_lock(const struct sock *sk, const gfp_t prio struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, gfp_t priority); -void __sock_wfree(struct sk_buff *skb); void sock_wfree(struct sk_buff *skb); +#ifdef CONFIG_INET +void __sock_wfree(struct sk_buff *skb); +void tcp_wfree(struct sk_buff *skb); +#endif +static inline bool is_skb_wmem(const struct sk_buff *skb) +{ + return skb->destructor == sock_wfree || + (IS_ENABLED(CONFIG_INET) && skb->destructor == __sock_wfree) || + (IS_ENABLED(CONFIG_INET) && skb->destructor == tcp_wfree); +} + struct sk_buff *sock_omalloc(struct sock *sk, unsigned long size, gfp_t priority); void skb_orphan_partial(struct sk_buff *skb); diff --git a/include/net/tcp.h b/include/net/tcp.h index 3c4e6adb0dbd..5715e60c519a 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -390,7 +390,6 @@ static inline bool tcp_release_cb_cond(struct sock *sk) return false; } -void tcp_wfree(struct sk_buff *skb); void tcp_write_timer_handler(struct sock *sk); void tcp_delack_timer_handler(struct sock *sk); int tcp_ioctl(struct sock *sk, int cmd, int *karg); |
