From patchwork Fri Dec 11 20:48:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Long Li X-Patchwork-Id: 85030 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2533AA09EE; Fri, 11 Dec 2020 21:48:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 74F51BC88; Fri, 11 Dec 2020 21:48:31 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by dpdk.org (Postfix) with ESMTP id D34F4BC86; Fri, 11 Dec 2020 21:48:28 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1004) id 1FD0420B717A; Fri, 11 Dec 2020 12:48:27 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1FD0420B717A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com; s=default; t=1607719707; bh=+5SYvTplVHIKnkz8mY/CDB6EZANvPERDzy3Lev6VVeE=; h=From:To:Cc:Subject:Date:From; b=I2eB4UiQiJqcnslHcozhG9iGQyG+0w2kYtS5YiJYpD143OWNyc2wNkU7Z5UgfSSi8 v8WtFX7STuI6V7BL74M2lIjOqGg6aophtxUSf2YqusICDgVjrthDX1x7bInTdsLP1A 6NWbLeC80KHayi3B0OGD+LGMZweMkbsF5MUG9Clg= From: Long Li To: Stephen Hemminger Cc: dev@dpdk.org, Long Li , stable@dpdk.org Date: Fri, 11 Dec 2020 12:48:21 -0800 Message-Id: <1607719701-3646-1-git-send-email-longli@linuxonhyperv.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH v2] net/netvsc: ignore NVS_TYPE_TXTBL_NOTE while executing a sync command 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" From: Long Li On netvsc initialization, the host VSP may send a NVS_TYPE_TXTBL_NOTE packet while executing a VSP command synchronously. Instead of returning an error, ignore this packet as we don't use it for DPDK. Cc: stable@dpdk.org Signed-off-by: Long Li --- drivers/net/netvsc/hn_nvs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c index a0ee7d8bfa..a97591d16b 100644 --- a/drivers/net/netvsc/hn_nvs.c +++ b/drivers/net/netvsc/hn_nvs.c @@ -97,8 +97,13 @@ __hn_nvs_execute(struct hn_data *hv, hdr = (struct hn_nvs_hdr *)buffer; /* Silently drop received packets while waiting for response */ - if (hdr->type == NVS_TYPE_RNDIS) { + switch (hdr->type) { + case NVS_TYPE_RNDIS: hn_nvs_ack_rxbuf(chan, xactid); + /* fallthrough */ + + case NVS_TYPE_TXTBL_NOTE: + PMD_DRV_LOG(DEBUG, "discard packet type 0x%x", hdr->type); goto retry; }