DPDK patches and discussions
 help / color / mirror / Atom feed
From: Luca Boccassi <bluca@debian.org>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"3chas3@gmail.com" <3chas3@gmail.com>,
	 "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v4] net/ixgbe: add LHA ID to x550 code
Date: Tue, 20 Nov 2018 21:08:23 +0000	[thread overview]
Message-ID: <1542748103.27590.2.camel@debian.org> (raw)
In-Reply-To: <039ED4275CED7440929022BC67E70611532E8C42@SHSMSX103.ccr.corp.intel.com>

On Tue, 2018-11-20 at 19:52 +0000, Zhang, Qi Z wrote:
> > -----Original Message-----
> > From: Luca Boccassi [mailto:bluca@debian.org]
> > Sent: Tuesday, November 20, 2018 3:27 AM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> > 3chas3@gmail.com; Luca Boccassi <bluca@debian.org>; stable@dpdk.org
> > Subject: [PATCH v4] net/ixgbe: add LHA ID to x550 code
> > 
> > ixgbe is able to recognize 1G SX and LX id, but it is missing the
> > LHA.
> > Add it, so that it can handle LHA sfp plugin.
> > 
> > Fixes: d2e72774e58c ("ixgbe/base: support X550")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> 
> The patch is OK for me, but here is some coding style need to fix.
> 
> Reviewed-by: Qi Zhang <qi.z.zhang@intel.com>

Thanks for the review!

I intentionally left the checkpatch complaint unfixed as it applies
just the same to the other existing lines above and below the addition
of this patch, so it makes more sense for it to be fixed (if desired)
separately and for all affected lines.

