DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/7] fix build with debug enabled
@ 2015-03-03 15:23 Thomas Monjalon
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 1/7] mempool: " Thomas Monjalon
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Thomas Monjalon @ 2015-03-03 15:23 UTC (permalink / raw)
  To: dev

There are some compilation errors when debug options are enabled.
We should start thinking to test every patch with an all-yes configuration.
Unfortunately, we cannot force this kind of configuration because
some libraries depend on the availability of some libraries.

Thomas Monjalon (7):
  mempool: fix build with debug enabled
  fm10k: fix build with debug enabled
  virtio: fix build with mempool debug enabled
  virtio: fix build with debug enabled
  mlx4: fix build with mempool debug enabled
  mlx4: mute auto config in quiet mode
  bond: remove debug function to fix link with shared lib

 examples/bond/main.c                    |  5 -----
 lib/librte_eal/common/include/rte_pci.h |  2 +-
 lib/librte_mempool/rte_mempool.h        |  8 ++++----
 lib/librte_pmd_bond/rte_eth_bond_pmd.c  | 13 -------------
 lib/librte_pmd_fm10k/fm10k_logs.h       |  2 ++
 lib/librte_pmd_mlx4/Makefile            | 10 +++++++---
 lib/librte_pmd_mlx4/mlx4.c              | 22 ++++++++++------------
 lib/librte_pmd_virtio/Makefile          |  2 --
 lib/librte_pmd_virtio/virtio_ethdev.c   | 10 +++-------
 9 files changed, 27 insertions(+), 47 deletions(-)

-- 
2.2.2

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

* [dpdk-dev] [PATCH 1/7] mempool: fix build with debug enabled
  2015-03-03 15:23 [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
@ 2015-03-03 15:23 ` Thomas Monjalon
  2015-03-04  9:59   ` Olivier MATZ
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 2/7] fm10k: " Thomas Monjalon
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Thomas Monjalon @ 2015-03-03 15:23 UTC (permalink / raw)
  To: dev

error: format ‘%p’ expects argument of type ‘void *’,
but argument 5 has type ‘const struct rte_mempool *’ [-Werror=format=]

mp type is (const struct rte_mempool *) and must be casted into a simpler
type to be printed.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_mempool/rte_mempool.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h
index 974e8d7..39f7233 100644
--- a/lib/librte_mempool/rte_mempool.h
+++ b/lib/librte_mempool/rte_mempool.h
@@ -345,7 +345,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp,
 				rte_log_set_history(0);
 				RTE_LOG(CRIT, MEMPOOL,
 					"obj=%p, mempool=%p, cookie=%" PRIx64 "\n",
-					obj, mp, cookie);
+					obj, (const void *) mp, cookie);
 				rte_panic("MEMPOOL: bad header cookie (put)\n");
 			}
 			__mempool_write_header_cookie(obj, 1);
@@ -355,7 +355,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp,
 				rte_log_set_history(0);
 				RTE_LOG(CRIT, MEMPOOL,
 					"obj=%p, mempool=%p, cookie=%" PRIx64 "\n",
-					obj, mp, cookie);
+					obj, (const void *) mp, cookie);
 				rte_panic("MEMPOOL: bad header cookie (get)\n");
 			}
 			__mempool_write_header_cookie(obj, 0);
@@ -366,7 +366,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp,
 				rte_log_set_history(0);
 				RTE_LOG(CRIT, MEMPOOL,
 					"obj=%p, mempool=%p, cookie=%" PRIx64 "\n",
-					obj, mp, cookie);
+					obj, (const void *) mp, cookie);
 				rte_panic("MEMPOOL: bad header cookie (audit)\n");
 			}
 		}
@@ -375,7 +375,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp,
 			rte_log_set_history(0);
 			RTE_LOG(CRIT, MEMPOOL,
 				"obj=%p, mempool=%p, cookie=%" PRIx64 "\n",
-				obj, mp, cookie);
+				obj, (const void *) mp, cookie);
 			rte_panic("MEMPOOL: bad trailer cookie\n");
 		}
 	}
-- 
2.2.2

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

* [dpdk-dev] [PATCH 2/7] fm10k: fix build with debug enabled
  2015-03-03 15:23 [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 1/7] mempool: " Thomas Monjalon
