* [dpdk-dev] [PATCH] examples/vm_power: add conditional compilation for PMD specific code
@ 2019-04-02 18:14 David Christensen
2019-04-02 18:14 ` David Christensen
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: David Christensen @ 2019-04-02 18:14 UTC (permalink / raw)
To: david.hunt; +Cc: dev, stable, David Christensen
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
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 <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, ð);
+#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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH] examples/vm_power: add conditional compilation for PMD specific code
2019-04-02 18:14 [dpdk-dev] [PATCH] examples/vm_power: add conditional compilation for PMD specific code David Christensen
@ 2019-04-02 18:14 ` David Christensen
2019-04-15 9:18 ` Hunt, David
2019-04-15 16:40 ` Kevin Traynor
2 siblings, 0 replies; 6+ messages in thread
From: David Christensen @ 2019-04-02 18:14 UTC (permalink / raw)
To: david.hunt; +Cc: dev, stable, David Christensen
Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
---
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 <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, ð);
+#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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/vm_power: add conditional compilation for PMD specific code
2019-04-02 18:14 [dpdk-dev] [PATCH] examples/vm_power: add conditional compilation for PMD specific code David Christensen
2019-04-02 18:14 ` David Christensen
@ 2019-04-15 9:18 ` Hunt, David
2019-04-15 9:18 ` Hunt, David
2019-04-15 16:40 ` Kevin Traynor
2 siblings, 1 reply; 6+ messages in thread
From: Hunt, David @ 2019-04-15 9:18 UTC (permalink / raw)
To: David Christensen; +Cc: dev, stable
Hi David,
On 2/4/2019 7:14 PM, David Christensen wrote:
> Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
> ---
> 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 <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, ð);
> +#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 <david.hunt@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/vm_power: add conditional compilation for PMD specific code
2019-04-15 9:18 ` Hunt, David
@ 2019-04-15 9:18 ` Hunt, David
0 siblings, 0 replies; 6+ messages in thread
From: Hunt, David @ 2019-04-15 9:18 UTC (permalink / raw)
To: David Christensen; +Cc: dev, stable
Hi David,
On 2/4/2019 7:14 PM, David Christensen wrote:
> Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
> ---
> 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 <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, ð);
> +#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 <david.hunt@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/vm_power: add conditional compilation for PMD specific code
2019-04-02 18:14 [dpdk-dev] [PATCH] examples/vm_power: add conditional compilation for PMD specific code David Christensen
2019-04-02 18:14 ` David Christensen
2019-04-15 9:18 ` Hunt, David
@ 2019-04-15 16:40 ` Kevin Traynor
2019-04-15 16:40 ` Kevin Traynor
2 siblings, 1 reply; 6+ messages in thread
From: Kevin Traynor @ 2019-04-15 16:40 UTC (permalink / raw)
To: David Christensen, david.hunt; +Cc: dev, stable
On 02/04/2019 19:14, David Christensen wrote:
I think it should have Fixes: and probably stable tags.
> Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
> ---
> 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(+)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] examples/vm_power: add conditional compilation for PMD specific code
2019-04-15 16:40 ` Kevin Traynor
@ 2019-04-15 16:40 ` Kevin Traynor
0 siblings, 0 replies; 6+ messages in thread
From: Kevin Traynor @ 2019-04-15 16:40 UTC (permalink / raw)
To: David Christensen, david.hunt; +Cc: dev, stable
On 02/04/2019 19:14, David Christensen wrote:
I think it should have Fixes: and probably stable tags.
> Signed-off-by: David Christensen <drc@linux.vnet.ibm.com>
> ---
> 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(+)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-04-15 16:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02 18:14 [dpdk-dev] [PATCH] examples/vm_power: add conditional compilation for PMD specific code David Christensen
2019-04-02 18:14 ` David Christensen
2019-04-15 9:18 ` Hunt, David
2019-04-15 9:18 ` Hunt, David
2019-04-15 16:40 ` Kevin Traynor
2019-04-15 16:40 ` Kevin Traynor
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).