> > ---
> > v4: dropped first patch, no longer necessary in 18.11
> > 
> >  drivers/net/ixgbe/base/ixgbe_82599.c |  2 ++
> >  drivers/net/ixgbe/base/ixgbe_phy.c   | 13 +++++++++++++
> >  drivers/net/ixgbe/base/ixgbe_phy.h   |  1 +
> >  drivers/net/ixgbe/base/ixgbe_type.h  |  2 ++
> > drivers/net/ixgbe/base/ixgbe_x550.c  |  4 ++++
> >  5 files changed, 22 insertions(+)
> > 
> > diff --git a/drivers/net/ixgbe/base/ixgbe_82599.c
> > b/drivers/net/ixgbe/base/ixgbe_82599.c
> > index 7de753fd3..96bdde62c 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_82599.c
> > +++ b/drivers/net/ixgbe/base/ixgbe_82599.c
> > @@ -392,6 +392,8 @@ s32 ixgbe_get_link_capabilities_82599(struct
> > ixgbe_hw *hw,
> >  	/* Check if 1G SFP module. */
> >  	if (hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
> >  	    hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
> > +	    hw->phy.sfp_type == ixgbe_sfp_type_1g_lha_core0 ||
> > +	    hw->phy.sfp_type == ixgbe_sfp_type_1g_lha_core1 ||
> >  	    hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
> >  	    hw->phy.sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
> >  	    hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 || diff
> > --git
> > a/drivers/net/ixgbe/base/ixgbe_phy.c
> > b/drivers/net/ixgbe/base/ixgbe_phy.c
> > index 6cdd8fbab..dd118f917 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_phy.c
> > +++ b/drivers/net/ixgbe/base/ixgbe_phy.c
> > @@ -1402,6 +1402,13 @@ s32 ixgbe_identify_sfp_module_generic(struct
> > ixgbe_hw *hw)
> >  				else
> >  					hw->phy.sfp_type =
> >  						ixgbe_sfp_type_1g_
> > lx_core1;
> > +			} else if (comp_codes_1g &
> > IXGBE_SFF_1GBASELHA_CAPABLE) {
> > +				if (hw->bus.lan_id == 0)
> > +					hw->phy.sfp_type =
> > +						ixgbe_sfp_type_1g_
> > lha_core0;
> > +				else
> > +					hw->phy.sfp_type =
> > +						ixgbe_sfp_type_1g_
> > lha_core1;
> >  			} else {
> >  				hw->phy.sfp_type =
> > ixgbe_sfp_type_unknown;
> >  			}
> > @@ -1489,6 +1496,8 @@ s32 ixgbe_identify_sfp_module_generic(struct
> > ixgbe_hw *hw)
> >  		if (comp_codes_10g == 0 &&
> >  		    !(hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_cu_core1 ||
> >  		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_cu_core0 ||
> > +		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lha_core0 ||
> > +		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lha_core1 ||
> >  		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lx_core0 ||
> >  		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lx_core1 ||
> >  		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_sx_core0 || @@
> > -1508,6 +1517,8 @@ s32 ixgbe_identify_sfp_module_generic(struct
> > ixgbe_hw
> > *hw)
> >  		if (!(enforce_sfp &
> > IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) &&
> >  		    !(hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_cu_core0 ||
> >  		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_cu_core1 ||
> > +		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lha_core0 ||
> > +		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lha_core1 ||
> >  		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lx_core0 ||
> >  		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lx_core1 ||
> >  		      hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_sx_core0 || @@
> > -1835,11 +1846,13 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct
> > ixgbe_hw *hw,
> >  	 */
> >  	if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 ||
> >  	    sfp_type == ixgbe_sfp_type_1g_lx_core0 ||
> > +	    sfp_type == ixgbe_sfp_type_1g_lha_core0 ||
> >  	    sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
> >  	    sfp_type == ixgbe_sfp_type_1g_sx_core0)
> >  		sfp_type = ixgbe_sfp_type_srlr_core0;
> >  	else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 ||
> >  		 sfp_type == ixgbe_sfp_type_1g_lx_core1 ||
> > +		 sfp_type == ixgbe_sfp_type_1g_lha_core1 ||
> >  		 sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
> >  		 sfp_type == ixgbe_sfp_type_1g_sx_core1)
> >  		sfp_type = ixgbe_sfp_type_srlr_core1; diff --git
> > a/drivers/net/ixgbe/base/ixgbe_phy.h
> > b/drivers/net/ixgbe/base/ixgbe_phy.h
> > index 132fa542b..f1605f2cc 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_phy.h
> > +++ b/drivers/net/ixgbe/base/ixgbe_phy.h
> > @@ -41,6 +41,7 @@
> >  #define IXGBE_SFF_1GBASESX_CAPABLE	0x1
> >  #define IXGBE_SFF_1GBASELX_CAPABLE	0x2
> >  #define IXGBE_SFF_1GBASET_CAPABLE	0x8
> > +#define IXGBE_SFF_1GBASELHA_CAPABLE	0x10
> >  #define IXGBE_SFF_10GBASESR_CAPABLE	0x10
> >  #define IXGBE_SFF_10GBASELR_CAPABLE	0x20
> >  #define IXGBE_SFF_SOFT_RS_SELECT_MASK	0x8
> > diff --git a/drivers/net/ixgbe/base/ixgbe_type.h
> > b/drivers/net/ixgbe/base/ixgbe_type.h
> > index cee6ba2e0..077b8f01c 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_type.h
> > +++ b/drivers/net/ixgbe/base/ixgbe_type.h
> > @@ -3724,6 +3724,8 @@ enum ixgbe_sfp_type {
> >  	ixgbe_sfp_type_1g_sx_core1 = 12,
> >  	ixgbe_sfp_type_1g_lx_core0 = 13,
> >  	ixgbe_sfp_type_1g_lx_core1 = 14,
> > +	ixgbe_sfp_type_1g_lha_core0 = 15,
> > +	ixgbe_sfp_type_1g_lha_core1 = 16,
> >  	ixgbe_sfp_type_not_present = 0xFFFE,
> >  	ixgbe_sfp_type_unknown = 0xFFFF
> >  };
> > diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c
> > b/drivers/net/ixgbe/base/ixgbe_x550.c
> > index f7b98af52..a920a146e 100644
> > --- a/drivers/net/ixgbe/base/ixgbe_x550.c
> > +++ b/drivers/net/ixgbe/base/ixgbe_x550.c
> > @@ -1534,6 +1534,8 @@ STATIC s32
> > ixgbe_supported_sfp_modules_X550em(struct ixgbe_hw *hw, bool
> > *linear)
> >  	case ixgbe_sfp_type_1g_sx_core1:
> >  	case ixgbe_sfp_type_1g_lx_core0:
> >  	case ixgbe_sfp_type_1g_lx_core1:
> > +	case ixgbe_sfp_type_1g_lha_core0:
> > +	case ixgbe_sfp_type_1g_lha_core1:
> >  		*linear = false;
> >  		break;
> >  	case ixgbe_sfp_type_unknown:
> > @@ -1874,6 +1876,8 @@ s32 ixgbe_get_link_capabilities_X550em(struct
> > ixgbe_hw *hw,
> >  		/* Check if 1G SFP module. */
> >  		if (hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0
> > ||
> >  		    hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1
> > +		    || hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lha_core0 ||
> > +		    hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lha_core1
> >  		    || hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lx_core0 ||
> >  		    hw->phy.sfp_type ==
> > ixgbe_sfp_type_1g_lx_core1) {
> >  			*speed = IXGBE_LINK_SPEED_1GB_FULL;
> > --
> > 2.19.1
> 
> 
-- 
Kind regards,
Luca Boccassi

  reply	other threads:[~2018-11-20 21:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-15 17:09 [dpdk-dev] [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Luca Boccassi
2018-08-15 17:09 ` [dpdk-dev] [PATCH 2/2] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-09-26 10:22 ` [dpdk-dev] [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Luca Boccassi
2018-11-01 14:04 ` Luca Boccassi
2018-11-01 14:04   ` [dpdk-dev] [PATCH 2/2] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-11-01 14:41   ` [dpdk-dev] [PATCH 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Luca Boccassi
2018-11-02 14:11   ` Zhang, Qi Z
2018-11-02 15:21     ` Luca Boccassi
2018-11-02 16:49       ` Zhang, Qi Z
2018-11-02 17:08         ` [dpdk-dev] [dpdk-stable] " Luca Boccassi
2018-11-02 15:18 ` [dpdk-dev] [PATCH v3 " Luca Boccassi
2018-11-02 15:18   ` [dpdk-dev] [PATCH v3 2/2] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-11-05 17:41   ` [dpdk-dev] [PATCH v3 1/2] net/ixgbe: fix x550 code to handle unidentified PHY Zhang, Qi Z
2018-11-05 18:08     ` [dpdk-dev] [dpdk-stable] " Luca Boccassi
2018-11-05 18:18     ` [dpdk-dev] " Chas Williams
2018-11-06 23:31       ` Zhang, Qi Z
2018-11-07 12:55         ` Luca Boccassi
2018-11-07 18:27           ` Zhang, Qi Z
2018-11-09 13:18             ` [dpdk-dev] [dpdk-stable] " Luca Boccassi
2018-11-20 11:28               ` Luca Boccassi
2018-11-20 11:27   ` [dpdk-dev] [PATCH v4] net/ixgbe: add LHA ID to x550 code Luca Boccassi
2018-11-20 19:52     ` Zhang, Qi Z
2018-11-20 21:08       ` Luca Boccassi [this message]
2018-11-22 17:54         ` [dpdk-dev] [dpdk-stable] " Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1542748103.27590.2.camel@debian.org \
    --to=bluca@debian.org \
    --cc=3chas3@gmail.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).