@ 2015-03-03 15:23 ` Thomas Monjalon
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 3/7] virtio: fix build with mempool " Thomas Monjalon
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Thomas Monjalon @ 2015-03-03 15:23 UTC (permalink / raw)
  To: dev

error: implicit declaration of function ‘RTE_LOG’

Fixes: a6061d9e7075 ("fm10k: register PF driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_pmd_fm10k/fm10k_logs.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_pmd_fm10k/fm10k_logs.h b/lib/librte_pmd_fm10k/fm10k_logs.h
index febd796..41a45ce 100644
--- a/lib/librte_pmd_fm10k/fm10k_logs.h
+++ b/lib/librte_pmd_fm10k/fm10k_logs.h
@@ -34,6 +34,8 @@
 #ifndef _FM10K_LOGS_H_
 #define _FM10K_LOGS_H_
 
+#include <rte_log.h>
+
 #define PMD_INIT_LOG(level, fmt, args...) \
 	rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \
 		"PMD: %s(): " fmt "\n", __func__, ##args)
-- 
2.2.2

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

* [dpdk-dev] [PATCH 3/7] virtio: fix build with mempool debug enabled
  2015-03-03 15:23 [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 1/7] mempool: " Thomas Monjalon
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 2/7] fm10k: " Thomas Monjalon
@ 2015-03-03 15:23 ` Thomas Monjalon
  2015-03-04  1:15   ` Ouyang, Changchun
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 4/7] virtio: fix build with " Thomas Monjalon
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Thomas Monjalon @ 2015-03-03 15:23 UTC (permalink / raw)
  To: dev

The mempool header forces error on -Wcast-qual:
	error: cast discards ‘const’ qualifier from pointer target type

Let's fix it by removing const qualifier of pci driver from commit
	5e9f6d1340ff ("pci: reference driver structure for each device")
It's needed because the driver flags are changed depending on using uio or not.
Actually these driver flags should be directly attached to each device.

Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_eal/common/include/rte_pci.h | 2 +-
 lib/librte_pmd_virtio/Makefile          | 2 --
 lib/librte_pmd_virtio/virtio_ethdev.c   | 8 ++------
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h
index b9cdf8b..995f814 100644
--- a/lib/librte_eal/common/include/rte_pci.h
+++ b/lib/librte_eal/common/include/rte_pci.h
@@ -158,7 +158,7 @@ struct rte_pci_device {
 	struct rte_pci_id id;                   /**< PCI ID. */
 	struct rte_pci_resource mem_resource[PCI_MAX_RESOURCE];   /**< PCI Memory Resource */
 	struct rte_intr_handle intr_handle;     /**< Interrupt handle */
-	const struct rte_pci_driver *driver;    /**< Associated driver */
+	struct rte_pci_driver *driver;          /**< Associated driver */
 	uint16_t max_vfs;                       /**< sriov enable if not zero */
 	int numa_node;                          /**< NUMA node connection */
 	struct rte_devargs *devargs;            /**< Device user arguments */
diff --git a/lib/librte_pmd_virtio/Makefile b/lib/librte_pmd_virtio/Makefile
index 0baaf46..793067f 100644
--- a/lib/librte_pmd_virtio/Makefile
+++ b/lib/librte_pmd_virtio/Makefile
@@ -57,6 +57,4 @@ DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_eal lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_mempool lib/librte_mbuf
 DEPDIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += lib/librte_net lib/librte_malloc
 
-CFLAGS_virtio_ethdev.o += -Wno-cast-qual
-
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c
index 88ecd57..4bad1e4 100644
--- a/lib/librte_pmd_virtio/virtio_ethdev.c
+++ b/lib/librte_pmd_virtio/virtio_ethdev.c
@@ -938,8 +938,6 @@ static int virtio_resource_init_by_uio(struct rte_pci_device *pci_dev)
 	char filename[PATH_MAX];
 	unsigned long start, size;
 	unsigned int uio_num;
-	struct rte_pci_driver *pci_drv =
-			(struct rte_pci_driver *)pci_dev->driver;
 
 	if (get_uio_dev(&pci_dev->addr, dirname, sizeof(dirname), &uio_num) < 0)
 		return -1;
@@ -978,7 +976,7 @@ static int virtio_resource_init_by_uio(struct rte_pci_device *pci_dev)
 	}
 
 	pci_dev->intr_handle.type = RTE_INTR_HANDLE_UIO;
-	pci_drv->drv_flags |= RTE_PCI_DRV_INTR_LSC;
+	pci_dev->driver->drv_flags |= RTE_PCI_DRV_INTR_LSC;
 
 	return 0;
 }
@@ -993,8 +991,6 @@ static int virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev)
 	char pci_id[16];
 	int found = 0;
 	size_t linesz;
-	struct rte_pci_driver *pci_drv =
-			(struct rte_pci_driver *)pci_dev->driver;
 
 	snprintf(pci_id, sizeof(pci_id), PCI_PRI_FMT,
 		 pci_dev->addr.domain,
@@ -1046,7 +1042,7 @@ static int virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev)
 		start, size);
 
 	/* can't support lsc interrupt without uio */
-	pci_drv->drv_flags &= ~RTE_PCI_DRV_INTR_LSC;
+	pci_dev->driver->drv_flags &= ~RTE_PCI_DRV_INTR_LSC;
 
 	return 0;
 }
-- 
2.2.2

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

* [dpdk-dev] [PATCH 4/7] virtio: fix build with debug enabled
  2015-03-03 15:23 [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
                   ` (2 preceding siblings ...)
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 3/7] virtio: fix build with mempool " Thomas Monjalon
@ 2015-03-03 15:23 ` Thomas Monjalon
  2015-03-04  1:17   ` Ouyang, Changchun
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 5/7] mlx4: fix build with mempool " Thomas Monjalon
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Thomas Monjalon @ 2015-03-03 15:23 UTC (permalink / raw)
  To: dev

With CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=y:
	error: ‘devname’ undeclared (first use in this function)

Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_pmd_virtio/virtio_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c
index 4bad1e4..d239083 100644
--- a/lib/librte_pmd_virtio/virtio_ethdev.c
+++ b/lib/librte_pmd_virtio/virtio_ethdev.c
@@ -971,7 +971,7 @@ static int virtio_resource_init_by_uio(struct rte_pci_device *pci_dev)
 	pci_dev->intr_handle.fd = open(dirname, O_RDWR);
 	if (pci_dev->intr_handle.fd < 0) {
 		PMD_INIT_LOG(ERR, "Cannot open %s: %s\n",
-			devname, strerror(errno));
+			dirname, strerror(errno));
 		return -1;
 	}
 
-- 
2.2.2

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

* [dpdk-dev] [PATCH 5/7] mlx4: fix build with mempool debug enabled
  2015-03-03 15:23 [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
                   ` (3 preceding siblings ...)
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 4/7] virtio: fix build with " Thomas Monjalon
@ 2015-03-03 15:23 ` Thomas Monjalon
  2015-03-03 16:02   ` Adrien Mazarguil
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 6/7] mlx4: mute auto config in quiet mode Thomas Monjalon
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Thomas Monjalon @ 2015-03-03 15:23 UTC (permalink / raw)
  To: dev

The mempool header forces error on -Wcast-qual and makes verbs.h failing.
Let's include verbs before as a system header.

Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_pmd_mlx4/mlx4.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/lib/librte_pmd_mlx4/mlx4.c b/lib/librte_pmd_mlx4/mlx4.c
index 492cbbf..b5774c4 100644
--- a/lib/librte_pmd_mlx4/mlx4.c
+++ b/lib/librte_pmd_mlx4/mlx4.c
@@ -60,6 +60,16 @@
 #include <linux/ethtool.h>
 #include <linux/sockios.h>
 
+/* Verbs header. */
+/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
+#ifdef PEDANTIC
+#pragma GCC diagnostic ignored "-pedantic"
+#endif
+#include <infiniband/verbs.h>
+#ifdef PEDANTIC
+#pragma GCC diagnostic error "-pedantic"
+#endif
+
 /* DPDK headers don't like -pedantic. */
 #ifdef PEDANTIC
 #pragma GCC diagnostic ignored "-pedantic"
@@ -81,18 +91,6 @@
 #pragma GCC diagnostic error "-pedantic"
 #endif
 
-/* Verbs header. */
-/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
-#ifdef PEDANTIC
-#pragma GCC diagnostic ignored "-pedantic"
-#endif
-
-#include <infiniband/verbs.h>
-
-#ifdef PEDANTIC
-#pragma GCC diagnostic error "-pedantic"
-#endif
-
 /* Generated configuration header. */
 #include "mlx4_autoconf.h"
 
-- 
2.2.2

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

* [dpdk-dev] [PATCH 6/7] mlx4: mute auto config in quiet mode
  2015-03-03 15:23 [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
                   ` (4 preceding siblings ...)
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 5/7] mlx4: fix build with mempool " Thomas Monjalon
@ 2015-03-03 15:23 ` Thomas Monjalon
  2015-03-03 16:03   ` Adrien Mazarguil
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 7/7] bond: remove debug function to fix link with shared lib Thomas Monjalon
  2015-03-04 10:21 ` [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
  7 siblings, 1 reply; 15+ messages in thread
From: Thomas Monjalon @ 2015-03-03 15:23 UTC (permalink / raw)
  To: dev

If verbose is off, auto-config-h.sh script should be quiet.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 lib/librte_pmd_mlx4/Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/librte_pmd_mlx4/Makefile b/lib/librte_pmd_mlx4/Makefile
index de50a5a..6666813 100644
--- a/lib/librte_pmd_mlx4/Makefile
+++ b/lib/librte_pmd_mlx4/Makefile
@@ -98,20 +98,24 @@ include $(RTE_SDK)/mk/rte.lib.mk
 export CC CFLAGS CPPFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS
 export AUTO_CONFIG_CFLAGS = -Wno-error
 
+ifndef V
+AUTOCONF_OUTPUT := >/dev/null
+endif
+
 mlx4_autoconf.h: $(RTE_SDK)/scripts/auto-config-h.sh
 	$Q $(RM) -f -- '$@'
 	$Q sh -- '$<' '$@' \
 		RSS_SUPPORT \
 		infiniband/verbs.h \
-		enum IBV_EXP_DEVICE_UD_RSS
+		enum IBV_EXP_DEVICE_UD_RSS $(AUTOCONF_OUTPUT)
 	$Q sh -- '$<' '$@' \
 		INLINE_RECV \
 		infiniband/verbs.h \
-		enum IBV_EXP_DEVICE_ATTR_INLINE_RECV_SZ
+		enum IBV_EXP_DEVICE_ATTR_INLINE_RECV_SZ $(AUTOCONF_OUTPUT)
 	$Q sh -- '$<' '$@' \
 		SEND_RAW_WR_SUPPORT \
 		infiniband/verbs.h \
-		type 'struct ibv_send_wr_raw'
+		type 'struct ibv_send_wr_raw' $(AUTOCONF_OUTPUT)
 
 mlx4.o: mlx4_autoconf.h
 
-- 
2.2.2

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

* [dpdk-dev] [PATCH 7/7] bond: remove debug function to fix link with shared lib
  2015-03-03 15:23 [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
                   ` (5 preceding siblings ...)
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 6/7] mlx4: mute auto config in quiet mode Thomas Monjalon
@ 2015-03-03 15:23 ` Thomas Monjalon
  2015-03-04  9:49   ` Declan Doherty
  2015-03-04 10:21 ` [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
  7 siblings, 1 reply; 15+ messages in thread
From: Thomas Monjalon @ 2015-03-03 15:23 UTC (permalink / raw)
  To: dev

The function print_client_stats was used in the example without being
clearly exported in the map file. So it breaks linking with shared library
when debug is enabled.
It's better to remove this function as it probably could be implemented
with statistics API.

Fixes: cc7e8ae84faa ("add example application for link bonding mode 6")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 examples/bond/main.c                   |  5 -----
 lib/librte_pmd_bond/rte_eth_bond_pmd.c | 13 -------------
 2 files changed, 18 deletions(-)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index e4457f2..7da6bfc 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -650,7 +650,6 @@ cmdline_parse_inst_t cmd_quit = {
 	},
 };
 
-extern void print_client_stats(void);
 struct cmd_show_result {
 	cmdline_fixed_string_t show;
 };
@@ -680,10 +679,6 @@ static void cmd_show_parsed(__attribute__((unused)) void *parsed_result,
 			global_flag_stru_p->port_packets[1],
 			global_flag_stru_p->port_packets[2]);
 	rte_spinlock_unlock(&global_flag_stru_p->lock);
-
-#if defined(RTE_LIBRTE_BOND_DEBUG_ALB_L1) || defined(RTE_LIBRTE_BOND_DEBUG_ALB)
-	print_client_stats();
-#endif
 }
 
 cmdline_parse_token_string_t cmd_show_show =
diff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c
index 7dee5f2..af8113e 100644
--- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c
+++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c
@@ -279,19 +279,6 @@ update_client_stats(uint32_t addr, uint8_t port, uint32_t *TXorRXindicator)
 
 }
 
-void print_client_stats(void);
-void print_client_stats(void)
-{
-	int i = 0;
-	char buf[MaxIPv4String];
-
-	for (; i < active_clients; i++)	{
-		ipv4_addr_to_dot(client_stats[i].ipv4_addr, buf, MaxIPv4String);
-		printf("port:%d client:%s RX:%d TX:%d\n", client_stats[i].port,	buf,
-				client_stats[i].ipv4_rx_packets,
-				client_stats[i].ipv4_tx_packets);
-	}
-}
 #ifdef RTE_LIBRTE_BOND_DEBUG_ALB
 #define MODE6_DEBUG(info, src_ip, dst_ip, eth_h, arp_op, port, burstnumber)	\
 		RTE_LOG(DEBUG, PMD, \
-- 
2.2.2

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

* Re: [dpdk-dev] [PATCH 5/7] mlx4: fix build with mempool debug enabled
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 5/7] mlx4: fix build with mempool " Thomas Monjalon
@ 2015-03-03 16:02   ` Adrien Mazarguil
  0 siblings, 0 replies; 15+ messages in thread
