DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Min Tang <tommytang@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] net/netvsc: subchannel configuration failed due to unexpected NVS response
Date: Thu, 27 Feb 2020 09:47:04 -0800	[thread overview]
Message-ID: <20200227094704.3ab4aa25@hermes.lan> (raw)
In-Reply-To: <CAEHUbGT6exgRiV4_5kjOZgfSwuyP53Lci6qAzvQowM8K=vn3_A@mail.gmail.com>

On Thu, 27 Feb 2020 11:16:01 -0500
Min Tang <tommytang@gmail.com> wrote:

> Hi Stephen:
> 
> I saw the following error messages when using DPDK 18.11.2 in Azure:
> 
> hn_nvs_execute(): unexpected NVS resp 0x6b, expect 0x85
> hn_dev_configure(): subchannel configuration failed
> 
> It was not easy to reproduce it and it only occurred with multiple queues
> enabled. In hn_nvs_execute it expects the response to match the request. In
> the failed case, it was expecting NVS_TYPE_SUBCH_REQ (133 or 0x85) but
> got NVS_TYPE_RNDIS(107 or 0x6b). Obviously somewhere the NVS_TYPE_RNDIS
> message had been sent before the NVS_TYPE_SUBCH_REQ message was sent.  I
> looked at the code and found that the NVS_TYPE_RNDIS message needs
> completion response but it does not receive the response message anywhere.
> The fix would be receiving and discarding the wrong response message(s).
> 
> I put the following patches and it has fixed the problem.
> 
> --- a/drivers/net/netvsc/hn_nvs.c 2020-02-27 11:08:29.755530969 -0500
> +++ b/drivers/net/netvsc/hn_nvs.c 2020-02-27 11:07:21.567371798 -0500
> @@ -92,7 +92,7 @@
>   if (hdr->type != type) {
>   PMD_DRV_LOG(ERR, "unexpected NVS resp %#x, expect %#x",
>      hdr->type, type);
> - goto retry;
> + return -EINVAL;
>   }
> 
>   if (len < resplen) {

Thanks for the analysis. Not sure if this the right fix.
Looks like the control channel needs additional locking.
Having two outstanding requests at once is not going to work well.

  reply	other threads:[~2020-02-27 17:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 16:16 Min Tang
2020-02-27 17:47 ` Stephen Hemminger [this message]
2020-02-27 18:24   ` Min Tang
2020-03-01 17:54 ` Stephen Hemminger
2020-03-02 15:40   ` Min Tang
2020-03-02 16:07     ` Stephen Hemminger

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=20200227094704.3ab4aa25@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=tommytang@gmail.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).