DPDK usage discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: <martin_curran-gray@keysight.com>
Cc: <users@dpdk.org>
Subject: Re: [dpdk-users] Link Status and Interrupts in 2.2.0
Date: Mon, 25 Apr 2016 13:03:29 -0700	[thread overview]
Message-ID: <20160425130329.1ed98942@xeon-e3> (raw)
In-Reply-To: <22C95CA62CBADB498D32A348F0F073BC116CC81F@wcosexch02k.cos.is.keysight.com>

On Mon, 25 Apr 2016 11:49:52 +0000
<martin_curran-gray@keysight.com> wrote:

> Hello All,
> 
> Been adding in support for the interrupt handler for the link status for ports on an X710 card.
> 
> Before I changed the lsc field of the intr_conf to 1, I was able to see the link status information correctly.
> 
> The documentation does say that if interrupts are enabled, the rte_eth_link_get function recovers the information from a structure that the interrupt host thread fills in, rather than going to the card it's self.
> 
> This seems reasonable, however....once you've had an interrupt then all is good,
> 
> But if the link was "active" when dpdk and my app starts up, then no interrupt is generated, which then means that global structure is not filled in, so I see
> 
> get link status
> status is 0  speed is 0 duplex is 0
> 
> if I turn the lasers on and off on my source I get the expected values, since the interrupt event causes the global data to be populated.
> 
> get link status
> status is 1  speed is 10000 duplex is 2
> 
> So the question is, how do I use the LSC interrupts via the "rte_eth_dev_callback_register" function,
> but get the correct values in the link status information if no interrupts occur?
> 
> I saw a submission to the patchwork 7160, dated Sep 24 2015 but it was marked as not applicable , archived.....
> 
> Many Thanks
> 
> 
> Martin
> 
> R&D Engineer
> Keysight Technologies UK Ltd

Your application needs to make one call to check for current link state after
device is started. After that all updates can be done from the LSC interrupt callback.

  reply	other threads:[~2016-04-25 20:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 11:49 martin_curran-gray
2016-04-25 20:03 ` Stephen Hemminger [this message]
2016-04-26  6:03 ` martin_curran-gray
2016-04-27  9:39 ` 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=20160425130329.1ed98942@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=martin_curran-gray@keysight.com \
    --cc=users@dpdk.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;
as well as URLs for NNTP newsgroup(s).