From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7FC3A0561; Thu, 27 Feb 2020 18:47:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C663B2C4F; Thu, 27 Feb 2020 18:47:14 +0100 (CET) Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) by dpdk.org (Postfix) with ESMTP id 49A022C02 for ; Thu, 27 Feb 2020 18:47:13 +0100 (CET) Received: by mail-pg1-f174.google.com with SMTP id j15so64246pgm.6 for ; Thu, 27 Feb 2020 09:47:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7vSijHsHKrmutP+b6LI6Bzqwe+de7pahScJpmP1EKek=; b=L/dUKmwK3LvomvaRC/5GmAeqXC+9/ATkv0Xpw6+x0lrkb/ae3ijVNpHf8YEBK3f8y6 IS3NMI1VDkNWWEIrH475zmZaV7iL6mOMoLzVfZhn/l/03QU9GQ02fYtRsWdECpGr2UcM bq125csn6K+6C6jBOTJte3bjOMuHS1fp3DTzzyukKmYfzRv5McJziwKrNyrZB5DFnFFp W2QzfArQB0k1Elx65szPHFAMOlb7vQx7ecR2gB4OmszqAaQCwlwQsuGQEBAsyz10X7g1 EgQgkxAr+LGZJchMwPgjSTnLjSwBZbdfeFu4ihCHZgN+Potb6enJ5X56SqyzuuHnmJps LvJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7vSijHsHKrmutP+b6LI6Bzqwe+de7pahScJpmP1EKek=; b=jeNK9Hkgin1GYmWe5v/fpp3Ghjo8Xj47w9MjZjdL3UL4vDKffS/GPYnRlstUl1iO6f /vTcHIMTBpmgY2wZl/HWAXVe7WCzAugKCnELeK5aIjWQ15pYvgxBLw8nm57ALVzNmHFe eobUcp0FlNt+6ZLjgTG0VPyqGHlTqIYnK6vJIgN1KHIeeC2bUBnNjanohNDsOPTy6dnq AiS8EydEj79QRPstxvmsyVgx52adVUn9qXVFZc7U4e7jhSOZtpvMzUGcHI37008OK6T7 7H7U6Mj7aT9vsUU3Nq/tL6XUoGIRvUDXL5deV2hfwteFIo9UvLv36WtcojTBLKpVG9Tu sbpA== X-Gm-Message-State: APjAAAU+z+xyoTU2k3sAX6y0i2wHkHZ47VqCc6ur05RClp71uSbwQ6JA xFfnM7CINTjTzswHaKDRnVlWfy9uz1g= X-Google-Smtp-Source: APXvYqxWuj8RRWxJXaegi7zfjkDpqF3sdA19d95LuHnBNaNWE9m3GoyozhMt4LBAwlyK0wylIc/LnA== X-Received: by 2002:a63:2447:: with SMTP id k68mr485584pgk.368.1582825632416; Thu, 27 Feb 2020 09:47:12 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q25sm7961607pfg.41.2020.02.27.09.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 09:47:12 -0800 (PST) Date: Thu, 27 Feb 2020 09:47:04 -0800 From: Stephen Hemminger To: Min Tang Cc: dev@dpdk.org Message-ID: <20200227094704.3ab4aa25@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] net/netvsc: subchannel configuration failed due to unexpected NVS response X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 27 Feb 2020 11:16:01 -0500 Min Tang 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.