[dpdk-dev] app/test-pmd: fix compiler error with drivers disabled
Checks
Commit Message
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(+)
Comments
On 10/25/2017 1:09 PM, Bruce Richardson wrote:
> 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>
Is this duplicate of [1] which is applied into next-net [2].
[1]
http://dpdk.org/dev/patchwork/patch/30813/
[2]
http://dpdk.org/browse/next/dpdk-next-net/commit/?id=9d4d6c4a5563fe63facc9ed6e5087d54900e511d
On Wed, Oct 25, 2017 at 01:20:30PM -0700, Ferruh Yigit wrote:
> On 10/25/2017 1:09 PM, Bruce Richardson wrote:
> > 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>
>
> Is this duplicate of [1] which is applied into next-net [2].
>
>
> [1]
> http://dpdk.org/dev/patchwork/patch/30813/
>
> [2]
> http://dpdk.org/browse/next/dpdk-next-net/commit/?id=9d4d6c4a5563fe63facc9ed6e5087d54900e511d
>
Yes, please ignore as a dup. I'll mark it as N/A in patchwork.
/Bruce
@@ -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);
@@ -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;