From: Adrien Mazarguil @ 2015-03-03 16:02 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Tue, Mar 03, 2015 at 04:23:48PM +0100, Thomas Monjalon wrote:
> The mempool header forces error on -Wcast-qual and makes verbs.h failing.
> Let's include verbs before as a system header.
> 
> Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  lib/librte_pmd_mlx4/mlx4.c | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/lib/librte_pmd_mlx4/mlx4.c b/lib/librte_pmd_mlx4/mlx4.c
> index 492cbbf..b5774c4 100644
> --- a/lib/librte_pmd_mlx4/mlx4.c
> +++ b/lib/librte_pmd_mlx4/mlx4.c
> @@ -60,6 +60,16 @@
>  #include <linux/ethtool.h>
>  #include <linux/sockios.h>
>  
> +/* Verbs header. */
> +/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
> +#ifdef PEDANTIC
> +#pragma GCC diagnostic ignored "-pedantic"
> +#endif
> +#include <infiniband/verbs.h>
> +#ifdef PEDANTIC
> +#pragma GCC diagnostic error "-pedantic"
> +#endif
> +
>  /* DPDK headers don't like -pedantic. */
>  #ifdef PEDANTIC
>  #pragma GCC diagnostic ignored "-pedantic"
> @@ -81,18 +91,6 @@
>  #pragma GCC diagnostic error "-pedantic"
>  #endif
>  
> -/* Verbs header. */
> -/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
> -#ifdef PEDANTIC
> -#pragma GCC diagnostic ignored "-pedantic"
> -#endif
> -
> -#include <infiniband/verbs.h>
> -
> -#ifdef PEDANTIC
> -#pragma GCC diagnostic error "-pedantic"
> -#endif
> -
>  /* Generated configuration header. */
>  #include "mlx4_autoconf.h"
>  
> -- 
> 2.2.2

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

