net/iavf: fix mismatch command
authorJunyu Jiang <junyux.jiang@intel.com>
Tue, 1 Sep 2020 08:14:36 +0000 (08:14 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:07 +0000 (18:55 +0200)
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")
Cc: stable@dpdk.org
Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
Reviewed-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/iavf/iavf_vchnl.c

index 6b57ecb..a163548 100644 (file)
@@ -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;
        }