Skip to contentSkip to conversation

net/netvsc: ignore NVS_TYPE_TXTBL_NOTE while executing a sync command

PATCH Superseded Long Li 3 participants 3 messages Dec 11, 2020 Network drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Long Li

author
#0 lore raw

PATCH 1/1 net/netvsc: ignore NVS_TYPE_TXTBL_NOTE while executing a sync command

From: Long Li <[email protected]>

On netvsc initialization, the host VSP may send a NVS_TYPE_TXTBL_NOTE packet while executing a VSP command synchronously.

Ignore this packet as we don't use it for DPDK.

---
 drivers/net/netvsc/hn_nvs.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/netvsc/hn_nvs.c +6 -1
index a0ee7d8bfa..b6aa07cc5f 100644
@@ -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(NOTICE, "discard packet type %x", hdr->type);
 		goto retry;
 	}
 
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 22 lines · On Thu, 10 Dec 2020 23:52:44 -0800 Long Li <[email protected]> wrote:

From: Long Li <[email protected]>

On netvsc initialization, the host VSP may send a NVS_TYPE_TXTBL_NOTE packet while executing a VSP command synchronously.

Ignore this packet as we don't use it for DPDK.

---
 drivers/net/netvsc/hn_nvs.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/netvsc/hn_nvs.c +0 -1
index a0ee7d8bfa..b6aa07cc5f 100644
@@ -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) {

drivers/net/netvsc/hn_nvs.c __hn_nvs_execute(struct hn_data *hv, · line 109

Quoted 10 lines
drivers/net/netvsc/hn_nvs.c +6 -0
+	switch (hdr->type) {
+	case NVS_TYPE_RNDIS:
 		hn_nvs_ack_rxbuf(chan, xactid);
+		/* fallthrough */
+
+	case NVS_TYPE_TXTBL_NOTE:
+		PMD_DRV_LOG(NOTICE, "discard packet type %x", hdr->type);
 		goto retry;
 	}
 

Could you change that log message to DEBUG (or INFO) level? Users probably don't need to see it.

#2 lore raw
Quoted 26 lines

Subject: Re: [dpdk-dev] [PATCH] net/netvsc: ignore NVS_TYPE_TXTBL_NOTE while executing a sync command

Quoted 20 lines · On Thu, 10 Dec 2020 23:52:44 -0800 Long Li <[email protected]> wrote:

From: Long Li <[email protected]>

On netvsc initialization, the host VSP may send a NVS_TYPE_TXTBL_NOTE packet while executing a VSP command synchronously.

Ignore this packet as we don't use it for DPDK.

---
 drivers/net/netvsc/hn_nvs.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/netvsc/hn_nvs.c +0 -0
index a0ee7d8bfa..b6aa07cc5f 100644
@@ -97,8 +97,13 @@ __hn_nvs_execute(struct hn_data *hv,
 	hdr = (struct hn_nvs_hdr *)buffer;
 
Quoted 16 lines

drivers/net/netvsc/hn_nvs.c __hn_nvs_execute(struct hn_data *hv, · line 108

Quoted 13 lines
drivers/net/netvsc/hn_nvs.c +6 -1
 	/* 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(NOTICE, "discard packet type %x", hdr-
 type);
 		goto retry;
 	}

Could you change that log message to DEBUG (or INFO) level? Users probably don't need to see it.

Sure, I'm sending a v2.

Quoted 2 lines