lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 17 Nov 2019 13:52:48 +0000 From: Shay Drory <shayd@...lanox.com> To: "netdev@...r.kernel.org" <netdev@...r.kernel.org> CC: Maor Gottlieb <maorg@...lanox.com>, Eran Ben Elisha <eranbe@...lanox.com>, "lennart@...ttering.net" <lennart@...ttering.net>, Saeed Mahameed <saeedm@...lanox.com>, Jiri Pirko <jiri@...lanox.com>, "systemd-devel@...ts.freedesktop.org" <systemd-devel@...ts.freedesktop.org>, "mkubecek@...e.cz" <mkubecek@...e.cz> Subject: Re: Send SFP event from kernel driver to user space (UDEV) +relevant people On 11/17/2019 13:46, Shay Drory wrote: > Today, SFP inserted / removal event impacts only the kernel space drivers. > There are users who wishes to get SFP insert / removal in a udev-event > format for their application / daemons / monitors. > The naive way to implement this feature would be to create a sysfs file > that represents device SFP, to expose it under the netdev sysfs, and > to raise a udev event over it. > However, it is not reasonable to create a sysfs for each net-device. > In this letter, I would like to offer a new mechanism that will add a > support to send SFP events from the kernel driver to user space. > This suggestion is built upon a new netlink infrastructure for ethtool > currently being written by Michal Kubeckwhich called “ethtool-netlink”[1]. > My suggestion is to do it by adding a function > (ethtool_sfp_insterted/removed(...)) to ethtool API, This function will > raise a netlink event to be caught in user space. > The design: > > - SFP event from NIC caught by the driver > - Driver call ethtool_sfp_inserted/removed() > - Ethtool generated netlink event with relevant data > - This event-message will be handled in the user-space library of UDEV > (for this purpose we would like to add a netlink infrastructure to UDEV > user-space library). > > the flow in scheme: > > UDEV (in systemd) > ↑ > ethtool_netlink (in ethtool) > ↑ > driver (mlx5_core for example) > ↑ > NIC (SFP event) > > Would like to hear your opinion on this suggestion, or on alternative > designs. > > Thanks > Shay Drory > > [1] > https://patchwork.ozlabs.org/project/netdev/list/?series=&submitter=11892&state=*&q=&archive=&delegate= >
Powered by blists - more mailing lists