From owner-freebsd-net@freebsd.org Fri Jan 20 16:42: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 5F77CCB96AE for ; Fri, 20 Jan 2017 16:42:07 +0000 (UTC) (envelope-from gallatin@netflix.com) Received: from mail-pg0-x232.google.com (mail-pg0-x232.google.com [IPv6:2607:f8b0:400e:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27BF91100 for ; Fri, 20 Jan 2017 16:42:07 +0000 (UTC) (envelope-from gallatin@netflix.com) Received: by mail-pg0-x232.google.com with SMTP id 204so24909892pge.0 for ; Fri, 20 Jan 2017 08:42:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=N/XGNWZYH5gaYJJ9zFxEh902DzSPZ+QmSuHrAfSuMlM=; b=OeEAnvtfopm66WJLBLvWSTOXvTWdETm8XJpTanu1LAETjfbBkGMdNqIPAOHnLA+GnE RRCzARTfQGDzh3NjQmIrH5CKkWKdLqauzc3TZqVAryj4ZAEqK4TP4kpbGZujqBhOeyn0 wtDw7KssHxlSeQuNalzhvz4Ez2xGs43lv1qb8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=N/XGNWZYH5gaYJJ9zFxEh902DzSPZ+QmSuHrAfSuMlM=; b=W9ZdKEKcf2j0MtT3yD/8xP33uz+q1bsbytY/Wi4D7bQiUgHsbQNrX+jV/iIP1Ko4Og JRlIPg/wVrtqP1e5bb+GXroLzp7ltluJZnj6/dLZkRSvB8aHOCupf6BW00slrKCBpkFF QZgQWDIMkc7WvXdWqAVND9DKb5RgAGKGMNlGpyD4amRctm5h4jbdFaCGTE+H6q+Sk0J1 +Bku2gzLp0AgPHUezVWgGtDbFUIqkY/HPjTOxj4vdjlushCP688caahKNdUMFAs2ZE3A uEoLxXjh0HIEzt8IcuRdtTgZaLfH9qWgJsH+8X/K8hYoePjFgJnCLx97P0p33Fqbjvad xSbg== X-Gm-Message-State: AIkVDXLQAqv6w1IvucUJakti+R4/QbJobkCri73gGrdGmwC1vG0xAwHJjNB0L8xQsO1JIXNl X-Received: by 10.84.148.134 with SMTP id k6mr23228858pla.142.1484930526692; Fri, 20 Jan 2017 08:42:06 -0800 (PST) Received: from ?IPv6:2601:5ca:c302:a71:ec4:7aff:fe71:9cc0? ([2601:5ca:c302:a71:ec4:7aff:fe71:9cc0]) by smtp.gmail.com with ESMTPSA id y23sm18027524pfi.66.2017.01.20.08.42.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2017 08:42:06 -0800 (PST) Subject: Re: RFC: ethctl To: Kevin Bowling , freebsd-net@freebsd.org References: From: Andrew Gallatin Cc: Scott Long , 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 Message-ID: Date: Fri, 20 Jan 2017 11:42:04 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 20 Jan 2017 17:12:43 +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 16:42:07 -0000 On 01/19/2017 22:58, Kevin Bowling wrote: > Greetings, > > I'm casting a wide net in cc, try to keep the noise minimal but we need > some input from a variety of HW vendors. > > 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. > > I expect we can achieve some level of inversion so the device specific > code can live close to the driver and plug into the ethctl framework. > It should be general enough to add completely new top level commands, so > vendors can implement HW specific features. On the other hand, we > should attempt to hook into common core for features every NIC provides, > with a focus on iflib. > > I will fund Matt Macy to do the overall design and implementation. > > Regards, > Kevin Bowling, on behalf of Limelight Networks for this effort In a previous job, I was the author of a few Linux drivers (as well as FreeBSD, Solaris, OSX, ESX, etc) for Myricom NICs. IMHO, the "good" thing about ethtool was the standardized kernel API to do things like change tx/rx ring size, and enable/disable offloads. That was much nicer than having to parse ioctls and/or have custom sysctls. I think Gleb had started on this in his ifnet branch, and centralizing such features in iflib is a good carrot to encourage new drivers to use iflib. However, as a user/admin, I believed that a lot of the stuff that was in Linux's ethtool should really have been in ifconfig, and it was always a bit hard to remember which tool did which thing. I think I was spoiled by the rich configuration syntax available on FreeBSD's ifconfig. Eg, this seems more natural: ifconfig mxge0 -tso than this ethtool -K eth2 tso off Eg, I don't see why we need another tool for some of this missing "ethtool" functionality; it seems like most of it would naturally fit into ifconfig. As to other features, like writing firmware images and/or reading dumping eeprom -- these were never a natural fit for us. We already had our own tools that did just what we needed and worked across *all* OSes (even Windows!). I remember trying to figure out the ethtool way, but there was no substantial customer demand for using ethtool for this that I was aware of, and the time needed to adapt our firmware image, etc, to the ethtool format was just not possible to justify. So I think asking vendors to support a FreeBSD ethtool-ish interface for this is asking a lot. Drew