DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/4] misc compilation fixes
@ 2015-05-18  8:17 Olivier Matz
  2015-05-18  8:17 ` [dpdk-dev] [PATCH 1/4] examples/bond: fix compilation with clang Olivier Matz
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Olivier Matz @ 2015-05-18  8:17 UTC (permalink / raw)
  To: dev

This series contains compilation fixes.

Olivier Matz (4):
  examples/bond: fix compilation with clang
  examples/netmap: fix compilation for x86_x32-native-linuxapp-gcc
  pmds: fix 32 bits compilation with debug enabled
  examples/mk: add dependencies for timer and vm_power_manager

 examples/Makefile                          |   4 +-
 examples/bond/main.c                       |   2 +-
 examples/netmap_compat/lib/compat_netmap.c |   2 +-
 lib/librte_pmd_fm10k/fm10k_rxtx.c          |   5 +-
 lib/librte_pmd_i40e/i40e_ethdev.c          | 124 ++++++++++++++---------------
 lib/librte_pmd_i40e/i40e_rxtx.c            |   2 +-
 lib/librte_pmd_virtio/virtio_ethdev.c      |   2 +-
 7 files changed, 72 insertions(+), 69 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH 1/4] examples/bond: fix compilation with clang
  2015-05-18  8:17 [dpdk-dev] [PATCH 0/4] misc compilation fixes Olivier Matz
@ 2015-05-18  8:17 ` Olivier Matz
  2015-05-18 13:53   ` Bruce Richardson
  2015-05-18  8:17 ` [dpdk-dev] [PATCH 2/4] examples/netmap: fix compilation for x86_x32-native-linuxapp-gcc Olivier Matz
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Olivier Matz @ 2015-05-18  8:17 UTC (permalink / raw)
  To: dev

Fix the following compilation error:

examples/bond/main.c:717:1: error: control reaches end of
  non-void function [-Werror,-Wreturn-type]

The prompt() function does not return anything, so fix its prototype
to be void.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 examples/bond/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index e90dc1d..4622283 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -705,7 +705,7 @@ cmdline_parse_ctx_t main_ctx[] = {
 };
 
 /* prompt function, called from main on MASTER lcore */
-static void *prompt(__attribute__((unused)) void *arg1)
+static void prompt(__attribute__((unused)) void *arg1)
 {
 	struct cmdline *cl;
 
-- 
2.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH 2/4] examples/netmap: fix compilation for x86_x32-native-linuxapp-gcc
  2015-05-18  8:17 [dpdk-dev] [PATCH 0/4] misc compilation fixes Olivier Matz
  2015-05-18  8:17 ` [dpdk-dev] [PATCH 1/4] examples/bond: fix compilation with clang Olivier Matz
@ 2015-05-18  8:17 ` Olivier Matz
  2015-05-18  8:18 ` [dpdk-dev] [PATCH 3/4] pmds: fix 32 bits compilation with debug enabled Olivier Matz
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Olivier Matz @ 2015-05-18  8:17 UTC (permalink / raw)
  To: dev

Fix a cast issue:
examples/netmap_compat/lib/compat_netmap.c:827:10: error: cast to
  pointer from integer of different size [-Werror=int-to-pointer-cast]

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 examples/netmap_compat/lib/compat_netmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/netmap_compat/lib/compat_netmap.c b/examples/netmap_compat/lib/compat_netmap.c
index 1d86ef0..856ab6e 100644
--- a/examples/netmap_compat/lib/compat_netmap.c
+++ b/examples/netmap_compat/lib/compat_netmap.c
@@ -824,7 +824,7 @@ rte_netmap_mmap(void *addr, size_t length,
 		return (MAP_FAILED);
 	}
 
-	return ((void *)((uintptr_t)netmap.mem + offset));
+	return (void *)((uintptr_t)netmap.mem + (uintptr_t)offset);
 }
 
 /**
-- 
2.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH 3/4] pmds: fix 32 bits compilation with debug enabled
  2015-05-18  8:17 [dpdk-dev] [PATCH 0/4] misc compilation fixes Olivier Matz
  2015-05-18  8:17 ` [dpdk-dev] [PATCH 1/4] examples/bond: fix compilation with clang Olivier Matz
  2015-05-18  8:17 ` [dpdk-dev] [PATCH 2/4] examples/netmap: fix compilation for x86_x32-native-linuxapp-gcc Olivier Matz
@ 2015-05-18  8:18 ` Olivier Matz
  2015-05-18  8:18 ` [dpdk-dev] [PATCH 4/4] examples/mk: add dependencies for timer and vm_power_manager Olivier Matz
  2015-05-19 15:47 ` [dpdk-dev] [PATCH 0/4] misc compilation fixes Thomas Monjalon
  4 siblings, 0 replies; 9+ messages in thread
