From owner-freebsd-net@freebsd.org Sun Aug 21 18:19:46 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B581DBC1808 for ; Sun, 21 Aug 2016 18:19:46 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx2.freebsd.org", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D9541741; Sun, 21 Aug 2016 18:19:46 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from butcher-nb.yandex.net (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 43DBC1BE0; Sun, 21 Aug 2016 18:19:44 +0000 (UTC) (envelope-from ae@FreeBSD.org) Subject: Re: svn commit: r304313 - head/sys/net To: Adrian Chadd , "Robert N. M. Watson" References: <201608172021.u7HKLXJ4001584@repo.freebsd.org> <28FA9F29-FA29-4547-875D-0734DA120636@FreeBSD.org> Cc: FreeBSD Net From: "Andrey V. Elsukov" Message-ID: <16924228-a88c-4d6e-0d51-fedcbec1594d@FreeBSD.org> Date: Sun, 21 Aug 2016 21:18:08 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xWfcuEjsaLAh3S7Js3GpIK5BUD5oO6eRu" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Aug 2016 18:19:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xWfcuEjsaLAh3S7Js3GpIK5BUD5oO6eRu Content-Type: multipart/mixed; boundary="2dnJljW57eP1BrPApK1fSenC2Wa0Px8Dk" From: "Andrey V. Elsukov" To: Adrian Chadd , "Robert N. M. Watson" Cc: FreeBSD Net Message-ID: <16924228-a88c-4d6e-0d51-fedcbec1594d@FreeBSD.org> Subject: Re: svn commit: r304313 - head/sys/net References: <201608172021.u7HKLXJ4001584@repo.freebsd.org> <28FA9F29-FA29-4547-875D-0734DA120636@FreeBSD.org> In-Reply-To: --2dnJljW57eP1BrPApK1fSenC2Wa0Px8Dk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 21.08.16 20:33, Adrian Chadd wrote: >> Does this make sense? >=20 > Right. Let me go and look into it a little more. I think we may want=20 > to revert the change (which just landed to -11, so maybe revert that=20 > too) so I can test both of them out for correctness. >=20 > 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. =46rom my point of view it can't change anything that worked before. 1. With default config (nws_count =3D 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 =3D=3D 1) { 787 *cpuidp =3D 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 =3D=3D nws_array[*cpuidp % nws_count]. And curcpu =3D=3D 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. --=20 WBR, Andrey V. Elsukov --2dnJljW57eP1BrPApK1fSenC2Wa0Px8Dk-- --xWfcuEjsaLAh3S7Js3GpIK5BUD5oO6eRu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEsBAEBCAAWBQJXufBgDxxhZUBmcmVlYnNkLm9yZwAKCRABxeoEEMihenDECACL hAqjc6CMoZUZwxGs+34akG8xzIt9OZopsIkIXMHHW2gG30CVXH2cppivtaxv+o41 HyR302PnaeyTE3iRryKQOyzZ3sB+6NWFNrgG84BnkdBVaXTyYdoq36emzPw5Zbji m2VxkTNwXTXpPLiH5U/xL+YyMx724QLC33dRbt6USTUTeBAxM2EpW741g/dfB6W0 /wrbwH/KapVAo9ceIXBIlUr+XYWo+iRk8Mwdj7GwoVl526zHs5SJlKqsMJLPGT4e 2TBn7VR7SwvCOnkGiQrGCmM+L2uIuQ7k0nUzaS1/GOiX41bX3DxkkXkjmSHxBqMx 0/FI0c0Nz7OtOfbc1ZjM =gNzd -----END PGP SIGNATURE----- --xWfcuEjsaLAh3S7Js3GpIK5BUD5oO6eRu--