Skip to content

Commit e51edea

Browse files
0x7f454c46kuba-moo
authored andcommitted
net/netlink: Correct the comment on netlink message max cap
Since commit d35c99f ("netlink: do not enter direct reclaim from netlink_dump()") the cap is 32KiB. Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Link: https://patch.msgid.link/20241113-tcp-md5-diag-prep-v2-5-00a2a7feb1fa@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 2532390 commit e51edea

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

net/netlink/af_netlink.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,7 @@ static int netlink_dump(struct sock *sk, bool lock_taken)
22642264
goto errout_skb;
22652265

22662266
/* NLMSG_GOODSIZE is small to avoid high order allocations being
2267-
* required, but it makes sense to _attempt_ a 16K bytes allocation
2267+
* required, but it makes sense to _attempt_ a 32KiB allocation
22682268
* to reduce number of system calls on dump operations, if user
22692269
* ever provided a big enough buffer.
22702270
*/
@@ -2286,7 +2286,7 @@ static int netlink_dump(struct sock *sk, bool lock_taken)
22862286
goto errout_skb;
22872287

22882288
/* Trim skb to allocated size. User is expected to provide buffer as
2289-
* large as max(min_dump_alloc, 16KiB (mac_recvmsg_len capped at
2289+
* large as max(min_dump_alloc, 32KiB (max_recvmsg_len capped at
22902290
* netlink_recvmsg())). dump will pack as many smaller messages as
22912291
* could fit within the allocated skb. skb is typically allocated
22922292
* with larger space than required (could be as much as near 2x the

0 commit comments

Comments
 (0)