From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 34B47A0679 for ; Tue, 2 Apr 2019 20:46:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AA9B55F13; Tue, 2 Apr 2019 20:46:32 +0200 (CEST) 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 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 2 Apr 2019 19:46:25 +0100 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x32IkOW023134330 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Apr 2019 18:46:24 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 94DBFAC062; Tue, 2 Apr 2019 18:46:24 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3AAC2AC05B; Tue, 2 Apr 2019 18:46:24 +0000 (GMT) Received: from opperfx2.aus.stglabs.ibm.com (unknown [9.40.200.237]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 2 Apr 2019 18:46:24 +0000 (GMT) From: David Christensen To: david.hunt@intel.com Cc: dev@dpdk.org, stable@dpdk.org, David Christensen Date: Tue, 2 Apr 2019 14:46:12 -0400 X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19040218-0072-0000-0000-000004148801 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010862; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000284; SDB=6.01183370; UDB=6.00619529; IPR=6.00964118; MB=3.00026264; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-02 18:46:27 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040218-0073-0000-0000-00004BB014E4 Message-Id: <1554230772-2170-1-git-send-email-drc@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-02_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=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=888 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904020125 Subject: [dpdk-dev] [PATCH v2] examples/vm_power: add conditional compilation for PMD specific code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190402184612.EfDhOVPLClEM5rV5T7yLWH8rkaVjcnkiolS4nA-pY3E@z> 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