svn commit: r304313 - head/sys/net

Andrey V. Elsukov ae at FreeBSD.org
Sun Aug 21 18:19:46 UTC 2016


On 21.08.16 20:33, Adrian Chadd wrote:
>> Does this make sense?
> 
> Right. Let me go and look into it a little more. I think we may want 
> to revert the change (which just landed to -11, so maybe revert that 
> too) so I can test both of them out for correctness.
> 
> Andrey, I'm sorry for suggesting we back it out, but I'd like to
> make sure we don't break networking on 11. :) Is that okay? I will
> look at this tonight/tomorrow.

Hi,

I already wanted to merge it into releneg/11.0.

From my point of view it can't change anything that worked before.
1. With default config (nws_count = 1) we use only first value from
nws_array as cpuid.

 782         /*
 783          * In the event we have only one worker, shortcut and
deliver to it
 784          * without further ado.
 785          */
 786         if (nws_count == 1) {
 787                 *cpuidp = nws_array[0];
 788                 return (m);
 789         }

2. When we have nws_count equal to mp_ncpus, nws_array will contain the
same cpuid values, so *cpuidp == nws_array[*cpuidp % nws_count]. And
curcpu == nws_array[curcpu % nws_count];

3. When we have nws_count lower than mp_ncpus - it just panics.
And this commit fixes such panics. The only uncertain case is when
np_m2cpuid() returns NETISR_CPUID_NONE. In this case with
NETISR_DISPATCH_HYBRID we can get deferred dispatch due to curcpu
doesn't have netisr worker.

I think we can keep this in the release, but if you have an idea how to
improve it - just do it and then do MFC.

-- 
WBR, Andrey V. Elsukov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 559 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20160821/4b194abe/attachment.sig>


More information about the freebsd-net mailing list