From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH v2] net/bnxt: fix arguments to _rte_eth_dev_callback_process
Date: Mon, 31 Jul 2017 11:24:23 -0500 [thread overview]
Message-ID: <20170731162423.8160-1-ajit.khaparde@broadcom.com> (raw)
In-Reply-To: <09000e95-6f04-deee-d19f-7b4a36ae8311@intel.com>
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>
--
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)
next prev parent reply other threads:[~2017-07-31 16:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 3:32 [dpdk-dev] [PATCH 0/2] fixes to bnxt PMD Ajit Khaparde
2017-07-25 3:32 ` [dpdk-dev] [PATCH 1/2] net/bnxt: check current vlan anti spoof value before setting new value Ajit Khaparde
2017-07-31 11:25 ` Ferruh Yigit
2017-07-25 3:32 ` [dpdk-dev] [PATCH 2/2] net/bnxt: fix arguments to _rte_eth_dev_callback_process Ajit Khaparde
2017-07-31 11:19 ` Ferruh Yigit
2017-07-31 11:27 ` Ferruh Yigit
2017-07-31 16:24 ` Ajit Khaparde [this message]
2017-07-31 17:29 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170731162423.8160-1-ajit.khaparde@broadcom.com \
--to=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).