From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <konstantin.ananyev@intel.com>
Received: from mga02.intel.com (mga02.intel.com [134.134.136.20])
 by dpdk.org (Postfix) with ESMTP id B3335B0A8
 for <dev@dpdk.org>; Tue, 24 Jun 2014 17:32:07 +0200 (CEST)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by orsmga101.jf.intel.com with ESMTP; 24 Jun 2014 08:32:24 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.01,538,1400050800"; d="scan'208";a="533308788"
Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153])
 by orsmga001.jf.intel.com with ESMTP; 24 Jun 2014 08:32:06 -0700
Received: from irsmsx105.ger.corp.intel.com ([169.254.7.76]) by
 IRSMSX101.ger.corp.intel.com ([169.254.1.56]) with mapi id 14.03.0123.003;
 Tue, 24 Jun 2014 16:30:55 +0100
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Zhang, Helin" <helin.zhang@intel.com>, "De Lara Guarch, Pablo"
 <pablo.de.lara.guarch@intel.com>
Thread-Topic: [dpdk-dev] [PATCH] ixgbe: Alternative fix for 82599 Bypass
 NIC,	getting incorrect media type
Thread-Index: AQHPj7qTe0zQZr/9BE69WGiZHAS0tZuAVmIA///5twCAABKMMA==
Date: Tue, 24 Jun 2014 15:30:55 +0000
Message-ID: <2601191342CEEE43887BDE71AB9772582133403A@IRSMSX105.ger.corp.intel.com>
References: <1403620889-29179-1-git-send-email-pablox.de.lara.guarch@intel.com>
 <2601191342CEEE43887BDE71AB97725821333FC2@IRSMSX105.ger.corp.intel.com>
 <F35DEAC7BCE34641BA9FAC6BCA4A12E70A74683D@SHSMSX104.ccr.corp.intel.com>
In-Reply-To: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A74683D@SHSMSX104.ccr.corp.intel.com>
Accept-Language: en-IE, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [163.33.239.181]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] ixgbe: Alternative fix for 82599 Bypass NIC,
	getting incorrect media type
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Jun 2014 15:32:08 -0000

Hi Helin,

> -----Original Message-----
> From: Zhang, Helin
> Sent: Tuesday, June 24, 2014 4:23 PM
> To: Ananyev, Konstantin; De Lara Guarch, Pablo
> Cc: dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] ixgbe: Alternative fix for 82599 Bypass N=
IC, getting incorrect media type
>=20
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ananyev, Konstantin
> Sent: Tuesday, June 24, 2014 10:47 PM
> To: De Lara Guarch, Pablo; dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] ixgbe: Alternative fix for 82599 Bypass N=
IC, getting incorrect media type
>=20
>=20
> > This was previosly solved in commit
> > 60a70d4e042350ca0f9200334b341063438be89b,
> > but this alternative fix solves the same issue, but without modifying
> > the ixgbe shared code.
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > ---
> >  lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c  |    3 --
> >  lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c |   35 ++++++++++++++++++---=
-------
> >  2 files changed, 22 insertions(+), 16 deletions(-)
> >
> > diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c
> > b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c
> > index 93c4e35..ed97ad9 100644
> > --- a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c
> > +++ b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c
> > @@ -537,9 +537,6 @@ enum ixgbe_media_type ixgbe_get_media_type_82599(st=
ruct ixgbe_hw *hw)
> >  	case IXGBE_DEV_ID_82599_SFP_SF2:
> >  	case IXGBE_DEV_ID_82599_SFP_SF_QP:
> >  	case IXGBE_DEV_ID_82599EN_SFP:
> > -#ifdef RTE_NIC_BYPASS
> > -	case IXGBE_DEV_ID_82599_BYPASS:
> > -#endif
> >  		media_type =3D ixgbe_media_type_fiber;
> >  		break;
> >  	case IXGBE_DEV_ID_82599_CX4:
> > diff --git a/lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c
> > b/lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c
> > index 27a5f70..6748ea4 100644
> > --- a/lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c
> > +++ b/lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c
> > @@ -256,19 +256,6 @@ out:
> >  	return status;
> >  }
> >
> > -/*
> > - * Wrapper around ND functions to support BYPASS nic.
> > - */
> > -s32
> > -ixgbe_bypass_init_shared_code(struct ixgbe_hw *hw) -{
> > -	if (hw->device_id =3D=3D IXGBE_DEV_ID_82599_BYPASS) {
> > -		hw->mac.type =3D ixgbe_mac_82599EB;
> > -	}
> > -
> > -	return (ixgbe_init_shared_code(hw));
> > -}
> > -
> >  static enum ixgbe_media_type
> >  ixgbe_bypass_get_media_type(struct ixgbe_hw *hw)  { @@ -284,6 +271,28
> > @@ ixgbe_bypass_get_media_type(struct ixgbe_hw *hw)
> >  	return (media_type);
> >  }
> >
> > +/*
> > + * Wrapper around ND functions to support BYPASS nic.
> > + */
> > +s32
> > +ixgbe_bypass_init_shared_code(struct ixgbe_hw *hw) {
> > +	s32 ret_val;
> > +
> > +	if (hw->device_id =3D=3D IXGBE_DEV_ID_82599_BYPASS) {
> > +		hw->mac.type =3D ixgbe_mac_82599EB;
> > +	}
> > +
> > +	ret_val =3D ixgbe_init_shared_code(hw);
> > +	if (hw->device_id =3D=3D IXGBE_DEV_ID_82599_BYPASS) {
> > +		hw->mac.ops.get_media_type =3D &ixgbe_bypass_get_media_type;
> > +		ixgbe_init_mac_link_ops_82599(hw);
> > +	}
> > +
> > +	return ret_val;
> > +}
> > +
> > +
> >  s32
> >  ixgbe_bypass_init_hw(struct ixgbe_hw *hw)  {
> > --
>=20
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>=20
> -------------------------------------------------------------------------=
-------------------------------
>=20
> Hi Pablo
>=20
> It seems that you modified ixgbe_82599.c. Do we really need to do that mo=
dification in ixgbe_82599.c? Generally we try to avoid doing
> that.
>=20
> Regards,
> Helin

Actually that's the purpose of that patch: fix the problem without modifyin=
g shared code.
So he removing previous modifications in the shared code.
Konstantin