DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Helin" <helin.zhang@intel.com>
To: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] ixgbe: Alternative fix for 82599 Bypass NIC, getting incorrect media type
Date: Tue, 24 Jun 2014 15:34:17 +0000	[thread overview]
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A74689C@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <2601191342CEEE43887BDE71AB9772582133403A@IRSMSX105.ger.corp.intel.com>



-----Original Message-----
From: Ananyev, Konstantin 
Sent: Tuesday, June 24, 2014 11:31 PM
To: Zhang, Helin; De Lara Guarch, Pablo
Cc: dev@dpdk.org
Subject: RE: [dpdk-dev] [PATCH] ixgbe: Alternative fix for 82599 Bypass NIC, getting incorrect media type

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 NIC, getting incorrect media type
> 
> -----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 NIC, getting incorrect media type
> 
> 
> > 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(struct 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 = 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 == IXGBE_DEV_ID_82599_BYPASS) {
> > -		hw->mac.type = 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 == IXGBE_DEV_ID_82599_BYPASS) {
> > +		hw->mac.type = ixgbe_mac_82599EB;
> > +	}
> > +
> > +	ret_val = ixgbe_init_shared_code(hw);
> > +	if (hw->device_id == IXGBE_DEV_ID_82599_BYPASS) {
> > +		hw->mac.ops.get_media_type = &ixgbe_bypass_get_media_type;
> > +		ixgbe_init_mac_link_ops_82599(hw);
> > +	}
> > +
> > +	return ret_val;
> > +}
> > +
> > +
> >  s32
> >  ixgbe_bypass_init_hw(struct ixgbe_hw *hw)  {
> > --
> 
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 
> ----------------------------------------------------------------------
> ----------------------------------
> 
> Hi Pablo
> 
> It seems that you modified ixgbe_82599.c. Do we really need to do that 
> modification in ixgbe_82599.c? Generally we try to avoid doing that.
> 
> Regards,
> Helin

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

----------------------------------------------------------------------------------------------------------------------------------
Hi Konstantin

OK. I got it. It is a roll-back. Thanks!

Regards,
Helin

  reply	other threads:[~2014-06-24 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 14:41 Pablo de Lara
2014-06-24 14:46 ` Ananyev, Konstantin
2014-06-24 15:22   ` Zhang, Helin
2014-06-24 15:30     ` Ananyev, Konstantin
2014-06-24 15:34       ` Zhang, Helin [this message]
2014-06-26 12:24   ` Thomas Monjalon

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=F35DEAC7BCE34641BA9FAC6BCA4A12E70A74689C@SHSMSX104.ccr.corp.intel.com \
    --to=helin.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=pablo.de.lara.guarch@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).