From owner-freebsd-arch@FreeBSD.ORG Wed May 27 05:30:02 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DD9A1065670; Wed, 27 May 2009 05:30:02 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206192061.chello.pl [87.206.192.61]) by mx1.freebsd.org (Postfix) with ESMTP id BA3488FC13; Wed, 27 May 2009 05:30:01 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id C594545CDD; Wed, 27 May 2009 07:29:58 +0200 (CEST) Received: from localhost (chello087206192061.chello.pl [87.206.192.61]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 58D2E45CAC; Wed, 27 May 2009 07:29:53 +0200 (CEST) Date: Wed, 27 May 2009 07:29:54 +0200 From: Pawel Jakub Dawidek To: Kip Macy Message-ID: <20090527052954.GC4204@garage.freebsd.pl> References: <20090526135547.GE1491@garage.freebsd.pl> <3c1674c90905262217k7a75b73fsab25c2ef93993e18@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="z6Eq5LdranGa6ru8" Content-Disposition: inline In-Reply-To: <3c1674c90905262217k7a75b73fsab25c2ef93993e18@mail.gmail.com> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: adrian@freebsd.org, trasz@freebsd.org, julian@elischer.org, freebsd-arch@freebsd.org Subject: Re: IP_NONLOCALOK improvements. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2009 05:30:02 -0000 --z6Eq5LdranGa6ru8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 26, 2009 at 10:17:32PM -0700, Kip Macy wrote: > On Tue, May 26, 2009 at 6:55 AM, Pawel Jakub Dawidek wr= ote: > > Now that we have IP_NONLOCALOK IP socket option (which is something I > > need a lot for my company's stuff) I started to hack on it a bit. > > > > OpenBSD has SO_BINDANY SOL_SOCKET option for some time now. So first of > > all I wanted to do the same for FreeBSD. Unfortunately we ran out of > > space in so_options - it is u_short and all possible values are already Actually so_options is short, not u_short, sorry about that. The size stays the same. > > taken. As a side note there is SO_NO_DDP option that is used only in > > cxgb driver and nowhere else. This seems like a waste of very important > > bit (sonner or later someone will need yet another socket option). >=20 > Wouldn't now (before 8.0) be a good time to expand it beyond 16 bits > rather than artificially restricting ourselves? We can do that anyway. I'd prefer not to change it to SO_BINDANY, because I'd like to MFC it and we won't be able to MFC so_options enlargement. There is also an argument that this functionality more fits as IP socket option than socket socket option. We could do something more complex, though: - Remove SO_NO_DDP from 7 (replace it with SO_BINDANY), as I don't see any users of SO_NO_DDP, at least in our tree. - Expand so_options in HEAD and add SO_NO_DDP back. But I'll left this for others to decide, as I might not be aware of the consequences of so_options type change. All I know is that there are places in the code that assume so_options is 16bit long (like tw_so_options field in tcptw structure) and xsocket structure visible in userland will also be changed. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --z6Eq5LdranGa6ru8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKHM/QForvXbEpPzQRAlSOAJkBNK+YriySqoyuG94SQRPVzmA5qgCfXoSD vuEoNI+S4iXcNWC7TFyDi2E= =v97J -----END PGP SIGNATURE----- --z6Eq5LdranGa6ru8--