[dpdk-stable] patch 'examples/vm_power: fix build without i40e' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 10 15:59:18 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/16/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/dc90a9467232103f42a1fedc9bc788675ae32e27

Thanks.

Kevin.

---
>From dc90a9467232103f42a1fedc9bc788675ae32e27 Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt at intel.com>
Date: Thu, 24 Oct 2019 15:26:10 +0100
Subject: [PATCH] examples/vm_power: fix build without i40e

[ upstream commit e4d028a0fb53809a341f62a39e59f9e13e7c7f59 ]

channel_monitor.c was dependent on i40e driver being available.
This is only necessary for the TRAFFIC policy, so use #ifdef's
to not call these when i40e not available.

Fixes: f14791a8126e ("examples/vm_power_mgr: add policy to channels")

Signed-off-by: David Hunt <david.hunt at intel.com>
Tested-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
 examples/vm_power_manager/channel_monitor.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index b5b7c6787..1d6d7ec6d 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -28,5 +28,7 @@
 #include <rte_cycles.h>
 #include <rte_ethdev.h>
+#ifdef RTE_LIBRTE_I40E_PMD
 #include <rte_pmd_i40e.h>
+#endif
 
 #include <libvirt/libvirt.h>
@@ -408,6 +410,10 @@ get_pfid(struct policy *pol)
 
 		RTE_ETH_FOREACH_DEV(x) {
+#ifdef RTE_LIBRTE_I40E_PMD
 			ret = rte_pmd_i40e_query_vfid_by_mac(x,
 				(struct ether_addr *)&(pol->pkt.vfid[i]));
+#else
+			ret = -ENOTSUP;
+#endif
 			if (ret != -EINVAL) {
 				pol->port[i] = x;
@@ -495,8 +501,11 @@ get_pkt_diff(struct policy *pol)
 	double rdtsc_curr, rdtsc_diff, diff;
 	int x;
+#ifdef RTE_LIBRTE_I40E_PMD
 	struct rte_eth_stats vf_stats;
+#endif
 
 	for (x = 0; x < pol->pkt.nb_mac_to_monitor; x++) {
 
+#ifdef RTE_LIBRTE_I40E_PMD
 		/*Read vsi stats*/
 		if (rte_pmd_i40e_get_vf_stats(x, pol->pfid[x], &vf_stats) == 0)
@@ -504,4 +513,7 @@ get_pkt_diff(struct policy *pol)
 		else
 			vsi_pkt_count = -1;
+#else
+		vsi_pkt_count = -1;
+#endif
 
 		vsi_pkt_total += vsi_pkt_count;
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-10 14:49:42.026352624 +0000
+++ 0044-examples-vm_power-fix-build-without-i40e.patch	2019-12-10 14:49:39.076457320 +0000
@@ -1 +1 @@
-From e4d028a0fb53809a341f62a39e59f9e13e7c7f59 Mon Sep 17 00:00:00 2001
+From dc90a9467232103f42a1fedc9bc788675ae32e27 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e4d028a0fb53809a341f62a39e59f9e13e7c7f59 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 0c73fac55..29e1cb64d 100644
+index b5b7c6787..1d6d7ec6d 100644
@@ -24 +25 @@
-@@ -29,5 +29,7 @@
+@@ -28,5 +28,7 @@
@@ -32 +33 @@
-@@ -437,6 +439,10 @@ get_pfid(struct policy *pol)
+@@ -408,6 +410,10 @@ get_pfid(struct policy *pol)
@@ -37 +38 @@
- 				(struct rte_ether_addr *)&(pol->pkt.vfid[i]));
+ 				(struct ether_addr *)&(pol->pkt.vfid[i]));
@@ -43 +44 @@
-@@ -532,8 +538,11 @@ get_pkt_diff(struct policy *pol)
+@@ -495,8 +501,11 @@ get_pkt_diff(struct policy *pol)
@@ -55 +56 @@
-@@ -541,4 +550,7 @@ get_pkt_diff(struct policy *pol)
+@@ -504,4 +513,7 @@ get_pkt_diff(struct policy *pol)



More information about the stable mailing list