From owner-svn-src-head@FreeBSD.ORG Thu Jul 10 10:11:16 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AED09678; Thu, 10 Jul 2014 10:11:16 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3F59D28D8; Thu, 10 Jul 2014 10:11:16 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id C7B1825D3A9A; Thu, 10 Jul 2014 10:11:13 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id DF1F1C22BA7; Thu, 10 Jul 2014 10:11:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id iWbZ8TTYzSbx; Thu, 10 Jul 2014 10:11:11 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (unknown [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B2F2FC22B95; Thu, 10 Jul 2014 10:11:09 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: svn commit: r268479 - head/sys/netinet From: "Bjoern A. Zeeb" In-Reply-To: <201407100310.s6A3AvQ5093684@svn.freebsd.org> Date: Thu, 10 Jul 2014 10:11:06 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <7B389A41-388C-498E-8D92-0C9B0B11D83D@FreeBSD.org> References: <201407100310.s6A3AvQ5093684@svn.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.1878.2) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 10:11:16 -0000 On 10 Jul 2014, at 03:10 , Adrian Chadd 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