Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jul 2014 10:11:06 +0000
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r268479 - head/sys/netinet
Message-ID:  <7B389A41-388C-498E-8D92-0C9B0B11D83D@FreeBSD.org>
In-Reply-To: <201407100310.s6A3AvQ5093684@svn.freebsd.org>
References:  <201407100310.s6A3AvQ5093684@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10 Jul 2014, at 03:10 , Adrian Chadd <adrian@freebsd.org> wrote:

> Author: adrian
> Date: Thu Jul 10 03:10:56 2014
> New Revision: 268479
> URL: http://svnweb.freebsd.org/changeset/base/268479
>=20
> Log:
>  Implement the first stage of multi-bind listen sockets and RSS socket
>  awareness.
>=20
>  * Introduce IP_BINDMULTI - indicating that it's okay to bind multiple
>    sockets on the same bind details.
>=20
>    Although the PCB code has been taught about this (see below) this =
patch
>    doesn't introduce the rest of the PCB changes necessary to =
distribute
>    lookups among multiple PCB entries in the global wildcard table.
>=20
>  * Introduce IP_RSS_LISTEN_BUCKET - placing an listen socket into the
>    given RSS bucket (and thus a single PCBGROUP hash.)
>=20
>  * Modify the PCB add path to be aware of IP_BINDMULTI:
>    + Only allow further PCB entries to be added if the owner =
credentials
>      and IP_BINDMULTI has been specified.  Ie, only allow further
>      IP_BINDMULTI sockets to appear if the first bind() was =
IP_BINDMULTI.
>=20
>  * Teach the PCBGROUP code about IP_RSS_LISTE_BUCKET marked PCB =
entries.
>    Instead of using the wildcard logic and hashing, these sockets are
>    simply placed into the PCBGROUP and _not_ in the wildcard hash.
>=20
>  * When doing a PCBGROUP lookup, also do a wildcard match as well.
>    This allows for an RSS bucket PCB entry to appear in a PCBGROUP
>    rather than having to exist in the wildcard list.
>=20
>  Tested:
>=20
>  * TCP IPv4 server testing with igb(4)
>  * TCP IPv4 server testing with ix(4)
>=20
>  TODO:
>=20
>  * The pcbgroup lookup code duplicated the wildcard and wildcard-PCB
>    logic.  This could be refactored into a single function.
>=20
>  * This doesn't yet work for IPv6 (The PCBGROUP code in netinet6/ =
doesn't
>    yet know about this); nor does it yet fully work for UDP.


Is there any intention to bring the feature parity in the close future?  =
I am tired of fixing this kind of stuff 6 years later;  been there, had =
to do that too often.



> Modified: head/sys/netinet/in_pcb.h
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- head/sys/netinet/in_pcb.h	Thu Jul 10 02:15:16 2014	=
(r268478)
> +++ head/sys/netinet/in_pcb.h	Thu Jul 10 03:10:56 2014	=
(r268479)
> @@ -181,7 +181,8 @@ struct inpcb {
> 	u_int	inp_refcount;		/* (i) refcount */
> 	void	*inp_pspare[5];		/* (x) route caching / general =
use */
> 	uint32_t inp_flowtype;		/* (x) M_HASHTYPE value */
> -	u_int	inp_ispare[5];		/* (x) route caching / user =
cookie /
> +	uint32_t inp_rss_listen_bucket;	/* (x) overridden RSS listen =
bucket */
> +	u_int	inp_ispare[4];		/* (x) route caching / user =
cookie /
> 					 *     general use */

Please do not use spares that were not reserved for you.


=97=20
Bjoern A. Zeeb             "Come on. Learn, goddamn it.", WarGames, 1983




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B389A41-388C-498E-8D92-0C9B0B11D83D>