From: Olivier Matz @ 2015-05-18  8:18 UTC (permalink / raw)
  To: dev

When debug is enabled for 32 bits targets, it triggers some format
errors that are not visible in 64 bits. Fix them by using the proper
format from inttypes.h or the proper cast.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 lib/librte_pmd_fm10k/fm10k_rxtx.c     |   5 +-
 lib/librte_pmd_i40e/i40e_ethdev.c     | 124 +++++++++++++++++-----------------
 lib/librte_pmd_i40e/i40e_rxtx.c       |   2 +-
 lib/librte_pmd_virtio/virtio_ethdev.c |   2 +-
 4 files changed, 68 insertions(+), 65 deletions(-)

diff --git a/lib/librte_pmd_fm10k/fm10k_rxtx.c b/lib/librte_pmd_fm10k/fm10k_rxtx.c
index 83bddfc..56df6cd 100644
--- a/lib/librte_pmd_fm10k/fm10k_rxtx.c
+++ b/lib/librte_pmd_fm10k/fm10k_rxtx.c
@@ -30,6 +30,9 @@
  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
+#include <inttypes.h>
+
 #include <rte_ethdev.h>
 #include <rte_common.h>
 #include "fm10k.h"
@@ -57,7 +60,7 @@ static inline void dump_rxd(union fm10k_rx_desc *rxd)
 	PMD_RX_LOG(DEBUG, "|   0x%08x   |   0x%08x   |", 0, rxd->d.rss);
 	PMD_RX_LOG(DEBUG, "+----------------|----------------+");
 	PMD_RX_LOG(DEBUG, "|            TIME TAG             |");
-	PMD_RX_LOG(DEBUG, "|       0x%016lx        |", rxd->q.timestamp);
+	PMD_RX_LOG(DEBUG, "|       0x%016"PRIx64"        |", rxd->q.timestamp);
 	PMD_RX_LOG(DEBUG, "+----------------|----------------+");
 }
 #endif
diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index 96700e4..ece88d9 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -1200,19 +1200,19 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
 
 	PMD_DRV_LOG(DEBUG, "***************** VSI[%u] stats start *******************",
 		    vsi->vsi_id);
