DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Christensen <drc@linux.vnet.ibm.com>
To: david.hunt@intel.com
Cc: dev@dpdk.org, stable@dpdk.org,
	David Christensen <drc@linux.vnet.ibm.com>
Subject: [dpdk-dev] [PATCH v2] examples/vm_power: add conditional compilation for PMD specific code
Date: Tue,  2 Apr 2019 14:46:12 -0400	[thread overview]
Message-ID: <1554230772-2170-1-git-send-email-drc@linux.vnet.ibm.com> (raw)
Message-ID: <20190402184612.EfDhOVPLClEM5rV5T7yLWH8rkaVjcnkiolS4nA-pY3E@z> (raw)

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 <drc@linux.vnet.ibm.com>
---

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 <rte_pmd_ixgbe.h>
+#endif
+#ifdef RTE_LIBRTE_I40E_PMD
 #include <rte_pmd_i40e.h>
+#endif
+#ifdef RTE_LIBRTE_BNXT_PMD
 #include <rte_pmd_bnxt.h>
+#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, &eth);
+#endif
+#ifdef RTE_LIBRTE_I40E_PMD
 				if (ret == -ENOTSUP)
 					ret = rte_pmd_i40e_set_vf_mac_addr(
 							portid, w, &eth);
+#endif
+#ifdef RTE_LIBRTE_BNXT_PMD
 				if (ret == -ENOTSUP)
 					ret = rte_pmd_bnxt_set_vf_mac_addr(
 							portid, w, &eth);
+#endif
 
 				switch (ret) {
 				case 0:
-- 
1.8.3.1


             reply	other threads:[~2019-04-02 18:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 18:46 David Christensen [this message]
2019-04-02 18:46 ` David Christensen
2019-04-12 17:04 ` David Christensen
2019-04-12 17:04   ` David Christensen
2019-04-18 14:23 ` Hunt, David
2019-04-18 14:23   ` Hunt, David
2019-04-22 22:05   ` Thomas Monjalon
2019-04-22 22:05     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1554230772-2170-1-git-send-email-drc@linux.vnet.ibm.com \
    --to=drc@linux.vnet.ibm.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).