DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: Chas Williams <3chas3@gmail.com>, "Zhang, Helin" <helin.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Charles (Chas) Williams" <chas3@att.com>
Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: update data->eth_link status on	start
Date: Mon, 2 Apr 2018 12:40:40 +0000	[thread overview]
Message-ID: <039ED4275CED7440929022BC67E7061153177875@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <CAG2-GkmwGjf7V1ZhXM3X5ivXyO0ButWfZY7ky7YSsFX679O66g@mail.gmail.com>

Hi Williams:

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chas Williams
> Sent: Saturday, March 31, 2018 1:22 AM
> To: Zhang, Helin <helin.zhang@intel.com>
> Cc: dev@dpdk.org; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>; Charles (Chas) Williams
> <chas3@att.com>
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: update data->eth_link status on
> start
> 
> On Fri, Mar 30, 2018 at 12:30 PM, Zhang, Helin <helin.zhang@intel.com>
> wrote:
> >
> >
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chas Williams
> >> Sent: Wednesday, February 14, 2018 6:56 AM
> >> To: dev@dpdk.org
> >> Cc: Lu, Wenzhuo; Ananyev, Konstantin; Charles (Chas) Williams
> >> Subject: [dpdk-dev] [PATCH] net/ixgbe: update data->eth_link status
> >> on start
> >>
> >> From: "Charles (Chas) Williams" <chas3@att.com>
> >>
> >> dev->data->eth_link isn't updated until the first interrupt.  If a
> >> link is carrier down, then this interrupt may never happen.  Before
> >> we finished starting the PMD, call ixgbe_dev_link_update() to ensure we
> have a valid status.
> >>
> >> Signed-off-by: Chas Williams <chas3@att.com>
> >> ---
> >>  drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c
> >> b/drivers/net/ixgbe/ixgbe_ethdev.c
> >> index 37eb668..27d29dc 100644
> >> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> >> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> >> @@ -2666,6 +2666,8 @@ ixgbe_dev_start(struct rte_eth_dev *dev)
> >>       if (err)
> >>               goto error;
> >>
> >> +     ixgbe_dev_link_update(dev, 0);
> > It is called in rte_eth_dev_start() if lsc is not enabled, and it is
> > not needed here to avoid any duplication.
> > BTW, did you see any issue or just check the code? Thanks!
> 
> Yes, I see an issue with bonding.  If LSC is enabled, then link_status isn't set
> until the first interrupt to update the link status.  If a link is down, this
> interrupt may never happen result in link_status being somewhat undefined.

Is your issue only happened on VF?
For PF, I saw ixgbe_check_link is called at ixgbe_dev_start, so link status is assume be updated.
If you think it is just missed in VF, can you implemented this in the similar way as PF?

Regards
Qi

> 
> >
> > /Helin
> >
> >> +
> >>  skip_link_setup:
> >>
> >>       if (rte_intr_allow_others(intr_handle)) { @@ -5033,6 +5035,8 @@
> >> ixgbevf_dev_start(struct rte_eth_dev *dev)
> >>
> >>       ixgbevf_dev_rxtx_start(dev);
> >>
> >> +     ixgbevf_dev_link_update(dev, 0);
> >> +
> >>       /* check and configure queue intr-vector mapping */
> >>       if (rte_intr_cap_multiple(intr_handle) &&
> >>           dev->data->dev_conf.intr_conf.rxq) {
> >> --
> >> 2.9.5
> >

  reply	other threads:[~2018-04-02 12:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 22:56 Chas Williams
2018-03-30 16:30 ` Zhang, Helin
2018-03-30 17:21   ` Chas Williams
2018-04-02 12:40     ` Zhang, Qi Z [this message]
2018-04-02 13:38       ` Chas Williams
2018-04-02 13:45         ` Zhang, Qi Z
2018-04-02 13:57           ` Chas Williams
2018-04-02 14:34             ` Zhang, Qi Z
2018-04-04 13:53               ` Dai, Wei
2018-04-06 14:52             ` Zhang, Helin
2018-04-06 14:59               ` Chas Williams
2018-04-06 15:59               ` Zhang, Qi Z
2018-04-08  2:05 ` Zhang, Qi Z
2018-04-08 16:08   ` Zhang, Helin
2023-12-15 13:11 Riyadi Selamat

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=039ED4275CED7440929022BC67E7061153177875@SHSMSX103.ccr.corp.intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=3chas3@gmail.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --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).