-	PMD_DRV_LOG(DEBUG, "rx_bytes:            %lu", nes->rx_bytes);
-	PMD_DRV_LOG(DEBUG, "rx_unicast:          %lu", nes->rx_unicast);
-	PMD_DRV_LOG(DEBUG, "rx_multicast:        %lu", nes->rx_multicast);
-	PMD_DRV_LOG(DEBUG, "rx_broadcast:        %lu", nes->rx_broadcast);
-	PMD_DRV_LOG(DEBUG, "rx_discards:         %lu", nes->rx_discards);
-	PMD_DRV_LOG(DEBUG, "rx_unknown_protocol: %lu",
+	PMD_DRV_LOG(DEBUG, "rx_bytes:            %"PRIu64"", nes->rx_bytes);
+	PMD_DRV_LOG(DEBUG, "rx_unicast:          %"PRIu64"", nes->rx_unicast);
+	PMD_DRV_LOG(DEBUG, "rx_multicast:        %"PRIu64"", nes->rx_multicast);
+	PMD_DRV_LOG(DEBUG, "rx_broadcast:        %"PRIu64"", nes->rx_broadcast);
+	PMD_DRV_LOG(DEBUG, "rx_discards:         %"PRIu64"", nes->rx_discards);
+	PMD_DRV_LOG(DEBUG, "rx_unknown_protocol: %"PRIu64"",
 		    nes->rx_unknown_protocol);
-	PMD_DRV_LOG(DEBUG, "tx_bytes:            %lu", nes->tx_bytes);
-	PMD_DRV_LOG(DEBUG, "tx_unicast:          %lu", nes->tx_unicast);
-	PMD_DRV_LOG(DEBUG, "tx_multicast:        %lu", nes->tx_multicast);
-	PMD_DRV_LOG(DEBUG, "tx_broadcast:        %lu", nes->tx_broadcast);
-	PMD_DRV_LOG(DEBUG, "tx_discards:         %lu", nes->tx_discards);
-	PMD_DRV_LOG(DEBUG, "tx_errors:           %lu", nes->tx_errors);
+	PMD_DRV_LOG(DEBUG, "tx_bytes:            %"PRIu64"", nes->tx_bytes);
+	PMD_DRV_LOG(DEBUG, "tx_unicast:          %"PRIu64"", nes->tx_unicast);
+	PMD_DRV_LOG(DEBUG, "tx_multicast:        %"PRIu64"", nes->tx_multicast);
+	PMD_DRV_LOG(DEBUG, "tx_broadcast:        %"PRIu64"", nes->tx_broadcast);
+	PMD_DRV_LOG(DEBUG, "tx_discards:         %"PRIu64"", nes->tx_discards);
+	PMD_DRV_LOG(DEBUG, "tx_errors:           %"PRIu64"", nes->tx_errors);
 	PMD_DRV_LOG(DEBUG, "***************** VSI[%u] stats end *******************",
 		    vsi->vsi_id);
 }
@@ -1424,73 +1424,73 @@ i40e_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 	stats->ierrors  = stats->ibadcrc + stats->ibadlen + stats->imissed;
 
 	PMD_DRV_LOG(DEBUG, "***************** PF stats start *******************");
