Message ID | 20220207091231.2047315-1-danieller@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Michal Kubecek |
Headers | show |
Series | [ethtool-next] ethtool: Add support for OSFP transceiver modules | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Hello Michal, Can you please take the patch? I haven't got any comment about it. Thanks, Danielle > -----Original Message----- > From: Danielle Ratson <danieller@nvidia.com> > Sent: Monday, February 7, 2022 11:13 AM > To: netdev@vger.kernel.org > Cc: mkubecek@suse.cz; Vadim Pasternak <vadimp@nvidia.com>; mlxsw > <mlxsw@nvidia.com>; Danielle Ratson <danieller@nvidia.com> > Subject: [PATCH ethtool-next] ethtool: Add support for OSFP transceiver > modules > > OSFP transceiver modules use the same management interface specification > (CMIS) as QSFP-DD and DSFP modules. > > Allow ethtool to dump, parse and print their EEPROM contents by adding > their SFF-8024 Identifier Value (0x19). > > This is required for future NVIDIA Spectrum-4 based systems that will be > equipped with OSFP transceivers. > > While at it, add the DSFP identifier to the IOCTL path, as it was missing. > > Signed-off-by: Danielle Ratson <danieller@nvidia.com> > Reviewed-by: Ido Schimmel <idosch@nvidia.com> > --- > netlink/module-eeprom.c | 1 + > qsfp.c | 4 +++- > sff-common.c | 3 +++ > sff-common.h | 1 + > 4 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/netlink/module-eeprom.c b/netlink/module-eeprom.c index > f359aee..49833a2 100644 > --- a/netlink/module-eeprom.c > +++ b/netlink/module-eeprom.c > @@ -223,6 +223,7 @@ static int eeprom_parse(struct cmd_context *ctx) > case SFF8024_ID_QSFP_PLUS: > return sff8636_show_all_nl(ctx); > case SFF8024_ID_QSFP_DD: > + case SFF8024_ID_OSFP: > case SFF8024_ID_DSFP: > return cmis_show_all_nl(ctx); > #endif > diff --git a/qsfp.c b/qsfp.c > index 57aac86..1fe5de1 100644 > --- a/qsfp.c > +++ b/qsfp.c > @@ -947,7 +947,9 @@ void sff8636_show_all_ioctl(const __u8 *id, __u32 > eeprom_len) { > struct sff8636_memory_map map = {}; > > - if (id[SFF8636_ID_OFFSET] == SFF8024_ID_QSFP_DD) { > + if (id[SFF8636_ID_OFFSET] == SFF8024_ID_QSFP_DD || > + id[SFF8636_ID_OFFSET] == SFF8024_ID_OSFP || > + id[SFF8636_ID_OFFSET] == SFF8024_ID_DSFP) { > cmis_show_all_ioctl(id); > return; > } > diff --git a/sff-common.c b/sff-common.c index 2815951..e951cf1 100644 > --- a/sff-common.c > +++ b/sff-common.c > @@ -139,6 +139,9 @@ void sff8024_show_identifier(const __u8 *id, int > id_offset) > case SFF8024_ID_QSFP_DD: > printf(" (QSFP-DD Double Density 8X Pluggable Transceiver > (INF-8628))\n"); > break; > + case SFF8024_ID_OSFP: > + printf(" (OSFP 8X Pluggable Transceiver)\n"); > + break; > case SFF8024_ID_DSFP: > printf(" (DSFP Dual Small Form Factor Pluggable > Transceiver)\n"); > break; > diff --git a/sff-common.h b/sff-common.h index 9e32300..dd12dda 100644 > --- a/sff-common.h > +++ b/sff-common.h > @@ -62,6 +62,7 @@ > #define SFF8024_ID_CDFP_S3 0x16 > #define SFF8024_ID_MICRO_QSFP 0x17 > #define SFF8024_ID_QSFP_DD 0x18 > +#define SFF8024_ID_OSFP 0x19 > #define SFF8024_ID_DSFP 0x1B > #define SFF8024_ID_LAST SFF8024_ID_DSFP > #define SFF8024_ID_UNALLOCATED_LAST 0x7F > -- > 2.31.1
diff --git a/netlink/module-eeprom.c b/netlink/module-eeprom.c index f359aee..49833a2 100644 --- a/netlink/module-eeprom.c +++ b/netlink/module-eeprom.c @@ -223,6 +223,7 @@ static int eeprom_parse(struct cmd_context *ctx) case SFF8024_ID_QSFP_PLUS: return sff8636_show_all_nl(ctx); case SFF8024_ID_QSFP_DD: + case SFF8024_ID_OSFP: case SFF8024_ID_DSFP: return cmis_show_all_nl(ctx); #endif diff --git a/qsfp.c b/qsfp.c index 57aac86..1fe5de1 100644 --- a/qsfp.c +++ b/qsfp.c @@ -947,7 +947,9 @@ void sff8636_show_all_ioctl(const __u8 *id, __u32 eeprom_len) { struct sff8636_memory_map map = {}; - if (id[SFF8636_ID_OFFSET] == SFF8024_ID_QSFP_DD) { + if (id[SFF8636_ID_OFFSET] == SFF8024_ID_QSFP_DD || + id[SFF8636_ID_OFFSET] == SFF8024_ID_OSFP || + id[SFF8636_ID_OFFSET] == SFF8024_ID_DSFP) { cmis_show_all_ioctl(id); return; } diff --git a/sff-common.c b/sff-common.c index 2815951..e951cf1 100644 --- a/sff-common.c +++ b/sff-common.c @@ -139,6 +139,9 @@ void sff8024_show_identifier(const __u8 *id, int id_offset) case SFF8024_ID_QSFP_DD: printf(" (QSFP-DD Double Density 8X Pluggable Transceiver (INF-8628))\n"); break; + case SFF8024_ID_OSFP: + printf(" (OSFP 8X Pluggable Transceiver)\n"); + break; case SFF8024_ID_DSFP: printf(" (DSFP Dual Small Form Factor Pluggable Transceiver)\n"); break; diff --git a/sff-common.h b/sff-common.h index 9e32300..dd12dda 100644 --- a/sff-common.h +++ b/sff-common.h @@ -62,6 +62,7 @@ #define SFF8024_ID_CDFP_S3 0x16 #define SFF8024_ID_MICRO_QSFP 0x17 #define SFF8024_ID_QSFP_DD 0x18 +#define SFF8024_ID_OSFP 0x19 #define SFF8024_ID_DSFP 0x1B #define SFF8024_ID_LAST SFF8024_ID_DSFP #define SFF8024_ID_UNALLOCATED_LAST 0x7F