[dpdk-users] Link Status and Interrupts in 2.2.0

Stephen Hemminger stephen at networkplumber.org
Mon Apr 25 22:03:29 CEST 2016


On Mon, 25 Apr 2016 11:49:52 +0000
<martin_curran-gray at 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.


More information about the users mailing list