Linux Documentation
 help / color / mirror / Atom feed
From: Kory Maincent <kory.maincent@bootlin.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Donald Hunter <donald.hunter@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-doc@vger.kernel.org, Kyle Swenson <kyle.swenson@est.tech>,
	Dent Project <dentproject@linuxfoundation.org>,
	kernel@pengutronix.de,
	Maxime Chevallier <maxime.chevallier@bootlin.com>
Subject: Re: [PATCH net-next 08/14] net: pse-pd: Split ethtool_get_status into multiple callbacks
Date: Wed, 8 Jan 2025 10:27:36 +0100	[thread overview]
Message-ID: <20250108102736.18c8a58f@kmaincent-XPS-13-7390> (raw)
In-Reply-To: <20250107171554.742dcf59@kernel.org>

On Tue, 7 Jan 2025 17:15:54 -0800
Jakub Kicinski <kuba@kernel.org> wrote:

> On Sat, 04 Jan 2025 23:27:33 +0100 Kory Maincent wrote:
> > diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> > index f711bfd75c4d..2bdf7e72ee50 100644
> > --- a/include/linux/ethtool.h
> > +++ b/include/linux/ethtool.h
> > @@ -1323,4 +1323,40 @@ struct ethtool_c33_pse_pw_limit_range {
> >  	u32 min;
> >  	u32 max;
> >  };
> > +
> > +/**
> > + * struct ethtool_pse_control_status - PSE control/channel status.
> > + *
> > + * @podl_admin_state: operational state of the PoDL PSE
> > + *	functions. IEEE 802.3-2018 30.15.1.1.2 aPoDLPSEAdminState
> > + * @podl_pw_status: power detection status of the PoDL PSE.
> > + *	IEEE 802.3-2018 30.15.1.1.3 aPoDLPSEPowerDetectionStatus:
> > + * @c33_admin_state: operational state of the PSE
> > + *	functions. IEEE 802.3-2022 30.9.1.1.2 aPSEAdminState
> > + * @c33_pw_status: power detection status of the PSE.
> > + *	IEEE 802.3-2022 30.9.1.1.5 aPSEPowerDetectionStatus:
> > + * @c33_pw_class: detected class of a powered PD
> > + *	IEEE 802.3-2022 30.9.1.1.8 aPSEPowerClassification
> > + * @c33_actual_pw: power currently delivered by the PSE in mW
> > + *	IEEE 802.3-2022 30.9.1.1.23 aPSEActualPower
> > + * @c33_ext_state_info: extended state information of the PSE
> > + * @c33_avail_pw_limit: available power limit of the PSE in mW
> > + *	IEEE 802.3-2022 145.2.5.4 pse_avail_pwr
> > + * @c33_pw_limit_ranges: supported power limit configuration range. The
> > driver
> > + *	is in charge of the memory allocation
> > + * @c33_pw_limit_nb_ranges: number of supported power limit configuration
> > + *	ranges
> > + */  
> 
> Is there a reason this is defined in ethtool.h?

I moved in to ethtool because the PSE drivers does not need it anymore.
I can keep it in pse.h.

> I have a weak preference towards keeping it in pse-pd/pse.h
> since touching ethtool.h rebuilds bulk of networking code.
> From that perspective it's also suboptimal that pse-pd/pse.h
> pulls in ethtool.h.

Do you prefer the other way around, ethtool.h pulls in pse.h?
Several structure are used in ethtool, PSE core and even drivers at the same
time so I don't have much choice. Or, is it preferable to add a new header?

Regards,
-- 
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

  reply	other threads:[~2025-01-08  9:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-04 22:27 [PATCH net-next 00/14] Arrange PSE core and update TPS23881 driver Kory Maincent
2025-01-04 22:27 ` [PATCH net-next 01/14] net: pse-pd: Remove unused pse_ethtool_get_pw_limit function declaration Kory Maincent
2025-01-04 22:27 ` [PATCH net-next 02/14] net: pse-pd: Avoid setting max_uA in regulator constraints Kory Maincent
2025-01-08 11:14   ` Oleksij Rempel
2025-01-04 22:27 ` [PATCH net-next 03/14] net: pse-pd: Add power limit check Kory Maincent
2025-01-04 22:27 ` [PATCH net-next 04/14] net: pse-pd: tps23881: Simplify function returns by removing redundant checks Kory Maincent
2025-01-04 22:27 ` [PATCH net-next 05/14] net: pse-pd: tps23881: Use helpers to calculate bit offset for a channel Kory Maincent
2025-01-04 22:27 ` [PATCH net-next 06/14] net: pse-pd: tps23881: Add missing configuration register after disable Kory Maincent
2025-01-04 22:27 ` [PATCH net-next 07/14] net: pse-pd: Use power limit at driver side instead of current limit Kory Maincent
2025-01-08 11:13   ` Oleksij Rempel
2025-01-04 22:27 ` [PATCH net-next 08/14] net: pse-pd: Split ethtool_get_status into multiple callbacks Kory Maincent
2025-01-08  1:15   ` Jakub Kicinski
2025-01-08  9:27     ` Kory Maincent [this message]
2025-01-08 17:36       ` Jakub Kicinski
2025-01-09  9:01         ` Kory Maincent
2025-01-09  9:37         ` Paolo Abeni
2025-01-04 22:27 ` [PATCH net-next 09/14] net: pse-pd: Remove is_enabled callback from drivers Kory Maincent
2025-01-08 11:09   ` Oleksij Rempel
2025-01-04 22:27 ` [PATCH net-next 10/14] net: pse-pd: tps23881: Add support for power limit and measurement features Kory Maincent
2025-01-08 11:17   ` Oleksij Rempel
2025-01-04 22:27 ` [PATCH net-next 11/14] net: pse-pd: Add support for PSE device index Kory Maincent
2025-01-08  1:18   ` Jakub Kicinski
2025-01-08  5:47     ` Oleksij Rempel
2025-01-08 17:42       ` Jakub Kicinski
2025-01-08 18:17         ` Oleksij Rempel
2025-01-04 22:27 ` [PATCH net-next 12/14] net: ethtool: Add support for new PSE device index description Kory Maincent
2025-01-04 22:27 ` [PATCH net-next 13/14] regulator: core: Resolve supply using of_node from regulator_config Kory Maincent
2025-01-04 22:27 ` [PATCH net-next 14/14] net: pse-pd: Fix missing PI of_node description Kory Maincent

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=20250108102736.18c8a58f@kmaincent-XPS-13-7390 \
    --to=kory.maincent@bootlin.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=dentproject@linuxfoundation.org \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=kyle.swenson@est.tech \
    --cc=lgirdwood@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=thomas.petazzoni@bootlin.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