Skip to content

Commit 75dff05

Browse files
edumazetkuba-moo
authored andcommitted
tcp: add const to tcp_try_rmem_schedule() and sk_rmem_schedule() skb
These functions to not modify the skb, add a const qualifier. Signed-off-by: Eric Dumazet <[email protected]> Reviewed-by: Kuniyuki Iwashima <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 445e0cc commit 75dff05

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/net/sock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ __sk_rmem_schedule(struct sock *sk, int size, bool pfmemalloc)
15531553
}
15541554

15551555
static inline bool
1556-
sk_rmem_schedule(struct sock *sk, struct sk_buff *skb, int size)
1556+
sk_rmem_schedule(struct sock *sk, const struct sk_buff *skb, int size)
15571557
{
15581558
return __sk_rmem_schedule(sk, size, skb_pfmemalloc(skb));
15591559
}

net/ipv4/tcp_input.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4888,7 +4888,7 @@ static void tcp_ofo_queue(struct sock *sk)
48884888
static bool tcp_prune_ofo_queue(struct sock *sk, const struct sk_buff *in_skb);
48894889
static int tcp_prune_queue(struct sock *sk, const struct sk_buff *in_skb);
48904890

4891-
static int tcp_try_rmem_schedule(struct sock *sk, struct sk_buff *skb,
4891+
static int tcp_try_rmem_schedule(struct sock *sk, const struct sk_buff *skb,
48924892
unsigned int size)
48934893
{
48944894
if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf ||

0 commit comments

Comments
 (0)