From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Christensen Subject: [PATCH v2] examples/vm_power: add conditional compilation for PMD specific code Date: Tue, 2 Apr 2019 14:46:12 -0400 Message-ID: <1554230772-2170-1-git-send-email-drc@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org, stable@dpdk.org, David Christensen To: david.hunt@intel.com Return-path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id A1D065942 for ; Tue, 2 Apr 2019 20:46:31 +0200 (CEST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x32IiDfo129037 for ; Tue, 2 Apr 2019 14:46:30 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rmbmtn60m-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 02 Apr 2019 14:46:29 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 2 Apr 2019 19:46:28 +0100 List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 fails due to hard-coded requirement for IXGBE_PMD in examples/vm_power_manager Signed-off-by: David Christensen --- v2: * Fixed tab issues reported by checkpatches, added Bugzilla ID 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 893bf4c..bb50a2a 100644 --- a/examples/vm_power_manager/main.c +++ b/examples/vm_power_manager/main.c @@ -31,9 +31,15 @@ #include "vm_power_cli.h" #include "oob_monitor.h" #include "parse.h" +#ifdef RTE_LIBRTE_IXGBE_PMD #include +#endif +#ifdef RTE_LIBRTE_I40E_PMD #include +#endif +#ifdef RTE_LIBRTE_BNXT_PMD #include +#endif #define RX_RING_SIZE 1024 #define TX_RING_SIZE 1024 @@ -369,14 +375,21 @@ for (w = 0; w < MAX_VFS; w++) { eth.addr_bytes[5] = w + 0xf0; + ret = -ENOTSUP; +#ifdef RTE_LIBRTE_IXGBE_PMD 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