[dpdk-dev] [PATCH] net/ixgbe: 10GBASE-T SFP+ copper support
Ido Goshen
Ido at cgstowernetworks.com
Wed Apr 24 23:25:04 CEST 2019
> -----Original Message-----
> From: Ananyev, Konstantin <konstantin.ananyev at intel.com>
> Sent: Wednesday, April 24, 2019 2:47 PM
> To: Ido Goshen <Ido at cgstowernetworks.com>; Lu, Wenzhuo
> <wenzhuo.lu at intel.com>
> Cc: dev at dpdk.org
> Subject: RE: [PATCH] net/ixgbe: 10GBASE-T SFP+ copper support
>
>
>
> >
> > From: Ido Goshen <ido at cgstowernetworks.com>
> >
> > 10BASE-T SFP+ copper transceivers become cheaper and popular So far
> > those were blocked by ixgbe as “unsupported”.
> > e.g.
> > eth_ixgbe_dev_init(): Unsupported SFP+ Module
> > eth_ixgbe_dev_init(): Hardware Initialization Failure: -19
> > EAL: Requested device 0000:0a:00.0 cannot be used
> >
> > This patch expands the usage of allow_unsupported_sfp to be more
> > general and makes ixgbe more tolerant to unknown SFPs
>
>
> I don't think it is a good idea to change the base code to blindly allow
> unknown SFPs.
> Again in eth_ixgbe_dev_init() we do set
> hw->allow_unsupported_sfp = 1;
> so the function below will return success anyway,
what's the reason to not allow unknown SFPs?
as is they are explicitly blocked and not working anyway, why not give them a chance?
More inputs
1. i40e already does support it (I didn't go deep into it but it just seems less strict on hw_init)
2. even with ixgbe it can work, because unsupported is only checked by ixgbe_init_hw
so if the SFP is inserted after the app has started it does work
kind of inconsistent
>
> >
> > Signed-off-by: Ido Goshen <ido at cgstowernetworks.com>
> > ---
> > drivers/net/ixgbe/base/ixgbe_phy.c | 22 +++++++++++-----------
> > drivers/net/ixgbe/base/ixgbe_x550.c | 3 +++
> > 2 files changed, 14 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/net/ixgbe/base/ixgbe_phy.c
> > b/drivers/net/ixgbe/base/ixgbe_phy.c
> > index dd118f9..ff96afc 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_phy.c
> > +++ b/drivers/net/ixgbe/base/ixgbe_phy.c
> > @@ -1527,18 +1527,9 @@ s32 ixgbe_identify_sfp_module_generic(struct
> ixgbe_hw *hw)
> > if (hw->phy.type == ixgbe_phy_sfp_intel) {
> > status = IXGBE_SUCCESS;
> > } else {
> > - if (hw->allow_unsupported_sfp == true) {
> > - EWARN(hw,
> > - "WARNING: Intel (R)
> Network Connections are quality tested using Intel (R) Ethernet
> > Optics. "
> > - "Using untested modules is
> not supported and may cause unstable operation or damage
> > to the module or the adapter. "
> > - "Intel Corporation is not
> responsible for any harm caused by using untested modules.\n");
> > - status = IXGBE_SUCCESS;
> > - } else {
> > - DEBUGOUT("SFP+ module not
> supported\n");
> > - hw->phy.type =
> > + hw->phy.type =
> > ixgbe_phy_sfp_unsupported;
> > - status =
> IXGBE_ERR_SFP_NOT_SUPPORTED;
> > - }
> > + status = IXGBE_ERR_SFP_NOT_SUPPORTED;
> > }
> > } else {
> > status = IXGBE_SUCCESS;
> > @@ -1546,6 +1537,15 @@ s32 ixgbe_identify_sfp_module_generic(struct
> ixgbe_hw *hw)
> > }
> >
> > out:
> > + if (status == IXGBE_ERR_SFP_NOT_SUPPORTED &&
> > + hw->allow_unsupported_sfp) {
> > + PMD_INIT_LOG(WARNING,
> > + "WARNING: Intel (R) Network Connections
> are quality tested using Intel (R) Ethernet Optics. "
> > + "Using untested modules is not supported
> and may cause unstable
> > +operation or damage to the module or
> > the adapter. "
> > + "Intel Corporation is not responsible for any
> harm caused by using untested modules.\n");
> > + hw->phy.type = ixgbe_phy_unknown;
> > + status = IXGBE_SUCCESS;
> > + }
> > return status;
> >
> > err_read_i2c_eeprom:
> > diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c
> > b/drivers/net/ixgbe/base/ixgbe_x550.c
> > index a920a14..212d9a0 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_x550.c
> > +++ b/drivers/net/ixgbe/base/ixgbe_x550.c
> > @@ -1539,6 +1539,9 @@ STATIC s32
> ixgbe_supported_sfp_modules_X550em(struct ixgbe_hw *hw, bool *linear)
> > *linear = false;
> > break;
> > case ixgbe_sfp_type_unknown:
> > + if (hw->allow_unsupported_sfp)
> > + return IXGBE_SUCCESS;
> > + /* fall through */
> > case ixgbe_sfp_type_1g_cu_core0:
> > case ixgbe_sfp_type_1g_cu_core1:
> > default:
> > --
> > 1.9.1
More information about the dev
mailing list