-- 
Adrien Mazarguil
6WIND

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

* Re: [dpdk-dev] [PATCH 6/7] mlx4: mute auto config in quiet mode
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 6/7] mlx4: mute auto config in quiet mode Thomas Monjalon
@ 2015-03-03 16:03   ` Adrien Mazarguil
  0 siblings, 0 replies; 15+ messages in thread
From: Adrien Mazarguil @ 2015-03-03 16:03 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Tue, Mar 03, 2015 at 04:23:49PM +0100, Thomas Monjalon wrote:
> If verbose is off, auto-config-h.sh script should be quiet.
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  lib/librte_pmd_mlx4/Makefile | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/librte_pmd_mlx4/Makefile b/lib/librte_pmd_mlx4/Makefile
> index de50a5a..6666813 100644
> --- a/lib/librte_pmd_mlx4/Makefile
> +++ b/lib/librte_pmd_mlx4/Makefile
> @@ -98,20 +98,24 @@ include $(RTE_SDK)/mk/rte.lib.mk
>  export CC CFLAGS CPPFLAGS EXTRA_CFLAGS EXTRA_CPPFLAGS
>  export AUTO_CONFIG_CFLAGS = -Wno-error
>  
> +ifndef V
> +AUTOCONF_OUTPUT := >/dev/null
> +endif
> +
>  mlx4_autoconf.h: $(RTE_SDK)/scripts/auto-config-h.sh
>  	$Q $(RM) -f -- '$@'
>  	$Q sh -- '$<' '$@' \
>  		RSS_SUPPORT \
>  		infiniband/verbs.h \
> -		enum IBV_EXP_DEVICE_UD_RSS
> +		enum IBV_EXP_DEVICE_UD_RSS $(AUTOCONF_OUTPUT)
>  	$Q sh -- '$<' '$@' \
>  		INLINE_RECV \
>  		infiniband/verbs.h \
> -		enum IBV_EXP_DEVICE_ATTR_INLINE_RECV_SZ
> +		enum IBV_EXP_DEVICE_ATTR_INLINE_RECV_SZ $(AUTOCONF_OUTPUT)
>  	$Q sh -- '$<' '$@' \
>  		SEND_RAW_WR_SUPPORT \
>  		infiniband/verbs.h \
> -		type 'struct ibv_send_wr_raw'
> +		type 'struct ibv_send_wr_raw' $(AUTOCONF_OUTPUT)
>  
>  mlx4.o: mlx4_autoconf.h
>  
> -- 
> 2.2.2

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

-- 
Adrien Mazarguil
6WIND

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

* Re: [dpdk-dev] [PATCH 3/7] virtio: fix build with mempool debug enabled
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 3/7] virtio: fix build with mempool " Thomas Monjalon
@ 2015-03-04  1:15   ` Ouyang, Changchun
  0 siblings, 0 replies; 15+ messages in thread
