From owner-freebsd-net@FreeBSD.ORG Thu Sep 8 14:48:27 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 128DC1065707; Thu, 8 Sep 2011 14:48:27 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8D61E8FC13; Thu, 8 Sep 2011 14:48:26 +0000 (UTC) Received: by vxi39 with SMTP id 39so659514vxi.13 for ; Thu, 08 Sep 2011 07:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=FsKeXPjM7TYfto9iqWcVGqvvPAthWhfTYgX0jvoow8Q=; b=B2OgapadFjuP+B5vgYTDt8EsG4taoky9eTqDp5OLq0q7sm8OUUvlUQfl6B/s1QnhnB Ye9yyMI6Wg7vgnxSudsFFS3sHoWlwo4Ic0j41NzG3QbGpQQiUUEgJzmZTeGEc2XUwosa Gzmpt7zDJbCLWRtOKszzQbb2Ud03xduBUItzg= MIME-Version: 1.0 Received: by 10.52.90.37 with SMTP id bt5mr772895vdb.364.1315493305745; Thu, 08 Sep 2011 07:48:25 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.52.113.169 with HTTP; Thu, 8 Sep 2011 07:48:25 -0700 (PDT) In-Reply-To: <201109080834.11607.jhb@freebsd.org> References: <1315221674.3092.282.camel@deadeye> <201109080834.11607.jhb@freebsd.org> Date: Thu, 8 Sep 2011 16:48:25 +0200 X-Google-Sender-Auth: lCxXXFzOrKzeOff--jMk_wVtv_I Message-ID: From: "K. Macy" To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 14:48:27 -0000 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 det= ail: >> > >> > - 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. =A0The 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?) f= or > 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. 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. Cheers