netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Paolo Abeni <pabeni@redhat.com>,
	David Miller <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Simon Horman <horms@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v3 03/10] ethtool: allow ethtool op set_eee to set an NL extack message
Date: Wed, 15 Jan 2025 09:53:53 -0800	[thread overview]
Message-ID: <20250115095353.32a4f7e3@kernel.org> (raw)
In-Reply-To: <545f25c5-a497-4896-8763-fe17568599ef@gmail.com>

On Wed, 15 Jan 2025 18:46:35 +0100 Heiner Kallweit wrote:
> On 15.01.2025 00:00, Jakub Kicinski wrote:
> > On Sun, 12 Jan 2025 14:28:22 +0100 Heiner Kallweit wrote:  
> >> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> >> index f711bfd75..8ee047747 100644
> >> --- a/include/linux/ethtool.h
> >> +++ b/include/linux/ethtool.h
> >> @@ -270,6 +270,7 @@ struct ethtool_keee {
> >>  	__ETHTOOL_DECLARE_LINK_MODE_MASK(supported);
> >>  	__ETHTOOL_DECLARE_LINK_MODE_MASK(advertised);
> >>  	__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertised);
> >> +	struct netlink_ext_ack *extack;
> >>  	u32	tx_lpi_timer;
> >>  	bool	tx_lpi_enabled;
> >>  	bool	eee_active;  
> > 
> > :S I don't think we have a precedent for passing extack inside 
> > the paramter struct. I see 25 .set_eee callbacks, not crazy many.
> > Could you plumb this thru as a separate argument, please?  
> 
> I see your point regarding calling convention consistency.
> Drawback of passing extack as a separate argument is that we would
> have to do the same extension also to functions in phylib.
> Affected are phy_ethtool_set_eee and genphy_c45_ethtool_set_eee,
> because extack is to be used in the latter.
> Passing extack within struct ethtool_keee we don't have to change
> the functions in the call chain. So passing extack separately
> comes at a cost. Is it worth it?

I doubt it will be uglier than stuffing transient pointers into a config
struct. But we will only know for sure once the code is written..

  reply	other threads:[~2025-01-15 17:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-12 13:24 [PATCH net-next v3 00/10] net: phy: improve phylib EEE handling Heiner Kallweit
2025-01-12 13:25 ` [PATCH net-next v3 01/10] net: phy: rename eee_broken_modes to eee_disabled_modes Heiner Kallweit
2025-01-12 13:27 ` [PATCH net-next v3 02/10] net: phy: rename phy_set_eee_broken to phy_disable_eee_mode Heiner Kallweit
2025-01-12 13:28 ` [PATCH net-next v3 03/10] ethtool: allow ethtool op set_eee to set an NL extack message Heiner Kallweit
2025-01-14 23:00   ` Jakub Kicinski
2025-01-15 12:31     ` Russell King (Oracle)
2025-01-15 17:46     ` Heiner Kallweit
2025-01-15 17:53       ` Jakub Kicinski [this message]
2025-02-08 23:22     ` Heiner Kallweit
2025-02-11  0:08       ` Jakub Kicinski
2025-01-12 13:29 ` [PATCH net-next v3 04/10] net: phy: c45: improve handling of disabled EEE modes in ethtool functions Heiner Kallweit
2025-01-12 13:30 ` [PATCH net-next v3 05/10] net: phy: move definition of phy_is_started before phy_disable_eee_mode Heiner Kallweit
2025-01-12 13:31 ` [PATCH net-next v3 06/10] net: phy: improve phy_disable_eee_mode Heiner Kallweit
2025-01-12 13:32 ` [PATCH net-next v3 07/10] net: phy: remove disabled EEE modes from advertising in phy_probe Heiner Kallweit
2025-01-12 13:32 ` [PATCH net-next v3 08/10] net: phy: c45: Don't silently remove disabled EEE modes any longer when writing advertisement register Heiner Kallweit
2025-01-12 13:33 ` [PATCH net-next v3 09/10] net: phy: c45: use cached EEE advertisement in genphy_c45_ethtool_get_eee Heiner Kallweit
2025-01-12 13:34 ` [PATCH net-next v3 10/10] net: phy: c45: remove local advertisement parameter from genphy_c45_eee_is_active Heiner Kallweit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250115095353.32a4f7e3@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=horms@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).