diff options
| author | Eric Dumazet <edumazet@google.com> | 2026-04-09 10:11:47 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-04-12 09:07:53 -0700 |
| commit | f5148298b0fe18cc91f07584bd0f75cbace3cece (patch) | |
| tree | 9e985ad0d20e48bdfd8fac2de06adc865bd3c822 /include | |
| parent | 4431c239a3010c12147d166c409ad6867d08f2f1 (diff) | |
| download | lwn-f5148298b0fe18cc91f07584bd0f75cbace3cece.tar.gz lwn-f5148298b0fe18cc91f07584bd0f75cbace3cece.zip | |
tcp: return a drop_reason from tcp_add_backlog()
Part of a stack canary removal from tcp_v{4,6}_rcv().
Return a drop_reason instead of a boolean, so that we no longer
have to pass the address of a local variable.
$ scripts/bloat-o-meter -t vmlinux.old vmlinux.new
add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-37 (-37)
Function old new delta
tcp_v6_rcv 3133 3129 -4
tcp_v4_rcv 3206 3202 -4
tcp_add_backlog 1281 1252 -29
Total: Before=25567186, After=25567149, chg -0.00%
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260409101147.1642967-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/tcp.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 6156d1d068e1..fce4b653c23e 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1680,8 +1680,7 @@ static inline bool tcp_checksum_complete(struct sk_buff *skb) __skb_checksum_complete(skb); } -bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb, - enum skb_drop_reason *reason); +enum skb_drop_reason tcp_add_backlog(struct sock *sk, struct sk_buff *skb); static inline int tcp_filter(struct sock *sk, struct sk_buff *skb, enum skb_drop_reason *reason) |
