Date: Thu, 08 Sep 2011 17:21:17 +0100 From: Ben Hutchings <bhutchings@solarflare.com> To: John Baldwin <jhb@freebsd.org> Cc: Takuya ASADA <syuu@dokukino.com>, freebsd-net@freebsd.org, jfv@freebsd.org, "K. Macy" <kmacy@freebsd.org>, Navdeep Parhar <np@freebsd.org> Subject: Re: Adding Flow Director sysctls to ixgbe(4) Message-ID: <1315498877.2804.10.camel@bwh-desktop> In-Reply-To: <201109081106.40714.jhb@freebsd.org> References: <CALG4x-W99OZxd=1ZDvW4=MBqeE3RPOazc7jc_3O30X-Pou3k8Q@mail.gmail.com> <201109080834.11607.jhb@freebsd.org> <CAHM0Q_POUXeEBH2T00zDbzGh-4iuN2iML8L87_xreHr_O%2B29rg@mail.gmail.com> <201109081106.40714.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2011-09-08 at 11:06 -0400, John Baldwin wrote: > On Thursday, September 08, 2011 10:48:25 am K. Macy wrote: > > On Thu, Sep 8, 2011 at 2:34 PM, John Baldwin <jhb@freebsd.org> 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. Whatever the mechanism is, the interface should allow for: - Flexible matching on layer 2, 3 and 4 header fields - Masking out some bits before matching (e.g. ignoring priority bits of VLAN tag or least significant bits of IPv4 address) - Priority of rules in case several match a single flow. This may need to be combined with location, since in a TCAM location may determine priority. - Requesting packets to be dropped, steered to a single RX queue, or steered to a range of RX queues (using a flow hash and indirection table) - Use of multiple hash indirection tables Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1315498877.2804.10.camel>