From owner-freebsd-net@freebsd.org Fri Jan 20 09:10:07 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9461FCB8EC3 for ; Fri, 20 Jan 2017 09:10:07 +0000 (UTC) (envelope-from shurd@sasktel.net) Received: from mail144c7.megamailservers.com (mail544c7.megamailservers.com [209.235.141.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A61B1783; Fri, 20 Jan 2017 09:10:05 +0000 (UTC) (envelope-from shurd@sasktel.net) X-Authenticated-User: hurds.sasktel.net X-VIP: 69.49.109.87 Received: from [192.168.0.33] (ip72-194-73-141.oc.oc.cox.net [72.194.73.141]) (authenticated bits=0) by mail144c7.megamailservers.com (8.14.9/8.13.1) with ESMTP id v0K8eF76014015; Fri, 20 Jan 2017 03:40:17 -0500 Subject: Re: RFC: ethctl To: Kevin Bowling , freebsd-net@freebsd.org Cc: Scott Long , Drew Gallatin , Navdeep Parhar , Oded Shanoon , hps@freebsd.org, Matthew Macy , jeb.j.cramer@intel.com, eric.joyner@intel.com, arybchik@freebsd.org, shurd@freebsd.org, Sean Bruno , George Neville-Neil References: From: Stephen Hurd Message-ID: Date: Fri, 20 Jan 2017 00:40:14 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CTCH-RefID: str=0001.0A020201.5881CCF2.01E4, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.2 cv=J+fa1EvS c=1 sm=1 tr=0 a=l4Y+EJuLrT/8f1z5FvEQ1g==:117 a=l4Y+EJuLrT/8f1z5FvEQ1g==:17 a=IkcTkHD0fZMA:10 a=zj8lUfYbn9cKbSo8sksA:9 a=QEXdDO2ut3YA:10 X-Mailman-Approved-At: Fri, 20 Jan 2017 12:26:55 +0000 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 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, 20 Jan 2017 09:10:07 -0000 Kevin Bowling wrote: > I have heard from several vendors the need for a NIC configuration > tool. Chelsio ships a cxgb/cxgbetool in FreeBSD as one example. > There is precedence for some nod toward a basic unified tool in Linux > ethtool. > > From your perspective, > 1) What are the common requirements? > 2) What are specialized requirements? For instance as a full TCP > offload card Chelsio needs things others wont > 3) What should it _not_ do? Several of you have experience doing > Ethernet driver dev on many platforms so we should attempt to avoid > repeating past design mistakes. Regarding #3, the current ethtool nvram access is a very poor match for how nvram is used on Broadcom devices. Treating it as a tree or at least a key/value store would make support a lot easier in the driver. Very little of the nvram contents can be addressed by offset anymore. For firmware upgrades, it's even worse. Newer Broadcom devices need to have the firmware flashed into a staging area, then have the device notified to validate the image before an upgrade is complete. The generic nvram read/write methods can't be used for firmware and a small set of critical configuration data.