DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Jia Yu <jyu-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH 1/2] rte_ethdev: update link status (speed, duplex, link_up) after rte_eth_dev_start
Date: Fri, 30 Jan 2015 11:28:35 +0100	[thread overview]
Message-ID: <3121142.D7ktn8xfBZ@xps13> (raw)
In-Reply-To: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A7BBF2A-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>

Jia, any news on this patchset?

2014-11-12 03:57, Zhang, Helin:
> Hi Jia
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Jia Yu
> > Sent: Saturday, November 8, 2014 1:32 AM
> > To: dev-VfR2kkLFssw@public.gmane.org
> > Subject: [dpdk-dev] [PATCH 1/2] rte_ethdev: update link status (speed, duplex,
> > link_up) after rte_eth_dev_start
> > 
> > Since LSR interrupt is disabled by pmd drivers, link status in rte_eth_device is
> > always down.
> If LSC interrupt is disabled by default, it will poll the link status during the initialization
> or in dev_start, and then the link status should he correct. If I am not wrong.
> 
> > Bond slave_configure() enables LSR interrupt on devices to get notification if link
> > status changes. However, the LSC interrupt at device start time is still lost.
> Before enabling interrupt for LSC, the link status should be polled. So after the port
> startup, the link status should be there.
> 
> > 
> > In this fix, call link_update to read link status from hardware register at device
> > start time.
> Could you help to explain this code changes a bit more? Why we need it?
> 
> > 
> > Issue:
> > Change-Id: Ib57a1c9114f922485c7b0f4338bfe7b3d3f87d65
> > Signed-off-by: Jia Yu <jyu-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
> > ---
> >  lib/librte_ether/rte_ethdev.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index
> > ff1c769..6c01b02 100644
> > --- a/lib/librte_ether/rte_ethdev.c
> > +++ b/lib/librte_ether/rte_ethdev.c
> > @@ -869,6 +869,10 @@ rte_eth_dev_start(uint8_t port_id)
> > 
> >  	rte_eth_dev_config_restore(port_id);
> > 
> > +	if (dev->data->dev_conf.intr_conf.lsc != 0) {
> > +		FUNC_PTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP);
> > +		(*dev->dev_ops->link_update)(dev, 0);
> > +	}
> >  	return 0;
> >  }
> > 
> > --
> > 1.9.1
> 
> Regards,
> Helin

  parent reply	other threads:[~2015-01-30 10:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 17:31 [PATCH 0/2] rte_ethdev fix/improvement Jia Yu
     [not found] ` <1415381511-43364-1-git-send-email-jyu-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2014-11-07 17:31   ` [PATCH 1/2] rte_ethdev: update link status (speed, duplex, link_up) after rte_eth_dev_start Jia Yu
     [not found]     ` <1415381511-43364-2-git-send-email-jyu-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2014-11-12  3:57       ` Zhang, Helin
     [not found]         ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A7BBF2A-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-01-30 10:28           ` Thomas Monjalon [this message]
2015-02-03  8:00             ` Jia Yu
     [not found]               ` <D0F5BD49.32466%jyu-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2015-02-03  8:35                 ` Zhang, Helin
     [not found]                   ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A803FED-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-03 18:53                     ` Jia Yu
     [not found]                       ` <D0F656A6.32525%jyu-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2015-02-04  0:37                         ` Zhang, Helin
2014-11-07 17:31   ` [PATCH 2/2] rte_ethdev: add return status for rte_eth_stats_get Jia Yu
2014-11-10  9:40   ` [PATCH 0/2] rte_ethdev fix/improvement Thomas Monjalon
2014-11-11 23:48     ` Jia Yu
     [not found]       ` <D087DFF2.2BC9E%jyu-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2014-11-12  9:35         ` Thomas Monjalon
2015-02-11  3:20   ` Zhang, Helin
     [not found]     ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A806C0B-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-18 16:51       ` 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=3121142.D7ktn8xfBZ@xps13 \
    --to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=jyu-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
    /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