net/bnxt: fix arguments to callback process
authorAjit Khaparde <ajit.khaparde@broadcom.com>
Mon, 31 Jul 2017 16:24:23 +0000 (11:24 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 31 Jul 2017 17:58:41 +0000 (19:58 +0200)
The callback arguments to _rte_eth_dev_callback_process() are swapped.
Fix them.

Fixes: d6af1a13d7a1 ("ethdev: add return values to callback process API")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/rte_pmd_bnxt.c

index dd7e5b8..c343d90 100644 (file)
 
 int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
 {
-       struct rte_pmd_bnxt_mb_event_param cb_param;
+       struct rte_pmd_bnxt_mb_event_param ret_param;
 
-       cb_param.retval = RTE_PMD_BNXT_MB_EVENT_PROCEED;
-       cb_param.vf_id = vf_id;
-       cb_param.msg = msg;
+       ret_param.retval = RTE_PMD_BNXT_MB_EVENT_PROCEED;
+       ret_param.vf_id = vf_id;
+       ret_param.msg = msg;
 
        _rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
-                       &cb_param, NULL);
+                                     NULL, &ret_param);
 
        /* Default to approve */
-       if (cb_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
-               cb_param.retval = RTE_PMD_BNXT_MB_EVENT_NOOP_ACK;
+       if (ret_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
+               ret_param.retval = RTE_PMD_BNXT_MB_EVENT_NOOP_ACK;
 
-       return cb_param.retval == RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ? true : false;
+       return ret_param.retval == RTE_PMD_BNXT_MB_EVENT_NOOP_ACK ?
+               true : false;
 }
 
 int rte_pmd_bnxt_set_tx_loopback(uint8_t port, uint8_t on)