Skip to contentSkip to conversation

net/iavf: fix mismatch command

PATCH Applied Junyu Jiang 3 participants 3 messages Sep 1, 2020 – Sep 3, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/iavf: fix mismatch command

The "command mismatch" warning shouldn't be triggered by VIRTCHNL_OP_EVENT opcode, because the VIRTCHNL_OP_EVENT opcode is used by PF notifies status change events to VF. This patch fixed the issue.

Fixes 837c2ed86e4c ("net/iavf: return error if opcode is mismatched")
---
 drivers/net/iavf/iavf_vchnl.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/iavf/iavf_vchnl.c +5 -2
index 33acea54a..331018f14 100644
@@ -53,8 +53,11 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
 		    opcode, vf->cmd_retval);
 
 	if (opcode != vf->pend_cmd) {
-		PMD_DRV_LOG(WARNING, "command mismatch, expect %u, get %u",
-			    vf->pend_cmd, opcode);
+		if (opcode != VIRTCHNL_OP_EVENT) {
+			PMD_DRV_LOG(WARNING,
+				    "command mismatch, expect %u, get %u",
+				    vf->pend_cmd, opcode);
+		}
 		return IAVF_ERR_OPCODE_MISMATCH;
 	}
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 44 lines

-----Original Message-----
From: Jiang, JunyuX <[email protected]>
Sent: 2020年9月1日 16:15
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Jiang, JunyuX <[email protected]>; [email protected]
Subject: [PATCH] net/iavf: fix mismatch command

The "command mismatch" warning shouldn't be triggered by VIRTCHNL_OP_EVENT opcode, because the VIRTCHNL_OP_EVENT opcode is used by PF notifies status change events to VF.
This patch fixed the issue.

Fixes 837c2ed86e4c ("net/iavf: return error if opcode is mismatched")
---
 drivers/net/iavf/iavf_vchnl.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/iavf/iavf_vchnl.c index renamed from drivers/net/iavf/iavf_vchnl.c +0 -0

33acea54a..331018f14 100644

drivers/net/iavf/iavf_vchnl.c +5 -2
@@ -53,8 +53,11 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter,
 uint16_t buf_len,
 		    opcode, vf->cmd_retval);
 
 	if (opcode != vf->pend_cmd) {
-		PMD_DRV_LOG(WARNING, "command mismatch, expect %u,
 get %u",
-			    vf->pend_cmd, opcode);
+		if (opcode != VIRTCHNL_OP_EVENT) {
+			PMD_DRV_LOG(WARNING,
+				    "command mismatch, expect %u, get %u",
+				    vf->pend_cmd, opcode);
+		}
 		return IAVF_ERR_OPCODE_MISMATCH;

}

Quoted 2 lines

--
2.17.1

Applied
#2 lore raw
Quoted 56 lines

-----Original Message-----
From: dev <[email protected]> On Behalf Of Yang, Qiming
Sent: Thursday, September 3, 2020 9:51 AM
To: Jiang, JunyuX <[email protected]>; [email protected]
Cc: Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix mismatch command

Quoted 11 lines

-----Original Message-----
From: Jiang, JunyuX <[email protected]>
Sent: 2020年9月1日 16:15
To: [email protected]
Cc: Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>; Yang, Qiming <[email protected]>; Jiang, JunyuX <[email protected]>; [email protected]
Subject: [PATCH] net/iavf: fix mismatch command

The "command mismatch" warning shouldn't be triggered by VIRTCHNL_OP_EVENT opcode, because the VIRTCHNL_OP_EVENT opcode is

used

Quoted 32 lines

by PF notifies status change events to VF.
This patch fixed the issue.

Fixes 837c2ed86e4c ("net/iavf: return error if opcode is mismatched")
---
 drivers/net/iavf/iavf_vchnl.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/drivers/net/iavf/iavf_vchnl.c index
33acea54a..331018f14 100644

drivers/net/iavf/iavf_vchnl.c +5 -2
@@ -53,8 +53,11 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter,
 uint16_t buf_len,
 		    opcode, vf->cmd_retval);
 
 	if (opcode != vf->pend_cmd) {
-		PMD_DRV_LOG(WARNING, "command mismatch, expect %u,
 get %u",
-			    vf->pend_cmd, opcode);
+		if (opcode != VIRTCHNL_OP_EVENT) {
+			PMD_DRV_LOG(WARNING,
+				    "command mismatch, expect %u, get %u",
+				    vf->pend_cmd, opcode);
+		}
 		return IAVF_ERR_OPCODE_MISMATCH;

}

Quoted 3 lines
Quoted 2 lines

--
2.17.1

Applied to dpdk-next-net-intel.

Thanks
Qi