svn commit: r347418 - head/sys/net

Kristof Provost kp at FreeBSD.org
Tue May 19 21:47:12 UTC 2020


On 19 May 2020, at 17:02, Andrew Gallatin wrote:
> On 2020-05-19 04:21, Kristof Provost wrote:
>
>> The if_bnxt driver initialises |.isc_nrxd_max = {INT32_MAX, 
>> INT32_MAX, INT32_MAX},|, so presumably that’s the cause.
>> I don’t know what a sane value would be though. I’ve defaulted to 
>> 4096 (because that’s what some other iflib users seems to do) for 
>> now, and that seems to work. It doesn’t panic and I can get traffic 
>> through it at least:
>
> You seem to be setting the max, not the default, and 4K max 
> descriptors on a 100g device is going to basically cripple it.
>
Yeah, I just grabbed whatever number other iflib users used. My 
immediate concern was to get it to stop panicking.

> How about setting to the next power of 2 below max int so as to keep 
> with the authors intent?
>
Makes sense, yes.

> If we don't already have a macro, something like  (INT32_MAX >> 1) + 1
>
https://reviews.freebsd.org/D24922

Best regards,
Kristof


More information about the svn-src-head mailing list