From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: dev@dpdk.org
Cc: Allain Legacy <allain.legacy@windriver.com>
Subject: [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers
Date: Tue, 25 Apr 2017 10:30:01 +0200 [thread overview]
Message-ID: <046efd0fda00bfb5253586319fb9cfbf904a8f0a.1493108423.git.adrien.mazarguil@6wind.com> (raw)
In-Reply-To: <cover.1493108423.git.adrien.mazarguil@6wind.com>
This commit addresses several errors related to missing includes such as:
In file included from /tmp/check-includes.sh.15315.c:1:0:
build/include/rte_avp_fifo.h:77:22: error: 'struct rte_avp_fifo' declared
inside parameter list [-Werror]
[...]
build/include/rte_avp_fifo.h: In function 'avp_fifo_init':
build/include/rte_avp_fifo.h:81:3: error: implicit declaration of function
'rte_panic' [-Werror=implicit-function-declaration]
[...]
build/include/rte_avp_fifo.h:83:6: error: dereferencing pointer to
incomplete type
[...]
build/include/rte_avp_fifo.h:109:2: error: implicit declaration of
function 'rte_wmb' [-Werror=implicit-function-declaration]
[...]
In file included from /tmp/check-includes.sh.15315.c:1:0:
build/include/rte_avp_common.h:104:2: error: unknown type name 'uint64_t'
[...]
build/include/rte_avp_common.h:386:15: error: 'ETHER_ADDR_LEN' undeclared
here (not in a function)
[...]
It addresses errors with strict compilation flags:
In file included from /tmp/check-includes.sh.15315.c:1:0:
build/include/rte_avp_common.h:122:3: error: ISO C99 doesn't support
unnamed structs/unions [-Werror=pedantic]
[...]
build/include/rte_avp_common.h:136:17: error: ISO C forbids zero-size
array 'buffer' [-Werror=pedantic]
[...]
And also adds C++ awareness to both header files.
Fixes: 8e680655e205 ("net/avp: add public header files")
Cc: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/avp/rte_avp_common.h | 17 ++++++++++++++++-
drivers/net/avp/rte_avp_fifo.h | 12 ++++++++++++
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/net/avp/rte_avp_common.h b/drivers/net/avp/rte_avp_common.h
index 31d763e..05093ad 100644
--- a/drivers/net/avp/rte_avp_common.h
+++ b/drivers/net/avp/rte_avp_common.h
@@ -57,8 +57,18 @@
#ifndef _RTE_AVP_COMMON_H_
#define _RTE_AVP_COMMON_H_
+#include <stdint.h>
#ifdef __KERNEL__
#include <linux/if.h>
+#else
+#include <rte_common.h>
+#include <rte_memory.h>
+#include <rte_ether.h>
+#include <rte_atomic.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
#endif
/**
@@ -115,6 +125,7 @@ struct rte_avp_device_config {
*/
struct rte_avp_request {
uint32_t req_id; /**< Request id */
+ RTE_STD_C11
union {
uint32_t new_mtu; /**< New MTU */
uint8_t if_up; /**< 1: interface up, 0: interface down */
@@ -133,7 +144,7 @@ struct rte_avp_fifo {
volatile unsigned int read; /**< Next position to be read */
unsigned int len; /**< Circular buffer length */
unsigned int elem_size; /**< Pointer size - for 32/64 bit OS */
- void *volatile buffer[0]; /**< The buffer contains mbuf pointers */
+ void *volatile buffer[]; /**< The buffer contains mbuf pointers */
};
@@ -413,4 +424,8 @@ struct rte_avp_device_info {
#define RTE_AVP_IOCTL_RELEASE _IOWR(0, 3, struct rte_avp_device_info)
#define RTE_AVP_IOCTL_QUERY _IOWR(0, 4, struct rte_avp_device_config)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_AVP_COMMON_H_ */
diff --git a/drivers/net/avp/rte_avp_fifo.h b/drivers/net/avp/rte_avp_fifo.h
index 8262e4f..a0a37eb 100644
--- a/drivers/net/avp/rte_avp_fifo.h
+++ b/drivers/net/avp/rte_avp_fifo.h
@@ -57,6 +57,12 @@
#ifndef _RTE_AVP_FIFO_H_
#define _RTE_AVP_FIFO_H_
+#include <rte_avp_common.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef __KERNEL__
/* Write memory barrier for kernel compiles */
#define AVP_WMB() smp_wmb()
@@ -70,6 +76,8 @@
#endif
#ifndef __KERNEL__
+#include <rte_debug.h>
+
/**
* Initializes the avp fifo structure
*/
@@ -154,4 +162,8 @@ avp_fifo_free_count(struct rte_avp_fifo *fifo)
return (fifo->read - fifo->write - 1) & (fifo->len - 1);
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_AVP_FIFO_H_ */
--
2.1.4
next prev parent reply other threads:[~2017-04-25 8:30 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for " Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 01/13] crypto/scheduler: fix missing includes Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 02/13] eventdev: fix errors with strict compilation flags Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 03/13] latency: fix missing includes in exported header Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 04/13] net: fix missing include " Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 05/13] vhost: fix errors with strict compilation flags Adrien Mazarguil
2017-04-25 2:15 ` Yuanhan Liu
2017-04-26 7:32 ` Maxime Coquelin
2017-04-24 15:53 ` [dpdk-dev] [PATCH 06/13] mbuf: fix missing includes in exported header Adrien Mazarguil
2017-04-24 15:53 ` [dpdk-dev] [PATCH 07/13] net/avp: fix errors in exported headers Adrien Mazarguil
2017-04-24 16:19 ` Legacy, Allain
2017-04-24 15:53 ` [dpdk-dev] [PATCH 08/13] bitrate: fix errors in exported header Adrien Mazarguil
2017-04-24 15:53 ` [dpdk-dev] [PATCH 09/13] efd: fix missing include " Adrien Mazarguil
2017-04-24 15:53 ` [dpdk-dev] [PATCH 10/13] metrics: fix errors " Adrien Mazarguil
2017-04-24 15:53 ` [dpdk-dev] [PATCH 11/13] ethdev: fix C++ errors in flow API Adrien Mazarguil
2017-04-24 15:53 ` [dpdk-dev] [PATCH 12/13] ethdev: fix C++ errors in flow API (MPLS, GRE) Adrien Mazarguil
2017-04-25 1:18 ` Xing, Beilei
2017-04-24 15:53 ` [dpdk-dev] [PATCH 13/13] ethdev: fix incomplete items in flow API Adrien Mazarguil
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 01/13] crypto/scheduler: fix missing includes Adrien Mazarguil
2017-04-25 15:38 ` Zhang, Roy Fan
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 02/13] eventdev: fix errors with strict compilation flags Adrien Mazarguil
2017-04-25 15:31 ` De Lara Guarch, Pablo
2017-04-26 7:06 ` Adrien Mazarguil
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 03/13] latency: fix missing includes in exported header Adrien Mazarguil
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 04/13] net: fix missing include " Adrien Mazarguil
2017-04-25 16:13 ` Singh, Jasvinder
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 05/13] vhost: fix errors with strict compilation flags Adrien Mazarguil
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 06/13] mbuf: fix missing includes in exported header Adrien Mazarguil
2017-04-25 9:56 ` Olivier Matz
2017-04-25 8:30 ` Adrien Mazarguil [this message]
2017-04-25 12:31 ` [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers Legacy, Allain
2017-04-25 12:49 ` Adrien Mazarguil
2017-04-25 13:00 ` Legacy, Allain
2017-04-25 14:48 ` Adrien Mazarguil
2017-04-25 14:54 ` Legacy, Allain
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 08/13] bitrate: fix errors in exported header Adrien Mazarguil
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 09/13] efd: fix missing include " Adrien Mazarguil
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 10/13] metrics: fix errors " Adrien Mazarguil
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 11/13] ethdev: fix C++ errors in flow API Adrien Mazarguil
2017-04-25 11:35 ` [dpdk-dev] [dpdk-stable] " Shahaf Shuler
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 12/13] ethdev: fix C++ errors in flow API (MPLS, GRE) Adrien Mazarguil
2017-04-25 11:37 ` Shahaf Shuler
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 13/13] ethdev: fix incomplete items in flow API Adrien Mazarguil
2017-04-25 10:04 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Ferruh Yigit
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 01/14] crypto/scheduler: fix missing includes Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 02/14] eventdev: fix errors with strict compilation flags Adrien Mazarguil
2017-04-26 14:47 ` Jerin Jacob
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 03/14] latency: fix missing includes in exported header Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 04/14] net: fix missing include " Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 05/14] vhost: fix errors with strict compilation flags Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 06/14] mbuf: fix missing includes in exported header Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 07/14] net/avp: fix errors in exported headers Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 08/14] bitrate: fix errors in exported header Adrien Mazarguil
2017-04-26 15:07 ` Remy Horton
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 09/14] efd: fix missing include " Adrien Mazarguil
2017-04-26 15:36 ` De Lara Guarch, Pablo
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 10/14] metrics: fix errors " Adrien Mazarguil
2017-04-26 15:07 ` Remy Horton
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 11/14] ethdev: fix C++ errors in flow API Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 12/14] ethdev: fix C++ errors in flow API (MPLS, GRE) Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 13/14] ethdev: fix incomplete items in flow API Adrien Mazarguil
2017-04-27 1:03 ` Lu, Wenzhuo
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 14/14] eal: fix debug macro redefinition Adrien Mazarguil
2017-04-30 22:13 ` [dpdk-dev] [PATCH v3 00/14] Fixes for exported headers Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=046efd0fda00bfb5253586319fb9cfbf904a8f0a.1493108423.git.adrien.mazarguil@6wind.com \
--to=adrien.mazarguil@6wind.com \
--cc=allain.legacy@windriver.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).