Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1412684 > unrolled thread
| Started by | Jarod Wilson <jarod@redhat.com> |
|---|---|
| First post | 2016-06-03 03:40 +0200 |
| Last post | 2016-06-08 20:20 +0200 |
| Articles | 8 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH net] ethernet/sfc: report supported link speeds on SFP connections Jarod Wilson <jarod@redhat.com> - 2016-06-03 03:40 +0200
Re: [PATCH net] ethernet/sfc: report supported link speeds on SFP connections David Miller <davem@davemloft.net> - 2016-06-04 02:00 +0200
Re: [PATCH net] ethernet/sfc: report supported link speeds on SFP connections Bert Kenward <bkenward@solarflare.com> - 2016-06-06 17:20 +0200
[PATCH net v2] sfc: report supported link speeds on SFP connections Bert Kenward <bkenward@solarflare.com> - 2016-06-06 18:40 +0200
Re: [PATCH net v2] sfc: report supported link speeds on SFP connections Jarod Wilson <jarod@redhat.com> - 2016-06-06 21:00 +0200
Re: [PATCH net v2] sfc: report supported link speeds on SFP connections Jarod Wilson <jarod@redhat.com> - 2016-06-07 23:30 +0200
Re: [PATCH net v2] sfc: report supported link speeds on SFP connections Jarod Wilson <jarod@redhat.com> - 2016-06-08 15:50 +0200
Re: [PATCH net v2] sfc: report supported link speeds on SFP connections David Miller <davem@davemloft.net> - 2016-06-08 20:20 +0200
| From | Jarod Wilson <jarod@redhat.com> |
|---|---|
| Date | 2016-06-03 03:40 +0200 |
| Subject | [PATCH net] ethernet/sfc: report supported link speeds on SFP connections |
| Message-ID | <rFMfD-58M-5@gated-at.bofh.it> |
My solarflare cards connected to a 10GbE switch with an SFP+ module/cable don't currently report any supported link speeds: $ ethtool ens4f0 Settings for ens4f0: Supported ports: [ FIBRE ] Supported link modes: Not reported Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Advertised link modes: Not reported Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Link partner advertised link modes: 10000baseKX4/Full Link partner advertised pause frame use: Symmetric Link partner advertised auto-negotiation: No Speed: 10000Mb/s Duplex: Full Port: FIBRE PHYAD: 255 Transceiver: internal Auto-negotiation: on Cannot get wake-on-lan settings: Operation not permitted Current message level: 0x000020f7 (8439) drv probe link ifdown ifup rx_err tx_err hw Link detected: yes I've navigated my way through the sfc code down to mcdi_to_ethtool_cap's switch on media's MC_CMD_MEDIA_SFP_PLUS case, where no speeds are set. If we just do some cap checks similar to the MC_CMD_MEDIA_KX4 case, I get the expected output: $ ethtool ens4f0 Settings for ens4f0: Supported ports: [ FIBRE ] Supported link modes: 1000baseKX/Full 10000baseKX4/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Advertised link modes: Not reported Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Link partner advertised link modes: 10000baseKX4/Full Link partner advertised pause frame use: Symmetric Link partner advertised auto-negotiation: No Speed: 10000Mb/s Duplex: Full Port: FIBRE PHYAD: 255 Transceiver: internal Auto-negotiation: on Cannot get wake-on-lan settings: Operation not permitted Current message level: 0x000020f7 (8439) drv probe link ifdown ifup rx_err tx_err hw Link detected: yes This is from an sfc9120 interface here. It also applies to a 9140 with a 10GbE breakout cable. Side note: wiring up Advertised by simply copying Supported seems to be a thing many other drivers do. Worth doing here?... CC: Solarflare linux maintainers <linux-net-drivers@solarflare.com> CC: Edward Cree <ecree@solarflare.com> CC: Bert Kenward <bkenward@solarflare.com> CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson <jarod@redhat.com> --- drivers/net/ethernet/sfc/mcdi_port.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/sfc/mcdi_port.c b/drivers/net/ethernet/sfc/mcdi_port.c index 7f295c4..6516471 100644 --- a/drivers/net/ethernet/sfc/mcdi_port.c +++ b/drivers/net/ethernet/sfc/mcdi_port.c @@ -189,6 +189,10 @@ static u32 mcdi_to_ethtool_cap(u32 media, u32 cap) case MC_CMD_MEDIA_XFP: case MC_CMD_MEDIA_SFP_PLUS: + if (cap & (1 << MC_CMD_PHY_CAP_1000FDX_LBN)) + result |= SUPPORTED_1000baseKX_Full; + if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN)) + result |= SUPPORTED_10000baseKX4_Full; result |= SUPPORTED_FIBRE; break; -- 1.8.3.1
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-06-04 02:00 +0200 |
| Subject | Re: [PATCH net] ethernet/sfc: report supported link speeds on SFP connections |
| Message-ID | <rG7ap-1iQ-11@gated-at.bofh.it> |
| In reply to | #1412684 |
From: Jarod Wilson <jarod@redhat.com> Date: Thu, 2 Jun 2016 21:33:24 -0400 > My solarflare cards connected to a 10GbE switch with an SFP+ module/cable > don't currently report any supported link speeds: ... > CC: Solarflare linux maintainers <linux-net-drivers@solarflare.com> > CC: Edward Cree <ecree@solarflare.com> > CC: Bert Kenward <bkenward@solarflare.com> > CC: netdev@vger.kernel.org > Signed-off-by: Jarod Wilson <jarod@redhat.com> Solarflare maintainers, please review.
[toc] | [prev] | [next] | [standalone]
| From | Bert Kenward <bkenward@solarflare.com> |
|---|---|
| Date | 2016-06-06 17:20 +0200 |
| Subject | Re: [PATCH net] ethernet/sfc: report supported link speeds on SFP connections |
| Message-ID | <rH4tP-6DT-13@gated-at.bofh.it> |
| In reply to | #1412684 |
Apologies for delay in replying. On 03/06/16 02:33, Jarod Wilson wrote: > My solarflare cards connected to a 10GbE switch with an SFP+ module/cable > don't currently report any supported link speeds: > > ... > > diff --git a/drivers/net/ethernet/sfc/mcdi_port.c b/drivers/net/ethernet/sfc/mcdi_port.c > index 7f295c4..6516471 100644 > --- a/drivers/net/ethernet/sfc/mcdi_port.c > +++ b/drivers/net/ethernet/sfc/mcdi_port.c > @@ -189,6 +189,10 @@ static u32 mcdi_to_ethtool_cap(u32 media, u32 cap) > > case MC_CMD_MEDIA_XFP: > case MC_CMD_MEDIA_SFP_PLUS: > + if (cap & (1 << MC_CMD_PHY_CAP_1000FDX_LBN)) > + result |= SUPPORTED_1000baseKX_Full; > + if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN)) > + result |= SUPPORTED_10000baseKX4_Full; We probably shouldn't be claiming KX/KX4 here, because it isn't. I'll post an updated patch shortly. Bert.
[toc] | [prev] | [next] | [standalone]
| From | Bert Kenward <bkenward@solarflare.com> |
|---|---|
| Date | 2016-06-06 18:40 +0200 |
| Subject | [PATCH net v2] sfc: report supported link speeds on SFP connections |
| Message-ID | <rH5Jg-7nV-31@gated-at.bofh.it> |
| In reply to | #1412684 |
7000-series SFC NICs connected with an SFP+ module currently fail to report any supported link speeds. Reported-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Bert Kenward <bkenward@solarflare.com> --- drivers/net/ethernet/sfc/mcdi_port.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sfc/mcdi_port.c b/drivers/net/ethernet/sfc/mcdi_port.c index 7f295c4..2a9228a 100644 --- a/drivers/net/ethernet/sfc/mcdi_port.c +++ b/drivers/net/ethernet/sfc/mcdi_port.c @@ -189,11 +189,12 @@ static u32 mcdi_to_ethtool_cap(u32 media, u32 cap) case MC_CMD_MEDIA_XFP: case MC_CMD_MEDIA_SFP_PLUS: - result |= SUPPORTED_FIBRE; - break; - case MC_CMD_MEDIA_QSFP_PLUS: result |= SUPPORTED_FIBRE; + if (cap & (1 << MC_CMD_PHY_CAP_1000FDX_LBN)) + result |= SUPPORTED_1000baseT_Full; + if (cap & (1 << MC_CMD_PHY_CAP_10000FDX_LBN)) + result |= SUPPORTED_10000baseT_Full; if (cap & (1 << MC_CMD_PHY_CAP_40000FDX_LBN)) result |= SUPPORTED_40000baseCR4_Full; break; -- 2.5.5
[toc] | [prev] | [next] | [standalone]
| From | Jarod Wilson <jarod@redhat.com> |
|---|---|
| Date | 2016-06-06 21:00 +0200 |
| Subject | Re: [PATCH net v2] sfc: report supported link speeds on SFP connections |
| Message-ID | <rH7UK-da-9@gated-at.bofh.it> |
| In reply to | #1415277 |
On Mon, Jun 06, 2016 at 05:29:30PM +0100, Bert Kenward wrote: > 7000-series SFC NICs connected with an SFP+ module currently fail to > report any supported link speeds. > > Reported-by: Jarod Wilson <jarod@redhat.com> > Signed-off-by: Bert Kenward <bkenward@solarflare.com> Had a feeling my cut might not have been quite right. Looks good to me. Reviewed-by: Jarod Wilson <jarod@redhat.com> -- Jarod Wilson jarod@redhat.com
[toc] | [prev] | [next] | [standalone]
| From | Jarod Wilson <jarod@redhat.com> |
|---|---|
| Date | 2016-06-07 23:30 +0200 |
| Subject | Re: [PATCH net v2] sfc: report supported link speeds on SFP connections |
| Message-ID | <rHwJs-7Uj-1@gated-at.bofh.it> |
| In reply to | #1415372 |
On Mon, Jun 06, 2016 at 02:55:29PM -0400, Jarod Wilson wrote: > On Mon, Jun 06, 2016 at 05:29:30PM +0100, Bert Kenward wrote: > > 7000-series SFC NICs connected with an SFP+ module currently fail to > > report any supported link speeds. > > > > Reported-by: Jarod Wilson <jarod@redhat.com> > > Signed-off-by: Bert Kenward <bkenward@solarflare.com> > > Had a feeling my cut might not have been quite right. Looks good to me. > > Reviewed-by: Jarod Wilson <jarod@redhat.com> ...however, upon testing, there's a gotcha. This results in my 10Gbps sfc nic reporting that it supports 40Gbps: $ ethtool ens4f0 Settings for ens4f0: Supported ports: [ FIBRE ] Supported link modes: 1000baseT/Full 10000baseT/Full 40000baseKR4/Full Supported pause frame use: Symmetric Receive-only Supports auto-negotiation: Yes Advertised link modes: Not reported Advertised pause frame use: Symmetric Advertised auto-negotiation: Yes Link partner advertised link modes: 10000baseT/Full Link partner advertised pause frame use: Symmetric Link partner advertised auto-negotiation: No Speed: 10000Mb/s Duplex: Full Port: FIBRE PHYAD: 255 Transceiver: internal Auto-negotiation: on Cannot get wake-on-lan settings: Operation not permitted Current message level: 0x000020f7 (8439) drv probe link ifdown ifup rx_err tx_err hw Link detected: yes $ ethtool -i ens4f0 driver: sfc version: 4.0 firmware-version: 4.6.1.1001 rx1 tx1 expansion-rom-version: bus-info: 0000:05:00.0 supports-statistics: yes supports-test: yes supports-eeprom-access: no supports-register-dump: yes supports-priv-flags: no $ lspci -v -s 0000:05:00.0 05:00.0 Ethernet controller: Solarflare Communications SFC9120 (rev 01) Subsystem: Solarflare Communications SFN7x22F-R2 Flareon Ultra 7000 Series 10G Adapter Physical Slot: 4 Flags: bus master, fast devsel, latency 0, IRQ 16 I/O ports at c100 [size=256] Memory at ef000000 (64-bit, non-prefetchable) [size=8M] Memory at ef884000 (64-bit, non-prefetchable) [size=16K] Expansion ROM at ef840000 [disabled] [size=256K] Capabilities: <access denied> Kernel driver in use: sfc One solution would be to move the case MC_CMD_MEDIA_QSFP_PLUS above XFP/SFP_PLUS, only check the 40Gbps cap, no break, fall through into the XFP/SFP_PLUS chunk, continue processing there. -- Jarod Wilson jarod@redhat.com
[toc] | [prev] | [next] | [standalone]
| From | Jarod Wilson <jarod@redhat.com> |
|---|---|
| Date | 2016-06-08 15:50 +0200 |
| Subject | Re: [PATCH net v2] sfc: report supported link speeds on SFP connections |
| Message-ID | <rHM1Q-Pq-35@gated-at.bofh.it> |
| In reply to | #1416646 |
On Tue, Jun 07, 2016 at 05:20:16PM -0400, Jarod Wilson wrote: > On Mon, Jun 06, 2016 at 02:55:29PM -0400, Jarod Wilson wrote: > > On Mon, Jun 06, 2016 at 05:29:30PM +0100, Bert Kenward wrote: > > > 7000-series SFC NICs connected with an SFP+ module currently fail to > > > report any supported link speeds. > > > > > > Reported-by: Jarod Wilson <jarod@redhat.com> > > > Signed-off-by: Bert Kenward <bkenward@solarflare.com> > > > > Had a feeling my cut might not have been quite right. Looks good to me. > > > > Reviewed-by: Jarod Wilson <jarod@redhat.com> > > ...however, upon testing, there's a gotcha. This results in my 10Gbps sfc > nic reporting that it supports 40Gbps: > > $ ethtool ens4f0 > Settings for ens4f0: > Supported ports: [ FIBRE ] > Supported link modes: 1000baseT/Full > 10000baseT/Full > 40000baseKR4/Full This turned out to be a flub on my part. My local tree wasn't clean, had some lingering test/debug crap in it that I thought I'd removed, but clearly, hadn't. With that removed, we're all good here. Tested-by: Jarod Wilson <jarod@redhat.com> -- Jarod Wilson jarod@redhat.com
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-06-08 20:20 +0200 |
| Subject | Re: [PATCH net v2] sfc: report supported link speeds on SFP connections |
| Message-ID | <rHQf7-3Ci-3@gated-at.bofh.it> |
| In reply to | #1417448 |
From: Jarod Wilson <jarod@redhat.com> Date: Wed, 8 Jun 2016 09:41:14 -0400 > On Tue, Jun 07, 2016 at 05:20:16PM -0400, Jarod Wilson wrote: >> On Mon, Jun 06, 2016 at 02:55:29PM -0400, Jarod Wilson wrote: >> > On Mon, Jun 06, 2016 at 05:29:30PM +0100, Bert Kenward wrote: >> > > 7000-series SFC NICs connected with an SFP+ module currently fail to >> > > report any supported link speeds. >> > > >> > > Reported-by: Jarod Wilson <jarod@redhat.com> >> > > Signed-off-by: Bert Kenward <bkenward@solarflare.com> >> > >> > Had a feeling my cut might not have been quite right. Looks good to me. >> > >> > Reviewed-by: Jarod Wilson <jarod@redhat.com> >> >> ...however, upon testing, there's a gotcha. This results in my 10Gbps sfc >> nic reporting that it supports 40Gbps: >> >> $ ethtool ens4f0 >> Settings for ens4f0: >> Supported ports: [ FIBRE ] >> Supported link modes: 1000baseT/Full >> 10000baseT/Full >> 40000baseKR4/Full > > This turned out to be a flub on my part. My local tree wasn't clean, had > some lingering test/debug crap in it that I thought I'd removed, but > clearly, hadn't. With that removed, we're all good here. > > Tested-by: Jarod Wilson <jarod@redhat.com> Thanks for following up. Applied, thanks everyone.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web