From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 35F435B1C for ; Tue, 2 Apr 2019 20:14:26 +0200 (CEST) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x32I9csQ036660 for ; Tue, 2 Apr 2019 14:14:25 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0b-001b2d01.pphosted.com with ESMTP id 2rmbpeku0m-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 02 Apr 2019 14:14:25 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 2 Apr 2019 19:14:24 +0100 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e12.ny.us.ibm.com (146.89.104.199) 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:14:22 +0100 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x32IEL5w27590802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Apr 2019 18:14:22 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D5EC1AE064; Tue, 2 Apr 2019 18:14:21 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7A876AE063; Tue, 2 Apr 2019 18:14:21 +0000 (GMT) Received: from opperfx2.aus.stglabs.ibm.com (unknown [9.40.200.237]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 2 Apr 2019 18:14:21 +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:14:17 -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-0060-0000-0000-00000327836C 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.01183359; UDB=6.00619522; IPR=6.00964107; MB=3.00026264; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-02 18:14:24 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040218-0061-0000-0000-000048CFF306 Message-Id: <1554228857-55396-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=802 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904020121 Subject: [dpdk-dev] [PATCH] 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: , X-List-Received-Date: Tue, 02 Apr 2019 18:14:26 -0000 Signed-off-by: David Christensen --- 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. 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 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 0C327A0679 for ; Tue, 2 Apr 2019 20:14:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 16D9C5B2C; Tue, 2 Apr 2019 20:14:28 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 35F435B1C for ; Tue, 2 Apr 2019 20:14:26 +0200 (CEST) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x32I9csQ036660 for ; Tue, 2 Apr 2019 14:14:25 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0b-001b2d01.pphosted.com with ESMTP id 2rmbpeku0m-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 02 Apr 2019 14:14:25 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 2 Apr 2019 19:14:24 +0100 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e12.ny.us.ibm.com (146.89.104.199) 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:14:22 +0100 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x32IEL5w27590802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Apr 2019 18:14:22 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D5EC1AE064; Tue, 2 Apr 2019 18:14:21 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7A876AE063; Tue, 2 Apr 2019 18:14:21 +0000 (GMT) Received: from opperfx2.aus.stglabs.ibm.com (unknown [9.40.200.237]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 2 Apr 2019 18:14:21 +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:14:17 -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-0060-0000-0000-00000327836C 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.01183359; UDB=6.00619522; IPR=6.00964107; MB=3.00026264; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-02 18:14:24 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040218-0061-0000-0000-000048CFF306 Message-Id: <1554228857-55396-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=802 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904020121 Subject: [dpdk-dev] [PATCH] 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: <20190402181417.7hIVcdowAxOMKqt33OHni2HG9708letvHhCIwJTZGK8@z> Signed-off-by: David Christensen --- 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. 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