From owner-freebsd-net@FreeBSD.ORG Thu Sep 8 16:01:44 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 0207F1065672; Thu, 8 Sep 2011 16:01:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C90488FC13; Thu, 8 Sep 2011 16:01:43 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 64B2346B23; Thu, 8 Sep 2011 12:01:43 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EE29B8A02E; Thu, 8 Sep 2011 12:01:42 -0400 (EDT) From: John Baldwin To: "K. Macy" Date: Thu, 8 Sep 2011 11:06:40 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <201109080834.11607.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109081106.40714.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Thu, 08 Sep 2011 12:01:43 -0400 (EDT) Cc: Ben Hutchings , freebsd-net@freebsd.org, jfv@freebsd.org, Navdeep Parhar , Takuya ASADA 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: Thu, 08 Sep 2011 16:01:44 -0000 On Thursday, September 08, 2011 10:48:25 am 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, > >> > > >> > I implemented Ethernet Flow Director sysctls to ixgbe(4), here's a detail: > >> > > >> > - 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). > >> [...] > >> > >> 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? > > > > 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. > > > > We would need to come up with some sort of standard interface (ioctls?) for > > adding filters however. > > 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. Passing strings in via sysctls isn't an ideal interface. Passing in some sort of structure via ioctl would be far more typical, and it is possible to provide API compat since the size of the structure is encoded in the ioctl itself. -- John Baldwin