Re: git: be7c095ac99a - main - unix/dgram: bump maximum datagram size limit to 8k

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Sat, 02 Dec 2023 11:53:21 UTC
On Fri, 1 Dec 2023, Gleb Smirnoff wrote:

> The branch main has been updated by glebius:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=be7c095ac99ad29fd72b780c7d58949a38656c66
>
> commit be7c095ac99ad29fd72b780c7d58949a38656c66
> Author:     Gleb Smirnoff <glebius@FreeBSD.org>
> AuthorDate: 2023-12-01 23:37:29 +0000
> Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
> CommitDate: 2023-12-01 23:37:29 +0000
>
>    unix/dgram: bump maximum datagram size limit to 8k
>
>    This is important for wpa_supplicant operation on a crowded network.

This also unbreaks syslogd again as previously fixed based on
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260126

>    Note: we actually need an API to increase maximum datagram size on a
>    socket.  Previously SO_SNDBUF magically acted like that, but that was
>    an undocumented "feature".
>
>    Also move the comment to the proper line.  Previously it was the receive
>    buffer that imposed the limit.  Now notion of buffer size and maximum
>    datagram are separate.
>
>    Reviewed by:            bz, tuexen, karels

I discussed this but not approved this change.

We seem to be likely the only OS now enforcing (the slightly increasesd) 1988s
limits after everyone else got the behaviour from us that we were running on
for 34 years.  I still think that is not the right direction.


>    Differential Revision:  https://reviews.freebsd.org/D42830
>    PR:                     274990
> ---
> sys/kern/uipc_usrreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
> index 069294e1c963..8f5560e0f30b 100644
> --- a/sys/kern/uipc_usrreq.c
> +++ b/sys/kern/uipc_usrreq.c
> @@ -154,8 +154,8 @@ static struct task	unp_defer_task;
> #endif
> static u_long	unpst_sendspace = PIPSIZ;
> static u_long	unpst_recvspace = PIPSIZ;
> -static u_long	unpdg_maxdgram = 2*1024;
> -static u_long	unpdg_recvspace = 16*1024;	/* support 8KB syslog msgs */
> +static u_long	unpdg_maxdgram = 8*1024;	/* support 8KB syslog msgs */
> +static u_long	unpdg_recvspace = 16*1024;
> static u_long	unpsp_sendspace = PIPSIZ;	/* really max datagram size */
> static u_long	unpsp_recvspace = PIPSIZ;
>
>

-- 
Bjoern A. Zeeb                                                     r15:7