Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-30 Thread Andrew Lunn
> Sounds sane to me... I know that in the past Vadim had to deal with > various faulty modules. Vadim, is this something we can support? What > happens if user space requests a page that does not exist? For example, > in the case of QSFP-DD, lets say we do not provide page 03h but user > space stil

RE: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-30 Thread Vadim Pasternak
[PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP- > DD transceivers > > On Tue, Jun 30, 2020 at 02:21:59AM +0200, Andrew Lunn wrote: > > I've no practice experience with modules other than plain old SFPs, > > 1G. And those have all sorts of errors, even basic

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-29 Thread Ido Schimmel
On Tue, Jun 30, 2020 at 02:21:59AM +0200, Andrew Lunn wrote: > I've no practice experience with modules other than plain old SFPs, > 1G. And those have all sorts of errors, even basic things like the CRC > are systematically incorrect because they are not recalculated after > adding the serial numb

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-29 Thread Andrew Lunn
> Adrian, > > Thanks for the detailed response. I don't think the kernel should pass > fake pages only to make it easier for user space to parse the > information. What you are describing is basic dissection and it's done > all the time by wireshark / tcpdump. > > Anyway, even we pass a fake page

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-28 Thread Adrian Pop
Hi! Regarding multiple banks, I think that we can have a much more creative way of dealing with them (in the future). At page 76, we have "In particular, support of the Lower Memory and of Page 00h is required for all modules, including passive copper cables. These pages are therefore always imple

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-28 Thread Ido Schimmel
On Sat, Jun 27, 2020 at 09:42:10PM +0100, Adrian Pop wrote: > > > > Hi Adrian, Andrew, > > > > Not sure I understand... You want the kernel to always pass page 03h to > > user space (potentially zeroed)? Page 03h is not mandatory according to > > the standard and page 01h contains information if pa

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-27 Thread Adrian Pop
> > Hi Adrian, Andrew, > > Not sure I understand... You want the kernel to always pass page 03h to > user space (potentially zeroed)? Page 03h is not mandatory according to > the standard and page 01h contains information if page 03h is present or Hi Ido! Andrew was thinking of having 03h after 0

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-27 Thread Ido Schimmel
On Fri, Jun 26, 2020 at 11:13:42PM +0100, Adrian Pop wrote: > > You are saying pages 00h, 01h and 02h are mandatory for QSPF-DD. Page > > 03h is optional, but when present, it seems to contain what is page > > 02h above. Since the QSPF KAPI has it, QSPF-DD KAPI should also have > > it. So i would

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-26 Thread Adrian Pop
> You are saying pages 00h, 01h and 02h are mandatory for QSPF-DD. Page > 03h is optional, but when present, it seems to contain what is page > 02h above. Since the QSPF KAPI has it, QSPF-DD KAPI should also have > it. So i would suggest that pages 10h and 11h come after that. > > If a driver want

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-26 Thread Andrew Lunn
On Fri, Jun 26, 2020 at 06:33:55PM +0100, Adrian Pop wrote: > > > > Is page 03h valid for a QSFP DD? Do we add pages 10h and 11h after > > page 03h, or instead of? How do we indicate to user space what pages > > of data have been passed to it? > > > >Andrew > > >From QSFP-DD CMIS Rev 4.0: "In

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-26 Thread Adrian Pop
> > Is page 03h valid for a QSFP DD? Do we add pages 10h and 11h after > page 03h, or instead of? How do we indicate to user space what pages > of data have been passed to it? > >Andrew >From QSFP-DD CMIS Rev 4.0: "In particular, support of the Lower Memory and of Page 00h is required for all

Re: [PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-26 Thread Andrew Lunn
> + case MLXSW_REG_MCIA_EEPROM_MODULE_INFO_ID_QSFP_DD: > + /* Use SFF_8636 as base type. ethtool should recognize specific > + * type through the identifier value. > + */ > + modinfo->type = ETH_MODULE_SFF_8636; > + /* Verify i

[PATCH net-next 1/2] mlxsw: core: Add ethtool support for QSFP-DD transceivers

2020-06-26 Thread Ido Schimmel
From: Vadim Pasternak The Quad Small Form Factor Pluggable Double Density (QSFP-DD) hardware specification defines a form factor that supports up to 400 Gbps in aggregate over an 8x50-Gbps electrical interface. The QSFP-DD supports both optical and copper interfaces. Implementation is based on C