Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2398707pxb; Thu, 11 Feb 2021 11:16:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzuK+6s6704dC9cA/GuRZrocH5xl3iR177KVTxDwyxVgVkp0FgUn8uMBkOG/vJIcAkKiodn X-Received: by 2002:a17:906:b2c6:: with SMTP id cf6mr9329629ejb.99.1613070998912; Thu, 11 Feb 2021 11:16:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613070998; cv=none; d=google.com; s=arc-20160816; b=bSSaQz197TTLyuwr9iNZeaCqa/bB/TKJno+SOsYPSp3P2ajKn69pRFd10vWgVrS78J jEdFeoyzCxjN4+cszobR0VnAFDuAjwuRTouLwLeNYbaQ7uIAcONEMcppAz5a3kj2D8jp mCItfauXs+G3PHAevh7loGW427+CEpKgU2JHDGA3AkBBn2Kw+UWmhhClkd4FfKj0F7V9 BmMqCI6mPh1lJDK66KnA/9QUEm5JkZsdyq7nmEHljkNz5PV3vOoTFIKPURFGxESob3b9 WWL06BMHYRdNOkqKw+bvNY6zwWB3ttmBcrh9Q5kXCuWYgfc+RxvaZAxdEHZNQOzvs9V5 +PIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=D9fKhUI7so0qmWsIyDL2uQwyf5mTHXQCizKg/4vcqpo=; b=tV1kvW3deLfBtPugAzQWkuAxYng8At1znCxLa6wlU6tH9rd+t8ohLyMKvpJhtBOeoE lP6IQKGIhgs62SMqZ2mP+IPxif4Wt0BDqEwEyxJglV9GMDykDz4r8Ihh4+1wnfQOvjSS asUAe2ybLeSsm+3pVTuldXRBQdkvobqZ+OtsoS7Fzs1zx3mgwq8wvBGGE0e6WYn4xnot sRBD6NybGklFS4q413IupBvjcquLbwi9eRyMwz6xZXGdMS3+cXhri8TY+SMfSdgDyKGs s4CEDX4m2p7nya2sWVADAA+jELb+WDp2He7XeNrwhmkRTAn5gSAE7wPMZLpp5HT9jAoG zAhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=lJ5Zzw2T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t24si4376317edv.171.2021.02.11.11.16.14; Thu, 11 Feb 2021 11:16:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=lJ5Zzw2T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231268AbhBKTOX (ORCPT + 99 others); Thu, 11 Feb 2021 14:14:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230419AbhBKTOT (ORCPT ); Thu, 11 Feb 2021 14:14:19 -0500 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24D2BC061786 for ; Thu, 11 Feb 2021 11:13:38 -0800 (PST) Received: by mail-qt1-x829.google.com with SMTP id c1so5008138qtc.1 for ; Thu, 11 Feb 2021 11:13:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=D9fKhUI7so0qmWsIyDL2uQwyf5mTHXQCizKg/4vcqpo=; b=lJ5Zzw2TiP/kA7ZkNGmYepqT6SHZgeNUb3bqrGdFf70rxw4bgsf77veFYA2hDzB4f+ 06OhlwiaJ6TCUjDzB0CtHZrh15XZetEFVhFZLDFCfQlHR3D+gXl8USEm/OFKU/Dmu5m6 u7dXazmcXLOA75KnPrzv/YvPJIB36r7ViliQRdMpEMZXc3ghCq45iaNe/9Mz6S/u4/GF 1+Art1Lmc6XTPzr7eFsw8pVp2O30lof8vm65M68AfLvXD7OOEUVnGhf0+oJa85aYepCD YH4nuxYJ1qdtblUYWb6Z9M4x17UQt1gQVWfBfjNgkd+e6EAOse8uv4/WFfbRVkHTnQpR H1pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=D9fKhUI7so0qmWsIyDL2uQwyf5mTHXQCizKg/4vcqpo=; b=QK9s2jzQoNIYRPeZzNsBi7AlN9sqW4WoZvs2DdP+QELRoGRiaUM0WoIybdLFVIUzd7 MEQDNDZJHAOZptw7K59ID/uM+zXCZig0DXDbAzPd7C+giO+dSWa5UiC+QEnzoXl+ciXr 7Pj+weCG1AqGMljt03gT4amIHTp7F4L72UZkD+3bg0F0sfyPv5HLGOKihD/a81IAIxJH jvpB2s8mJtrsQKDIxnkRPWSF/3HbCB4vaHB7l0d4HMJ5ITyaJ+IDrPgaQI9fa8fX8XoR TlOKdLbriShIUMY7qa6upCmlS+DC7DAuvEJbvr9Chu24/H69xTc1TTdd94GuKRcIEHg7 3N5w== X-Gm-Message-State: AOAM5301adSkaxEcwyLWdBth0rNJxUWmnb5dlycVWZ0cbCpS2J7k4mzQ uGh5mF7/nrjxN5suZEjHi2Mi/n2Z8qmB71Gumv2xUA== X-Received: by 2002:ac8:5c41:: with SMTP id j1mr8887277qtj.306.1613070817304; Thu, 11 Feb 2021 11:13:37 -0800 (PST) MIME-Version: 1.0 References: <1612950500-9682-1-git-send-email-stefanc@marvell.com> <1612950500-9682-13-git-send-email-stefanc@marvell.com> <20210210.152924.767175240247395907.davem@davemloft.net> In-Reply-To: From: Marcin Wojtas Date: Thu, 11 Feb 2021 20:13:24 +0100 Message-ID: Subject: Re: [EXT] Re: [PATCH v12 net-next 12/15] net: mvpp2: add BM protection underrun feature support To: Andrew Lunn Cc: Stefan Chulski , David Miller , "netdev@vger.kernel.org" , "thomas.petazzoni@bootlin.com" , Nadav Haklai , Yan Markman , "linux-kernel@vger.kernel.org" , "kuba@kernel.org" , "linux@armlinux.org.uk" , "rmk+kernel@armlinux.org.uk" , "atenart@kernel.org" , "devicetree@vger.kernel.org" , "robh+dt@kernel.org" , "sebastian.hesselbarth@gmail.com" , "gregory.clement@bootlin.com" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, czw., 11 lut 2021 o 15:19 Andrew Lunn napisa=C5=82(a): > > On Thu, Feb 11, 2021 at 08:22:19AM +0000, Stefan Chulski wrote: > > > > > > > > ---------------------------------------------------------------------= - > > > From: > > > Date: Wed, 10 Feb 2021 11:48:17 +0200 > > > > > > > > > > > +static int bm_underrun_protect =3D 1; > > > > + > > > > +module_param(bm_underrun_protect, int, 0444); > > > > +MODULE_PARM_DESC(bm_underrun_protect, "Set BM underrun protect > > > > +feature (0-1), def=3D1"); > > > > > > No new module parameters, please. > > > > Ok, I would remove new module parameters. > > By the way why new module parameters forbitten? > > Historically, module parameters are a bad interface for > configuration. Vendors have stuffed all sorts of random junk into > module parameters. There is little documentation. Different drivers > can have similar looking module parameters which do different > things. Or different module parameters, which actually do the same > thing. But maybe with slightly different parameters. > > We get a much better overall result if you stop and think for a > while. How can this be made a generic configuration knob which > multiple vendors could use? And then add it to ethtool. Extend the > ethtool -h text and the man page. Maybe even hack some other vendors > driver to make use of it. > > Or we have also found out, that pushing back on parameters like this, > the developers goes back and looks at the code, and sometimes figures > out a way to automatically do the right thing, removing the > configuration knob, and just making it all simpler for the user to > use. I think of 2 alternatives: * `ethtool --set-priv-flags` - in such case there is a question if switching this particular feature in runtime is a good idea. * New DT/ACPI property - it is a hardware feature after all, so maybe let the user decide whether to enable it on the platform description level. What do you think? Best regards, Marcin