DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Mohammed Gamal <mgamal@redhat.com>
Cc: dev@dpdk.org, sthemmin@microsoft.com, kys@microsoft.com,
	haiyangz@microsoft.com
Subject: Re: [dpdk-dev] [PATCH] netvsc: update link info when getting device info
Date: Thu, 6 Feb 2020 15:45:51 -0800	[thread overview]
Message-ID: <20200206154551.0c6f7f48@shemminger-XPS-13-9360> (raw)
In-Reply-To: <20200206105541.1186-1-mgamal@redhat.com>

On Thu,  6 Feb 2020 12:55:41 +0200
Mohammed Gamal <mgamal@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@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?




  reply	other threads:[~2020-02-06 23:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 10:55 Mohammed Gamal
2020-02-06 23:45 ` Stephen Hemminger [this message]
2020-02-07  0:10 ` [dpdk-dev] [RFT] net/netvsc: initialize link state Stephen Hemminger
2020-02-07 13:22   ` Mohammed Gamal
2020-02-07 16:12     ` Stephen Hemminger
2020-02-07 16:26       ` Mohammed Gamal
2020-02-07 18:08 ` [dpdk-dev] [PATCH v2] " Stephen Hemminger
2020-02-10 13:10   ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit

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=20200206154551.0c6f7f48@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=mgamal@redhat.com \
    --cc=sthemmin@microsoft.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).