From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3492EA046B for ; Wed, 24 Jul 2019 20:26:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 277221C241; Wed, 24 Jul 2019 20:26:03 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id B244D1C241 for ; Wed, 24 Jul 2019 20:26:01 +0200 (CEST) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6OICUCh060280 for ; Wed, 24 Jul 2019 14:26:00 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 2txt88eebv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 24 Jul 2019 14:26:00 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x6OIP6SZ030153 for ; Wed, 24 Jul 2019 18:25:59 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma03dal.us.ibm.com with ESMTP id 2tx61n8er1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 24 Jul 2019 18:25:59 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x6OIPxsg36700636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 24 Jul 2019 18:25:59 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 164A6B206A; Wed, 24 Jul 2019 18:25:59 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D1C9BB2067; Wed, 24 Jul 2019 18:25:58 +0000 (GMT) Received: from opperfx2.aus.stglabs.ibm.com (unknown [9.40.200.237]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 24 Jul 2019 18:25:58 +0000 (GMT) From: David Christensen To: stable@dpdk.org Cc: David Christensen Date: Wed, 24 Jul 2019 14:25:44 -0400 Message-Id: <1563992744-39034-1-git-send-email-drc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-24_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=760 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907240195 Subject: [dpdk-stable] [PATCH 17.11] examples/vm_power_manager: add conditional compilation for PMD specific code X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- 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 +#endif +#ifdef RTE_LIBRTE_I40E_PMD #include +#endif +#ifdef RTE_LIBRTE_BNXT_PMD #include +#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