app/test-pmd: fix compiler error with drivers disabled
PATCH 1/1 app/test-pmd: fix compiler error with drivers disabled
When both ixgbe and bnxt drivers are disabled at build time, testpmd has a compiler errors due to unused parameters, and unused variables.
--- app/test-pmd/cmdline.c | 5 +++++ app/test-pmd/config.c | 7 +++++++ 2 files changed, 12 insertions(+)
app/test-pmd/cmdline.c +5 -0
@@ -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);
app/test-pmd/config.c +7 -0
@@ -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;
Signature · 1 line
2.13.6
Quoted 7 lines · Bruce Richardson
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")Signed-off-by Bruce Richardson <[email protected]>
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
Quoted 9 lines · Ferruh Yigit
Quoted 7 lines · Bruce Richardson
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")Signed-off-by Bruce Richardson <[email protected]>
Quoted 9 lines
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