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 D3638A055F; Thu, 27 Feb 2020 17:16:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F2B7A37AF; Thu, 27 Feb 2020 17:16:14 +0100 (CET) Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by dpdk.org (Postfix) with ESMTP id 806ED2C4F for ; Thu, 27 Feb 2020 17:16:13 +0100 (CET) Received: by mail-io1-f51.google.com with SMTP id z8so97276ioh.0 for ; Thu, 27 Feb 2020 08:16:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=cH/NtPCxIuhNAAtFacnlvluJeC2vtCru2YNTrui6cts=; b=kHJawonl19aiC1BSdEWBZuLc6+8lJsfqdGzTJSSx/N2wQsIPaZHIuRigU5iEUyRsJY 2V+1AbXWeea/RurxFyk1WMKuli6nDVXlNOH5T/kRygxw/MWDqAvHAvOf3+NpnLgWLzKt oDT56FR7i5g09kbzjvY3/k0KrxZlZJMkX2tzO33L/m1DAuhG7+jhNn88BPxKQUTo5p/3 NktM8KQYIJVfkQjOjh8tKOhExwmYMjGwg57M3oP4If7UazyIcDdL18VgC1jGcrU+LPcY y4AmPCXdi5iV+5v6wiX1g7boQuRVl+cRrSxU17rVgvFlRtcfB/Ao4ysM9GVFSAmG/BOQ oqBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=cH/NtPCxIuhNAAtFacnlvluJeC2vtCru2YNTrui6cts=; b=P0t1q7FqwFe3aHJUGqVKQk5A0HSzeumTtdYSs5jnIPEz6vPUSDBab60Y89nvQPYmGd pPu6QcwkCI99v7XCNkLN/uDPX3GILxNWEwsWMakMWAD8kfsid5veXakPSZhSsrC4zp3x j/aqNwgh9C7unQfSY+FM0RzD6QZe5YWbo0GFOwDsJ+41bOuhSwK8MLZ96/rFzAyhjlRe Ct0HDk74apbhsEWA3WEY27AFxv9iJyBLOVwXd56Sq5VXlHIHHoYXscfR2rzBofUgYjjp UrehUiHXeb7JZ52vFBcSaZDvMYYoRwYZfzW8ZpGag+3bWLVWrFaaRcpQzSGGSpYt1AYm BkSg== X-Gm-Message-State: APjAAAVFJyC0DNEO8poauhnH+wpbTnctL7ZCJu533XQO+4RTyHAc7DNZ e0mCZE3MX0t6i6cdnekCL1FGIomTvUd9ZShLoDoX3b+6 X-Google-Smtp-Source: APXvYqyouDQ/SmbYehAPagMcAftiGnxn3sT50PLCftHMLZHdiobfVEZlaIUTUCI5iD+3bmm46363W/hd1TBOEIyWc0E= X-Received: by 2002:a6b:8d82:: with SMTP id p124mr26684iod.233.1582820172504; Thu, 27 Feb 2020 08:16:12 -0800 (PST) MIME-Version: 1.0 From: Min Tang Date: Thu, 27 Feb 2020 11:16:01 -0500 Message-ID: To: dev@dpdk.org, stephen@networkplumber.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [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" 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) {