diff mbox series

net/netvsc: ignore NVS_TYPE_TXTBL_NOTE while executing a sync command

Message ID 1607673164-3683-1-git-send-email-longli@linuxonhyperv.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series net/netvsc: ignore NVS_TYPE_TXTBL_NOTE while executing a sync command | expand

Checks

Context Check Description
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Long Li Dec. 11, 2020, 7:52 a.m. UTC
From: Long Li <longli@microsoft.com>

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.

Cc: stable@dpdk.org
Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/netvsc/hn_nvs.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Stephen Hemminger Dec. 11, 2020, 5:21 p.m. UTC | #1
On Thu, 10 Dec 2020 23:52:44 -0800
Long Li <longli@linuxonhyperv.com> wrote:

> From: Long Li <longli@microsoft.com>
> 
> 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.
> 
> Cc: stable@dpdk.org
> Signed-off-by: Long Li <longli@microsoft.com>
> ---
>  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..b6aa07cc5f 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(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.

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Long Li Dec. 11, 2020, 8:05 p.m. UTC | #2
> Subject: Re: [dpdk-dev] [PATCH] net/netvsc: ignore NVS_TYPE_TXTBL_NOTE
> while executing a sync command
> 
> On Thu, 10 Dec 2020 23:52:44 -0800
> Long Li <longli@linuxonhyperv.com> wrote:
> 
> > From: Long Li <longli@microsoft.com>
> >
> > 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.
> >
> > Cc: stable@dpdk.org
> > Signed-off-by: Long Li <longli@microsoft.com>
> > ---
> >  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..b6aa07cc5f 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(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.

> 
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
diff mbox series

Patch

diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index a0ee7d8bfa..b6aa07cc5f 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(NOTICE, "discard packet type %x", hdr->type);
 		goto retry;
 	}