Re: [PATCH] docs: netlink: Correct buffer sizing info

From: Jakub Kicinski

Date: Tue May 12 2026 - 20:28:54 EST


On Tue, 12 May 2026 17:30:53 +0700 Konstantin Shabanov wrote:
> Update the docs to match the code (include/linux/netlink.h):
>
> /*
> * skb should fit one page. This choice is good for headerless malloc.
> * But we should limit to 8K so that userspace does not have to
> * use enormous buffer sizes on recvmsg() calls just to avoid
> * MSG_TRUNC when PAGE_SIZE is very large.
> */
> #if PAGE_SIZE < 8192UL
> #define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(PAGE_SIZE)
> #else
> #define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(8192UL)
> #endif

You should explain what you think the problem is in the commit message.
Maybe if you did you'd realize you're comparing kernel header comment
to user space guidance which are (obviously?) the inverse of each
other..

> Link: https://lore.kernel.org/all/20220819200221.422801-2-kuba@xxxxxxxxxx/

That's not how we refer to committed code.
--
pw-bot: reject