From: Bruce Richardson <bruce.richardson@intel.com>
To: Jingjing Wu <jingjing.wu@intel.com>
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH] app/test-pmd: fix compiler error with drivers disabled
Date: Wed, 25 Oct 2017 21:09:45 +0100 [thread overview]
Message-ID: <20171025200945.82300-1-bruce.richardson@intel.com> (raw)
When both ixgbe and bnxt drivers are disabled at build time, testpmd has
a compiler errors due to unused parameters, and unused variables.
Fixes: 36735a932ca7 ("net/bnxt: support set VF QOS and MAC anti spoof")
CC: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
app/test-pmd/cmdline.c | 5 +++++
app/test-pmd/config.c | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1159a4a47..809e3c25b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -7504,6 +7504,11 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
ret = rte_pmd_bnxt_set_vf_rxmode(res->port_id, res->vf_id,
rx_mode, (uint8_t)is_on);
#endif
+#ifndef RTE_LIBRTE_IXGBE_PMD
+#ifndef RTE_LIBRTE_BNXT_PMD
+ RTE_SET_USED(is_on);
+#endif
+#endif
if (ret < 0)
printf("bad VF receive mode parameter, return code = %d \n",
ret);
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index bafe76cf4..9440ff540 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -3194,6 +3194,13 @@ set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk)
if (diag == -ENOTSUP)
diag = rte_pmd_bnxt_set_vf_rate_limit(port_id, vf, rate, q_msk);
#endif
+#ifndef RTE_LIBRTE_IXGBE_PMD
+#ifndef RTE_LIBRTE_BNXT_PMD
+ RTE_SET_USED(vf);
+ RTE_SET_USED(rate);
+ RTE_SET_USED(q_msk);
+#endif
+#endif
if (diag == 0)
return diag;
--
2.13.6
next reply other threads:[~2017-10-25 20:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 20:09 Bruce Richardson [this message]
2017-10-25 20:20 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2017-10-25 20:44 ` Bruce Richardson
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=20171025200945.82300-1-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=stable@dpdk.org \
/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).