-	PMD_DRV_LOG(DEBUG, "rx_bytes:            %lu", ns->eth.rx_bytes);
-	PMD_DRV_LOG(DEBUG, "rx_unicast:          %lu", ns->eth.rx_unicast);
-	PMD_DRV_LOG(DEBUG, "rx_multicast:        %lu", ns->eth.rx_multicast);
-	PMD_DRV_LOG(DEBUG, "rx_broadcast:        %lu", ns->eth.rx_broadcast);
-	PMD_DRV_LOG(DEBUG, "rx_discards:         %lu", ns->eth.rx_discards);
-	PMD_DRV_LOG(DEBUG, "rx_unknown_protocol: %lu",
+	PMD_DRV_LOG(DEBUG, "rx_bytes:            %"PRIu64"", ns->eth.rx_bytes);
+	PMD_DRV_LOG(DEBUG, "rx_unicast:          %"PRIu64"", ns->eth.rx_unicast);
+	PMD_DRV_LOG(DEBUG, "rx_multicast:        %"PRIu64"", ns->eth.rx_multicast);
+	PMD_DRV_LOG(DEBUG, "rx_broadcast:        %"PRIu64"", ns->eth.rx_broadcast);
+	PMD_DRV_LOG(DEBUG, "rx_discards:         %"PRIu64"", ns->eth.rx_discards);
+	PMD_DRV_LOG(DEBUG, "rx_unknown_protocol: %"PRIu64"",
 		    ns->eth.rx_unknown_protocol);
-	PMD_DRV_LOG(DEBUG, "tx_bytes:            %lu", ns->eth.tx_bytes);
-	PMD_DRV_LOG(DEBUG, "tx_unicast:          %lu", ns->eth.tx_unicast);
-	PMD_DRV_LOG(DEBUG, "tx_multicast:        %lu", ns->eth.tx_multicast);
-	PMD_DRV_LOG(DEBUG, "tx_broadcast:        %lu", ns->eth.tx_broadcast);
-	PMD_DRV_LOG(DEBUG, "tx_discards:         %lu", ns->eth.tx_discards);
-	PMD_DRV_LOG(DEBUG, "tx_errors:           %lu", ns->eth.tx_errors);
-
-	PMD_DRV_LOG(DEBUG, "tx_dropped_link_down:     %lu",
+	PMD_DRV_LOG(DEBUG, "tx_bytes:            %"PRIu64"", ns->eth.tx_bytes);
+	PMD_DRV_LOG(DEBUG, "tx_unicast:          %"PRIu64"", ns->eth.tx_unicast);
+	PMD_DRV_LOG(DEBUG, "tx_multicast:        %"PRIu64"", ns->eth.tx_multicast);
+	PMD_DRV_LOG(DEBUG, "tx_broadcast:        %"PRIu64"", ns->eth.tx_broadcast);
+	PMD_DRV_LOG(DEBUG, "tx_discards:         %"PRIu64"", ns->eth.tx_discards);
+	PMD_DRV_LOG(DEBUG, "tx_errors:           %"PRIu64"", ns->eth.tx_errors);
+
+	PMD_DRV_LOG(DEBUG, "tx_dropped_link_down:     %"PRIu64"",
 		    ns->tx_dropped_link_down);
-	PMD_DRV_LOG(DEBUG, "crc_errors:               %lu", ns->crc_errors);
-	PMD_DRV_LOG(DEBUG, "illegal_bytes:            %lu",
+	PMD_DRV_LOG(DEBUG, "crc_errors:               %"PRIu64"", ns->crc_errors);
+	PMD_DRV_LOG(DEBUG, "illegal_bytes:            %"PRIu64"",
 		    ns->illegal_bytes);
-	PMD_DRV_LOG(DEBUG, "error_bytes:              %lu", ns->error_bytes);
-	PMD_DRV_LOG(DEBUG, "mac_local_faults:         %lu",
+	PMD_DRV_LOG(DEBUG, "error_bytes:              %"PRIu64"", ns->error_bytes);
+	PMD_DRV_LOG(DEBUG, "mac_local_faults:         %"PRIu64"",
 		    ns->mac_local_faults);
-	PMD_DRV_LOG(DEBUG, "mac_remote_faults:        %lu",
+	PMD_DRV_LOG(DEBUG, "mac_remote_faults:        %"PRIu64"",
 		    ns->mac_remote_faults);
-	PMD_DRV_LOG(DEBUG, "rx_length_errors:         %lu",
+	PMD_DRV_LOG(DEBUG, "rx_length_errors:         %"PRIu64"",
 		    ns->rx_length_errors);
-	PMD_DRV_LOG(DEBUG, "link_xon_rx:              %lu", ns->link_xon_rx);
-	PMD_DRV_LOG(DEBUG, "link_xoff_rx:             %lu", ns->link_xoff_rx);
+	PMD_DRV_LOG(DEBUG, "link_xon_rx:              %"PRIu64"", ns->link_xon_rx);
+	PMD_DRV_LOG(DEBUG, "link_xoff_rx:             %"PRIu64"", ns->link_xoff_rx);
 	for (i = 0; i < 8; i++) {
-		PMD_DRV_LOG(DEBUG, "priority_xon_rx[%d]:      %lu",
+		PMD_DRV_LOG(DEBUG, "priority_xon_rx[%d]:      %"PRIu64"",
 				i, ns->priority_xon_rx[i]);
-		PMD_DRV_LOG(DEBUG, "priority_xoff_rx[%d]:     %lu",
+		PMD_DRV_LOG(DEBUG, "priority_xoff_rx[%d]:     %"PRIu64"",
 				i, ns->priority_xoff_rx[i]);
 	}
-	PMD_DRV_LOG(DEBUG, "link_xon_tx:              %lu", ns->link_xon_tx);
-	PMD_DRV_LOG(DEBUG, "link_xoff_tx:             %lu", ns->link_xoff_tx);
+	PMD_DRV_LOG(DEBUG, "link_xon_tx:              %"PRIu64"", ns->link_xon_tx);
+	PMD_DRV_LOG(DEBUG, "link_xoff_tx:             %"PRIu64"", ns->link_xoff_tx);
 	for (i = 0; i < 8; i++) {
-		PMD_DRV_LOG(DEBUG, "priority_xon_tx[%d]:      %lu",
+		PMD_DRV_LOG(DEBUG, "priority_xon_tx[%d]:      %"PRIu64"",
 				i, ns->priority_xon_tx[i]);
-		PMD_DRV_LOG(DEBUG, "priority_xoff_tx[%d]:     %lu",
+		PMD_DRV_LOG(DEBUG, "priority_xoff_tx[%d]:     %"PRIu64"",
 				i, ns->priority_xoff_tx[i]);
-		PMD_DRV_LOG(DEBUG, "priority_xon_2_xoff[%d]:  %lu",
+		PMD_DRV_LOG(DEBUG, "priority_xon_2_xoff[%d]:  %"PRIu64"",
 				i, ns->priority_xon_2_xoff[i]);
 	}
-	PMD_DRV_LOG(DEBUG, "rx_size_64:               %lu", ns->rx_size_64);
-	PMD_DRV_LOG(DEBUG, "rx_size_127:              %lu", ns->rx_size_127);
-	PMD_DRV_LOG(DEBUG, "rx_size_255:              %lu", ns->rx_size_255);
-	PMD_DRV_LOG(DEBUG, "rx_size_511:              %lu", ns->rx_size_511);
-	PMD_DRV_LOG(DEBUG, "rx_size_1023:             %lu", ns->rx_size_1023);
-	PMD_DRV_LOG(DEBUG, "rx_size_1522:             %lu", ns->rx_size_1522);
-	PMD_DRV_LOG(DEBUG, "rx_size_big:              %lu", ns->rx_size_big);
-	PMD_DRV_LOG(DEBUG, "rx_undersize:             %lu", ns->rx_undersize);
-	PMD_DRV_LOG(DEBUG, "rx_fragments:             %lu", ns->rx_fragments);
-	PMD_DRV_LOG(DEBUG, "rx_oversize:              %lu", ns->rx_oversize);
-	PMD_DRV_LOG(DEBUG, "rx_jabber:                %lu", ns->rx_jabber);
-	PMD_DRV_LOG(DEBUG, "tx_size_64:               %lu", ns->tx_size_64);
-	PMD_DRV_LOG(DEBUG, "tx_size_127:              %lu", ns->tx_size_127);
-	PMD_DRV_LOG(DEBUG, "tx_size_255:              %lu", ns->tx_size_255);
-	PMD_DRV_LOG(DEBUG, "tx_size_511:              %lu", ns->tx_size_511);
-	PMD_DRV_LOG(DEBUG, "tx_size_1023:             %lu", ns->tx_size_1023);
-	PMD_DRV_LOG(DEBUG, "tx_size_1522:             %lu", ns->tx_size_1522);
-	PMD_DRV_LOG(DEBUG, "tx_size_big:              %lu", ns->tx_size_big);
-	PMD_DRV_LOG(DEBUG, "mac_short_packet_dropped: %lu",
+	PMD_DRV_LOG(DEBUG, "rx_size_64:               %"PRIu64"", ns->rx_size_64);
+	PMD_DRV_LOG(DEBUG, "rx_size_127:              %"PRIu64"", ns->rx_size_127);
+	PMD_DRV_LOG(DEBUG, "rx_size_255:              %"PRIu64"", ns->rx_size_255);
+	PMD_DRV_LOG(DEBUG, "rx_size_511:              %"PRIu64"", ns->rx_size_511);
+	PMD_DRV_LOG(DEBUG, "rx_size_1023:             %"PRIu64"", ns->rx_size_1023);
+	PMD_DRV_LOG(DEBUG, "rx_size_1522:             %"PRIu64"", ns->rx_size_1522);
+	PMD_DRV_LOG(DEBUG, "rx_size_big:              %"PRIu64"", ns->rx_size_big);
+	PMD_DRV_LOG(DEBUG, "rx_undersize:             %"PRIu64"", ns->rx_undersize);
+	PMD_DRV_LOG(DEBUG, "rx_fragments:             %"PRIu64"", ns->rx_fragments);
+	PMD_DRV_LOG(DEBUG, "rx_oversize:              %"PRIu64"", ns->rx_oversize);
+	PMD_DRV_LOG(DEBUG, "rx_jabber:                %"PRIu64"", ns->rx_jabber);
+	PMD_DRV_LOG(DEBUG, "tx_size_64:               %"PRIu64"", ns->tx_size_64);
+	PMD_DRV_LOG(DEBUG, "tx_size_127:              %"PRIu64"", ns->tx_size_127);
+	PMD_DRV_LOG(DEBUG, "tx_size_255:              %"PRIu64"", ns->tx_size_255);
+	PMD_DRV_LOG(DEBUG, "tx_size_511:              %"PRIu64"", ns->tx_size_511);
+	PMD_DRV_LOG(DEBUG, "tx_size_1023:             %"PRIu64"", ns->tx_size_1023);
+	PMD_DRV_LOG(DEBUG, "tx_size_1522:             %"PRIu64"", ns->tx_size_1522);
+	PMD_DRV_LOG(DEBUG, "tx_size_big:              %"PRIu64"", ns->tx_size_big);
+	PMD_DRV_LOG(DEBUG, "mac_short_packet_dropped: %"PRIu64"",
 			ns->mac_short_packet_dropped);
-	PMD_DRV_LOG(DEBUG, "checksum_error:           %lu",
+	PMD_DRV_LOG(DEBUG, "checksum_error:           %"PRIu64"",
 		    ns->checksum_error);
-	PMD_DRV_LOG(DEBUG, "fdir_match:               %lu", ns->fd_sb_match);
+	PMD_DRV_LOG(DEBUG, "fdir_match:               %"PRIu64"", ns->fd_sb_match);
 	PMD_DRV_LOG(DEBUG, "***************** PF stats end ********************");
 }
 
diff --git a/lib/librte_pmd_i40e/i40e_rxtx.c b/lib/librte_pmd_i40e/i40e_rxtx.c
index cb6040a..453f98f 100644
--- a/lib/librte_pmd_i40e/i40e_rxtx.c
+++ b/lib/librte_pmd_i40e/i40e_rxtx.c
@@ -1348,7 +1348,7 @@ i40e_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 				"tunneling_params: %#x;\n"
 				"l2tag2: %#hx;\n"
 				"rsvd: %#hx;\n"
-				"type_cmd_tso_mss: %#lx;\n",
+				"type_cmd_tso_mss: %#"PRIx64";\n",
 				tx_pkt, tx_id,
 				ctx_txd->tunneling_params,
 				ctx_txd->l2tag2,
diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c
index e63dbfb..f74e413 100644
--- a/lib/librte_pmd_virtio/virtio_ethdev.c
+++ b/lib/librte_pmd_virtio/virtio_ethdev.c
@@ -336,7 +336,7 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev,
 	vq->vq_ring_mem = mz->phys_addr;
 	vq->vq_ring_virt_mem = mz->addr;
 	PMD_INIT_LOG(DEBUG, "vq->vq_ring_mem:      0x%"PRIx64, (uint64_t)mz->phys_addr);
-	PMD_INIT_LOG(DEBUG, "vq->vq_ring_virt_mem: 0x%"PRIx64, (uint64_t)mz->addr);
+	PMD_INIT_LOG(DEBUG, "vq->vq_ring_virt_mem: 0x%"PRIx64, (uint64_t)(uintptr_t)mz->addr);
 	vq->virtio_net_hdr_mz  = NULL;
 	vq->virtio_net_hdr_mem = 0;
 
-- 
2.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH 4/4] examples/mk: add dependencies for timer and vm_power_manager
  2015-05-18  8:17 [dpdk-dev] [PATCH 0/4] misc compilation fixes Olivier Matz
                   ` (2 preceding siblings ...)
  2015-05-18  8:18 ` [dpdk-dev] [PATCH 3/4] pmds: fix 32 bits compilation with debug enabled Olivier Matz
@ 2015-05-18  8:18 ` Olivier Matz
  2015-05-19 15:47 ` [dpdk-dev] [PATCH 0/4] misc compilation fixes Thomas Monjalon
  4 siblings, 0 replies; 9+ messages in thread
From: Olivier Matz @ 2015-05-18  8:18 UTC (permalink / raw)
  To: dev

Do not compile these examples if the related dpdk option is not
enabled, as it's done for other examples. It allows to build
the examples directory with a reduced dpdk configuration.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 examples/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/Makefile b/examples/Makefile
index d549026..e659f6f 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -67,11 +67,11 @@ DIRS-$(CONFIG_RTE_LIBRTE_SCHED) += qos_sched
 DIRS-y += quota_watermark
 DIRS-$(CONFIG_RTE_ETHDEV_RXTX_CALLBACKS) += rxtx_callbacks
 DIRS-y += skeleton
-DIRS-y += timer
+DIRS-$(CONFIG_RTE_LIBRTE_TIMER) += timer
 DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost
 DIRS-$(CONFIG_RTE_LIBRTE_XEN_DOM0) += vhost_xen
 DIRS-y += vmdq
 DIRS-y += vmdq_dcb
-DIRS-y += vm_power_manager
+DIRS-$(CONFIG_RTE_LIBRTE_POWER) += vm_power_manager
 
 include $(RTE_SDK)/mk/rte.extsubdir.mk
-- 
2.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 1/4] examples/bond: fix compilation with clang
  2015-05-18  8:17 ` [dpdk-dev] [PATCH 1/4] examples/bond: fix compilation with clang Olivier Matz
@ 2015-05-18 13:53   ` Bruce Richardson
  2015-05-18 13:57     ` Olivier MATZ
  0 siblings, 1 reply; 9+ messages in thread
From: Bruce Richardson @ 2015-05-18 13:53 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev

On Mon, May 18, 2015 at 10:17:58AM +0200, Olivier Matz wrote:
> Fix the following compilation error:
> 
> examples/bond/main.c:717:1: error: control reaches end of
>   non-void function [-Werror,-Wreturn-type]
> 
> The prompt() function does not return anything, so fix its prototype
> to be void.
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Out of interest, what version of clang throws up this error?

/Bruce

> ---
>  examples/bond/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/bond/main.c b/examples/bond/main.c
> index e90dc1d..4622283 100644
> --- a/examples/bond/main.c
> +++ b/examples/bond/main.c
> @@ -705,7 +705,7 @@ cmdline_parse_ctx_t main_ctx[] = {
>  };
>  
>  /* prompt function, called from main on MASTER lcore */
> -static void *prompt(__attribute__((unused)) void *arg1)
> +static void prompt(__attribute__((unused)) void *arg1)
>  {
>  	struct cmdline *cl;
>  
> -- 
> 2.1.4
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 1/4] examples/bond: fix compilation with clang
  2015-05-18 13:53   ` Bruce Richardson
@ 2015-05-18 13:57     ` Olivier MATZ
  2015-05-18 14:00       ` Bruce Richardson
  0 siblings, 1 reply; 9+ messages in thread
From: Olivier MATZ @ 2015-05-18 13:57 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

Hi Bruce,

On 05/18/2015 03:53 PM, Bruce Richardson wrote:
> On Mon, May 18, 2015 at 10:17:58AM +0200, Olivier Matz wrote:
>> Fix the following compilation error:
>>
>> examples/bond/main.c:717:1: error: control reaches end of
>>   non-void function [-Werror,-Wreturn-type]
>>
>> The prompt() function does not return anything, so fix its prototype
>> to be void.
>>
>> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> 
> Out of interest, what version of clang throws up this error?

$ clang --version
Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix

And by the way, the gcc version I used for the other patches of the
series:

$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2


Regards,
Olivier

> 
> /Bruce
> 
>> ---
>>  examples/bond/main.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/examples/bond/main.c b/examples/bond/main.c
>> index e90dc1d..4622283 100644
>> --- a/examples/bond/main.c
>> +++ b/examples/bond/main.c
>> @@ -705,7 +705,7 @@ cmdline_parse_ctx_t main_ctx[] = {
>>  };
>>  
>>  /* prompt function, called from main on MASTER lcore */
>> -static void *prompt(__attribute__((unused)) void *arg1)
>> +static void prompt(__attribute__((unused)) void *arg1)
>>  {
>>  	struct cmdline *cl;
>>  
>> -- 
>> 2.1.4
>>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 1/4] examples/bond: fix compilation with clang
  2015-05-18 13:57     ` Olivier MATZ
@ 2015-05-18 14:00       ` Bruce Richardson
  0 siblings, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2015-05-18 14:00 UTC (permalink / raw)
  To: Olivier MATZ; +Cc: dev

On Mon, May 18, 2015 at 03:57:00PM +0200, Olivier MATZ wrote:
> Hi Bruce,
> 
> On 05/18/2015 03:53 PM, Bruce Richardson wrote:
> > On Mon, May 18, 2015 at 10:17:58AM +0200, Olivier Matz wrote:
> >> Fix the following compilation error:
> >>
> >> examples/bond/main.c:717:1: error: control reaches end of
> >>   non-void function [-Werror,-Wreturn-type]
> >>
> >> The prompt() function does not return anything, so fix its prototype
> >> to be void.
> >>
> >> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> > 
> > Out of interest, what version of clang throws up this error?
> 
> $ clang --version
> Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
> Target: x86_64-pc-linux-gnu
> Thread model: posix
> 
> And by the way, the gcc version I used for the other patches of the
> series:
> 
> $ gcc --version
> gcc (Debian 4.9.2-10) 4.9.2
> 
> 
> Regards,
> Olivier
> 

Thanks. I was just curious as I wasn't seeing issues with clang 3.6 on Fedora.

/Bruce

> > 
> > /Bruce
> > 
> >> ---
> >>  examples/bond/main.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/examples/bond/main.c b/examples/bond/main.c
> >> index e90dc1d..4622283 100644
> >> --- a/examples/bond/main.c
> >> +++ b/examples/bond/main.c
> >> @@ -705,7 +705,7 @@ cmdline_parse_ctx_t main_ctx[] = {
> >>  };
> >>  
> >>  /* prompt function, called from main on MASTER lcore */
> >> -static void *prompt(__attribute__((unused)) void *arg1)
> >> +static void prompt(__attribute__((unused)) void *arg1)
> >>  {
> >>  	struct cmdline *cl;
> >>  
> >> -- 
> >> 2.1.4
> >>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH 0/4] misc compilation fixes
  2015-05-18  8:17 [dpdk-dev] [PATCH 0/4] misc compilation fixes Olivier Matz
                   ` (3 preceding siblings ...)
  2015-05-18  8:18 ` [dpdk-dev] [PATCH 4/4] examples/mk: add dependencies for timer and vm_power_manager Olivier Matz
@ 2015-05-19 15:47 ` Thomas Monjalon
  4 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2015-05-19 15:47 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev

> This series contains compilation fixes.
> 
> Olivier Matz (4):
>   examples/bond: fix compilation with clang
>   examples/netmap: fix compilation for x86_x32-native-linuxapp-gcc
>   pmds: fix 32 bits compilation with debug enabled
>   examples/mk: add dependencies for timer and vm_power_manager

Applied, thanks

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-05-19 15:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18  8:17 [dpdk-dev] [PATCH 0/4] misc compilation fixes Olivier Matz
2015-05-18  8:17 ` [dpdk-dev] [PATCH 1/4] examples/bond: fix compilation with clang Olivier Matz
2015-05-18 13:53   ` Bruce Richardson
2015-05-18 13:57     ` Olivier MATZ
2015-05-18 14:00       ` Bruce Richardson
2015-05-18  8:17 ` [dpdk-dev] [PATCH 2/4] examples/netmap: fix compilation for x86_x32-native-linuxapp-gcc Olivier Matz
2015-05-18  8:18 ` [dpdk-dev] [PATCH 3/4] pmds: fix 32 bits compilation with debug enabled Olivier Matz
2015-05-18  8:18 ` [dpdk-dev] [PATCH 4/4] examples/mk: add dependencies for timer and vm_power_manager Olivier Matz
2015-05-19 15:47 ` [dpdk-dev] [PATCH 0/4] misc compilation fixes Thomas Monjalon

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).