Skip to contentSkip to conversation

build fixes

PATCH In review Thomas Monjalon 4 participants 13 messages Jul 2, 2014 – Jul 3, 2014 5 messages not in the archive

lore
Share & tools
lore
#0 lore raw

cover build fixes

When enabling pcap PMD or debug options, there are many compiler errors. There is also another error on BSD.

These errors are due to many recent developments (link bonding, rate limitation, ixgbe upgrade, vmxnet3, FILE argument for debug). So my comments are:
- I don't test every build configuration when accepting patches
- Many developers don't test debug configurations
We should try to improve this process in the future.

Please give quick feedbacks on this serie.
It requires a new release candidate.

Thanks for reading

Thomas Monjalon (7):
eal: fix build for bsd
ethdev: fix build of Tx rate limitation debug
ethdev: fix build of named allocation debug
pcap: fix build
virtio: fix build of debug dump
vmxnet3: fix build with debug
ixgbe/base: fix build with debug

 lib/librte_eal/bsdapp/eal/eal.c          | 1 +
 lib/librte_ether/rte_ethdev.c            | 6 +++---
 lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 4 ++--
 lib/librte_pmd_pcap/rte_eth_pcap.c       | 2 +-
 lib/librte_pmd_virtio/virtio_rxtx.c      | 2 +-
 lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c    | 4 ++--
 6 files changed, 10 insertions(+), 9 deletions(-)
Signature · 1 line
2.0.0
#2 lore raw

PATCH 1/7 eal: fix build for bsd

In reply to a message not in the archive

When adding link bonding to EAL initialization (a155d430119), an include was missing for BSD.

---
 lib/librte_eal/bsdapp/eal/eal.c | 1 +
 1 file changed, 1 insertion(+)
lib/librte_eal/bsdapp/eal/eal.c +1 -0
index c53f63e..38c6cfc 100644
@@ -66,6 +66,7 @@
 #include <rte_cpuflags.h>
 #include <rte_interrupts.h>
 #include <rte_pci.h>
+#include <rte_dev.h>
 #include <rte_devargs.h>
 #include <rte_common.h>
 #include <rte_version.h>
Signature · 1 line
2.0.0
#3 lore raw

PATCH 2/7 ethdev: fix build of Tx rate limitation debug

In reply to a message not in the archive

The commit 8dbe82b0733 (Tx rate limitation) didn't compile if CONFIG_RTE_LIBRTE_ETHDEV_DEBUG is enabled.

---
 lib/librte_ether/rte_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_ether/rte_ethdev.c +2 -2
index 0ebb8fb..8dccc6f 100644
@@ -2261,7 +2261,7 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id, uint16_t queue_idx,
 	if (tx_rate > link.link_speed) {
 		PMD_DEBUG_TRACE("set queue rate limit:invalid tx_rate=%d, "
 				"bigger than link speed= %d\n",
-			tx_rate, link_speed);
+			tx_rate, link.link_speed);
 		return -EINVAL;
 	}
 
@@ -2298,7 +2298,7 @@ int rte_eth_set_vf_rate_limit(uint8_t port_id, uint16_t vf, uint16_t tx_rate,
 	if (tx_rate > link.link_speed) {
 		PMD_DEBUG_TRACE("set VF rate limit:invalid tx_rate=%d, "
 				"bigger than link speed= %d\n",
-				tx_rate, link_speed);
+				tx_rate, link.link_speed);
 		return -EINVAL;
 	}
 
Signature · 1 line
2.0.0
#6 lore raw

PATCH 3/7 ethdev: fix build of named allocation debug

In reply to a message not in the archive

The commit 83b41136934 (add unique name to devices) didn't compile if CONFIG_RTE_LIBRTE_ETHDEV_DEBUG is enabled.

---
 lib/librte_ether/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_ether/rte_ethdev.c +1 -1
index 8dccc6f..fd1010a 100644
@@ -180,7 +180,7 @@ rte_eth_dev_allocate(const char *name)
 		rte_eth_dev_data_alloc();
 
 	if (rte_eth_dev_allocated(name) != NULL) {
-		PMD_DEBUG_TRACE("Ethernet Device with name %s already allocated!\n");
+		PMD_DEBUG_TRACE("Ethernet Device with name %s already allocated!\n", name);
 		return NULL;
 	}
 
Signature · 1 line
2.0.0
#7 lore raw

PATCH 4/7 pcap: fix build

In reply to a message not in the archive

The commit 83b41136934 (add unique name to devices) didn't compile if CONFIG_RTE_LIBRTE_PMD_PCAP is enabled.

---
 lib/librte_pmd_pcap/rte_eth_pcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_pmd_pcap/rte_eth_pcap.c +1 -1
index 12b7e0c..c77ee25 100644
@@ -719,7 +719,7 @@ rte_pmd_pcap_devinit(const char *name, const char *params)
 		if (ret < 0)
 			return -1;
 
