From: Andrew Lunn <andrew@lunn.ch>
To: Shay Drory <shayd@mellanox.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Maor Gottlieb <maorg@mellanox.com>,
Eran Ben Elisha <eranbe@mellanox.com>,
"lennart@poettering.net" <lennart@poettering.net>,
Saeed Mahameed <saeedm@mellanox.com>,
lorian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"systemd-devel@lists.freedesktop.org"
<systemd-devel@lists.freedesktop.org>,
Jiri Pirko <jiri@mellanox.com>,
"mkubecek@suse.cz" <mkubecek@suse.cz>
Subject: Re: Send SFP event from kernel driver to user space (UDEV)
Date: Tue, 19 Nov 2019 00:19:22 +0100 [thread overview]
Message-ID: <20191118231922.GB15395@lunn.ch> (raw)
In-Reply-To: <7dc1a44f-d15c-4181-df45-ae93cfd95438@mellanox.com>
On Mon, Nov 18, 2019 at 11:54:31AM +0000, Shay Drory wrote:
> On 11/18/2019 03:29, Andrew Lunn wrote:
> > On Sun, Nov 17, 2019 at 11:46:15AM +0000, Shay Drory wrote:
> >
> > Hi Shay
> >
> > It would be good to Cc: the generic SFP code maintainers.
>
> The suggested solution is not targeted for SFP drivers (see below),
> but I added them to the Cc list.
Hi Shay
So you are proposing something which won't work for the generic SFP
code? That should be an automatic NACK. Whatever you propose needs to
be generic so that it can work for any NICs that do firmware support
for SFPs, and those who let Linux handle the SFP.
> The feature is targeted to netdev users. It is expected from the
> user to query current state via ethtool -m and afterwards monitor
> for changes over UDEV.
What exactly are you interested in? What are your use cases. When
hwmon devices are created, you should get udev events. Maybe that is
sufficient? Or are you interested in some other parts of the SFP than
the diagnostic sensors?
> > Would you add just SFP insert/eject to UDEV. Or all the events which
> > get sent via netlink? Link up/down, route add/remove, etc?
>
> It makes sense to notify all events. What do you think?
I don't particularly like two ways to get the same information. It
means we have two APIs we need to maintain forever, when just one
should be sufficient.
> > Is UDEV name space aware? Do you run a udev daemon in each network
> > name space? I assume when you open a netlink socket, it is for just
> > the current network namespace?
>
> UDEV will follow netlink name-space.
So you do plan to have a udev daemon running in every network name
space. Does udev even support that?
I'm sceptical using udev is a good idea. But having netlink events
does sounds reasonable. And if you are willing to wait a while,
ethtool-nl does seem like a good fit. But please make sure your
solution is generic.
Andrew
next prev parent reply other threads:[~2019-11-18 23:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-17 11:46 Send SFP event from kernel driver to user space (UDEV) Shay Drory
2019-11-17 13:52 ` Shay Drory
2019-11-18 1:29 ` Andrew Lunn
2019-11-18 11:54 ` Shay Drory
2019-11-18 23:19 ` Andrew Lunn [this message]
2019-11-19 13:28 ` Shay Drory
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=20191118231922.GB15395@lunn.ch \
--to=andrew@lunn.ch \
--cc=eranbe@mellanox.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=jiri@mellanox.com \
--cc=lennart@poettering.net \
--cc=maorg@mellanox.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=shayd@mellanox.com \
--cc=systemd-devel@lists.freedesktop.org \
/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).