From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Wu, Jingjing" <jingjing.wu@intel.com>,
"Zhang, Helin" <helin.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/i40e: use PHY type to check PHY capability
Date: Mon, 26 Sep 2016 00:52:13 +0000 [thread overview]
Message-ID: <039ED4275CED7440929022BC67E706115064DEE6@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <9BB6961774997848B5B42BEC655768F80E272427@SHSMSX103.ccr.corp.intel.com>
Hi
> -----Original Message-----
> From: Wu, Jingjing
> Sent: Sunday, September 25, 2016 5:59 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Zhang, Helin <helin.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH v3 1/2] net/i40e: use PHY type to check PHY capability
>
>
>
> > -----Original Message-----
> > From: Zhang, Qi Z
> > Sent: Friday, September 23, 2016 1:50 AM
> > To: Wu, Jingjing <jingjing.wu@intel.com>; Zhang, Helin
> > <helin.zhang@intel.com>
> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> > Subject: [PATCH v3 1/2] net/i40e: use PHY type to check PHY capability
> >
> > In previous code, we use device ID to check PHY capability which is
> > not extensible since there is always new device be added.
> > Now we use PHY type to detect PHY capability.
> > PHY type encoded all link speed the device support, it is read out
> > through aq command "get_phy_capability"
> > at init stage.
> >
> > Signed-off-by: Zhang Qi <qi.z.zhang@intel.com>
> > ---
> > drivers/net/i40e/i40e_ethdev.c | 33 ++++++++++++++++++++++++++++-----
> > drivers/net/i40e/i40e_ethdev.h | 8 ++++++++
> > 2 files changed, 36 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> > b/drivers/net/i40e/i40e_ethdev.c index acc25a2..9658503 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -411,6 +411,7 @@ static int i40e_dev_filter_ctrl(struct rte_eth_dev
> *dev,
> > void *arg);
> > static int i40e_dev_get_dcb_info(struct rte_eth_dev *dev,
> > struct rte_eth_dcb_info *dcb_info);
> > +static int i40e_dev_sync_phy_type(struct i40e_hw *hw);
> > static void i40e_configure_registers(struct i40e_hw *hw); static
> > void i40e_hw_init(struct rte_eth_dev *dev); static int
> > i40e_config_qinq(struct i40e_hw *hw, struct i40e_vsi *vsi); @@ -1028,7
> > +1029,11 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
> > config_floating_veb(dev);
> > /* Clear PXE mode */
> > i40e_clear_pxe_mode(hw);
> > -
> > + ret = i40e_dev_sync_phy_type(hw);
> > + if (ret != I40E_SUCCESS) {
> > + PMD_INIT_LOG(ERR, "Failed to init phy type: %d", ret);
> > + goto err_sync_phy_type;
> > + }
> Should we return from device initialization if failure?
Admin queue is already initialized before this, get_phy_capability should
not fail, so initialization should stop if an unexpected failure happen.
> And return value of i40e_dev_sync_phy_type is standard error, but you check It
> by comparing with I40E defined error code.
I will correct it, thanks for capture this.
>
> Thanks
> Jingjing
Thanks
Qi
next prev parent reply other threads:[~2016-09-26 0:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 17:49 [dpdk-dev] [PATCH v3 0/2] net/i40e: enable 25G device Zhang Qi
2016-09-22 17:49 ` [dpdk-dev] [PATCH v3 1/2] net/i40e: use PHY type to check PHY capability Zhang Qi
2016-09-25 9:58 ` Wu, Jingjing
2016-09-26 0:52 ` Zhang, Qi Z [this message]
2016-09-22 17:49 ` [dpdk-dev] [PATCH v3 2/2] net/i40e: enable 25G device Zhang Qi
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=039ED4275CED7440929022BC67E706115064DEE6@SHSMSX103.ccr.corp.intel.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=helin.zhang@intel.com \
--cc=jingjing.wu@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).