[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241003153303.7cc6dba8@kmaincent-XPS-13-7390>
Date: Thu, 3 Oct 2024 15:33:03 +0200
From: Kory Maincent <kory.maincent@...tlin.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Jonathan Corbet
<corbet@....net>, Donald Hunter <donald.hunter@...il.com>, Thomas Petazzoni
<thomas.petazzoni@...tlin.com>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, linux-doc@...r.kernel.org, Kyle Swenson
<kyle.swenson@....tech>, Dent Project <dentproject@...uxfoundation.org>,
kernel@...gutronix.de
Subject: Re: [PATCH net-next 11/12] net: pse-pd: Add support for event
reporting using devm_regulator_irq_helper
On Thu, 3 Oct 2024 14:56:21 +0200
Andrew Lunn <andrew@...n.ch> wrote:
> > > https://docs.kernel.org/power/regulator/consumer.html#regulator-events
> > >
> > > Suggests these are internal events, using a notification chain. How
> > > does user space get to know about such events?
> >
> > When events appears, _notifier_call_chain() is called which can generate
> > netlink messages alongside the internal events:
> > https://elixir.bootlin.com/linux/v6.11.1/source/drivers/regulator/core.c#L4898
> >
>
> Ah, O.K.
>
> But is this in the correct 'address space' for the want of a better
> term. Everything else to do with PSE is in the networking domain of
> netlink. ethtool is used to configure PSE. Shouldn't the notification
> also close by to ethtool? When an interface changes state, there is a
> notification sent. Maybe we want to piggyback on that?
Indeed, but regulator API already provide such events, which will even be sent
when we enable or disable the PSE. Should we write a second event management.
Using regulator event API allows to report over current internal events to the
parents regulator the power supply of the PSE which could also do something to
avoid smoke.
Or maybe we should add another wrapper which will send PSE ethtool netlink
notification alongside the regulator notifications supported by this patch.
> Also, how do regulator events work in combination with network
> namespaces? If you move the interface into a different network
> namespace, do the regulator events get delivered to the root namespace
> or the namespace the interface is in?
regulator events are sent in root namespace.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Powered by blists - more mailing lists