From: Ouyang, Changchun @ 2015-03-04  1:15 UTC (permalink / raw)
  To: Thomas Monjalon, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Tuesday, March 3, 2015 11:24 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 3/7] virtio: fix build with mempool debug
> enabled
> 
> The mempool header forces error on -Wcast-qual:
> 	error: cast discards ‘const’ qualifier from pointer target type
> 
> Let's fix it by removing const qualifier of pci driver from commit
> 	5e9f6d1340ff ("pci: reference driver structure for each device") It's
> needed because the driver flags are changed depending on using uio or not.
> Actually these driver flags should be directly attached to each device.
> 
> Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Acked-by: Changchun Ouyang<changchun.ouyang@intel.com>

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

* Re: [dpdk-dev] [PATCH 4/7] virtio: fix build with debug enabled
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 4/7] virtio: fix build with " Thomas Monjalon
@ 2015-03-04  1:17   ` Ouyang, Changchun
  0 siblings, 0 replies; 15+ messages in thread
From: Ouyang, Changchun @ 2015-03-04  1:17 UTC (permalink / raw)
  To: Thomas Monjalon, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
> Sent: Tuesday, March 3, 2015 11:24 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 4/7] virtio: fix build with debug enabled
> 
> With CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=y:
> 	error: ‘devname’ undeclared (first use in this function)
> 
> Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource")
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>

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

* Re: [dpdk-dev] [PATCH 7/7] bond: remove debug function to fix link with shared lib
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 7/7] bond: remove debug function to fix link with shared lib Thomas Monjalon
@ 2015-03-04  9:49   ` Declan Doherty
  0 siblings, 0 replies; 15+ messages in thread
From: Declan Doherty @ 2015-03-04  9:49 UTC (permalink / raw)
  To: Thomas Monjalon, dev

On 03/03/15 15:23, Thomas Monjalon wrote:
> The function print_client_stats was used in the example without being
> clearly exported in the map file. So it breaks linking with shared library
> when debug is enabled.
> It's better to remove this function as it probably could be implemented
> with statistics API.
>
> Fixes: cc7e8ae84faa ("add example application for link bonding mode 6")
>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
> ....
>
Acked-by: Declan Doherty <declan.doherty@intel.com>

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

