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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 6 Nov 2022 18:08:04 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     piergiorgio.beruto@...il.com
Cc:     netdev@...r.kernel.org
Subject: Re: Adding IEEE802.3cg Clause 148 PLCA support to Linux

> Based on my personal experience, It looks to me that extending
> ethtool is the way to go. Maybe we should consider those as
> “tunables”?

I suggest you define new ethtool netlink messages. I don't think PHY
tunables would make a good interface, since you have multiple values
which need configuring, and you also have some status information.

So you probably want a message to set the configuration, and another
to get the current configuration. For the set, you probably want an
attribute per configuration value, and allow a subset of attributes to
be included in the message. The get configuration should by default
return all the attributes, but not enforce this, since some vendor
will implement it wrong and miss something out.

The get status message should return the PST value. This is something
you might also want to append to the linkstate message, next to the
SQI values.

What i don't see in the Open Alliance spec is anything about
interrupts. It would be interesting to see if any vendor triggers an
interrupt when PST changes. A PHY which has this should probably send
a linkstate message to userspace reporting the state change. For PHYs
without interrupts, phylib will poll the read_status method once per
second. You probably want to check the PST bit during that poll. If EN
is true, but PST is false, is the link considered down?

I would also include a check in the phylib core. If the set request
tries to set EN to true, check the current link mode and if it is not
half duplex return -EINVAL. An extack messages would be good here as
well.

For the interface between phylib and the PHY driver, you should
probably add to the struct phy_driver a set configuration method, a
get configuration method, and maybe a get status method. You can
provide implementations for these methods in phy-c45.c which any PHY
driver which conforms to the standard can use.

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