Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Nov 2015 16:24:34 -0800
From:      Alfred Perlstein <alfred@freebsd.org>
To:        freebsd-net@freebsd.org, Adrian Chadd <adrian@freebsd.org>
Subject:   Re: kern.ipc.sockbuf limits: anyone mind if I commit this?
Message-ID:  <56428AC2.6030600@freebsd.org>
In-Reply-To: <CAJ-VmonoMD2i%2BipM4VBduVLf3i06FqEVM5gadUM5q%2BL4ttE0ZQ@mail.gmail.com>
References:  <CAJ-VmonoMD2i%2BipM4VBduVLf3i06FqEVM5gadUM5q%2BL4ttE0ZQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 11/10/15 3:13 PM, Adrian Chadd wrote:
> hiya,
>
> there's a PR with a patch:
>
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204438
>
> https://github.com/sparrc/freebsd/commit/157f90c55d1d54d33f41c6f7517de1a9c5f5e229
>
> Does anyone know why setting the limits isn't as simple as this patch?
>
> Does anyone mind if I just commit this?
>
Don't mind too heavily, however the old behavior is bad and confusing 
however at least it stops you, however the new behavior will be odd and 
incorrect without warning.

More succinctly: Silently "accepting" but actually changing the value 
passed in seems wrong.

It would seem the reason for the calculation is to actually limit the 
number of bytes of mbufs (not just data) to the max value?  Is that true?

Maybe it makes sense to export sb_max_adj via sysctl and allow setting 
of it instead?  Having silent clipping seems worse than an error.

-Alfred



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56428AC2.6030600>