From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rnd-relay.smtp.broadcom.com (lpdvrndsmtp01.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id C2D0956A1 for ; Mon, 31 Jul 2017 18:24:28 +0200 (CEST) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.224.233]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id DB84930C029; Mon, 31 Jul 2017 09:24:26 -0700 (PDT) Received: from C02PT1RBG8WP.wifi.broadcom.net (c02pt1rbg8wp.wifi.broadcom.net [10.45.51.51]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id B5A9E81EA6; Mon, 31 Jul 2017 09:24:26 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Mon, 31 Jul 2017 11:24:23 -0500 Message-Id: <20170731162423.8160-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.10.1 (Apple Git-78) In-Reply-To: <09000e95-6f04-deee-d19f-7b4a36ae8311@intel.com> References: <09000e95-6f04-deee-d19f-7b4a36ae8311@intel.com> Subject: [dpdk-dev] [PATCH v2] net/bnxt: fix arguments to _rte_eth_dev_callback_process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 16:24:29 -0000 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 -- v1->v2: rename a cb_param to ret_param as per review comment. --- drivers/net/bnxt/rte_pmd_bnxt.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c index dd7e5b8..c343d90 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.c +++ b/drivers/net/bnxt/rte_pmd_bnxt.c @@ -50,20 +50,21 @@ 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) -- 2.10.1 (Apple Git-78)