From owner-freebsd-net@FreeBSD.ORG Fri Sep 9 00:31:54 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D93B2106564A; Fri, 9 Sep 2011 00:31:54 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id A41978FC08; Fri, 9 Sep 2011 00:31:54 +0000 (UTC) Received: from [209.249.190.124] (helo=gnnmac.hudson-trading.com) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1R1glq-00011b-7i; Thu, 08 Sep 2011 11:44:06 -0400 Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-1 From: George Neville-Neil In-Reply-To: Date: Thu, 8 Sep 2011 11:44:07 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <221A0471-8D58-43F8-B850-873EE2DE2B2F@neville-neil.com> References: <1315221674.3092.282.camel@deadeye> <201109080834.11607.jhb@freebsd.org> To: K. Macy X-Mailer: Apple Mail (2.1244.3) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com Cc: Takuya ASADA , John Baldwin , freebsd-net@freebsd.org, jfv@freebsd.org, Navdeep Parhar , Ben Hutchings Subject: Re: Adding Flow Director sysctls to ixgbe(4) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Sep 2011 00:31:54 -0000 On Sep 8, 2011, at 10:48 , K. Macy wrote: > On Thu, Sep 8, 2011 at 2:34 PM, John Baldwin wrote: >> On Monday, September 05, 2011 7:21:12 am Ben Hutchings wrote: >>> On Mon, 2011-09-05 at 15:51 +0900, Takuya ASADA wrote: >>>> Hi, >>>>=20 >>>> I implemented Ethernet Flow Director sysctls to ixgbe(4), here's a = detail: >>>>=20 >>>> - Adding removing signature filter >>>> On linux version of ixgbe driver, it has ability to set/remove = perfect >>>> filter from userland using ethtool command. >>>> I implemented similar feature, but on sysctl, and not perfect = filter >>>> but signature filter(which means hash collision may occurs). >>> [...] >>>=20 >>> Linux also has a generic interface to RX filtering and hashing >>> (ethtool_rxnfc) which ixgbe supports; wouldn't it be better for = FreeBSD >>> to support something like that? >>=20 >> Some sort of shared interface might be nice. The cxgb(4) and = cxgbe(4) drivers >> both provide their own tools to manipulate filters, though they do = not >> provide explicit steering IIRC. >>=20 >> We would need to come up with some sort of standard interface = (ioctls?) for >> adding filters however. >=20 > I know this must sound like nitpicking, but please don't add more > ioctls if you can avoid it. If you want to add new interfaces try to > stick with sysctl as it tends to be less prone to breakage across > releases. >=20 >=20 > The biggest problem in defining a new API is the lack of anyone with a > global overview of the functionality provided by NIC vendors and their > near-term roadmaps. It doesn't make sense to add an API that we only > know works for one or two vendors. >=20 I think this is doable. I've seen enough of these cards to know a bit of what we'd want. This is a subject we've covered in a few different BSDCans but it's probably time for a straw man. I'm not against the sysctl approach but I'll have to give this a bit more thought. The only real options are sockets, ioctls and sysctls, that I can see. Best, George