Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:39832 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755360AbeCSNhB (ORCPT ); Mon, 19 Mar 2018 09:37:01 -0400 Date: Mon, 19 Mar 2018 09:36:57 -0400 (EDT) Message-Id: <20180319.093657.276061255844405174.davem@davemloft.net> To: igor.russkikh@aquantia.com Cc: netdev@vger.kernel.org, darcari@redhat.com, pavel.belous@aquantia.com Subject: Re: [PATCH net 4/7] net: aquantia: Add aq_tx_clean_budget and valid budget handling logic From: David Miller In-Reply-To: <786f8d29-241d-c5ec-033b-e0f60dea8291@aquantia.com> References: <33a3d54c44403ea0f56d4881341cb94cd22e08fc.1521192913.git.igor.russkikh@aquantia.com> <20180316.145137.1684632029426990322.davem@davemloft.net> <786f8d29-241d-c5ec-033b-e0f60dea8291@aquantia.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Igor Russkikh Date: Mon, 19 Mar 2018 14:18:55 +0300 > > Hi David, > > Thanks for the comments. > >>> >>> +unsigned aq_tx_clean_budget = 256; >>> +module_param_named(aq_tx_clean_budget, aq_tx_clean_budget, uint, 0644); >>> +MODULE_PARM_DESC(aq_tx_clean_budget, "Maximum descriptors to cleanup on TX at once"); >>> + >>> static void aq_nic_update_ndev_stats(struct aq_nic_s *self); >> >> Please do not add driver private module parameter knobs like this. >> >> Instead, please use a existing, device agnostic, runtime, >> configuration mechanism to control this. > > I'm not aware of any existing standard way to configure tx cleanup budget. > Many drivers just have it hardcoded via define. Is that what you suggest then? You can hard code it, or find some way to make ethtool support this and therefore make the configuration available generically for all drivers which may want to allow tweaking this.