-		return rte_eth_from_pcaps(pcaps.pcaps, 1, pcaps.pcaps, 1,
+		return rte_eth_from_pcaps(name, pcaps.pcaps, 1, pcaps.pcaps, 1,
 				numa_node, kvlist);
 	}
 
Signature · 1 line
2.0.0
#8 lore raw

PATCH 5/7 virtio: fix build of debug dump

In reply to a message not in the archive

The commit 591a9d7985c1230 (add FILE argument to debug functions) didn't compile if CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP is enabled.

---
 lib/librte_pmd_virtio/virtio_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_pmd_virtio/virtio_rxtx.c +1 -1
index 6d20331..6f02a61 100644
@@ -55,7 +55,7 @@
 #include "virtqueue.h"
 
 #ifdef RTE_LIBRTE_VIRTIO_DEBUG_DUMP
-#define VIRTIO_DUMP_PACKET(m, len) rte_pktmbuf_dump(m, len)
+#define VIRTIO_DUMP_PACKET(m, len) rte_pktmbuf_dump(stdout, m, len)
 #else
 #define  VIRTIO_DUMP_PACKET(m, len) do { } while (0)
 #endif
Signature · 1 line
2.0.0
#11 lore raw

PATCH 6/7 vmxnet3: fix build with debug

In reply to a message not in the archive

Functions for queue dump are not used and cause compilation error if CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_DRIVER is enabled.
Fixed by disabling them.

---
 lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c +2 -2
index c6aa963..13960fa 100644
@@ -90,7 +90,7 @@ static uint32_t rxprod_reg[2] = {VMXNET3_REG_RXPROD, VMXNET3_REG_RXPROD2};
 
 static inline int vmxnet3_post_rx_bufs(vmxnet3_rx_queue_t* , uint8_t);
 static inline void vmxnet3_tq_tx_complete(vmxnet3_tx_queue_t *);
-#ifdef RTE_LIBRTE_VMXNET3_DEBUG_DRIVER
+#ifdef RTE_LIBRTE_VMXNET3_DEBUG_DRIVER_NOT_USED
 static void vmxnet3_rxq_dump(struct vmxnet3_rx_queue *);
 static void vmxnet3_txq_dump(struct vmxnet3_tx_queue *);
 #endif
@@ -105,7 +105,7 @@ rte_rxmbuf_alloc(struct rte_mempool *mp)
 	return (m);
 }
 
-#ifdef RTE_LIBRTE_VMXNET3_DEBUG_DRIVER
+#ifdef RTE_LIBRTE_VMXNET3_DEBUG_DRIVER_NOT_USED
 static void
 vmxnet3_rxq_dump(struct vmxnet3_rx_queue *rxq)
 {
Signature · 1 line
2.0.0
#12 lore raw

PATCH 7/7 ixgbe/base: fix build with debug

In reply to a message not in the archive

The upgraded base driver, especially commit 9ba80bde4c, didn't compile if CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER is enabled.

---
 lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h +2 -2
index 1636ee1..2bf1a6d 100644
@@ -63,8 +63,8 @@
 #define DEBUGOUT7(S, args...)   DEBUGOUT(S, ##args)
 
 #define ERROR_REPORT1(e, S, args...)   DEBUGOUT(S, ##args)
-#define ERROR_REPORT2  DEBUGOUT2
-#define ERROR_REPORT3  DEBUGOUT3
+#define ERROR_REPORT2(e, S, args...)   DEBUGOUT(S, ##args)
+#define ERROR_REPORT3(e, S, args...)   DEBUGOUT(S, ##args)
 
 #define FALSE               0
 #define TRUE                1
Signature · 1 line
2.0.0
#15 lore raw
In reply to a message not in the archive
Quoted 16 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Thomas Monjalon
Sent: Wednesday, July 02, 2014 8:03 AM
To: [email protected]
Subject: [dpdk-dev] [PATCH 0/7] build fixes

When enabling pcap PMD or debug options, there are many compiler errors. There is also another error on BSD.

These errors are due to many recent developments (link bonding, rate limitation, ixgbe upgrade, vmxnet3, FILE argument for debug). So my comments are:
- I don't test every build configuration when accepting patches
- Many developers don't test debug configurations
We should try to improve this process in the future.

Quoted 7 lines

Please give quick feedbacks on this serie.
It requires a new release candidate.

Thanks for reading

Thomas Monjalon (7):

Tested compilation on Fedora Linux and FreeBSD 10 both in default configuration and with all debug options set for PMDs. No compile errors encountered with main compilation.

However, two further minor issues spotted:
* Running "gmake" in the examples directory gives errors for applications that only work in Linux.
* The common_bsdapp file has all debug options turned on for the i40e driver by default.

#17 lore raw
In reply to a message not in the archive

2014-07-02 17:57, Richardson, Bruce:

Quoted 18 lines
Quoted 18 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Thomas Monjalon
Sent: Wednesday, July 02, 2014 8:03 AM
To: [email protected]
Subject: [dpdk-dev] [PATCH 0/7] build fixes

When enabling pcap PMD or debug options, there are many compiler errors. There is also another error on BSD.

These errors are due to many recent developments (link bonding, rate limitation, ixgbe upgrade, vmxnet3, FILE argument for debug).

So my comments are:
- I don't test every build configuration when accepting patches
- Many developers don't test debug configurations

We should try to improve this process in the future.

Quoted 8 lines
Quoted 2 lines

Please give quick feedbacks on this serie.
It requires a new release candidate.

Tested compilation on Fedora Linux and FreeBSD 10 both in default configuration and with all debug options set for PMDs. No compile errors encountered with main compilation.

Applied for version 1.7.0.

Thanks

Quoted 5 lines

However, two further minor issues spotted:
* Running "gmake" in the examples directory gives errors for applications that only work in Linux.
* The common_bsdapp file has all debug options
turned on for the i40e driver by default.

I've fixed these BSD issues:

	http://dpdk.org/browse/dpdk/commit/?id=304caba12
	http://dpdk.org/browse/dpdk/commit/?id=3417cd687

Thanks for reporting

Signature · 1 line
Thomas
#14 lore raw

Re: [PATCH 7/7] ixgbe/base: fix build with debug

In reply to a message not in the archive
Quoted 33 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Thomas Monjalon
Sent: Wednesday, July 2, 2014 11:03 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH 7/7] ixgbe/base: fix build with debug

