From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jose Abreu Subject: Re: [RFC] ethtool: Support for driver private ioctl's Date: Fri, 6 Apr 2018 14:57:26 +0100 Message-ID: References: <20180406090702.mgzozmkkh3vuhe7w@unicorn.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Cc: Florian Fainelli , Jose Abreu , David Miller , Jakub Jelinek , Jeff Garzik , Tim Hockin , Eli Kupermann , Chris Leech , Scott Feldman , "Ben Hutchings" , Joao Pinto To: Michal Kubecek , Return-path: Received: from smtprelay4.synopsys.com ([198.182.47.9]:45828 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753120AbeDFN5d (ORCPT ); Fri, 6 Apr 2018 09:57:33 -0400 In-Reply-To: <20180406090702.mgzozmkkh3vuhe7w@unicorn.suse.cz> Sender: netdev-owner@vger.kernel.org List-ID: Hi Michal, On 06-04-2018 10:07, Michal Kubecek wrote: > On Thu, Apr 05, 2018 at 08:50:49AM -0700, Florian Fainelli wrote: >> On 04/05/2018 03:47 AM, Jose Abreu wrote: >>> Background: Synopsys Ethernet IP's have a certain number of >>> features which can be reconfigured at runtime. Giving you two >>> examples: One of the most recent one is the safety features, >>> which can be enabled/disabled and forced at runtime. Another one >>> is a Flexible RX Parser which can route specific packets to >>> specific RX DMA channels. Given that these are features specific >>> to our IP's it would not be useful to add an uniform API for this >>> because the users would only be one or two drivers ... >> Parsing of packets and directing the matched packets to specific >> queues/channels can be done through ethtool rxnfc API, tc/cls_flower as >> well, so you should really check whether those APIs don't already allow >> you to do what you want. >> >> ethtool already supports a concept of private flags, not ioctl() though >> which allows you to toggle boolean values for instance (or technically >> up to how many bits a "flag" is used to represent) is that enough or do >> you need to turn on/off the feature as well as pass configuration >> parameters? > Perhaps introducing "driver/device specific tunables" (i.e. something > like tunables or PHY tunables but specific to a particular device) could > be a way. But it could get out of control quickly and users wouldn't be > happy if they had to set the same (or almost the same) parameter under > five different names for five NIC vendors. Yeah, that wouldn't be good but I think this should be a responsibility to developer: To see if there is an existing API/ethtool entry before implementing the "tunable". I think a big concern, for me at least, is that ethtool already has a lot of options and introducing even more would lead the user to confusion ... Thanks and Best Regards, Jose Miguel Abreu > > Michal Kubecek