[dpdk-dev] [PATCH] netvsc: update link info when getting device info

Stephen Hemminger stephen at networkplumber.org
Fri Feb 7 00:45:51 CET 2020


On Thu,  6 Feb 2020 12:55:41 +0200
Mohammed Gamal <mgamal at redhat.com> wrote:

> testpmd 'show summary' command always shows interface status as down
> with 0 Mbps speed regardless of the underlying VF's status.
> This happens as hn_dev_link_update() is never called, even on the initial
> RNDIS_STATUS_MEDIA_CONNECT message as LSC interrupts are not yet enabled
> at this point.
> 
> Let's call it and update link info when calling hn_dev_info_get().
> 
> Signed-off-by: Mohammed Gamal <mgamal at redhat.com>

This is not the right way to address this.

There is nothing in rte_eth_dev_info about link status.
That is in rte_eth_link_get.  I think the issue is that testpmd
calls with "nowait" and the definition of nowait is poorly designed in original
DPDK. The Intel version of wait/nowait is to have rte_eth_link_get wait until
the link comes up (in a spin loop). And nowait just polls state.

The current netvsc driver implements no wait, as "I will ask the host what
the link state is but not wait for a response". This is probably not
what testpmd wants.

I can easily fix netvsc to block even in nowait case, but first we need
to see what other drivers do.

Also link state is undefined if driver has never started.

Is testpmd using Link State Interrupt?





More information about the dev mailing list