The upgraded base driver, especially commit 9ba80bde4c, didn't compile if CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER is enabled.

---
 lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h +2 -3
index 1636ee1..2bf1a6d 100644
@@ -63,8 +63,8 @@
 #define DEBUGOUT7(S, args...)   DEBUGOUT(S, ##args)
 
 #define ERROR_REPORT1(e, S, args...)   DEBUGOUT(S, ##args)
-#define ERROR_REPORT2  DEBUGOUT2
-#define ERROR_REPORT3  DEBUGOUT3
+#define ERROR_REPORT2(e, S, args...)   DEBUGOUT(S, ##args)
+#define ERROR_REPORT3(e, S, args...)   DEBUGOUT(S, ##args)
 
 #define FALSE               0
 #define TRUE                1
--
Quoted 1 line

2.0.0

Reviewed-by
#5 lore raw

Re: [PATCH 2/7] ethdev: fix build of Tx rate limitation debug

In reply to a message not in the archive
Quoted 41 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Thomas Monjalon
Sent: Wednesday, July 2, 2014 11:03 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH 2/7] ethdev: fix build of Tx rate limitation debug

The commit 8dbe82b0733 (Tx rate limitation) didn't compile if CONFIG_RTE_LIBRTE_ETHDEV_DEBUG is enabled.

---
 lib/librte_ether/rte_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_ether/rte_ethdev.c index renamed from lib/librte_ether/rte_ethdev.c +0 -0

0ebb8fb..8dccc6f 100644

lib/librte_ether/rte_ethdev.c +2 -3
@@ -2261,7 +2261,7 @@ int rte_eth_set_queue_rate_limit(uint8_t port_id,
 uint16_t queue_idx,
 	if (tx_rate > link.link_speed) {
 		PMD_DEBUG_TRACE("set queue rate limit:invalid tx_rate=%d, "
 				"bigger than link speed= %d\n",
-			tx_rate, link_speed);
+			tx_rate, link.link_speed);
 		return -EINVAL;
 	}
@@ -2298,7 +2298,7 @@ int rte_eth_set_vf_rate_limit(uint8_t port_id,
 uint16_t vf, uint16_t tx_rate,
 	if (tx_rate > link.link_speed) {
 		PMD_DEBUG_TRACE("set VF rate limit:invalid tx_rate=%d, "
 				"bigger than link speed= %d\n",
-				tx_rate, link_speed);
+				tx_rate, link.link_speed);
 		return -EINVAL;
 	}
 
--
Quoted 1 line

2.0.0

Reviewed-by
#10 lore raw

Re: [PATCH 5/7] virtio: fix build of debug dump

In reply to a message not in the archive
Quoted 31 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Thomas Monjalon
Sent: Wednesday, July 02, 2014 11:03 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH 5/7] virtio: fix build of debug dump

The commit 591a9d7985c1230 (add FILE argument to debug functions) didn't compile if CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP is enabled.

---
 lib/librte_pmd_virtio/virtio_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_pmd_virtio/virtio_rxtx.c +1 -2
index 6d20331..6f02a61 100644
@@ -55,7 +55,7 @@
 #include "virtqueue.h"
 
 #ifdef RTE_LIBRTE_VIRTIO_DEBUG_DUMP
-#define VIRTIO_DUMP_PACKET(m, len) rte_pktmbuf_dump(m, len)
+#define VIRTIO_DUMP_PACKET(m, len) rte_pktmbuf_dump(stdout, m, len)
 #else
 #define  VIRTIO_DUMP_PACKET(m, len) do { } while (0)
 #endif
--
Quoted 1 line

2.0.0