[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YD1ScQ+w8+1H//Y+@lunn.ch>
Date: Mon, 1 Mar 2021 21:45:37 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Don Bollinger <don@...bollingers.org>
Cc: arndb@...db.de, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, brandon_chuang@...e-core.com,
wally_wang@...ton.com, aken_liu@...e-core.com, gulv@...rosoft.com,
jolevequ@...rosoft.com, xinxliu@...rosoft.com,
'netdev' <netdev@...r.kernel.org>,
'Moshe Shemesh' <moshe@...dia.com>
Subject: Re: [PATCH v2] eeprom/optoe: driver to read/write SFP/QSFP/CMIS
EEPROMS
> To be more specific, optoe is only replacing the functionality of
> drivers/net/phy/sfp.c, the functions of sfp_i2c_read() and sfp_i2c_write().
> These are the routines at the very bottom of the ethtool stack that actually
> execute the i2c calls to get the data. The existing routines are very
> limited, in that they don't handle pages at all. Hence they can only reach
> 256 bytes of QSFP EEPROM data and 512 bytes of SFP EEPROM data. I can
> propose a shorter cleaner replacement for each of those routines which will
> provide access to the rest of the data on those devices.
drivers/net/phy/sfp.c is not the only code making use of this KAPI.
Any MAC driver can implement the ethtool op calls for reading SFP
memory. The MAC driver can either directly reply because it has the
SFP hidden behind firmware, or it can call into the sfp.c code,
because Linux is driving the SFP.
Moshe is working on the Mellonox MAC drivers. As you say, the current
sfp.c code is very limited. But once Moshe code is merged, i will do
the work needed to extend sfp.c to fully support the KAPI. It will
then work for many more MAC drivers, those using phylink.
For me, the KAPI is the important thing, and less so how the
implementation underneath works. Ideally, we want one KAPI for
accessing SFP EEPROMs. Up until now, that KAPI is the ethtool IOCTL.
But that KAPI is now showing its age, and it causing us problems. So
we need to replace that KAPI. ethtool has recently moved to using
netlink messages. So any replacement should be based on netlink. The
whole network stack is pretty much controlled via netlink. So you will
find it very difficult to argue for any other form of KAPI within the
netdev community. Since optoe's KAPI is not netlink based, it is very
unlikely to be accepted.
But netlink is much more flexible than the older IOCTL interface.
Please work with us to ensure this new KAPI can work with your use
cases.
Andrew
Powered by blists - more mailing lists