[dpdk-stable] [PATCH 17.11] examples/vm_power_manager: add conditional compilation for PMD specific code
Yongseok Koh
yskoh at mellanox.com
Fri Aug 2 01:57:29 CEST 2019
> On Jul 24, 2019, at 11:25 AM, David Christensen <drc at linux.vnet.ibm.com> wrote:
>
> Running the devtools/test-build.sh script on IBM Power systems fails
> because the IXGBE_PMD is explicity disabled for Power as an untested
> driver, but the examples/vm_power_manager application has a hard
> dependency on a function call in the IXGBE_PMD.
>
> Modify the example application so that all dependencies on PMD code
> are conditionally compiled.
>
> Bugzilla ID: 237
> Fixes: Running test-build.sh fails on ppc_64 due to hard-coded
> requirement for IXGBE_PMD in examples/vm_power_manager
>
> Signed-off-by: David Christensen <drc at linux.vnet.ibm.com>
> ---
Acked-by: Yongseok Koh <yskoh at mellanox.com>
applied to stable/17.11
> examples/vm_power_manager/main.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
> index 399fbdd..2ad6ff6 100644
> --- a/examples/vm_power_manager/main.c
> +++ b/examples/vm_power_manager/main.c
> @@ -58,9 +58,16 @@
> #include "channel_monitor.h"
> #include "power_manager.h"
> #include "vm_power_cli.h"
> +
> +#ifdef RTE_LIBRTE_IXGBE_PMD
> #include <rte_pmd_ixgbe.h>
> +#endif
> +#ifdef RTE_LIBRTE_I40E_PMD
> #include <rte_pmd_i40e.h>
> +#endif
> +#ifdef RTE_LIBRTE_BNXT_PMD
> #include <rte_pmd_bnxt.h>
> +#endif
>
> #define RX_RING_SIZE 512
> #define TX_RING_SIZE 512
> @@ -324,15 +331,21 @@
> for (w = 0; w < MAX_VFS; w++) {
> eth.addr_bytes[5] = w + 0xf0;
>
> +#ifdef RTE_LIBRTE_IXGBE_PMD
> if (ret == -ENOTSUP)
> ret = rte_pmd_ixgbe_set_vf_mac_addr(portid,
> w, ð);
> +#endif
> +#ifdef RTE_LIBRTE_I40E_PMD
> if (ret == -ENOTSUP)
> ret = rte_pmd_i40e_set_vf_mac_addr(portid,
> w, ð);
> +#endif
> +#ifdef RTE_LIBRTE_BNXT_PMD
> if (ret == -ENOTSUP)
> ret = rte_pmd_bnxt_set_vf_mac_addr(portid,
> w, ð);
> +#endif
>
> switch (ret) {
> case 0:
> --
> 1.8.3.1
>
More information about the stable
mailing list