dpdk: DPDK 20.05 iavf flow director backporting to DPDK 20.02
[vpp.git] / build / external / patches / dpdk_20.02 / 0008-net-iavf-return-error-if-opcode-is-mismatched.patch
1 From 91d510242b7aae1aff4468059840feff4075f99c Mon Sep 17 00:00:00 2001
2 From: Leyi Rong <leyi.rong@intel.com>
3 Date: Wed, 8 Apr 2020 14:22:01 +0800
4 Subject: [DPDK 08/17] net/iavf: return error if opcode is mismatched
5
6 Adds error return when the opcode of read message is
7 mismatched which is received from adminQ.
8
9 Signed-off-by: Leyi Rong <leyi.rong@intel.com>
10 ---
11  drivers/net/iavf/iavf_vchnl.c | 4 +++-
12  1 file changed, 3 insertions(+), 1 deletion(-)
13
14 diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
15 index fa4da3a6d..b7fb05d32 100644
16 --- a/drivers/net/iavf/iavf_vchnl.c
17 +++ b/drivers/net/iavf/iavf_vchnl.c
18 @@ -52,9 +52,11 @@ iavf_read_msg_from_pf(struct iavf_adapter *adapter, uint16_t buf_len,
19         PMD_DRV_LOG(DEBUG, "AQ from pf carries opcode %u, retval %d",
20                     opcode, vf->cmd_retval);
21  
22 -       if (opcode != vf->pend_cmd)
23 +       if (opcode != vf->pend_cmd) {
24                 PMD_DRV_LOG(WARNING, "command mismatch, expect %u, get %u",
25                             vf->pend_cmd, opcode);
26 +               return IAVF_ERR_OPCODE_MISMATCH;
27 +       }
28  
29         return IAVF_SUCCESS;
30  }
31 -- 
32 2.17.1
33