build fixes
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
A message that is not in the archive (sent off-list or not yet received): 1404313375-2205-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org
PATCH 1/7 eal: fix build for bsd
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
@@ -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
PATCH 2/7 ethdev: fix build of Tx rate limitation debug
In reply to a message not in the archiveThe 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
@@ -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
A message that is not in the archive (sent off-list or not yet received): 1404313375-2205-3-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org
Zhang, Helin
Reviewed-byRe: [PATCH 2/7] ethdev: fix build of Tx rate limitation debug
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 debugThe commit
8dbe82b0733(Tx rate limitation) didn't compile ifCONFIG_RTE_LIBRTE_ETHDEV_DEBUGis enabled.Signed-off-by Thomas Monjalon <[email protected]>--- 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
-00ebb8fb..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
PATCH 3/7 ethdev: fix build of named allocation debug
In reply to a message not in the archiveThe 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
@@ -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
PATCH 4/7 pcap: fix build
In reply to a message not in the archiveThe 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
@@ -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
PATCH 5/7 virtio: fix build of debug dump
In reply to a message not in the archiveThe 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
@@ -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
A message that is not in the archive (sent off-list or not yet received): 1404313375-2205-6-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org
Xie, Huawei
Reviewed-byRe: [PATCH 5/7] virtio: fix build of debug dump
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 dumpThe commit
591a9d7985c1230(add FILE argument to debug functions) didn't compile ifCONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMPis enabled.Signed-off-by Thomas Monjalon <[email protected]>--- lib/librte_pmd_virtio/virtio_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/librte_pmd_virtio/virtio_rxtx.c +1
-2@@ -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
PATCH 6/7 vmxnet3: fix build with debug
In reply to a message not in the archiveFunctions 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
@@ -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
PATCH 7/7 ixgbe/base: fix build with debug
In reply to a message not in the archiveThe 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
@@ -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
A message that is not in the archive (sent off-list or not yet received): 1404313375-2205-8-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org
Re: [PATCH 7/7] ixgbe/base: fix build with debug
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 debugThe upgraded base driver, especially commit
9ba80bde4c, didn't compile ifCONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVERis enabled.Signed-off-by Thomas Monjalon <[email protected]>--- 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@@ -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
Richardson, Bruce
Acked-byQuoted 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 fixesWhen 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.
A message that is not in the archive (sent off-list or not yet received): 59AF69C657FD0841A61C55336867B5B02CF134F1-kPTMFJFq+rELt2AQoY/[email protected]
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 fixesWhen 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 configurationsWe 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.Acked-by Bruce Richardson <[email protected]>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.
* Thecommon_bsdappfile 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