* Re: [dpdk-dev] [PATCH 1/7] mempool: fix build with debug enabled
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 1/7] mempool: " Thomas Monjalon
@ 2015-03-04  9:59   ` Olivier MATZ
  0 siblings, 0 replies; 15+ messages in thread
From: Olivier MATZ @ 2015-03-04  9:59 UTC (permalink / raw)
  To: Thomas Monjalon, dev

Hi Thomas,

On 03/03/2015 04:23 PM, Thomas Monjalon wrote:
> error: format ‘%p’ expects argument of type ‘void *’,
> but argument 5 has type ‘const struct rte_mempool *’ [-Werror=format=]
>
> mp type is (const struct rte_mempool *) and must be casted into a simpler
> type to be printed.

I was a bit surprised to see this warning although the standard says:

  The argument shall be a pointer to void. The value of the pointer is
  converted to a sequence of printing wide characters, in an
  implementation-defined manner.

But I think we often do this in dpdk, without any warning:

	struct foo_s *foo = ...;
	printf("%p\n", foo);

After some search, the reason why you get a warning here is that you
compile a C file that includes this header with the "-pedantic" flag.
So, I think doing this fix is justified for header files as we cannot
predict which options are used by the user of these headers.

So:
Acked-by: Olivier Matz <olivier.matz@6wind.com>

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

* Re: [dpdk-dev] [PATCH 0/7] fix build with debug enabled
  2015-03-03 15:23 [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
                   ` (6 preceding siblings ...)
  2015-03-03 15:23 ` [dpdk-dev] [PATCH 7/7] bond: remove debug function to fix link with shared lib Thomas Monjalon
@ 2015-03-04 10:21 ` Thomas Monjalon
  7 siblings, 0 replies; 15+ messages in thread
From: Thomas Monjalon @ 2015-03-04 10:21 UTC (permalink / raw)
  To: dev

2015-03-03 16:23, Thomas Monjalon:
> There are some compilation errors when debug options are enabled.
> We should start thinking to test every patch with an all-yes configuration.
> Unfortunately, we cannot force this kind of configuration because
> some libraries depend on the availability of some libraries.
> 
> Thomas Monjalon (7):
>   mempool: fix build with debug enabled
>   fm10k: fix build with debug enabled
>   virtio: fix build with mempool debug enabled
>   virtio: fix build with debug enabled
>   mlx4: fix build with mempool debug enabled
>   mlx4: mute auto config in quiet mode
>   bond: remove debug function to fix link with shared lib

Got acknowledgement from almost all concerned maintainers, thanks.
Applied

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

end of thread, other threads:[~2015-03-04 10:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 15:23 [dpdk-dev] [PATCH 0/7] fix build with debug enabled Thomas Monjalon
2015-03-03 15:23 ` [dpdk-dev] [PATCH 1/7] mempool: " Thomas Monjalon
2015-03-04  9:59   ` Olivier MATZ
2015-03-03 15:23 ` [dpdk-dev] [PATCH 2/7] fm10k: " Thomas Monjalon
2015-03-03 15:23 ` [dpdk-dev] [PATCH 3/7] virtio: fix build with mempool " Thomas Monjalon
2015-03-04  1:15   ` Ouyang, Changchun
2015-03-03 15:23 ` [dpdk-dev] [PATCH 4/7] virtio: fix build with " Thomas Monjalon
2015-03-04  1:17   ` Ouyang, Changchun
2015-03-03 15:23 ` [dpdk-dev] [PATCH 5/7] mlx4: fix build with mempool " Thomas Monjalon
2015-03-03 16:02   ` Adrien Mazarguil
2015-03-03 15:23 ` [dpdk-dev] [PATCH 6/7] mlx4: mute auto config in quiet mode Thomas Monjalon
2015-03-03 16:03   ` Adrien Mazarguil
2015-03-03 15:23 ` [dpdk-dev] [PATCH 7/7] bond: remove debug function to fix link with shared lib Thomas Monjalon
2015-03-04  9:49   ` Declan Doherty
2015-03-04 10:21 ` [dpdk-dev] [PATCH 0/7] fix build with debug enabled 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).