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 932D8A00E6 for ; Thu, 18 Apr 2019 16:23:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BDD321B9C5; Thu, 18 Apr 2019 16:23:12 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 370DD1B9C2; Thu, 18 Apr 2019 16:23:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2019 07:23:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,366,1549958400"; d="scan'208";a="224641142" Received: from dhunt5-mobl2.ger.corp.intel.com (HELO [10.237.210.157]) ([10.237.210.157]) by orsmga001.jf.intel.com with ESMTP; 18 Apr 2019 07:23:08 -0700 To: David Christensen Cc: dev@dpdk.org, stable@dpdk.org References: <1554230772-2170-1-git-send-email-drc@linux.vnet.ibm.com> From: "Hunt, David" Message-ID: Date: Thu, 18 Apr 2019 15:23:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1554230772-2170-1-git-send-email-drc@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [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: <20190418142308.7w01qadNVp-AE2EJtSgXzvHyl1pe-bwSvF7oDrqb-Mw@z> On 2/4/2019 7:46 PM, David Christensen 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 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: Acked-by: David Hunt