* [dpdk-dev] [PATCH 00/13] Fixes for exported headers
@ 2017-04-24 15:52 Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 01/13] crypto/scheduler: fix missing includes Adrien Mazarguil
` (13 more replies)
0 siblings, 14 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:52 UTC (permalink / raw)
To: dev
This series addresses the remaining issues seen by check-includes.sh in
exported headers. Most of them may cause compilation errors in user
applications:
- Dependencies on missing includes.
- Non-standard C/C++ constructs usage without associated safeties.
- Missing C++ awareness blocks.
It also addresses the incomplete implementation of E-Tag and NVGRE flow API
pattern items.
Adrien Mazarguil (13):
crypto/scheduler: fix missing includes
eventdev: fix errors with strict compilation flags
latency: fix missing includes in exported header
net: fix missing include in exported header
vhost: fix errors with strict compilation flags
mbuf: fix missing includes in exported header
net/avp: fix errors in exported headers
bitrate: fix errors in exported header
efd: fix missing include in exported header
metrics: fix errors in exported header
ethdev: fix C++ errors in flow API
ethdev: fix C++ errors in flow API (MPLS, GRE)
ethdev: fix incomplete items in flow API
app/test-pmd/cmdline_flow.c | 46 ++++++++++++++++++
devtools/check-includes.sh | 4 +-
doc/guides/prog_guide/rte_flow.rst | 19 ++++++++
.../crypto/scheduler/rte_cryptodev_scheduler.h | 1 +
.../rte_cryptodev_scheduler_operations.h | 1 +
drivers/net/avp/rte_avp_common.h | 16 +++++-
drivers/net/avp/rte_avp_fifo.h | 12 +++++
lib/librte_bitratestats/rte_bitrate.h | 10 ++++
lib/librte_efd/rte_efd.h | 2 +
lib/librte_ether/rte_flow.h | 51 ++++++++++++++++++++
lib/librte_eventdev/rte_eventdev.h | 3 +-
lib/librte_eventdev/rte_eventdev_pmd.h | 16 +++---
lib/librte_latencystats/rte_latencystats.h | 2 +
lib/librte_mbuf/rte_mbuf_ptype.h | 3 ++
lib/librte_metrics/rte_metrics.h | 10 ++++
lib/librte_net/rte_net_crc.h | 2 +
lib/librte_vhost/rte_vhost.h | 16 ++++--
17 files changed, 200 insertions(+), 14 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 01/13] crypto/scheduler: fix missing includes
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
@ 2017-04-24 15:52 ` Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 02/13] eventdev: fix errors with strict compilation flags Adrien Mazarguil
` (12 subsequent siblings)
13 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:52 UTC (permalink / raw)
To: dev; +Cc: Fan Zhang
This commit addresses the following compilation errors:
In file included from build/include/rte_cryptodev_scheduler.h:37:0,
from /tmp/check-includes.sh.5355.c:1:
build/include/rte_cryptodev_scheduler_operations.h:43:30: error: unknown
type name 'uint8_t' struct rte_cryptodev *dev, uint8_t slave_id);
[...]
Fixes: 097ab0bac017 ("crypto/scheduler: add API")
Cc: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/crypto/scheduler/rte_cryptodev_scheduler.h | 1 +
drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.h b/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
index 7a34d0a..2ba6e47 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
@@ -46,6 +46,7 @@
* operation: round robin, packet-size based, and fail-over.
*/
+#include <stdint.h>
#include "rte_cryptodev_scheduler_operations.h"
#ifdef __cplusplus
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h b/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h
index 42fe9e6..719165c 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h
@@ -34,6 +34,7 @@
#ifndef _RTE_CRYPTO_SCHEDULER_OPERATIONS_H
#define _RTE_CRYPTO_SCHEDULER_OPERATIONS_H
+#include <rte_cryptodev.h>
#ifdef __cplusplus
extern "C" {
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 02/13] eventdev: fix errors with strict compilation flags
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 01/13] crypto/scheduler: fix missing includes Adrien Mazarguil
@ 2017-04-24 15:52 ` Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 03/13] latency: fix missing includes in exported header Adrien Mazarguil
` (11 subsequent siblings)
13 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:52 UTC (permalink / raw)
To: dev; +Cc: Jerin Jacob
Exported headers must allow compilation with the strictest flags. This
commit addresses the following errors:
In file included from build/include/rte_eventdev_pmd.h:55:0,
from /tmp/check-includes.sh.25816.c:1:
build/include/rte_eventdev.h:908:8: error: struct has no named members
[-Werror=pedantic]
[...]
In file included from /tmp/check-includes.sh.25816.c:1:0:
build/include/rte_eventdev_pmd.h:65:35: error: ISO C does not permit named
variadic macros [-Werror=variadic-macros]
[...]
Fixes: 71f238432865 ("eventdev: introduce event driven programming model")
Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs")
Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_eventdev/rte_eventdev.h | 3 +--
lib/librte_eventdev/rte_eventdev_pmd.h | 16 +++++++++-------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index b8ed6ef..20e7293 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -905,9 +905,9 @@ rte_event_dev_close(uint8_t dev_id);
* The generic *rte_event* structure to hold the event attributes
* for dequeue and enqueue operation
*/
+RTE_STD_C11
struct rte_event {
/** WORD0 */
- RTE_STD_C11
union {
uint64_t event;
/** Event attributes for dequeue or enqueue operation */
@@ -967,7 +967,6 @@ struct rte_event {
};
};
/** WORD1 */
- RTE_STD_C11
union {
uint64_t u64;
/**< Opaque 64-bit value */
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index a73dc91..988018f 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -62,16 +62,18 @@ extern "C" {
#endif
/* Logging Macros */
-#define RTE_EDEV_LOG_ERR(fmt, args...) \
- RTE_LOG(ERR, EVENTDEV, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
+#define RTE_EDEV_LOG_ERR(...) \
+ RTE_LOG(ERR, EVENTDEV, \
+ RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
-#define RTE_EDEV_LOG_DEBUG(fmt, args...) \
- RTE_LOG(DEBUG, EVENTDEV, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
+#define RTE_EDEV_LOG_DEBUG(...) \
+ RTE_LOG(DEBUG, EVENTDEV, \
+ RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
#else
-#define RTE_EDEV_LOG_DEBUG(fmt, args...) (void)0
+#define RTE_EDEV_LOG_DEBUG(...) (void)0
#endif
/* Macros to check for valid device */
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 03/13] latency: fix missing includes in exported header
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers 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 ` Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 04/13] net: fix missing include " Adrien Mazarguil
` (10 subsequent siblings)
13 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:52 UTC (permalink / raw)
To: dev; +Cc: Reshma Pattan
This commit addresses the following errors:
In file included from build/include/rte_latencystats.h:43:0,
from /tmp/check-includes.sh.6580.c:1:
build/include/rte_metrics.h:91:2: error: unknown type name 'uint16_t'
[...]
In file included from /tmp/check-includes.sh.6580.c:1:0:
build/include/rte_latencystats.h:66:19: error: expected declaration
specifiers or '...' before '*' token
[...]
Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats")
Cc: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_latencystats/rte_latencystats.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_latencystats/rte_latencystats.h b/lib/librte_latencystats/rte_latencystats.h
index 6efeaf4..d85cf3a 100644
--- a/lib/librte_latencystats/rte_latencystats.h
+++ b/lib/librte_latencystats/rte_latencystats.h
@@ -40,7 +40,9 @@
* library to provide application and flow based latency stats.
*/
+#include <stdint.h>
#include <rte_metrics.h>
+#include <rte_mbuf.h>
#ifdef __cplusplus
extern "C" {
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 04/13] net: fix missing include in exported header
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (2 preceding siblings ...)
2017-04-24 15:52 ` [dpdk-dev] [PATCH 03/13] latency: fix missing includes in exported header Adrien Mazarguil
@ 2017-04-24 15:52 ` Adrien Mazarguil
2017-04-24 15:52 ` [dpdk-dev] [PATCH 05/13] vhost: fix errors with strict compilation flags Adrien Mazarguil
` (9 subsequent siblings)
13 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:52 UTC (permalink / raw)
To: dev; +Cc: Jasvinder Singh
This commit addresses the following errors:
In file included from /tmp/check-includes.sh.18889.c:1:0:
build/include/rte_net_crc.h:86:1: error: unknown type name 'uint32_t'
[...]
Fixes: 986ff526fb84 ("net: add CRC computation API")
Cc: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_net/rte_net_crc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_net/rte_net_crc.h b/lib/librte_net/rte_net_crc.h
index 76fd129..d22286c 100644
--- a/lib/librte_net/rte_net_crc.h
+++ b/lib/librte_net/rte_net_crc.h
@@ -34,6 +34,8 @@
#ifndef _RTE_NET_CRC_H_
#define _RTE_NET_CRC_H_
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 05/13] vhost: fix errors with strict compilation flags
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (3 preceding siblings ...)
2017-04-24 15:52 ` [dpdk-dev] [PATCH 04/13] net: fix missing include " Adrien Mazarguil
@ 2017-04-24 15:52 ` 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
` (8 subsequent siblings)
13 siblings, 2 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:52 UTC (permalink / raw)
To: dev; +Cc: Yuanhan Liu, Maxime Coquelin
Exported headers must allow compilation with the strictest flags. This
commit addresses the following errors:
In file included from /tmp/check-includes.sh.20132.c:1:0:
build/include/rte_vhost.h:73:30: error: ISO C forbids zero-size array
'regions' [-Werror=pedantic]
[...]
Also:
- Add C++ awareness to rte_vhost.h for consistency with rte_eth_vhost.h.
- Move Linux includes into C++ block to prevent linking issues with
exported symbols.
- Update check-includes.sh following the removal of rte_virtio_net.h.
Finally, update check-includes.sh to ignore rte_vhost.h and rte_eth_vhost.h
from now on since the Linux headers they depend on are not clean enough:
In file included from /usr/include/linux/vhost.h:17:0,
from build/include/rte_vhost.h:43,
from build/include/rte_eth_vhost.h:44,
from /tmp/check-includes.sh.20132.c:1:
/usr/include/linux/virtio_ring.h: In function 'vring_init':
/usr/include/linux/virtio_ring.h:146:16: error: pointer of type 'void *'
used in arithmetic [-Werror=pointer-arith]
[...]
In file included from build/include/rte_vhost.h:43:0,
from build/include/rte_eth_vhost.h:44,
from /tmp/check-includes.sh.20132.c:1:
/usr/include/linux/vhost.h: At top level:
/usr/include/linux/vhost.h:73:3: error: ISO C99 doesn't support unnamed
structs/unions [-Werror=pedantic]
[...]
Fixes: eb32247457fe ("vhost: export guest memory regions")
Fixes: a798beb47c8e ("vhost: rename header file")
Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
devtools/check-includes.sh | 4 +++-
lib/librte_vhost/rte_vhost.h | 16 +++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/devtools/check-includes.sh b/devtools/check-includes.sh
index d65adc6..c4ec73f 100755
--- a/devtools/check-includes.sh
+++ b/devtools/check-includes.sh
@@ -109,10 +109,12 @@ include_dir=${1:-build/include}
'rte_byteorder_64.h' \
'generic/*' \
'exec-env/*' \
+ 'rte_vhost.h' \
+ 'rte_eth_vhost.h' \
}
: ${IGNORE_CXX= \
+ 'rte_vhost.h' \
'rte_eth_vhost.h' \
- 'rte_virtio_net.h' \
}
temp_cc=/tmp/${0##*/}.$$.c
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index 7a586e4..605e47c 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -40,13 +40,19 @@
*/
#include <stdint.h>
-#include <linux/vhost.h>
-#include <linux/virtio_ring.h>
#include <sys/eventfd.h>
#include <rte_memory.h>
#include <rte_mempool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These are not C++-aware. */
+#include <linux/vhost.h>
+#include <linux/virtio_ring.h>
+
#define RTE_VHOST_USER_CLIENT (1ULL << 0)
#define RTE_VHOST_USER_NO_RECONNECT (1ULL << 1)
#define RTE_VHOST_USER_DEQUEUE_ZERO_COPY (1ULL << 2)
@@ -70,7 +76,7 @@ struct rte_vhost_mem_region {
*/
struct rte_vhost_memory {
uint32_t nregions;
- struct rte_vhost_mem_region regions[0];
+ struct rte_vhost_mem_region regions[];
};
struct rte_vhost_vring {
@@ -426,4 +432,8 @@ int rte_vhost_get_mem_table(int vid, struct rte_vhost_memory **mem);
int rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
struct rte_vhost_vring *vring);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_VHOST_H_ */
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 06/13] mbuf: fix missing includes in exported header
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (4 preceding siblings ...)
2017-04-24 15:52 ` [dpdk-dev] [PATCH 05/13] vhost: fix errors with strict compilation flags Adrien Mazarguil
@ 2017-04-24 15:53 ` Adrien Mazarguil
2017-04-24 15:53 ` [dpdk-dev] [PATCH 07/13] net/avp: fix errors in exported headers Adrien Mazarguil
` (7 subsequent siblings)
13 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:53 UTC (permalink / raw)
To: dev; +Cc: stable, Olivier Matz
This commit addresses the following errors:
In file included from /tmp/check-includes.sh.681.c:1:0:
build/include/rte_mbuf_ptype.h:587:35: error: unknown type name 'uint32_t'
[...]
build/include/rte_mbuf_ptype.h:662:51: error: unknown type name 'size_t'
[...]
Fixes: 288541c8ff9e ("mbuf: add functions to dump packet type")
Cc: stable@dpdk.org
Cc: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_mbuf/rte_mbuf_ptype.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h b/lib/librte_mbuf/rte_mbuf_ptype.h
index ff6de9d..a3269c4 100644
--- a/lib/librte_mbuf/rte_mbuf_ptype.h
+++ b/lib/librte_mbuf/rte_mbuf_ptype.h
@@ -91,6 +91,9 @@
* RTE_PTYPE_INNER_L4_UDP.
*/
+#include <stddef.h>
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 07/13] net/avp: fix errors in exported headers
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (5 preceding siblings ...)
2017-04-24 15:53 ` [dpdk-dev] [PATCH 06/13] mbuf: fix missing includes in exported header Adrien Mazarguil
@ 2017-04-24 15:53 ` 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
` (6 subsequent siblings)
13 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:53 UTC (permalink / raw)
To: dev; +Cc: Allain Legacy
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 | 16 +++++++++++++++-
drivers/net/avp/rte_avp_fifo.h | 12 ++++++++++++
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/drivers/net/avp/rte_avp_common.h b/drivers/net/avp/rte_avp_common.h
index 31d763e..6cdaca9 100644
--- a/drivers/net/avp/rte_avp_common.h
+++ b/drivers/net/avp/rte_avp_common.h
@@ -57,9 +57,18 @@
#ifndef _RTE_AVP_COMMON_H_
#define _RTE_AVP_COMMON_H_
+#include <stdint.h>
#ifdef __KERNEL__
#include <linux/if.h>
#endif
+#include <rte_common.h>
+#include <rte_memory.h>
+#include <rte_ether.h>
+#include <rte_atomic.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
/**
* AVP name is part of network device name.
@@ -115,6 +124,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 +143,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 +423,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
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 08/13] bitrate: fix errors in exported header
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (6 preceding siblings ...)
2017-04-24 15:53 ` [dpdk-dev] [PATCH 07/13] net/avp: fix errors in exported headers Adrien Mazarguil
@ 2017-04-24 15:53 ` Adrien Mazarguil
2017-04-24 15:53 ` [dpdk-dev] [PATCH 09/13] efd: fix missing include " Adrien Mazarguil
` (5 subsequent siblings)
13 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:53 UTC (permalink / raw)
To: dev; +Cc: Remy Horton
This commit addresses the following error:
In file included from /tmp/check-includes.sh.28023.c:1:0:
build/include/rte_bitrate.h:82:2: error: unknown type name 'uint8_t'
[...]
It also adds C++ awareness to rte_bitrate.h.
Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")
Cc: Remy Horton <remy.horton@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_bitratestats/rte_bitrate.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index b9f11bd..15fc270 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -34,6 +34,12 @@
#ifndef _RTE_BITRATE_H_
#define _RTE_BITRATE_H_
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* Bitrate statistics data structure.
* This data structure is intentionally opaque.
@@ -81,4 +87,8 @@ int rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data);
int rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
uint8_t port_id);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_BITRATE_H_ */
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 09/13] efd: fix missing include in exported header
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (7 preceding siblings ...)
2017-04-24 15:53 ` [dpdk-dev] [PATCH 08/13] bitrate: fix errors in exported header Adrien Mazarguil
@ 2017-04-24 15:53 ` Adrien Mazarguil
2017-04-24 15:53 ` [dpdk-dev] [PATCH 10/13] metrics: fix errors " Adrien Mazarguil
` (4 subsequent siblings)
13 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:53 UTC (permalink / raw)
To: dev; +Cc: stable, Byron Marohn, Pablo de Lara Guarch
This commit addresses the following compilation errors:
In file included from /tmp/check-includes.sh.8373.c:1:0:
build/include/rte_efd.h:133:9: error: unknown type name 'uint8_t'
[...]
Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Cc: stable@dpdk.org
Cc: Byron Marohn <byron.marohn@intel.com>
Cc: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_efd/rte_efd.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_efd/rte_efd.h b/lib/librte_efd/rte_efd.h
index 6d31e18..1596863 100644
--- a/lib/librte_efd/rte_efd.h
+++ b/lib/librte_efd/rte_efd.h
@@ -40,6 +40,8 @@
* RTE EFD Table
*/
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 10/13] metrics: fix errors in exported header
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (8 preceding siblings ...)
2017-04-24 15:53 ` [dpdk-dev] [PATCH 09/13] efd: fix missing include " Adrien Mazarguil
@ 2017-04-24 15:53 ` Adrien Mazarguil
2017-04-24 15:53 ` [dpdk-dev] [PATCH 11/13] ethdev: fix C++ errors in flow API Adrien Mazarguil
` (3 subsequent siblings)
13 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:53 UTC (permalink / raw)
To: dev; +Cc: Remy Horton
This commit addresses the following compilation errors:
In file included from /tmp/check-includes.sh.21060.c:1:0:
build/include/rte_metrics.h:91:2: error: unknown type name 'uint16_t'
[...]
It also adds C++ awareness to rte_metrics.h.
Fixes: 349950ddb9c5 ("metrics: add information metrics library")
Cc: Remy Horton <remy.horton@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_metrics/rte_metrics.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/librte_metrics/rte_metrics.h b/lib/librte_metrics/rte_metrics.h
index fd0154f..0fa3104 100644
--- a/lib/librte_metrics/rte_metrics.h
+++ b/lib/librte_metrics/rte_metrics.h
@@ -52,6 +52,12 @@
#ifndef _RTE_METRICS_H_
#define _RTE_METRICS_H_
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Maximum length of metric name (including null-terminator) */
#define RTE_METRICS_MAX_NAME_LEN 64
@@ -237,4 +243,8 @@ int rte_metrics_update_values(
const uint64_t *values,
uint32_t count);
+#ifdef __cplusplus
+}
+#endif
+
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 11/13] ethdev: fix C++ errors in flow API
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (9 preceding siblings ...)
2017-04-24 15:53 ` [dpdk-dev] [PATCH 10/13] metrics: fix errors " Adrien Mazarguil
@ 2017-04-24 15:53 ` Adrien Mazarguil
2017-04-24 15:53 ` [dpdk-dev] [PATCH 12/13] ethdev: fix C++ errors in flow API (MPLS, GRE) Adrien Mazarguil
` (2 subsequent siblings)
13 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:53 UTC (permalink / raw)
To: dev; +Cc: stable
This commit addresses the following compilation errors:
In file included from build/include/rte_flow_driver.h:50:0,
from /tmp/check-includes.sh.1397.cc:1:
build/include/rte_flow.h:428:2: error: expected primary-expression before
'.' token
[...]
build/include/rte_flow.h:469:1: sorry, unimplemented: non-trivial
designated initializers not supported
[...]
C++ does not support the C99-style designated initializers used in this
file for the default item masks. While the resulting symbols are primarily
useful to PMDs (written in C), they are exposed as part of the public API
for documentation purposes and to assist application writers.
Considering that:
- using pre-C99 initialization style for compatibility with C++ would
render them difficult to understand (all struct members must be
initialized)
- using both initialization styles would be needlessly verbose
- not exposing them at all would defeat their purpose
- applications do not normally need these symbols at run time
This commit hides these symbols from C++ applications. Specific C++
initializers will be added later if necessary.
Fixes: 6de5c0f1302c ("ethdev: define default item masks in flow API")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_ether/rte_flow.h | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index 7749491..bc7bc45 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -314,9 +314,11 @@ struct rte_flow_item_any {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_ANY. */
+#ifndef __cplusplus
static const struct rte_flow_item_any rte_flow_item_any_mask = {
.num = 0x00000000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_VF
@@ -341,9 +343,11 @@ struct rte_flow_item_vf {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_VF. */
+#ifndef __cplusplus
static const struct rte_flow_item_vf rte_flow_item_vf_mask = {
.id = 0x00000000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_PORT
@@ -370,9 +374,11 @@ struct rte_flow_item_port {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_PORT. */
+#ifndef __cplusplus
static const struct rte_flow_item_port rte_flow_item_port_mask = {
.index = 0x00000000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_RAW
@@ -403,6 +409,7 @@ struct rte_flow_item_raw {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_RAW. */
+#ifndef __cplusplus
static const struct rte_flow_item_raw rte_flow_item_raw_mask = {
.relative = 1,
.search = 1,
@@ -411,6 +418,7 @@ static const struct rte_flow_item_raw rte_flow_item_raw_mask = {
.limit = 0xffff,
.length = 0xffff,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_ETH
@@ -424,11 +432,13 @@ struct rte_flow_item_eth {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_ETH. */
+#ifndef __cplusplus
static const struct rte_flow_item_eth rte_flow_item_eth_mask = {
.dst.addr_bytes = "\xff\xff\xff\xff\xff\xff",
.src.addr_bytes = "\xff\xff\xff\xff\xff\xff",
.type = 0x0000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_VLAN
@@ -444,10 +454,12 @@ struct rte_flow_item_vlan {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_VLAN. */
+#ifndef __cplusplus
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask = {
.tpid = 0x0000,
.tci = 0xffff,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_IPV4
@@ -461,12 +473,14 @@ struct rte_flow_item_ipv4 {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_IPV4. */
+#ifndef __cplusplus
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask = {
.hdr = {
.src_addr = 0xffffffff,
.dst_addr = 0xffffffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_IPV6.
@@ -480,6 +494,7 @@ struct rte_flow_item_ipv6 {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_IPV6. */
+#ifndef __cplusplus
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask = {
.hdr = {
.src_addr =
@@ -490,6 +505,7 @@ static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask = {
"\xff\xff\xff\xff\xff\xff\xff\xff",
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_ICMP.
@@ -501,12 +517,14 @@ struct rte_flow_item_icmp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_ICMP. */
+#ifndef __cplusplus
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask = {
.hdr = {
.icmp_type = 0xff,
.icmp_code = 0xff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_UDP.
@@ -518,12 +536,14 @@ struct rte_flow_item_udp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_UDP. */
+#ifndef __cplusplus
static const struct rte_flow_item_udp rte_flow_item_udp_mask = {
.hdr = {
.src_port = 0xffff,
.dst_port = 0xffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_TCP.
@@ -535,12 +555,14 @@ struct rte_flow_item_tcp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_TCP. */
+#ifndef __cplusplus
static const struct rte_flow_item_tcp rte_flow_item_tcp_mask = {
.hdr = {
.src_port = 0xffff,
.dst_port = 0xffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_SCTP.
@@ -552,12 +574,14 @@ struct rte_flow_item_sctp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_SCTP. */
+#ifndef __cplusplus
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask = {
.hdr = {
.src_port = 0xffff,
.dst_port = 0xffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_VXLAN.
@@ -572,9 +596,11 @@ struct rte_flow_item_vxlan {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN. */
+#ifndef __cplusplus
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask = {
.vni = "\xff\xff\xff",
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_E_TAG.
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 12/13] ethdev: fix C++ errors in flow API (MPLS, GRE)
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (10 preceding siblings ...)
2017-04-24 15:53 ` [dpdk-dev] [PATCH 11/13] ethdev: fix C++ errors in flow API Adrien Mazarguil
@ 2017-04-24 15:53 ` 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
13 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:53 UTC (permalink / raw)
To: dev; +Cc: Beilei Xing
This commit addresses the following compilation errors:
In file included from build/include/rte_flow_driver.h:50:0,
from /tmp/check-includes.sh.1397.cc:1:
build/include/rte_flow.h:631:1: error: C99 designator 'label_tc_s' outside
aggregate initializer
[...]
build/include/rte_flow.h:631:1: error: initializer-string for array of
chars is too long [-fpermissive]
[...]
build/include/rte_flow.h:650:1: sorry, unimplemented: non-trivial
designated initializers not supported
[...]
C++ does not support the C99-style designated initializers used in this
file for the default item masks. While the resulting symbols are primarily
useful to PMDs (written in C), they are exposed as part of the public API
for documentation purposes and to assist application writers.
Considering that:
- using pre-C99 initialization style for compatibility with C++ would
render them difficult to understand (all struct members must be
initialized)
- using both initialization styles would be needlessly verbose
- not exposing them at all would defeat their purpose
- applications do not normally need these symbols at run time
This commit hides these symbols from C++ applications. Specific C++
initializers will be added later if necessary.
Fixes: 7cd048321d1d ("ethdev: add MPLS and GRE flow API items")
Cc: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_ether/rte_flow.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index bc7bc45..abd4c6a 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -652,9 +652,11 @@ struct rte_flow_item_mpls {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_MPLS. */
+#ifndef __cplusplus
static const struct rte_flow_item_mpls rte_flow_item_mpls_mask = {
.label_tc_s = "\xff\xff\xf0",
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_GRE.
@@ -671,9 +673,11 @@ struct rte_flow_item_gre {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_GRE. */
+#ifndef __cplusplus
static const struct rte_flow_item_gre rte_flow_item_gre_mask = {
.protocol = 0xffff,
};
+#endif
/**
* Matching pattern item definition.
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH 13/13] ethdev: fix incomplete items in flow API
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (11 preceding siblings ...)
2017-04-24 15:53 ` [dpdk-dev] [PATCH 12/13] ethdev: fix C++ errors in flow API (MPLS, GRE) Adrien Mazarguil
@ 2017-04-24 15:53 ` Adrien Mazarguil
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
13 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-24 15:53 UTC (permalink / raw)
To: dev; +Cc: stable, Wei Zhao, Wenzhuo Lu
E-Tag and NVGRE pattern items have been added hastily without updating
documentation nor testpmd.
This commit also adds default masks for these items based on the ixgbe
implementation.
Fixes: 99e7003831c3 ("net/ixgbe: parse L2 tunnel filter")
Cc: stable@dpdk.org
Cc: Wei Zhao <wei.zhao1@intel.com>
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
app/test-pmd/cmdline_flow.c | 46 +++++++++++++++++++++++++++++++++
doc/guides/prog_guide/rte_flow.rst | 19 ++++++++++++++
lib/librte_ether/rte_flow.h | 21 +++++++++++++++
3 files changed, 86 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 4e99f0f..5514ee4 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -159,6 +159,10 @@ enum index {
ITEM_SCTP_CKSUM,
ITEM_VXLAN,
ITEM_VXLAN_VNI,
+ ITEM_E_TAG,
+ ITEM_E_TAG_ECID_B,
+ ITEM_NVGRE,
+ ITEM_NVGRE_TNI,
ITEM_MPLS,
ITEM_MPLS_LABEL,
ITEM_GRE,
@@ -436,6 +440,8 @@ static const enum index next_item[] = {
ITEM_TCP,
ITEM_SCTP,
ITEM_VXLAN,
+ ITEM_E_TAG,
+ ITEM_NVGRE,
ITEM_MPLS,
ITEM_GRE,
ZERO,
@@ -544,6 +550,18 @@ static const enum index item_vxlan[] = {
ZERO,
};
+static const enum index item_e_tag[] = {
+ ITEM_E_TAG_ECID_B,
+ ITEM_NEXT,
+ ZERO,
+};
+
+static const enum index item_nvgre[] = {
+ ITEM_NVGRE_TNI,
+ ITEM_NEXT,
+ ZERO,
+};
+
static const enum index item_mpls[] = {
ITEM_MPLS_LABEL,
ITEM_NEXT,
@@ -1297,6 +1315,34 @@ static const struct token token_list[] = {
.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
},
+ [ITEM_E_TAG] = {
+ .name = "e_tag",
+ .help = "match E-Tag header",
+ .priv = PRIV_ITEM(E_TAG, sizeof(struct rte_flow_item_e_tag)),
+ .next = NEXT(item_e_tag),
+ .call = parse_vc,
+ },
+ [ITEM_E_TAG_ECID_B] = {
+ .name = "ecid_b",
+ .help = "E-CID base",
+ .next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
+ rsvd_grp_ecid_b,
+ "\x3f\xff")),
+ },
+ [ITEM_NVGRE] = {
+ .name = "nvgre",
+ .help = "match NVGRE header",
+ .priv = PRIV_ITEM(NVGRE, sizeof(struct rte_flow_item_nvgre)),
+ .next = NEXT(item_nvgre),
+ .call = parse_vc,
+ },
+ [ITEM_NVGRE_TNI] = {
+ .name = "tni",
+ .help = "Virtual subnet ID",
+ .next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
+ },
[ITEM_MPLS] = {
.name = "mpls",
.help = "match MPLS header",
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 9bca9ec..5dfd8a2 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -863,6 +863,25 @@ Matches a VXLAN header (RFC 7348).
- ``rsvd1``: reserved, normally 0x00.
- Default ``mask`` matches VNI only.
+Item: ``E_TAG``
+^^^^^^^^^^^^^^^
+
+Matches an IEEE 802.1BR E-Tag header.
+
+- ``tpid``: tag protocol identifier (0x893F)
+- ``epcp_edei_in_ecid_b``: E-Tag control information (E-TCI), E-PCP (3b),
+ E-DEI (1b), ingress E-CID base (12b).
+- ``rsvd_grp_ecid_b``: reserved (2b), GRP (2b), E-CID base (12b).
+- ``in_ecid_e``: ingress E-CID ext.
+- ``ecid_e``: E-CID ext.
+
+Item: ``NVGRE``
+^^^^^^^^^^^^^^^
+
+Matches a NVGRE header (RFC 7637).
+
+- ``c_k_s_rsvd0_ver``
+
Item: ``MPLS``
^^^^^^^^^^^^^^
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index abd4c6a..c47edbc 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -49,6 +49,7 @@
#include <rte_sctp.h>
#include <rte_tcp.h>
#include <rte_udp.h>
+#include <rte_byteorder.h>
#ifdef __cplusplus
extern "C" {
@@ -620,6 +621,19 @@ struct rte_flow_item_e_tag {
uint8_t ecid_e; /**< E-CID ext. */
};
+/** Default mask for RTE_FLOW_ITEM_TYPE_E_TAG. */
+#ifndef __cplusplus
+static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask = {
+#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
+ .rsvd_grp_ecid_b = 0x3fff,
+#elif RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
+ .rsvd_grp_ecid_b = 0xff3f,
+#else
+#error Unsupported endianness.
+#endif
+};
+#endif
+
/**
* RTE_FLOW_ITEM_TYPE_NVGRE.
*
@@ -638,6 +652,13 @@ struct rte_flow_item_nvgre {
uint8_t flow_id; /**< Flow ID. */
};
+/** Default mask for RTE_FLOW_ITEM_TYPE_NVGRE. */
+#ifndef __cplusplus
+static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask = {
+ .tni = "\xff\xff\xff",
+};
+#endif
+
/**
* RTE_FLOW_ITEM_TYPE_MPLS.
*
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH 07/13] net/avp: fix errors in exported headers
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
0 siblings, 0 replies; 66+ messages in thread
From: Legacy, Allain @ 2017-04-24 16:19 UTC (permalink / raw)
To: Adrien Mazarguil, dev; +Cc: Peters, Matt
> -----Original Message-----
> From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> Sent: Monday, April 24, 2017 11:53 AM
<...>
> diff --git a/drivers/net/avp/rte_avp_common.h
> b/drivers/net/avp/rte_avp_common.h
> index 31d763e..6cdaca9 100644
> --- a/drivers/net/avp/rte_avp_common.h
> +++ b/drivers/net/avp/rte_avp_common.h
> @@ -57,9 +57,18 @@
> #ifndef _RTE_AVP_COMMON_H_
> #define _RTE_AVP_COMMON_H_
>
> +#include <stdint.h>
> #ifdef __KERNEL__
> #include <linux/if.h>
> #endif
> +#include <rte_common.h>
> +#include <rte_memory.h>
> +#include <rte_ether.h>
> +#include <rte_atomic.h>
These 4 are going to need to be in an #else of the #ifdef __KERNEL__ otherwise our local kernel module build will fail.
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH 12/13] ethdev: fix C++ errors in flow API (MPLS, GRE)
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
0 siblings, 0 replies; 66+ messages in thread
From: Xing, Beilei @ 2017-04-25 1:18 UTC (permalink / raw)
To: Adrien Mazarguil, dev
> -----Original Message-----
> From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> Sent: Monday, April 24, 2017 11:53 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>
> Subject: [PATCH 12/13] ethdev: fix C++ errors in flow API (MPLS, GRE)
>
> This commit addresses the following compilation errors:
>
> In file included from build/include/rte_flow_driver.h:50:0,
> from /tmp/check-includes.sh.1397.cc:1:
> build/include/rte_flow.h:631:1: error: C99 designator 'label_tc_s' outside
> aggregate initializer
> [...]
> build/include/rte_flow.h:631:1: error: initializer-string for array of
> chars is too long [-fpermissive]
> [...]
> build/include/rte_flow.h:650:1: sorry, unimplemented: non-trivial
> designated initializers not supported [...]
>
> C++ does not support the C99-style designated initializers used in this
> file for the default item masks. While the resulting symbols are primarily useful
> to PMDs (written in C), they are exposed as part of the public API for
> documentation purposes and to assist application writers.
>
> Considering that:
>
> - using pre-C99 initialization style for compatibility with C++ would
> render them difficult to understand (all struct members must be
> initialized)
> - using both initialization styles would be needlessly verbose
> - not exposing them at all would defeat their purpose
> - applications do not normally need these symbols at run time
>
> This commit hides these symbols from C++ applications. Specific C++ initializers
> will be added later if necessary.
>
> Fixes: 7cd048321d1d ("ethdev: add MPLS and GRE flow API items")
>
> Cc: Beilei Xing <beilei.xing@intel.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> ---
> lib/librte_ether/rte_flow.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index
> bc7bc45..abd4c6a 100644
> --- a/lib/librte_ether/rte_flow.h
> +++ b/lib/librte_ether/rte_flow.h
> @@ -652,9 +652,11 @@ struct rte_flow_item_mpls { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_MPLS. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_mpls rte_flow_item_mpls_mask = {
> .label_tc_s = "\xff\xff\xf0",
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_GRE.
> @@ -671,9 +673,11 @@ struct rte_flow_item_gre { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_GRE. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_gre rte_flow_item_gre_mask = {
> .protocol = 0xffff,
> };
> +#endif
>
> /**
> * Matching pattern item definition.
> --
> 2.1.4
Acked-by: Beilei Xing <beilei.xing@intel.com>
Thanks.
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH 05/13] vhost: fix errors with strict compilation flags
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
1 sibling, 0 replies; 66+ messages in thread
From: Yuanhan Liu @ 2017-04-25 2:15 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dev, Maxime Coquelin
On Mon, Apr 24, 2017 at 05:52:59PM +0200, Adrien Mazarguil wrote:
> Exported headers must allow compilation with the strictest flags. This
> commit addresses the following errors:
>
> In file included from /tmp/check-includes.sh.20132.c:1:0:
> build/include/rte_vhost.h:73:30: error: ISO C forbids zero-size array
> 'regions' [-Werror=pedantic]
> [...]
>
> Also:
>
> - Add C++ awareness to rte_vhost.h for consistency with rte_eth_vhost.h.
> - Move Linux includes into C++ block to prevent linking issues with
> exported symbols.
> - Update check-includes.sh following the removal of rte_virtio_net.h.
>
> Finally, update check-includes.sh to ignore rte_vhost.h and rte_eth_vhost.h
> from now on since the Linux headers they depend on are not clean enough:
>
> In file included from /usr/include/linux/vhost.h:17:0,
> from build/include/rte_vhost.h:43,
> from build/include/rte_eth_vhost.h:44,
> from /tmp/check-includes.sh.20132.c:1:
> /usr/include/linux/virtio_ring.h: In function 'vring_init':
> /usr/include/linux/virtio_ring.h:146:16: error: pointer of type 'void *'
> used in arithmetic [-Werror=pointer-arith]
> [...]
> In file included from build/include/rte_vhost.h:43:0,
> from build/include/rte_eth_vhost.h:44,
> from /tmp/check-includes.sh.20132.c:1:
> /usr/include/linux/vhost.h: At top level:
> /usr/include/linux/vhost.h:73:3: error: ISO C99 doesn't support unnamed
> structs/unions [-Werror=pedantic]
> [...]
>
> Fixes: eb32247457fe ("vhost: export guest memory regions")
> Fixes: a798beb47c8e ("vhost: rename header file")
>
> Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
--yliu
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers Adrien Mazarguil
` (12 preceding siblings ...)
2017-04-24 15:53 ` [dpdk-dev] [PATCH 13/13] ethdev: fix incomplete items in flow API Adrien Mazarguil
@ 2017-04-25 8:29 ` Adrien Mazarguil
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 01/13] crypto/scheduler: fix missing includes Adrien Mazarguil
` (14 more replies)
13 siblings, 15 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:29 UTC (permalink / raw)
To: dev
This series addresses the remaining issues seen by check-includes.sh in
exported headers. Most of them may cause compilation errors in user
applications:
- Dependencies on missing includes.
- Non-standard C/C++ constructs usage without associated safeties.
- Missing C++ awareness blocks.
It also addresses the incomplete implementation of E-Tag and NVGRE flow API
pattern items.
Changes in v2:
- Fixed (still) incomplete E-tag and NVGRE flow API documentation.
- Renamed E-Tag item parameter "ecid_b" to "grp_ecid_b" in testpmd, to
reflect that both fields are set at once.
- Fixed remaining compilation issue with RTE_LIBRTE_EVENTDEV_DEBUG.
- Fixed avp include to avoid kernel module compilation issue pointed out
by Allain.
Adrien Mazarguil (13):
crypto/scheduler: fix missing includes
eventdev: fix errors with strict compilation flags
latency: fix missing includes in exported header
net: fix missing include in exported header
vhost: fix errors with strict compilation flags
mbuf: fix missing includes in exported header
net/avp: fix errors in exported headers
bitrate: fix errors in exported header
efd: fix missing include in exported header
metrics: fix errors in exported header
ethdev: fix C++ errors in flow API
ethdev: fix C++ errors in flow API (MPLS, GRE)
ethdev: fix incomplete items in flow API
app/test-pmd/cmdline_flow.c | 46 ++++++++++++++++++
devtools/check-includes.sh | 4 +-
doc/guides/prog_guide/rte_flow.rst | 26 ++++++++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 8 +++
.../crypto/scheduler/rte_cryptodev_scheduler.h | 1 +
.../rte_cryptodev_scheduler_operations.h | 1 +
drivers/net/avp/rte_avp_common.h | 17 ++++++-
drivers/net/avp/rte_avp_fifo.h | 12 +++++
lib/librte_bitratestats/rte_bitrate.h | 10 ++++
lib/librte_efd/rte_efd.h | 2 +
lib/librte_ether/rte_flow.h | 51 ++++++++++++++++++++
lib/librte_eventdev/rte_eventdev.h | 3 +-
lib/librte_eventdev/rte_eventdev_pmd.h | 24 ++++-----
lib/librte_latencystats/rte_latencystats.h | 2 +
lib/librte_mbuf/rte_mbuf_ptype.h | 3 ++
lib/librte_metrics/rte_metrics.h | 10 ++++
lib/librte_net/rte_net_crc.h | 2 +
lib/librte_vhost/rte_vhost.h | 16 ++++--
18 files changed, 217 insertions(+), 21 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 01/13] crypto/scheduler: fix missing includes
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
@ 2017-04-25 8:29 ` 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
` (13 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:29 UTC (permalink / raw)
To: dev; +Cc: Fan Zhang
This commit addresses the following compilation errors:
In file included from build/include/rte_cryptodev_scheduler.h:37:0,
from /tmp/check-includes.sh.5355.c:1:
build/include/rte_cryptodev_scheduler_operations.h:43:30: error: unknown
type name 'uint8_t' struct rte_cryptodev *dev, uint8_t slave_id);
[...]
Fixes: 097ab0bac017 ("crypto/scheduler: add API")
Cc: Fan Zhang <roy.fan.zhang@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/crypto/scheduler/rte_cryptodev_scheduler.h | 1 +
drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.h b/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
index 7a34d0a..2ba6e47 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
@@ -46,6 +46,7 @@
* operation: round robin, packet-size based, and fail-over.
*/
+#include <stdint.h>
#include "rte_cryptodev_scheduler_operations.h"
#ifdef __cplusplus
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h b/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h
index 42fe9e6..719165c 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h
@@ -34,6 +34,7 @@
#ifndef _RTE_CRYPTO_SCHEDULER_OPERATIONS_H
#define _RTE_CRYPTO_SCHEDULER_OPERATIONS_H
+#include <rte_cryptodev.h>
#ifdef __cplusplus
extern "C" {
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 02/13] eventdev: fix errors with strict compilation flags
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 8:29 ` Adrien Mazarguil
2017-04-25 15:31 ` De Lara Guarch, Pablo
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 03/13] latency: fix missing includes in exported header Adrien Mazarguil
` (12 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:29 UTC (permalink / raw)
To: dev; +Cc: Jerin Jacob
Exported headers must allow compilation with the strictest flags. This
commit addresses the following errors:
In file included from build/include/rte_eventdev_pmd.h:55:0,
from /tmp/check-includes.sh.25816.c:1:
build/include/rte_eventdev.h:908:8: error: struct has no named members
[-Werror=pedantic]
[...]
In file included from /tmp/check-includes.sh.25816.c:1:0:
build/include/rte_eventdev_pmd.h:65:35: error: ISO C does not permit named
variadic macros [-Werror=variadic-macros]
[...]
Also enabling RTE_LIBRTE_EVENTDEV_DEBUG causes redefinitions:
In file included from /tmp/check-includes.sh.18921.c:27:0:
build/include/rte_eventdev_pmd.h:58:0: error: "RTE_PMD_DEBUG_TRACE"
redefined [-Werror]
[...]
Rely on the rte_ethdev.h version instead.
Fixes: 71f238432865 ("eventdev: introduce event driven programming model")
Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs")
Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_eventdev/rte_eventdev.h | 3 +--
lib/librte_eventdev/rte_eventdev_pmd.h | 24 ++++++++++--------------
2 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index b8ed6ef..20e7293 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -905,9 +905,9 @@ rte_event_dev_close(uint8_t dev_id);
* The generic *rte_event* structure to hold the event attributes
* for dequeue and enqueue operation
*/
+RTE_STD_C11
struct rte_event {
/** WORD0 */
- RTE_STD_C11
union {
uint64_t event;
/** Event attributes for dequeue or enqueue operation */
@@ -967,7 +967,6 @@ struct rte_event {
};
};
/** WORD1 */
- RTE_STD_C11
union {
uint64_t u64;
/**< Opaque 64-bit value */
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index a73dc91..a090fa4 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -51,27 +51,23 @@ extern "C" {
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_common.h>
+#include <rte_ethdev.h>
#include "rte_eventdev.h"
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
-#define RTE_PMD_DEBUG_TRACE(...) \
- rte_pmd_debug_trace(__func__, __VA_ARGS__)
-#else
-#define RTE_PMD_DEBUG_TRACE(...)
-#endif
-
/* Logging Macros */
-#define RTE_EDEV_LOG_ERR(fmt, args...) \
- RTE_LOG(ERR, EVENTDEV, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
+#define RTE_EDEV_LOG_ERR(...) \
+ RTE_LOG(ERR, EVENTDEV, \
+ RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
-#define RTE_EDEV_LOG_DEBUG(fmt, args...) \
- RTE_LOG(DEBUG, EVENTDEV, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
+#define RTE_EDEV_LOG_DEBUG(...) \
+ RTE_LOG(DEBUG, EVENTDEV, \
+ RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
#else
-#define RTE_EDEV_LOG_DEBUG(fmt, args...) (void)0
+#define RTE_EDEV_LOG_DEBUG(...) (void)0
#endif
/* Macros to check for valid device */
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 03/13] latency: fix missing includes in exported header
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 8:29 ` [dpdk-dev] [PATCH v2 02/13] eventdev: fix errors with strict compilation flags Adrien Mazarguil
@ 2017-04-25 8:29 ` Adrien Mazarguil
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 04/13] net: fix missing include " Adrien Mazarguil
` (11 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:29 UTC (permalink / raw)
To: dev; +Cc: Reshma Pattan
This commit addresses the following errors:
In file included from build/include/rte_latencystats.h:43:0,
from /tmp/check-includes.sh.6580.c:1:
build/include/rte_metrics.h:91:2: error: unknown type name 'uint16_t'
[...]
In file included from /tmp/check-includes.sh.6580.c:1:0:
build/include/rte_latencystats.h:66:19: error: expected declaration
specifiers or '...' before '*' token
[...]
Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats")
Cc: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_latencystats/rte_latencystats.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_latencystats/rte_latencystats.h b/lib/librte_latencystats/rte_latencystats.h
index 6efeaf4..d85cf3a 100644
--- a/lib/librte_latencystats/rte_latencystats.h
+++ b/lib/librte_latencystats/rte_latencystats.h
@@ -40,7 +40,9 @@
* library to provide application and flow based latency stats.
*/
+#include <stdint.h>
#include <rte_metrics.h>
+#include <rte_mbuf.h>
#ifdef __cplusplus
extern "C" {
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 04/13] net: fix missing include in exported header
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (2 preceding siblings ...)
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 ` 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
` (10 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:29 UTC (permalink / raw)
To: dev; +Cc: Jasvinder Singh
This commit addresses the following errors:
In file included from /tmp/check-includes.sh.18889.c:1:0:
build/include/rte_net_crc.h:86:1: error: unknown type name 'uint32_t'
[...]
Fixes: 986ff526fb84 ("net: add CRC computation API")
Cc: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_net/rte_net_crc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_net/rte_net_crc.h b/lib/librte_net/rte_net_crc.h
index 76fd129..d22286c 100644
--- a/lib/librte_net/rte_net_crc.h
+++ b/lib/librte_net/rte_net_crc.h
@@ -34,6 +34,8 @@
#ifndef _RTE_NET_CRC_H_
#define _RTE_NET_CRC_H_
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 05/13] vhost: fix errors with strict compilation flags
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (3 preceding siblings ...)
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 04/13] net: fix missing include " Adrien Mazarguil
@ 2017-04-25 8:29 ` Adrien Mazarguil
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 06/13] mbuf: fix missing includes in exported header Adrien Mazarguil
` (9 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:29 UTC (permalink / raw)
To: dev
Exported headers must allow compilation with the strictest flags. This
commit addresses the following errors:
In file included from /tmp/check-includes.sh.20132.c:1:0:
build/include/rte_vhost.h:73:30: error: ISO C forbids zero-size array
'regions' [-Werror=pedantic]
[...]
Also:
- Add C++ awareness to rte_vhost.h for consistency with rte_eth_vhost.h.
- Move Linux includes into C++ block to prevent linking issues with
exported symbols.
- Update check-includes.sh following the removal of rte_virtio_net.h.
Finally, update check-includes.sh to ignore rte_vhost.h and rte_eth_vhost.h
from now on since the Linux headers they depend on are not clean enough:
In file included from /usr/include/linux/vhost.h:17:0,
from build/include/rte_vhost.h:43,
from build/include/rte_eth_vhost.h:44,
from /tmp/check-includes.sh.20132.c:1:
/usr/include/linux/virtio_ring.h: In function 'vring_init':
/usr/include/linux/virtio_ring.h:146:16: error: pointer of type 'void *'
used in arithmetic [-Werror=pointer-arith]
[...]
In file included from build/include/rte_vhost.h:43:0,
from build/include/rte_eth_vhost.h:44,
from /tmp/check-includes.sh.20132.c:1:
/usr/include/linux/vhost.h: At top level:
/usr/include/linux/vhost.h:73:3: error: ISO C99 doesn't support unnamed
structs/unions [-Werror=pedantic]
[...]
Fixes: eb32247457fe ("vhost: export guest memory regions")
Fixes: a798beb47c8e ("vhost: rename header file")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
devtools/check-includes.sh | 4 +++-
lib/librte_vhost/rte_vhost.h | 16 +++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/devtools/check-includes.sh b/devtools/check-includes.sh
index d65adc6..c4ec73f 100755
--- a/devtools/check-includes.sh
+++ b/devtools/check-includes.sh
@@ -109,10 +109,12 @@ include_dir=${1:-build/include}
'rte_byteorder_64.h' \
'generic/*' \
'exec-env/*' \
+ 'rte_vhost.h' \
+ 'rte_eth_vhost.h' \
}
: ${IGNORE_CXX= \
+ 'rte_vhost.h' \
'rte_eth_vhost.h' \
- 'rte_virtio_net.h' \
}
temp_cc=/tmp/${0##*/}.$$.c
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index 7a586e4..605e47c 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -40,13 +40,19 @@
*/
#include <stdint.h>
-#include <linux/vhost.h>
-#include <linux/virtio_ring.h>
#include <sys/eventfd.h>
#include <rte_memory.h>
#include <rte_mempool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These are not C++-aware. */
+#include <linux/vhost.h>
+#include <linux/virtio_ring.h>
+
#define RTE_VHOST_USER_CLIENT (1ULL << 0)
#define RTE_VHOST_USER_NO_RECONNECT (1ULL << 1)
#define RTE_VHOST_USER_DEQUEUE_ZERO_COPY (1ULL << 2)
@@ -70,7 +76,7 @@ struct rte_vhost_mem_region {
*/
struct rte_vhost_memory {
uint32_t nregions;
- struct rte_vhost_mem_region regions[0];
+ struct rte_vhost_mem_region regions[];
};
struct rte_vhost_vring {
@@ -426,4 +432,8 @@ int rte_vhost_get_mem_table(int vid, struct rte_vhost_memory **mem);
int rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
struct rte_vhost_vring *vring);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_VHOST_H_ */
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 06/13] mbuf: fix missing includes in exported header
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (4 preceding siblings ...)
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 ` Adrien Mazarguil
2017-04-25 9:56 ` Olivier Matz
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers Adrien Mazarguil
` (8 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:30 UTC (permalink / raw)
To: dev; +Cc: stable, Olivier Matz
This commit addresses the following errors:
In file included from /tmp/check-includes.sh.681.c:1:0:
build/include/rte_mbuf_ptype.h:587:35: error: unknown type name 'uint32_t'
[...]
build/include/rte_mbuf_ptype.h:662:51: error: unknown type name 'size_t'
[...]
Fixes: 288541c8ff9e ("mbuf: add functions to dump packet type")
Cc: stable@dpdk.org
Cc: Olivier Matz <olivier.matz@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_mbuf/rte_mbuf_ptype.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h b/lib/librte_mbuf/rte_mbuf_ptype.h
index ff6de9d..a3269c4 100644
--- a/lib/librte_mbuf/rte_mbuf_ptype.h
+++ b/lib/librte_mbuf/rte_mbuf_ptype.h
@@ -91,6 +91,9 @@
* RTE_PTYPE_INNER_L4_UDP.
*/
+#include <stddef.h>
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (5 preceding siblings ...)
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 06/13] mbuf: fix missing includes in exported header Adrien Mazarguil
@ 2017-04-25 8:30 ` Adrien Mazarguil
2017-04-25 12:31 ` Legacy, Allain
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 08/13] bitrate: fix errors in exported header Adrien Mazarguil
` (7 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:30 UTC (permalink / raw)
To: dev; +Cc: Allain Legacy
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
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 08/13] bitrate: fix errors in exported header
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (6 preceding siblings ...)
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers Adrien Mazarguil
@ 2017-04-25 8:30 ` Adrien Mazarguil
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 09/13] efd: fix missing include " Adrien Mazarguil
` (6 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:30 UTC (permalink / raw)
To: dev; +Cc: Remy Horton
This commit addresses the following error:
In file included from /tmp/check-includes.sh.28023.c:1:0:
build/include/rte_bitrate.h:82:2: error: unknown type name 'uint8_t'
[...]
It also adds C++ awareness to rte_bitrate.h.
Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")
Cc: Remy Horton <remy.horton@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_bitratestats/rte_bitrate.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index b9f11bd..15fc270 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -34,6 +34,12 @@
#ifndef _RTE_BITRATE_H_
#define _RTE_BITRATE_H_
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* Bitrate statistics data structure.
* This data structure is intentionally opaque.
@@ -81,4 +87,8 @@ int rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data);
int rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
uint8_t port_id);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_BITRATE_H_ */
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 09/13] efd: fix missing include in exported header
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (7 preceding siblings ...)
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 08/13] bitrate: fix errors in exported header Adrien Mazarguil
@ 2017-04-25 8:30 ` Adrien Mazarguil
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 10/13] metrics: fix errors " Adrien Mazarguil
` (5 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:30 UTC (permalink / raw)
To: dev; +Cc: stable, Byron Marohn, Pablo de Lara Guarch
This commit addresses the following compilation errors:
In file included from /tmp/check-includes.sh.8373.c:1:0:
build/include/rte_efd.h:133:9: error: unknown type name 'uint8_t'
[...]
Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Cc: stable@dpdk.org
Cc: Byron Marohn <byron.marohn@intel.com>
Cc: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_efd/rte_efd.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_efd/rte_efd.h b/lib/librte_efd/rte_efd.h
index 6d31e18..1596863 100644
--- a/lib/librte_efd/rte_efd.h
+++ b/lib/librte_efd/rte_efd.h
@@ -40,6 +40,8 @@
* RTE EFD Table
*/
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 10/13] metrics: fix errors in exported header
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (8 preceding siblings ...)
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 09/13] efd: fix missing include " Adrien Mazarguil
@ 2017-04-25 8:30 ` Adrien Mazarguil
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 11/13] ethdev: fix C++ errors in flow API Adrien Mazarguil
` (4 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:30 UTC (permalink / raw)
To: dev; +Cc: Remy Horton
This commit addresses the following compilation errors:
In file included from /tmp/check-includes.sh.21060.c:1:0:
build/include/rte_metrics.h:91:2: error: unknown type name 'uint16_t'
[...]
It also adds C++ awareness to rte_metrics.h.
Fixes: 349950ddb9c5 ("metrics: add information metrics library")
Cc: Remy Horton <remy.horton@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_metrics/rte_metrics.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/librte_metrics/rte_metrics.h b/lib/librte_metrics/rte_metrics.h
index fd0154f..0fa3104 100644
--- a/lib/librte_metrics/rte_metrics.h
+++ b/lib/librte_metrics/rte_metrics.h
@@ -52,6 +52,12 @@
#ifndef _RTE_METRICS_H_
#define _RTE_METRICS_H_
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Maximum length of metric name (including null-terminator) */
#define RTE_METRICS_MAX_NAME_LEN 64
@@ -237,4 +243,8 @@ int rte_metrics_update_values(
const uint64_t *values,
uint32_t count);
+#ifdef __cplusplus
+}
+#endif
+
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 11/13] ethdev: fix C++ errors in flow API
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (9 preceding siblings ...)
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 10/13] metrics: fix errors " Adrien Mazarguil
@ 2017-04-25 8:30 ` 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
` (3 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:30 UTC (permalink / raw)
To: dev; +Cc: stable
This commit addresses the following compilation errors:
In file included from build/include/rte_flow_driver.h:50:0,
from /tmp/check-includes.sh.1397.cc:1:
build/include/rte_flow.h:428:2: error: expected primary-expression before
'.' token
[...]
build/include/rte_flow.h:469:1: sorry, unimplemented: non-trivial
designated initializers not supported
[...]
C++ does not support the C99-style designated initializers used in this
file for the default item masks. While the resulting symbols are primarily
useful to PMDs (written in C), they are exposed as part of the public API
for documentation purposes and to assist application writers.
Considering that:
- using pre-C99 initialization style for compatibility with C++ would
render them difficult to understand (all struct members must be
initialized)
- using both initialization styles would be needlessly verbose
- not exposing them at all would defeat their purpose
- applications do not normally need these symbols at run time
This commit hides these symbols from C++ applications. Specific C++
initializers will be added later if necessary.
Fixes: 6de5c0f1302c ("ethdev: define default item masks in flow API")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_ether/rte_flow.h | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index 7749491..bc7bc45 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -314,9 +314,11 @@ struct rte_flow_item_any {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_ANY. */
+#ifndef __cplusplus
static const struct rte_flow_item_any rte_flow_item_any_mask = {
.num = 0x00000000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_VF
@@ -341,9 +343,11 @@ struct rte_flow_item_vf {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_VF. */
+#ifndef __cplusplus
static const struct rte_flow_item_vf rte_flow_item_vf_mask = {
.id = 0x00000000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_PORT
@@ -370,9 +374,11 @@ struct rte_flow_item_port {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_PORT. */
+#ifndef __cplusplus
static const struct rte_flow_item_port rte_flow_item_port_mask = {
.index = 0x00000000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_RAW
@@ -403,6 +409,7 @@ struct rte_flow_item_raw {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_RAW. */
+#ifndef __cplusplus
static const struct rte_flow_item_raw rte_flow_item_raw_mask = {
.relative = 1,
.search = 1,
@@ -411,6 +418,7 @@ static const struct rte_flow_item_raw rte_flow_item_raw_mask = {
.limit = 0xffff,
.length = 0xffff,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_ETH
@@ -424,11 +432,13 @@ struct rte_flow_item_eth {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_ETH. */
+#ifndef __cplusplus
static const struct rte_flow_item_eth rte_flow_item_eth_mask = {
.dst.addr_bytes = "\xff\xff\xff\xff\xff\xff",
.src.addr_bytes = "\xff\xff\xff\xff\xff\xff",
.type = 0x0000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_VLAN
@@ -444,10 +454,12 @@ struct rte_flow_item_vlan {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_VLAN. */
+#ifndef __cplusplus
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask = {
.tpid = 0x0000,
.tci = 0xffff,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_IPV4
@@ -461,12 +473,14 @@ struct rte_flow_item_ipv4 {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_IPV4. */
+#ifndef __cplusplus
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask = {
.hdr = {
.src_addr = 0xffffffff,
.dst_addr = 0xffffffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_IPV6.
@@ -480,6 +494,7 @@ struct rte_flow_item_ipv6 {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_IPV6. */
+#ifndef __cplusplus
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask = {
.hdr = {
.src_addr =
@@ -490,6 +505,7 @@ static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask = {
"\xff\xff\xff\xff\xff\xff\xff\xff",
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_ICMP.
@@ -501,12 +517,14 @@ struct rte_flow_item_icmp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_ICMP. */
+#ifndef __cplusplus
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask = {
.hdr = {
.icmp_type = 0xff,
.icmp_code = 0xff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_UDP.
@@ -518,12 +536,14 @@ struct rte_flow_item_udp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_UDP. */
+#ifndef __cplusplus
static const struct rte_flow_item_udp rte_flow_item_udp_mask = {
.hdr = {
.src_port = 0xffff,
.dst_port = 0xffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_TCP.
@@ -535,12 +555,14 @@ struct rte_flow_item_tcp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_TCP. */
+#ifndef __cplusplus
static const struct rte_flow_item_tcp rte_flow_item_tcp_mask = {
.hdr = {
.src_port = 0xffff,
.dst_port = 0xffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_SCTP.
@@ -552,12 +574,14 @@ struct rte_flow_item_sctp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_SCTP. */
+#ifndef __cplusplus
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask = {
.hdr = {
.src_port = 0xffff,
.dst_port = 0xffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_VXLAN.
@@ -572,9 +596,11 @@ struct rte_flow_item_vxlan {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN. */
+#ifndef __cplusplus
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask = {
.vni = "\xff\xff\xff",
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_E_TAG.
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 12/13] ethdev: fix C++ errors in flow API (MPLS, GRE)
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (10 preceding siblings ...)
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 11/13] ethdev: fix C++ errors in flow API Adrien Mazarguil
@ 2017-04-25 8:30 ` 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
` (2 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:30 UTC (permalink / raw)
To: dev
This commit addresses the following compilation errors:
In file included from build/include/rte_flow_driver.h:50:0,
from /tmp/check-includes.sh.1397.cc:1:
build/include/rte_flow.h:631:1: error: C99 designator 'label_tc_s' outside
aggregate initializer
[...]
build/include/rte_flow.h:631:1: error: initializer-string for array of
chars is too long [-fpermissive]
[...]
build/include/rte_flow.h:650:1: sorry, unimplemented: non-trivial
designated initializers not supported
[...]
C++ does not support the C99-style designated initializers used in this
file for the default item masks. While the resulting symbols are primarily
useful to PMDs (written in C), they are exposed as part of the public API
for documentation purposes and to assist application writers.
Considering that:
- using pre-C99 initialization style for compatibility with C++ would
render them difficult to understand (all struct members must be
initialized)
- using both initialization styles would be needlessly verbose
- not exposing them at all would defeat their purpose
- applications do not normally need these symbols at run time
This commit hides these symbols from C++ applications. Specific C++
initializers will be added later if necessary.
Fixes: 7cd048321d1d ("ethdev: add MPLS and GRE flow API items")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
---
lib/librte_ether/rte_flow.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index bc7bc45..abd4c6a 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -652,9 +652,11 @@ struct rte_flow_item_mpls {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_MPLS. */
+#ifndef __cplusplus
static const struct rte_flow_item_mpls rte_flow_item_mpls_mask = {
.label_tc_s = "\xff\xff\xf0",
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_GRE.
@@ -671,9 +673,11 @@ struct rte_flow_item_gre {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_GRE. */
+#ifndef __cplusplus
static const struct rte_flow_item_gre rte_flow_item_gre_mask = {
.protocol = 0xffff,
};
+#endif
/**
* Matching pattern item definition.
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v2 13/13] ethdev: fix incomplete items in flow API
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (11 preceding siblings ...)
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 8:30 ` 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
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 8:30 UTC (permalink / raw)
To: dev; +Cc: stable, Wei Zhao, Wenzhuo Lu
E-Tag and NVGRE pattern items have been added hastily without updating
documentation nor testpmd.
This commit also adds default masks for these items based on the ixgbe
implementation.
Fixes: 99e7003831c3 ("net/ixgbe: parse L2 tunnel filter")
Cc: stable@dpdk.org
Cc: Wei Zhao <wei.zhao1@intel.com>
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
app/test-pmd/cmdline_flow.c | 46 ++++++++++++++++++++++++
doc/guides/prog_guide/rte_flow.rst | 26 ++++++++++++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 8 +++++
lib/librte_ether/rte_flow.h | 21 +++++++++++
4 files changed, 101 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 4e99f0f..0a40005 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -159,6 +159,10 @@ enum index {
ITEM_SCTP_CKSUM,
ITEM_VXLAN,
ITEM_VXLAN_VNI,
+ ITEM_E_TAG,
+ ITEM_E_TAG_GRP_ECID_B,
+ ITEM_NVGRE,
+ ITEM_NVGRE_TNI,
ITEM_MPLS,
ITEM_MPLS_LABEL,
ITEM_GRE,
@@ -436,6 +440,8 @@ static const enum index next_item[] = {
ITEM_TCP,
ITEM_SCTP,
ITEM_VXLAN,
+ ITEM_E_TAG,
+ ITEM_NVGRE,
ITEM_MPLS,
ITEM_GRE,
ZERO,
@@ -544,6 +550,18 @@ static const enum index item_vxlan[] = {
ZERO,
};
+static const enum index item_e_tag[] = {
+ ITEM_E_TAG_GRP_ECID_B,
+ ITEM_NEXT,
+ ZERO,
+};
+
+static const enum index item_nvgre[] = {
+ ITEM_NVGRE_TNI,
+ ITEM_NEXT,
+ ZERO,
+};
+
static const enum index item_mpls[] = {
ITEM_MPLS_LABEL,
ITEM_NEXT,
@@ -1297,6 +1315,34 @@ static const struct token token_list[] = {
.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
},
+ [ITEM_E_TAG] = {
+ .name = "e_tag",
+ .help = "match E-Tag header",
+ .priv = PRIV_ITEM(E_TAG, sizeof(struct rte_flow_item_e_tag)),
+ .next = NEXT(item_e_tag),
+ .call = parse_vc,
+ },
+ [ITEM_E_TAG_GRP_ECID_B] = {
+ .name = "grp_ecid_b",
+ .help = "GRP and E-CID base",
+ .next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
+ rsvd_grp_ecid_b,
+ "\x3f\xff")),
+ },
+ [ITEM_NVGRE] = {
+ .name = "nvgre",
+ .help = "match NVGRE header",
+ .priv = PRIV_ITEM(NVGRE, sizeof(struct rte_flow_item_nvgre)),
+ .next = NEXT(item_nvgre),
+ .call = parse_vc,
+ },
+ [ITEM_NVGRE_TNI] = {
+ .name = "tni",
+ .help = "virtual subnet ID",
+ .next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
+ },
[ITEM_MPLS] = {
.name = "mpls",
.help = "match MPLS header",
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 9bca9ec..b587ba9 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -863,6 +863,32 @@ Matches a VXLAN header (RFC 7348).
- ``rsvd1``: reserved, normally 0x00.
- Default ``mask`` matches VNI only.
+Item: ``E_TAG``
+^^^^^^^^^^^^^^^
+
+Matches an IEEE 802.1BR E-Tag header.
+
+- ``tpid``: tag protocol identifier (0x893F)
+- ``epcp_edei_in_ecid_b``: E-Tag control information (E-TCI), E-PCP (3b),
+ E-DEI (1b), ingress E-CID base (12b).
+- ``rsvd_grp_ecid_b``: reserved (2b), GRP (2b), E-CID base (12b).
+- ``in_ecid_e``: ingress E-CID ext.
+- ``ecid_e``: E-CID ext.
+- Default ``mask`` simultaneously matches GRP and E-CID base.
+
+Item: ``NVGRE``
+^^^^^^^^^^^^^^^
+
+Matches a NVGRE header (RFC 7637).
+
+- ``c_k_s_rsvd0_ver``: checksum (1b), undefined (1b), key bit (1b),
+ sequence number (1b), reserved 0 (9b), version (3b). This field must have
+ value 0x2000 according to RFC 7637.
+- ``protocol``: protocol type (0x6558).
+- ``tni``: virtual subnet ID.
+- ``flow_id``: flow ID.
+- Default ``mask`` matches TNI only.
+
Item: ``MPLS``
^^^^^^^^^^^^^^
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index ddd1d92..1aea101 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2537,6 +2537,14 @@ This section lists supported pattern items and their attributes, if any.
- ``vni {unsigned}``: VXLAN identifier.
+- ``e_tag``: match IEEE 802.1BR E-Tag header.
+
+ - ``grp_ecid_b {unsigned}``: GRP and E-CID base.
+
+- ``nvgre``: match NVGRE header.
+
+ - ``tni {unsigned}``: virtual subnet ID.
+
- ``mpls``: match MPLS header.
- ``label {unsigned}``: MPLS label.
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index abd4c6a..c47edbc 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -49,6 +49,7 @@
#include <rte_sctp.h>
#include <rte_tcp.h>
#include <rte_udp.h>
+#include <rte_byteorder.h>
#ifdef __cplusplus
extern "C" {
@@ -620,6 +621,19 @@ struct rte_flow_item_e_tag {
uint8_t ecid_e; /**< E-CID ext. */
};
+/** Default mask for RTE_FLOW_ITEM_TYPE_E_TAG. */
+#ifndef __cplusplus
+static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask = {
+#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
+ .rsvd_grp_ecid_b = 0x3fff,
+#elif RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
+ .rsvd_grp_ecid_b = 0xff3f,
+#else
+#error Unsupported endianness.
+#endif
+};
+#endif
+
/**
* RTE_FLOW_ITEM_TYPE_NVGRE.
*
@@ -638,6 +652,13 @@ struct rte_flow_item_nvgre {
uint8_t flow_id; /**< Flow ID. */
};
+/** Default mask for RTE_FLOW_ITEM_TYPE_NVGRE. */
+#ifndef __cplusplus
+static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask = {
+ .tni = "\xff\xff\xff",
+};
+#endif
+
/**
* RTE_FLOW_ITEM_TYPE_MPLS.
*
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 06/13] mbuf: fix missing includes in exported header
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
0 siblings, 0 replies; 66+ messages in thread
From: Olivier Matz @ 2017-04-25 9:56 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dev, stable
On Tue, 25 Apr 2017 10:30:00 +0200, Adrien Mazarguil <adrien.mazarguil@6wind.com> wrote:
> This commit addresses the following errors:
>
> In file included from /tmp/check-includes.sh.681.c:1:0:
> build/include/rte_mbuf_ptype.h:587:35: error: unknown type name 'uint32_t'
> [...]
> build/include/rte_mbuf_ptype.h:662:51: error: unknown type name 'size_t'
> [...]
>
> Fixes: 288541c8ff9e ("mbuf: add functions to dump packet type")
>
> Cc: stable@dpdk.org
> Cc: Olivier Matz <olivier.matz@6wind.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (12 preceding siblings ...)
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 ` Ferruh Yigit
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
14 siblings, 0 replies; 66+ messages in thread
From: Ferruh Yigit @ 2017-04-25 10:04 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dev
On 4/25/2017 9:29 AM, Adrien Mazarguil wrote:
> This series addresses the remaining issues seen by check-includes.sh in
> exported headers. Most of them may cause compilation errors in user
> applications:
>
> - Dependencies on missing includes.
> - Non-standard C/C++ constructs usage without associated safeties.
> - Missing C++ awareness blocks.
>
> It also addresses the incomplete implementation of E-Tag and NVGRE flow API
> pattern items.
>
> Changes in v2:
>
> - Fixed (still) incomplete E-tag and NVGRE flow API documentation.
Hi Adrien,
Thanks for fixing this.
> - Renamed E-Tag item parameter "ecid_b" to "grp_ecid_b" in testpmd, to
> reflect that both fields are set at once.
> - Fixed remaining compilation issue with RTE_LIBRTE_EVENTDEV_DEBUG.
> - Fixed avp include to avoid kernel module compilation issue pointed out
> by Allain.
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH v2 11/13] ethdev: fix C++ errors in flow API
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 ` Shahaf Shuler
0 siblings, 0 replies; 66+ messages in thread
From: Shahaf Shuler @ 2017-04-25 11:35 UTC (permalink / raw)
To: Adrien Mazarguil, dev; +Cc: stable
Tuesday, April 25, 2017 11:30 AM, Adrien Mazarguil:
> This commit addresses the following compilation errors:
>
> In file included from build/include/rte_flow_driver.h:50:0,
> from /tmp/check-includes.sh.1397.cc:1:
> build/include/rte_flow.h:428:2: error: expected primary-expression before
> '.' token
> [...]
> build/include/rte_flow.h:469:1: sorry, unimplemented: non-trivial
> designated initializers not supported [...]
>
> C++ does not support the C99-style designated initializers used in this
> file for the default item masks. While the resulting symbols are primarily
> useful to PMDs (written in C), they are exposed as part of the public API for
> documentation purposes and to assist application writers.
>
> Considering that:
>
> - using pre-C99 initialization style for compatibility with C++ would
> render them difficult to understand (all struct members must be
> initialized)
> - using both initialization styles would be needlessly verbose
> - not exposing them at all would defeat their purpose
> - applications do not normally need these symbols at run time
>
> This commit hides these symbols from C++ applications. Specific C++
> initializers will be added later if necessary.
>
> Fixes: 6de5c0f1302c ("ethdev: define default item masks in flow API")
>
> Cc: stable@dpdk.org
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
> ---
> lib/librte_ether/rte_flow.h | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index
> 7749491..bc7bc45 100644
> --- a/lib/librte_ether/rte_flow.h
> +++ b/lib/librte_ether/rte_flow.h
> @@ -314,9 +314,11 @@ struct rte_flow_item_any { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_ANY. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_any rte_flow_item_any_mask = {
> .num = 0x00000000,
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_VF
> @@ -341,9 +343,11 @@ struct rte_flow_item_vf { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_VF. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_vf rte_flow_item_vf_mask = {
> .id = 0x00000000,
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_PORT
> @@ -370,9 +374,11 @@ struct rte_flow_item_port { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_PORT. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_port rte_flow_item_port_mask = {
> .index = 0x00000000,
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_RAW
> @@ -403,6 +409,7 @@ struct rte_flow_item_raw { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_RAW. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_raw rte_flow_item_raw_mask = {
> .relative = 1,
> .search = 1,
> @@ -411,6 +418,7 @@ static const struct rte_flow_item_raw
> rte_flow_item_raw_mask = {
> .limit = 0xffff,
> .length = 0xffff,
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_ETH
> @@ -424,11 +432,13 @@ struct rte_flow_item_eth { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_ETH. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_eth rte_flow_item_eth_mask = {
> .dst.addr_bytes = "\xff\xff\xff\xff\xff\xff",
> .src.addr_bytes = "\xff\xff\xff\xff\xff\xff",
> .type = 0x0000,
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_VLAN
> @@ -444,10 +454,12 @@ struct rte_flow_item_vlan { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_VLAN. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_vlan rte_flow_item_vlan_mask = {
> .tpid = 0x0000,
> .tci = 0xffff,
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_IPV4
> @@ -461,12 +473,14 @@ struct rte_flow_item_ipv4 { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_IPV4. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask = {
> .hdr = {
> .src_addr = 0xffffffff,
> .dst_addr = 0xffffffff,
> },
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_IPV6.
> @@ -480,6 +494,7 @@ struct rte_flow_item_ipv6 { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_IPV6. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask = {
> .hdr = {
> .src_addr =
> @@ -490,6 +505,7 @@ static const struct rte_flow_item_ipv6
> rte_flow_item_ipv6_mask = {
> "\xff\xff\xff\xff\xff\xff\xff\xff",
> },
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_ICMP.
> @@ -501,12 +517,14 @@ struct rte_flow_item_icmp { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_ICMP. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_icmp rte_flow_item_icmp_mask = {
> .hdr = {
> .icmp_type = 0xff,
> .icmp_code = 0xff,
> },
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_UDP.
> @@ -518,12 +536,14 @@ struct rte_flow_item_udp { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_UDP. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_udp rte_flow_item_udp_mask = {
> .hdr = {
> .src_port = 0xffff,
> .dst_port = 0xffff,
> },
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_TCP.
> @@ -535,12 +555,14 @@ struct rte_flow_item_tcp { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_TCP. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_tcp rte_flow_item_tcp_mask = {
> .hdr = {
> .src_port = 0xffff,
> .dst_port = 0xffff,
> },
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_SCTP.
> @@ -552,12 +574,14 @@ struct rte_flow_item_sctp { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_SCTP. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_sctp rte_flow_item_sctp_mask = {
> .hdr = {
> .src_port = 0xffff,
> .dst_port = 0xffff,
> },
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_VXLAN.
> @@ -572,9 +596,11 @@ struct rte_flow_item_vxlan { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask = {
> .vni = "\xff\xff\xff",
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_E_TAG.
> --
> 2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 12/13] ethdev: fix C++ errors in flow API (MPLS, GRE)
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
0 siblings, 0 replies; 66+ messages in thread
From: Shahaf Shuler @ 2017-04-25 11:37 UTC (permalink / raw)
To: Adrien Mazarguil, dev
Tuesday, April 25, 2017 11:30 AM, Adrien Mazarguil:
> This commit addresses the following compilation errors:
>
> In file included from build/include/rte_flow_driver.h:50:0,
> from /tmp/check-includes.sh.1397.cc:1:
> build/include/rte_flow.h:631:1: error: C99 designator 'label_tc_s' outside
> aggregate initializer
> [...]
> build/include/rte_flow.h:631:1: error: initializer-string for array of
> chars is too long [-fpermissive]
> [...]
> build/include/rte_flow.h:650:1: sorry, unimplemented: non-trivial
> designated initializers not supported [...]
>
> C++ does not support the C99-style designated initializers used in this
> file for the default item masks. While the resulting symbols are primarily
> useful to PMDs (written in C), they are exposed as part of the public API for
> documentation purposes and to assist application writers.
>
> Considering that:
>
> - using pre-C99 initialization style for compatibility with C++ would
> render them difficult to understand (all struct members must be
> initialized)
> - using both initialization styles would be needlessly verbose
> - not exposing them at all would defeat their purpose
> - applications do not normally need these symbols at run time
>
> This commit hides these symbols from C++ applications. Specific C++
> initializers will be added later if necessary.
>
> Fixes: 7cd048321d1d ("ethdev: add MPLS and GRE flow API items")
>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
> ---
> lib/librte_ether/rte_flow.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index
> bc7bc45..abd4c6a 100644
> --- a/lib/librte_ether/rte_flow.h
> +++ b/lib/librte_ether/rte_flow.h
> @@ -652,9 +652,11 @@ struct rte_flow_item_mpls { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_MPLS. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_mpls rte_flow_item_mpls_mask = {
> .label_tc_s = "\xff\xff\xf0",
> };
> +#endif
>
> /**
> * RTE_FLOW_ITEM_TYPE_GRE.
> @@ -671,9 +673,11 @@ struct rte_flow_item_gre { };
>
> /** Default mask for RTE_FLOW_ITEM_TYPE_GRE. */
> +#ifndef __cplusplus
> static const struct rte_flow_item_gre rte_flow_item_gre_mask = {
> .protocol = 0xffff,
> };
> +#endif
>
> /**
> * Matching pattern item definition.
> --
> 2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers
2017-04-25 8:30 ` [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers Adrien Mazarguil
@ 2017-04-25 12:31 ` Legacy, Allain
2017-04-25 12:49 ` Adrien Mazarguil
0 siblings, 1 reply; 66+ messages in thread
From: Legacy, Allain @ 2017-04-25 12:31 UTC (permalink / raw)
To: Adrien Mazarguil, dev; +Cc: Peters, Matt
> -----Original Message-----
> From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> Sent: Tuesday, April 25, 2017 4:30 AM
<...>
>
> +#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
I compiled this in our environment and found a couple of additional issues. I apologize... I should have done that on the first pass. It should actually look like this to handle both userspace and kernel compiles:
#ifdef __KERNEL__
#include <linux/if.h>
#define RTE_STD_C11
#else
#include <stdint.h>
#include <rte_common.h>
#include <rte_memory.h>
#include <rte_ether.h>
#include <rte_atomic.h>
#endif
1) stdint.h needs to be moved in to the #else, and
2) RTE_STD_C11 needs to be included in the #ifdef __KERNEL__.
<..>
> 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>
Would you mind changing the brackets (<>) to quotes ("") since this is a local include file?
#include "rte_avp_common.h"
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers
2017-04-25 12:31 ` Legacy, Allain
@ 2017-04-25 12:49 ` Adrien Mazarguil
2017-04-25 13:00 ` Legacy, Allain
0 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 12:49 UTC (permalink / raw)
To: Legacy, Allain; +Cc: dev, Peters, Matt
On Tue, Apr 25, 2017 at 12:31:56PM +0000, Legacy, Allain wrote:
> > -----Original Message-----
> > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> > Sent: Tuesday, April 25, 2017 4:30 AM
> <...>
> >
> > +#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
>
> I compiled this in our environment and found a couple of additional issues. I apologize... I should have done that on the first pass. It should actually look like this to handle both userspace and kernel compiles:
>
> #ifdef __KERNEL__
> #include <linux/if.h>
> #define RTE_STD_C11
> #else
> #include <stdint.h>
> #include <rte_common.h>
> #include <rte_memory.h>
> #include <rte_ether.h>
> #include <rte_atomic.h>
> #endif
>
> 1) stdint.h needs to be moved in to the #else, and
OK, will update.
> 2) RTE_STD_C11 needs to be included in the #ifdef __KERNEL__.
Missed that one, however I suggest either:
#ifndef __KERNEL__ around RTE_STD_C11
or using __extension__ directly. Which do you prefer?
By the way, is the kernel module that depends on rte_avp_common.h available
somewhere to validate compilation against it?
> <..>
> > 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>
>
> Would you mind changing the brackets (<>) to quotes ("") since this is a local include file?
>
> #include "rte_avp_common.h"
I will update it.
--
Adrien Mazarguil
6WIND
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers
2017-04-25 12:49 ` Adrien Mazarguil
@ 2017-04-25 13:00 ` Legacy, Allain
2017-04-25 14:48 ` Adrien Mazarguil
0 siblings, 1 reply; 66+ messages in thread
From: Legacy, Allain @ 2017-04-25 13:00 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dev, Peters, Matt
> -----Original Message-----
> From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> Sent: Tuesday, April 25, 2017 8:50 AM
<...>
> > 2) RTE_STD_C11 needs to be included in the #ifdef __KERNEL__.
>
> Missed that one, however I suggest either:
>
> #ifndef __KERNEL__ around RTE_STD_C11
>
> or using __extension__ directly. Which do you prefer?
I would prefer if it was done as it is done in rte_kni_common.h to provide consistency with other similar files. Like this:
#ifdef __KERNEL__
#include <linux/if.h>
#define RTE_STD_C11
#else
#include <rte_common.h>
#endif
...but if you disagree then I prefer the #ifndef __KERNEL__ option.
>
> By the way, is the kernel module that depends on rte_avp_common.h
> available somewhere to validate compilation against it?
There is an older version of the module available on github, but it has not been updated since the AVP driver has been included in the DPDK. Since the AVP directory and files were significantly changed in order to meet the requirements of the DPDK it won't be much use to you. Until we can update it please make sure both Matt Peters and I are CC'd on the patch requests and we'll confirm compilation as quickly as possible.
> > Would you mind changing the brackets (<>) to quotes ("") since this is a
> local include file?
> >
> > #include "rte_avp_common.h"
>
> I will update it.
Thank you.
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers
2017-04-25 13:00 ` Legacy, Allain
@ 2017-04-25 14:48 ` Adrien Mazarguil
2017-04-25 14:54 ` Legacy, Allain
0 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-25 14:48 UTC (permalink / raw)
To: Legacy, Allain; +Cc: dev, Peters, Matt
On Tue, Apr 25, 2017 at 01:00:46PM +0000, Legacy, Allain wrote:
> > -----Original Message-----
> > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> > Sent: Tuesday, April 25, 2017 8:50 AM
> <...>
> > > 2) RTE_STD_C11 needs to be included in the #ifdef __KERNEL__.
> >
> > Missed that one, however I suggest either:
> >
> > #ifndef __KERNEL__ around RTE_STD_C11
> >
> > or using __extension__ directly. Which do you prefer?
>
> I would prefer if it was done as it is done in rte_kni_common.h to provide consistency with other similar files. Like this:
>
> #ifdef __KERNEL__
> #include <linux/if.h>
> #define RTE_STD_C11
> #else
> #include <rte_common.h>
> #endif
>
> ...but if you disagree then I prefer the #ifndef __KERNEL__ option.
You're right in fact, I did not remember that was the method used for
KNI. Let's keep your suggestion.
> >
> > By the way, is the kernel module that depends on rte_avp_common.h
> > available somewhere to validate compilation against it?
>
> There is an older version of the module available on github, but it has not been updated since the AVP driver has been included in the DPDK. Since the AVP directory and files were significantly changed in order to meet the requirements of the DPDK it won't be much use to you. Until we can update it please make sure both Matt Peters and I are CC'd on the patch requests and we'll confirm compilation as quickly as possible.
>
>
> > > Would you mind changing the brackets (<>) to quotes ("") since this is a
> > local include file?
> > >
> > > #include "rte_avp_common.h"
> >
> > I will update it.
>
>
> Thank you.
Can I add your acked-by line directly assuming all the above is done as
described?
--
Adrien Mazarguil
6WIND
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers
2017-04-25 14:48 ` Adrien Mazarguil
@ 2017-04-25 14:54 ` Legacy, Allain
0 siblings, 0 replies; 66+ messages in thread
From: Legacy, Allain @ 2017-04-25 14:54 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dev, Peters, Matt
> -----Original Message-----
> From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> Sent: Tuesday, April 25, 2017 10:49 AM
<...>
> > Thank you.
>
> Can I add your acked-by line directly assuming all the above is done as
> described?
Yes.
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 02/13] eventdev: fix errors with strict compilation flags
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
0 siblings, 1 reply; 66+ messages in thread
From: De Lara Guarch, Pablo @ 2017-04-25 15:31 UTC (permalink / raw)
To: Adrien Mazarguil, dev; +Cc: Jerin Jacob
Hi Adrien,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Adrien Mazarguil
> Sent: Tuesday, April 25, 2017 9:30 AM
> To: dev@dpdk.org
> Cc: Jerin Jacob
> Subject: [dpdk-dev] [PATCH v2 02/13] eventdev: fix errors with strict
> compilation flags
>
> Exported headers must allow compilation with the strictest flags. This
> commit addresses the following errors:
>
> In file included from build/include/rte_eventdev_pmd.h:55:0,
> from /tmp/check-includes.sh.25816.c:1:
> build/include/rte_eventdev.h:908:8: error: struct has no named members
> [-Werror=pedantic]
> [...]
> In file included from /tmp/check-includes.sh.25816.c:1:0:
> build/include/rte_eventdev_pmd.h:65:35: error: ISO C does not permit
> named
> variadic macros [-Werror=variadic-macros]
> [...]
>
> Also enabling RTE_LIBRTE_EVENTDEV_DEBUG causes redefinitions:
>
> In file included from /tmp/check-includes.sh.18921.c:27:0:
> build/include/rte_eventdev_pmd.h:58:0: error:
> "RTE_PMD_DEBUG_TRACE"
> redefined [-Werror]
> [...]
>
> Rely on the rte_ethdev.h version instead.
>
> Fixes: 71f238432865 ("eventdev: introduce event driven programming
> model")
> Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs")
>
> Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
I am seeing the following error due to this patch:
In file included from /root/tmp/dpdk-17.05-rc2/lib/librte_eventdev/rte_eventdev.c:62:0:
/root/tmp/dpdk-17.05-rc2/lib/librte_eventdev/rte_eventdev_pmd.h:54:24: fatal error: rte_ethdev.h: No such file or directory
#include <rte_ethdev.h>
It only happens when I compile with "-j", so it looks like dependencies have to be fixed?
Thanks,
Pablo
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 01/13] crypto/scheduler: fix missing includes
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
0 siblings, 0 replies; 66+ messages in thread
From: Zhang, Roy Fan @ 2017-04-25 15:38 UTC (permalink / raw)
To: Adrien Mazarguil, dev
> -----Original Message-----
> From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> Sent: Tuesday, April 25, 2017 9:30 AM
> To: dev@dpdk.org
> Cc: Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Subject: [PATCH v2 01/13] crypto/scheduler: fix missing includes
>
> This commit addresses the following compilation errors:
>
> In file included from build/include/rte_cryptodev_scheduler.h:37:0,
> from /tmp/check-includes.sh.5355.c:1:
> build/include/rte_cryptodev_scheduler_operations.h:43:30: error: unknown
> type name 'uint8_t' struct rte_cryptodev *dev, uint8_t slave_id); [...]
>
> Fixes: 097ab0bac017 ("crypto/scheduler: add API")
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Thanks for the patch, Adrien.
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 04/13] net: fix missing include in exported header
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 04/13] net: fix missing include " Adrien Mazarguil
@ 2017-04-25 16:13 ` Singh, Jasvinder
0 siblings, 0 replies; 66+ messages in thread
From: Singh, Jasvinder @ 2017-04-25 16:13 UTC (permalink / raw)
To: Adrien Mazarguil, dev
-----Original Message-----
From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
Sent: Tuesday, April 25, 2017 9:30 AM
To: dev@dpdk.org
Cc: Singh, Jasvinder <jasvinder.singh@intel.com>
Subject: [PATCH v2 04/13] net: fix missing include in exported header
This commit addresses the following errors:
In file included from /tmp/check-includes.sh.18889.c:1:0:
build/include/rte_net_crc.h:86:1: error: unknown type name 'uint32_t'
[...]
Fixes: 986ff526fb84 ("net: add CRC computation API")
Cc: Jasvinder Singh <jasvinder.singh@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
Thanks.
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v2 02/13] eventdev: fix errors with strict compilation flags
2017-04-25 15:31 ` De Lara Guarch, Pablo
@ 2017-04-26 7:06 ` Adrien Mazarguil
0 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 7:06 UTC (permalink / raw)
To: De Lara Guarch, Pablo; +Cc: dev, Jerin Jacob
On Tue, Apr 25, 2017 at 03:31:45PM +0000, De Lara Guarch, Pablo wrote:
> Hi Adrien,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Adrien Mazarguil
> > Sent: Tuesday, April 25, 2017 9:30 AM
> > To: dev@dpdk.org
> > Cc: Jerin Jacob
> > Subject: [dpdk-dev] [PATCH v2 02/13] eventdev: fix errors with strict
> > compilation flags
> >
> > Exported headers must allow compilation with the strictest flags. This
> > commit addresses the following errors:
> >
> > In file included from build/include/rte_eventdev_pmd.h:55:0,
> > from /tmp/check-includes.sh.25816.c:1:
> > build/include/rte_eventdev.h:908:8: error: struct has no named members
> > [-Werror=pedantic]
> > [...]
> > In file included from /tmp/check-includes.sh.25816.c:1:0:
> > build/include/rte_eventdev_pmd.h:65:35: error: ISO C does not permit
> > named
> > variadic macros [-Werror=variadic-macros]
> > [...]
> >
> > Also enabling RTE_LIBRTE_EVENTDEV_DEBUG causes redefinitions:
> >
> > In file included from /tmp/check-includes.sh.18921.c:27:0:
> > build/include/rte_eventdev_pmd.h:58:0: error:
> > "RTE_PMD_DEBUG_TRACE"
> > redefined [-Werror]
> > [...]
> >
> > Rely on the rte_ethdev.h version instead.
> >
> > Fixes: 71f238432865 ("eventdev: introduce event driven programming
> > model")
> > Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs")
> >
> > Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
>
> I am seeing the following error due to this patch:
> In file included from /root/tmp/dpdk-17.05-rc2/lib/librte_eventdev/rte_eventdev.c:62:0:
> /root/tmp/dpdk-17.05-rc2/lib/librte_eventdev/rte_eventdev_pmd.h:54:24: fatal error: rte_ethdev.h: No such file or directory
> #include <rte_ethdev.h>
>
> It only happens when I compile with "-j", so it looks like dependencies have to be fixed?
You're right, actually rte_eventdev_pmd.h is not even supposed to have a
dependency on rte_ethdev.h. The problem comes from RTE_FUNC_PTR_OR_ERR_RET()
defined in rte_dev.h, itself relying on the RTE_PMD_DEBUG_TRACE() macro
without any kind of dependency.
This makes no sense, RTE_PMD_DEBUG_TRACE() should be defined along with
rte_pmd_debug_trace() in rte_dev.h. I'll move this fix to a separate commit
to remove all duplicate definitions.
--
Adrien Mazarguil
6WIND
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH 05/13] vhost: fix errors with strict compilation flags
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
1 sibling, 0 replies; 66+ messages in thread
From: Maxime Coquelin @ 2017-04-26 7:32 UTC (permalink / raw)
To: Adrien Mazarguil, dev; +Cc: Yuanhan Liu
On 04/24/2017 05:52 PM, Adrien Mazarguil wrote:
> Exported headers must allow compilation with the strictest flags. This
> commit addresses the following errors:
>
> In file included from /tmp/check-includes.sh.20132.c:1:0:
> build/include/rte_vhost.h:73:30: error: ISO C forbids zero-size array
> 'regions' [-Werror=pedantic]
> [...]
>
> Also:
>
> - Add C++ awareness to rte_vhost.h for consistency with rte_eth_vhost.h.
> - Move Linux includes into C++ block to prevent linking issues with
> exported symbols.
> - Update check-includes.sh following the removal of rte_virtio_net.h.
>
> Finally, update check-includes.sh to ignore rte_vhost.h and rte_eth_vhost.h
> from now on since the Linux headers they depend on are not clean enough:
>
> In file included from /usr/include/linux/vhost.h:17:0,
> from build/include/rte_vhost.h:43,
> from build/include/rte_eth_vhost.h:44,
> from /tmp/check-includes.sh.20132.c:1:
> /usr/include/linux/virtio_ring.h: In function 'vring_init':
> /usr/include/linux/virtio_ring.h:146:16: error: pointer of type 'void *'
> used in arithmetic [-Werror=pointer-arith]
> [...]
> In file included from build/include/rte_vhost.h:43:0,
> from build/include/rte_eth_vhost.h:44,
> from /tmp/check-includes.sh.20132.c:1:
> /usr/include/linux/vhost.h: At top level:
> /usr/include/linux/vhost.h:73:3: error: ISO C99 doesn't support unnamed
> structs/unions [-Werror=pedantic]
> [...]
>
> Fixes: eb32247457fe ("vhost: export guest memory regions")
> Fixes: a798beb47c8e ("vhost: rename header file")
>
> Cc: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> ---
> devtools/check-includes.sh | 4 +++-
> lib/librte_vhost/rte_vhost.h | 16 +++++++++++++---
> 2 files changed, 16 insertions(+), 4 deletions(-)
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 00/14] Fixes for exported headers
2017-04-25 8:29 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Adrien Mazarguil
` (13 preceding siblings ...)
2017-04-25 10:04 ` [dpdk-dev] [PATCH v2 00/13] Fixes for exported headers Ferruh Yigit
@ 2017-04-26 12:07 ` Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 01/14] crypto/scheduler: fix missing includes Adrien Mazarguil
` (14 more replies)
14 siblings, 15 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev
This series addresses the remaining issues seen by check-includes.sh in
exported headers. Most of them may cause compilation errors in user
applications:
- Dependencies on missing includes.
- Non-standard C/C++ constructs usage without associated safeties.
- Missing C++ awareness blocks.
It also addresses the incomplete implementation of E-Tag and NVGRE flow API
pattern items.
Changes in v2:
- Fixed (still) incomplete E-tag and NVGRE flow API documentation.
- Renamed E-Tag item parameter "ecid_b" to "grp_ecid_b" in testpmd, to
reflect that both fields are set at once.
- Fixed remaining compilation issue with RTE_LIBRTE_EVENTDEV_DEBUG.
- Fixed avp include to avoid kernel module compilation issue pointed out
by Allain.
Changes in v3:
- Reverted regression introduced in v2 related to RTE_PMD_DEBUG_TRACE() and
RTE_LIBRTE_EVENTDEV_DEBUG.
- Addressed original issue with RTE_PMD_DEBUG_TRACE() in a new separate
commit.
- Fixed remaining regression on the kernel side of avp.
Adrien Mazarguil (14):
crypto/scheduler: fix missing includes
eventdev: fix errors with strict compilation flags
latency: fix missing includes in exported header
net: fix missing include in exported header
vhost: fix errors with strict compilation flags
mbuf: fix missing includes in exported header
net/avp: fix errors in exported headers
bitrate: fix errors in exported header
efd: fix missing include in exported header
metrics: fix errors in exported header
ethdev: fix C++ errors in flow API
ethdev: fix C++ errors in flow API (MPLS, GRE)
ethdev: fix incomplete items in flow API
eal: fix debug macro redefinition
app/test-pmd/cmdline_flow.c | 46 ++++++++++++++++++
devtools/check-includes.sh | 4 +-
doc/guides/prog_guide/rte_flow.rst | 26 ++++++++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 8 +++
.../crypto/scheduler/rte_cryptodev_scheduler.h | 1 +
.../rte_cryptodev_scheduler_operations.h | 1 +
drivers/net/avp/rte_avp_common.h | 18 ++++++-
drivers/net/avp/rte_avp_fifo.h | 12 +++++
lib/librte_bitratestats/rte_bitrate.h | 10 ++++
lib/librte_cryptodev/rte_cryptodev_pmd.h | 8 ---
lib/librte_eal/common/include/rte_dev.h | 14 ++++++
lib/librte_efd/rte_efd.h | 2 +
lib/librte_ether/rte_ethdev.h | 9 ----
lib/librte_ether/rte_flow.h | 51 ++++++++++++++++++++
lib/librte_eventdev/rte_eventdev.h | 3 +-
lib/librte_eventdev/rte_eventdev_pmd.h | 23 ++++-----
lib/librte_latencystats/rte_latencystats.h | 2 +
lib/librte_mbuf/rte_mbuf_ptype.h | 3 ++
lib/librte_metrics/rte_metrics.h | 10 ++++
lib/librte_net/rte_net_crc.h | 2 +
lib/librte_vhost/rte_vhost.h | 16 ++++--
21 files changed, 231 insertions(+), 38 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 01/14] crypto/scheduler: fix missing includes
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
@ 2017-04-26 12:07 ` Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 02/14] eventdev: fix errors with strict compilation flags Adrien Mazarguil
` (13 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev
This commit addresses the following compilation errors:
In file included from build/include/rte_cryptodev_scheduler.h:37:0,
from /tmp/check-includes.sh.5355.c:1:
build/include/rte_cryptodev_scheduler_operations.h:43:30: error: unknown
type name 'uint8_t' struct rte_cryptodev *dev, uint8_t slave_id);
[...]
Fixes: 097ab0bac017 ("crypto/scheduler: add API")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/crypto/scheduler/rte_cryptodev_scheduler.h | 1 +
drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.h b/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
index 7a34d0a..2ba6e47 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.h
@@ -46,6 +46,7 @@
* operation: round robin, packet-size based, and fail-over.
*/
+#include <stdint.h>
#include "rte_cryptodev_scheduler_operations.h"
#ifdef __cplusplus
diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h b/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h
index 42fe9e6..719165c 100644
--- a/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h
+++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler_operations.h
@@ -34,6 +34,7 @@
#ifndef _RTE_CRYPTO_SCHEDULER_OPERATIONS_H
#define _RTE_CRYPTO_SCHEDULER_OPERATIONS_H
+#include <rte_cryptodev.h>
#ifdef __cplusplus
extern "C" {
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 02/14] eventdev: fix errors with strict compilation flags
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 ` 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
` (12 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev; +Cc: Jerin Jacob, De Lara Guarch, Pablo
Exported headers must allow compilation with the strictest flags. This
commit addresses the following errors:
In file included from build/include/rte_eventdev_pmd.h:55:0,
from /tmp/check-includes.sh.25816.c:1:
build/include/rte_eventdev.h:908:8: error: struct has no named members
[-Werror=pedantic]
[...]
In file included from /tmp/check-includes.sh.25816.c:1:0:
build/include/rte_eventdev_pmd.h:65:35: error: ISO C does not permit named
variadic macros [-Werror=variadic-macros]
[...]
Fixes: 71f238432865 ("eventdev: introduce event driven programming model")
Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs")
Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_eventdev/rte_eventdev.h | 3 +--
lib/librte_eventdev/rte_eventdev_pmd.h | 16 +++++++++-------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index b8ed6ef..20e7293 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -905,9 +905,9 @@ rte_event_dev_close(uint8_t dev_id);
* The generic *rte_event* structure to hold the event attributes
* for dequeue and enqueue operation
*/
+RTE_STD_C11
struct rte_event {
/** WORD0 */
- RTE_STD_C11
union {
uint64_t event;
/** Event attributes for dequeue or enqueue operation */
@@ -967,7 +967,6 @@ struct rte_event {
};
};
/** WORD1 */
- RTE_STD_C11
union {
uint64_t u64;
/**< Opaque 64-bit value */
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index a73dc91..988018f 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -62,16 +62,18 @@ extern "C" {
#endif
/* Logging Macros */
-#define RTE_EDEV_LOG_ERR(fmt, args...) \
- RTE_LOG(ERR, EVENTDEV, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
+#define RTE_EDEV_LOG_ERR(...) \
+ RTE_LOG(ERR, EVENTDEV, \
+ RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
-#define RTE_EDEV_LOG_DEBUG(fmt, args...) \
- RTE_LOG(DEBUG, EVENTDEV, "%s() line %u: " fmt "\n", \
- __func__, __LINE__, ## args)
+#define RTE_EDEV_LOG_DEBUG(...) \
+ RTE_LOG(DEBUG, EVENTDEV, \
+ RTE_FMT("%s() line %u: " RTE_FMT_HEAD(__VA_ARGS__,) "\n", \
+ __func__, __LINE__, RTE_FMT_TAIL(__VA_ARGS__,)))
#else
-#define RTE_EDEV_LOG_DEBUG(fmt, args...) (void)0
+#define RTE_EDEV_LOG_DEBUG(...) (void)0
#endif
/* Macros to check for valid device */
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 03/14] latency: fix missing includes in exported header
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 12:07 ` Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 04/14] net: fix missing include " Adrien Mazarguil
` (11 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev; +Cc: Reshma Pattan
This commit addresses the following errors:
In file included from build/include/rte_latencystats.h:43:0,
from /tmp/check-includes.sh.6580.c:1:
build/include/rte_metrics.h:91:2: error: unknown type name 'uint16_t'
[...]
In file included from /tmp/check-includes.sh.6580.c:1:0:
build/include/rte_latencystats.h:66:19: error: expected declaration
specifiers or '...' before '*' token
[...]
Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats")
Cc: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_latencystats/rte_latencystats.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_latencystats/rte_latencystats.h b/lib/librte_latencystats/rte_latencystats.h
index 6efeaf4..d85cf3a 100644
--- a/lib/librte_latencystats/rte_latencystats.h
+++ b/lib/librte_latencystats/rte_latencystats.h
@@ -40,7 +40,9 @@
* library to provide application and flow based latency stats.
*/
+#include <stdint.h>
#include <rte_metrics.h>
+#include <rte_mbuf.h>
#ifdef __cplusplus
extern "C" {
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 04/14] net: fix missing include in exported header
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (2 preceding siblings ...)
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 ` Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 05/14] vhost: fix errors with strict compilation flags Adrien Mazarguil
` (10 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev
This commit addresses the following errors:
In file included from /tmp/check-includes.sh.18889.c:1:0:
build/include/rte_net_crc.h:86:1: error: unknown type name 'uint32_t'
[...]
Fixes: 986ff526fb84 ("net: add CRC computation API")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
lib/librte_net/rte_net_crc.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_net/rte_net_crc.h b/lib/librte_net/rte_net_crc.h
index 76fd129..d22286c 100644
--- a/lib/librte_net/rte_net_crc.h
+++ b/lib/librte_net/rte_net_crc.h
@@ -34,6 +34,8 @@
#ifndef _RTE_NET_CRC_H_
#define _RTE_NET_CRC_H_
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 05/14] vhost: fix errors with strict compilation flags
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (3 preceding siblings ...)
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 04/14] net: fix missing include " Adrien Mazarguil
@ 2017-04-26 12:07 ` Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 06/14] mbuf: fix missing includes in exported header Adrien Mazarguil
` (9 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev
Exported headers must allow compilation with the strictest flags. This
commit addresses the following errors:
In file included from /tmp/check-includes.sh.20132.c:1:0:
build/include/rte_vhost.h:73:30: error: ISO C forbids zero-size array
'regions' [-Werror=pedantic]
[...]
Also:
- Add C++ awareness to rte_vhost.h for consistency with rte_eth_vhost.h.
- Move Linux includes into C++ block to prevent linking issues with
exported symbols.
- Update check-includes.sh following the removal of rte_virtio_net.h.
Finally, update check-includes.sh to ignore rte_vhost.h and rte_eth_vhost.h
from now on since the Linux headers they depend on are not clean enough:
In file included from /usr/include/linux/vhost.h:17:0,
from build/include/rte_vhost.h:43,
from build/include/rte_eth_vhost.h:44,
from /tmp/check-includes.sh.20132.c:1:
/usr/include/linux/virtio_ring.h: In function 'vring_init':
/usr/include/linux/virtio_ring.h:146:16: error: pointer of type 'void *'
used in arithmetic [-Werror=pointer-arith]
[...]
In file included from build/include/rte_vhost.h:43:0,
from build/include/rte_eth_vhost.h:44,
from /tmp/check-includes.sh.20132.c:1:
/usr/include/linux/vhost.h: At top level:
/usr/include/linux/vhost.h:73:3: error: ISO C99 doesn't support unnamed
structs/unions [-Werror=pedantic]
[...]
Fixes: eb32247457fe ("vhost: export guest memory regions")
Fixes: a798beb47c8e ("vhost: rename header file")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
devtools/check-includes.sh | 4 +++-
lib/librte_vhost/rte_vhost.h | 16 +++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/devtools/check-includes.sh b/devtools/check-includes.sh
index d65adc6..c4ec73f 100755
--- a/devtools/check-includes.sh
+++ b/devtools/check-includes.sh
@@ -109,10 +109,12 @@ include_dir=${1:-build/include}
'rte_byteorder_64.h' \
'generic/*' \
'exec-env/*' \
+ 'rte_vhost.h' \
+ 'rte_eth_vhost.h' \
}
: ${IGNORE_CXX= \
+ 'rte_vhost.h' \
'rte_eth_vhost.h' \
- 'rte_virtio_net.h' \
}
temp_cc=/tmp/${0##*/}.$$.c
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
index 7a586e4..605e47c 100644
--- a/lib/librte_vhost/rte_vhost.h
+++ b/lib/librte_vhost/rte_vhost.h
@@ -40,13 +40,19 @@
*/
#include <stdint.h>
-#include <linux/vhost.h>
-#include <linux/virtio_ring.h>
#include <sys/eventfd.h>
#include <rte_memory.h>
#include <rte_mempool.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These are not C++-aware. */
+#include <linux/vhost.h>
+#include <linux/virtio_ring.h>
+
#define RTE_VHOST_USER_CLIENT (1ULL << 0)
#define RTE_VHOST_USER_NO_RECONNECT (1ULL << 1)
#define RTE_VHOST_USER_DEQUEUE_ZERO_COPY (1ULL << 2)
@@ -70,7 +76,7 @@ struct rte_vhost_mem_region {
*/
struct rte_vhost_memory {
uint32_t nregions;
- struct rte_vhost_mem_region regions[0];
+ struct rte_vhost_mem_region regions[];
};
struct rte_vhost_vring {
@@ -426,4 +432,8 @@ int rte_vhost_get_mem_table(int vid, struct rte_vhost_memory **mem);
int rte_vhost_get_vhost_vring(int vid, uint16_t vring_idx,
struct rte_vhost_vring *vring);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_VHOST_H_ */
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 06/14] mbuf: fix missing includes in exported header
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (4 preceding siblings ...)
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 ` Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 07/14] net/avp: fix errors in exported headers Adrien Mazarguil
` (8 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev; +Cc: stable
This commit addresses the following errors:
In file included from /tmp/check-includes.sh.681.c:1:0:
build/include/rte_mbuf_ptype.h:587:35: error: unknown type name 'uint32_t'
[...]
build/include/rte_mbuf_ptype.h:662:51: error: unknown type name 'size_t'
[...]
Fixes: 288541c8ff9e ("mbuf: add functions to dump packet type")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_mbuf/rte_mbuf_ptype.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/librte_mbuf/rte_mbuf_ptype.h b/lib/librte_mbuf/rte_mbuf_ptype.h
index ff6de9d..a3269c4 100644
--- a/lib/librte_mbuf/rte_mbuf_ptype.h
+++ b/lib/librte_mbuf/rte_mbuf_ptype.h
@@ -91,6 +91,9 @@
* RTE_PTYPE_INNER_L4_UDP.
*/
+#include <stddef.h>
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 07/14] net/avp: fix errors in exported headers
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (5 preceding siblings ...)
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 ` Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 08/14] bitrate: fix errors in exported header Adrien Mazarguil
` (7 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev
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")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
---
drivers/net/avp/rte_avp_common.h | 18 +++++++++++++++++-
drivers/net/avp/rte_avp_fifo.h | 12 ++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/drivers/net/avp/rte_avp_common.h b/drivers/net/avp/rte_avp_common.h
index 31d763e..488d721 100644
--- a/drivers/net/avp/rte_avp_common.h
+++ b/drivers/net/avp/rte_avp_common.h
@@ -59,6 +59,17 @@
#ifdef __KERNEL__
#include <linux/if.h>
+#define RTE_STD_C11
+#else
+#include <stdint.h>
+#include <rte_common.h>
+#include <rte_memory.h>
+#include <rte_ether.h>
+#include <rte_atomic.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
#endif
/**
@@ -115,6 +126,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 +145,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 +425,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..803eb80 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
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 08/14] bitrate: fix errors in exported header
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (6 preceding siblings ...)
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 ` 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
` (6 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev; +Cc: Remy Horton
This commit addresses the following error:
In file included from /tmp/check-includes.sh.28023.c:1:0:
build/include/rte_bitrate.h:82:2: error: unknown type name 'uint8_t'
[...]
It also adds C++ awareness to rte_bitrate.h.
Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")
Cc: Remy Horton <remy.horton@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_bitratestats/rte_bitrate.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/librte_bitratestats/rte_bitrate.h b/lib/librte_bitratestats/rte_bitrate.h
index b9f11bd..15fc270 100644
--- a/lib/librte_bitratestats/rte_bitrate.h
+++ b/lib/librte_bitratestats/rte_bitrate.h
@@ -34,6 +34,12 @@
#ifndef _RTE_BITRATE_H_
#define _RTE_BITRATE_H_
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* Bitrate statistics data structure.
* This data structure is intentionally opaque.
@@ -81,4 +87,8 @@ int rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data);
int rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
uint8_t port_id);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _RTE_BITRATE_H_ */
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 09/14] efd: fix missing include in exported header
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (7 preceding siblings ...)
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 08/14] bitrate: fix errors in exported header Adrien Mazarguil
@ 2017-04-26 12:07 ` 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
` (5 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev; +Cc: stable, Byron Marohn, Pablo de Lara Guarch
This commit addresses the following compilation errors:
In file included from /tmp/check-includes.sh.8373.c:1:0:
build/include/rte_efd.h:133:9: error: unknown type name 'uint8_t'
[...]
Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Cc: stable@dpdk.org
Cc: Byron Marohn <byron.marohn@intel.com>
Cc: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_efd/rte_efd.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/librte_efd/rte_efd.h b/lib/librte_efd/rte_efd.h
index 6d31e18..1596863 100644
--- a/lib/librte_efd/rte_efd.h
+++ b/lib/librte_efd/rte_efd.h
@@ -40,6 +40,8 @@
* RTE EFD Table
*/
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 10/14] metrics: fix errors in exported header
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (8 preceding siblings ...)
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 09/14] efd: fix missing include " Adrien Mazarguil
@ 2017-04-26 12:07 ` 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
` (4 subsequent siblings)
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev; +Cc: Remy Horton
This commit addresses the following compilation errors:
In file included from /tmp/check-includes.sh.21060.c:1:0:
build/include/rte_metrics.h:91:2: error: unknown type name 'uint16_t'
[...]
It also adds C++ awareness to rte_metrics.h.
Fixes: 349950ddb9c5 ("metrics: add information metrics library")
Cc: Remy Horton <remy.horton@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_metrics/rte_metrics.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/librte_metrics/rte_metrics.h b/lib/librte_metrics/rte_metrics.h
index fd0154f..0fa3104 100644
--- a/lib/librte_metrics/rte_metrics.h
+++ b/lib/librte_metrics/rte_metrics.h
@@ -52,6 +52,12 @@
#ifndef _RTE_METRICS_H_
#define _RTE_METRICS_H_
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Maximum length of metric name (including null-terminator) */
#define RTE_METRICS_MAX_NAME_LEN 64
@@ -237,4 +243,8 @@ int rte_metrics_update_values(
const uint64_t *values,
uint32_t count);
+#ifdef __cplusplus
+}
+#endif
+
#endif
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 11/14] ethdev: fix C++ errors in flow API
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (9 preceding siblings ...)
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 10/14] metrics: fix errors " Adrien Mazarguil
@ 2017-04-26 12:07 ` Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 12/14] ethdev: fix C++ errors in flow API (MPLS, GRE) Adrien Mazarguil
` (3 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev; +Cc: stable
This commit addresses the following compilation errors:
In file included from build/include/rte_flow_driver.h:50:0,
from /tmp/check-includes.sh.1397.cc:1:
build/include/rte_flow.h:428:2: error: expected primary-expression before
'.' token
[...]
build/include/rte_flow.h:469:1: sorry, unimplemented: non-trivial
designated initializers not supported
[...]
C++ does not support the C99-style designated initializers used in this
file for the default item masks. While the resulting symbols are primarily
useful to PMDs (written in C), they are exposed as part of the public API
for documentation purposes and to assist application writers.
Considering that:
- using pre-C99 initialization style for compatibility with C++ would
render them difficult to understand (all struct members must be
initialized)
- using both initialization styles would be needlessly verbose
- not exposing them at all would defeat their purpose
- applications do not normally need these symbols at run time
This commit hides these symbols from C++ applications. Specific C++
initializers will be added later if necessary.
Fixes: 6de5c0f1302c ("ethdev: define default item masks in flow API")
Cc: stable@dpdk.org
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
lib/librte_ether/rte_flow.h | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index 7749491..bc7bc45 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -314,9 +314,11 @@ struct rte_flow_item_any {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_ANY. */
+#ifndef __cplusplus
static const struct rte_flow_item_any rte_flow_item_any_mask = {
.num = 0x00000000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_VF
@@ -341,9 +343,11 @@ struct rte_flow_item_vf {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_VF. */
+#ifndef __cplusplus
static const struct rte_flow_item_vf rte_flow_item_vf_mask = {
.id = 0x00000000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_PORT
@@ -370,9 +374,11 @@ struct rte_flow_item_port {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_PORT. */
+#ifndef __cplusplus
static const struct rte_flow_item_port rte_flow_item_port_mask = {
.index = 0x00000000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_RAW
@@ -403,6 +409,7 @@ struct rte_flow_item_raw {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_RAW. */
+#ifndef __cplusplus
static const struct rte_flow_item_raw rte_flow_item_raw_mask = {
.relative = 1,
.search = 1,
@@ -411,6 +418,7 @@ static const struct rte_flow_item_raw rte_flow_item_raw_mask = {
.limit = 0xffff,
.length = 0xffff,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_ETH
@@ -424,11 +432,13 @@ struct rte_flow_item_eth {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_ETH. */
+#ifndef __cplusplus
static const struct rte_flow_item_eth rte_flow_item_eth_mask = {
.dst.addr_bytes = "\xff\xff\xff\xff\xff\xff",
.src.addr_bytes = "\xff\xff\xff\xff\xff\xff",
.type = 0x0000,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_VLAN
@@ -444,10 +454,12 @@ struct rte_flow_item_vlan {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_VLAN. */
+#ifndef __cplusplus
static const struct rte_flow_item_vlan rte_flow_item_vlan_mask = {
.tpid = 0x0000,
.tci = 0xffff,
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_IPV4
@@ -461,12 +473,14 @@ struct rte_flow_item_ipv4 {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_IPV4. */
+#ifndef __cplusplus
static const struct rte_flow_item_ipv4 rte_flow_item_ipv4_mask = {
.hdr = {
.src_addr = 0xffffffff,
.dst_addr = 0xffffffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_IPV6.
@@ -480,6 +494,7 @@ struct rte_flow_item_ipv6 {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_IPV6. */
+#ifndef __cplusplus
static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask = {
.hdr = {
.src_addr =
@@ -490,6 +505,7 @@ static const struct rte_flow_item_ipv6 rte_flow_item_ipv6_mask = {
"\xff\xff\xff\xff\xff\xff\xff\xff",
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_ICMP.
@@ -501,12 +517,14 @@ struct rte_flow_item_icmp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_ICMP. */
+#ifndef __cplusplus
static const struct rte_flow_item_icmp rte_flow_item_icmp_mask = {
.hdr = {
.icmp_type = 0xff,
.icmp_code = 0xff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_UDP.
@@ -518,12 +536,14 @@ struct rte_flow_item_udp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_UDP. */
+#ifndef __cplusplus
static const struct rte_flow_item_udp rte_flow_item_udp_mask = {
.hdr = {
.src_port = 0xffff,
.dst_port = 0xffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_TCP.
@@ -535,12 +555,14 @@ struct rte_flow_item_tcp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_TCP. */
+#ifndef __cplusplus
static const struct rte_flow_item_tcp rte_flow_item_tcp_mask = {
.hdr = {
.src_port = 0xffff,
.dst_port = 0xffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_SCTP.
@@ -552,12 +574,14 @@ struct rte_flow_item_sctp {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_SCTP. */
+#ifndef __cplusplus
static const struct rte_flow_item_sctp rte_flow_item_sctp_mask = {
.hdr = {
.src_port = 0xffff,
.dst_port = 0xffff,
},
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_VXLAN.
@@ -572,9 +596,11 @@ struct rte_flow_item_vxlan {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_VXLAN. */
+#ifndef __cplusplus
static const struct rte_flow_item_vxlan rte_flow_item_vxlan_mask = {
.vni = "\xff\xff\xff",
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_E_TAG.
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 12/14] ethdev: fix C++ errors in flow API (MPLS, GRE)
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (10 preceding siblings ...)
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 ` Adrien Mazarguil
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 13/14] ethdev: fix incomplete items in flow API Adrien Mazarguil
` (2 subsequent siblings)
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev
This commit addresses the following compilation errors:
In file included from build/include/rte_flow_driver.h:50:0,
from /tmp/check-includes.sh.1397.cc:1:
build/include/rte_flow.h:631:1: error: C99 designator 'label_tc_s' outside
aggregate initializer
[...]
build/include/rte_flow.h:631:1: error: initializer-string for array of
chars is too long [-fpermissive]
[...]
build/include/rte_flow.h:650:1: sorry, unimplemented: non-trivial
designated initializers not supported
[...]
C++ does not support the C99-style designated initializers used in this
file for the default item masks. While the resulting symbols are primarily
useful to PMDs (written in C), they are exposed as part of the public API
for documentation purposes and to assist application writers.
Considering that:
- using pre-C99 initialization style for compatibility with C++ would
render them difficult to understand (all struct members must be
initialized)
- using both initialization styles would be needlessly verbose
- not exposing them at all would defeat their purpose
- applications do not normally need these symbols at run time
This commit hides these symbols from C++ applications. Specific C++
initializers will be added later if necessary.
Fixes: 7cd048321d1d ("ethdev: add MPLS and GRE flow API items")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
---
lib/librte_ether/rte_flow.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index bc7bc45..abd4c6a 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -652,9 +652,11 @@ struct rte_flow_item_mpls {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_MPLS. */
+#ifndef __cplusplus
static const struct rte_flow_item_mpls rte_flow_item_mpls_mask = {
.label_tc_s = "\xff\xff\xf0",
};
+#endif
/**
* RTE_FLOW_ITEM_TYPE_GRE.
@@ -671,9 +673,11 @@ struct rte_flow_item_gre {
};
/** Default mask for RTE_FLOW_ITEM_TYPE_GRE. */
+#ifndef __cplusplus
static const struct rte_flow_item_gre rte_flow_item_gre_mask = {
.protocol = 0xffff,
};
+#endif
/**
* Matching pattern item definition.
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 13/14] ethdev: fix incomplete items in flow API
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (11 preceding siblings ...)
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 ` 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
14 siblings, 1 reply; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev; +Cc: stable, Wei Zhao, Wenzhuo Lu
E-Tag and NVGRE pattern items have been added hastily without updating
documentation nor testpmd.
This commit also adds default masks for these items based on the ixgbe
implementation.
Fixes: 99e7003831c3 ("net/ixgbe: parse L2 tunnel filter")
Cc: stable@dpdk.org
Cc: Wei Zhao <wei.zhao1@intel.com>
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
app/test-pmd/cmdline_flow.c | 46 ++++++++++++++++++++++++
doc/guides/prog_guide/rte_flow.rst | 26 ++++++++++++++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 8 +++++
lib/librte_ether/rte_flow.h | 21 +++++++++++
4 files changed, 101 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 4e99f0f..0a40005 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -159,6 +159,10 @@ enum index {
ITEM_SCTP_CKSUM,
ITEM_VXLAN,
ITEM_VXLAN_VNI,
+ ITEM_E_TAG,
+ ITEM_E_TAG_GRP_ECID_B,
+ ITEM_NVGRE,
+ ITEM_NVGRE_TNI,
ITEM_MPLS,
ITEM_MPLS_LABEL,
ITEM_GRE,
@@ -436,6 +440,8 @@ static const enum index next_item[] = {
ITEM_TCP,
ITEM_SCTP,
ITEM_VXLAN,
+ ITEM_E_TAG,
+ ITEM_NVGRE,
ITEM_MPLS,
ITEM_GRE,
ZERO,
@@ -544,6 +550,18 @@ static const enum index item_vxlan[] = {
ZERO,
};
+static const enum index item_e_tag[] = {
+ ITEM_E_TAG_GRP_ECID_B,
+ ITEM_NEXT,
+ ZERO,
+};
+
+static const enum index item_nvgre[] = {
+ ITEM_NVGRE_TNI,
+ ITEM_NEXT,
+ ZERO,
+};
+
static const enum index item_mpls[] = {
ITEM_MPLS_LABEL,
ITEM_NEXT,
@@ -1297,6 +1315,34 @@ static const struct token token_list[] = {
.next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param),
.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)),
},
+ [ITEM_E_TAG] = {
+ .name = "e_tag",
+ .help = "match E-Tag header",
+ .priv = PRIV_ITEM(E_TAG, sizeof(struct rte_flow_item_e_tag)),
+ .next = NEXT(item_e_tag),
+ .call = parse_vc,
+ },
+ [ITEM_E_TAG_GRP_ECID_B] = {
+ .name = "grp_ecid_b",
+ .help = "GRP and E-CID base",
+ .next = NEXT(item_e_tag, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_MASK_HTON(struct rte_flow_item_e_tag,
+ rsvd_grp_ecid_b,
+ "\x3f\xff")),
+ },
+ [ITEM_NVGRE] = {
+ .name = "nvgre",
+ .help = "match NVGRE header",
+ .priv = PRIV_ITEM(NVGRE, sizeof(struct rte_flow_item_nvgre)),
+ .next = NEXT(item_nvgre),
+ .call = parse_vc,
+ },
+ [ITEM_NVGRE_TNI] = {
+ .name = "tni",
+ .help = "virtual subnet ID",
+ .next = NEXT(item_nvgre, NEXT_ENTRY(UNSIGNED), item_param),
+ .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_nvgre, tni)),
+ },
[ITEM_MPLS] = {
.name = "mpls",
.help = "match MPLS header",
diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst
index 9bca9ec..b587ba9 100644
--- a/doc/guides/prog_guide/rte_flow.rst
+++ b/doc/guides/prog_guide/rte_flow.rst
@@ -863,6 +863,32 @@ Matches a VXLAN header (RFC 7348).
- ``rsvd1``: reserved, normally 0x00.
- Default ``mask`` matches VNI only.
+Item: ``E_TAG``
+^^^^^^^^^^^^^^^
+
+Matches an IEEE 802.1BR E-Tag header.
+
+- ``tpid``: tag protocol identifier (0x893F)
+- ``epcp_edei_in_ecid_b``: E-Tag control information (E-TCI), E-PCP (3b),
+ E-DEI (1b), ingress E-CID base (12b).
+- ``rsvd_grp_ecid_b``: reserved (2b), GRP (2b), E-CID base (12b).
+- ``in_ecid_e``: ingress E-CID ext.
+- ``ecid_e``: E-CID ext.
+- Default ``mask`` simultaneously matches GRP and E-CID base.
+
+Item: ``NVGRE``
+^^^^^^^^^^^^^^^
+
+Matches a NVGRE header (RFC 7637).
+
+- ``c_k_s_rsvd0_ver``: checksum (1b), undefined (1b), key bit (1b),
+ sequence number (1b), reserved 0 (9b), version (3b). This field must have
+ value 0x2000 according to RFC 7637.
+- ``protocol``: protocol type (0x6558).
+- ``tni``: virtual subnet ID.
+- ``flow_id``: flow ID.
+- Default ``mask`` matches TNI only.
+
Item: ``MPLS``
^^^^^^^^^^^^^^
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index ddd1d92..1aea101 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -2537,6 +2537,14 @@ This section lists supported pattern items and their attributes, if any.
- ``vni {unsigned}``: VXLAN identifier.
+- ``e_tag``: match IEEE 802.1BR E-Tag header.
+
+ - ``grp_ecid_b {unsigned}``: GRP and E-CID base.
+
+- ``nvgre``: match NVGRE header.
+
+ - ``tni {unsigned}``: virtual subnet ID.
+
- ``mpls``: match MPLS header.
- ``label {unsigned}``: MPLS label.
diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h
index abd4c6a..c47edbc 100644
--- a/lib/librte_ether/rte_flow.h
+++ b/lib/librte_ether/rte_flow.h
@@ -49,6 +49,7 @@
#include <rte_sctp.h>
#include <rte_tcp.h>
#include <rte_udp.h>
+#include <rte_byteorder.h>
#ifdef __cplusplus
extern "C" {
@@ -620,6 +621,19 @@ struct rte_flow_item_e_tag {
uint8_t ecid_e; /**< E-CID ext. */
};
+/** Default mask for RTE_FLOW_ITEM_TYPE_E_TAG. */
+#ifndef __cplusplus
+static const struct rte_flow_item_e_tag rte_flow_item_e_tag_mask = {
+#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
+ .rsvd_grp_ecid_b = 0x3fff,
+#elif RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
+ .rsvd_grp_ecid_b = 0xff3f,
+#else
+#error Unsupported endianness.
+#endif
+};
+#endif
+
/**
* RTE_FLOW_ITEM_TYPE_NVGRE.
*
@@ -638,6 +652,13 @@ struct rte_flow_item_nvgre {
uint8_t flow_id; /**< Flow ID. */
};
+/** Default mask for RTE_FLOW_ITEM_TYPE_NVGRE. */
+#ifndef __cplusplus
+static const struct rte_flow_item_nvgre rte_flow_item_nvgre_mask = {
+ .tni = "\xff\xff\xff",
+};
+#endif
+
/**
* RTE_FLOW_ITEM_TYPE_MPLS.
*
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* [dpdk-dev] [PATCH v3 14/14] eal: fix debug macro redefinition
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (12 preceding siblings ...)
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 13/14] ethdev: fix incomplete items in flow API Adrien Mazarguil
@ 2017-04-26 12:07 ` Adrien Mazarguil
2017-04-30 22:13 ` [dpdk-dev] [PATCH v3 00/14] Fixes for exported headers Thomas Monjalon
14 siblings, 0 replies; 66+ messages in thread
From: Adrien Mazarguil @ 2017-04-26 12:07 UTC (permalink / raw)
To: dev; +Cc: stable, Thomas Monjalon, Declan Doherty, Jerin Jacob
The RTE_FUNC_*_RET() and RTE_PROC_*_RET() macro definitions in rte_dev.h
require RTE_PMD_DEBUG_TRACE(). This macro is defined as needed by users of
rte_dev.h since its value depends on their own debug settings.
It may be defined multiple times as a result when including files from
various components simultaneously. Worse, these redefinitions may be
inconsistent. This causes the following compilation errors:
In file included from /tmp/check-includes.sh.13890.c:27:0:
build/include/rte_eventdev_pmd.h:58:0: error: "RTE_PMD_DEBUG_TRACE"
redefined [-Werror]
[...]
In file included from build/include/rte_ethdev_pci.h:39:0,
from /tmp/check-includes.sh.13890.c:13:
build/include/rte_ethdev.h:1042:0: note: this is the location of the
previous definition
[...]
In file included from /tmp/check-includes.sh.13890.c:83:0:
build/include/rte_cryptodev_pmd.h:65:0: error: "RTE_PMD_DEBUG_TRACE"
redefined [-Werror]
[...]
In file included from /tmp/check-includes.sh.13890.c:27:0:
build/include/rte_eventdev_pmd.h:58:0: note: this is the location of
the previous definition
[...]
This commit moves the RTE_PMD_DEBUG_TRACE() definition to rte_dev.h where
it is enabled consistently depending on global configuration settings and
removes redundant definitions.
Also when disabled, RTE_PMD_DEBUG_TRACE() is now defined as (void)0 to
avoid empty statements warnings if used outside { } blocks.
Fixes: b974e4a40cb5 ("ethdev: make error checking macros public")
Cc: stable@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>
Cc: Declan Doherty <declan.doherty@intel.com>
Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
lib/librte_cryptodev/rte_cryptodev_pmd.h | 8 --------
lib/librte_eal/common/include/rte_dev.h | 14 ++++++++++++++
lib/librte_ether/rte_ethdev.h | 9 ---------
lib/librte_eventdev/rte_eventdev_pmd.h | 7 -------
4 files changed, 14 insertions(+), 24 deletions(-)
diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h
index 356b9dc..17ef37c 100644
--- a/lib/librte_cryptodev/rte_cryptodev_pmd.h
+++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h
@@ -57,14 +57,6 @@ extern "C" {
#include "rte_crypto.h"
#include "rte_cryptodev.h"
-
-#ifdef RTE_LIBRTE_CRYPTODEV_DEBUG
-#define RTE_PMD_DEBUG_TRACE(...) \
- rte_pmd_debug_trace(__func__, __VA_ARGS__)
-#else
-#define RTE_PMD_DEBUG_TRACE(...)
-#endif
-
struct rte_cryptodev_session {
RTE_STD_C11
struct {
diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h
index 67c2b0c..d18e6b8 100644
--- a/lib/librte_eal/common/include/rte_dev.h
+++ b/lib/librte_eal/common/include/rte_dev.h
@@ -49,6 +49,7 @@ extern "C" {
#include <stdio.h>
#include <sys/queue.h>
+#include <rte_config.h>
#include <rte_log.h>
__attribute__((format(printf, 2, 0)))
@@ -70,6 +71,19 @@ rte_pmd_debug_trace(const char *func_name, const char *fmt, ...)
rte_log(RTE_LOG_ERR, RTE_LOGTYPE_PMD, "%s: %s", func_name, buffer);
}
+/*
+ * Enable RTE_PMD_DEBUG_TRACE() when at least one component relying on the
+ * RTE_*_RET() macros defined below is compiled in debug mode.
+ */
+#if defined(RTE_LIBRTE_ETHDEV_DEBUG) || \
+ defined(RTE_LIBRTE_CRYPTODEV_DEBUG) || \
+ defined(RTE_LIBRTE_EVENTDEV_DEBUG)
+#define RTE_PMD_DEBUG_TRACE(...) \
+ rte_pmd_debug_trace(__func__, __VA_ARGS__)
+#else
+#define RTE_PMD_DEBUG_TRACE(...) (void)0
+#endif
+
/* Macros for checking for restricting functions to primary instance only */
#define RTE_PROC_PRIMARY_OR_ERR_RET(retval) do { \
if (rte_eal_process_type() != RTE_PROC_PRIMARY) { \
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index e0f7ee5..5f1d663 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1034,15 +1034,6 @@ struct rte_eth_dev_callback;
/** @internal Structure to keep track of registered callbacks */
TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
-
-#ifdef RTE_LIBRTE_ETHDEV_DEBUG
-#define RTE_PMD_DEBUG_TRACE(...) \
- rte_pmd_debug_trace(__func__, __VA_ARGS__)
-#else
-#define RTE_PMD_DEBUG_TRACE(...)
-#endif
-
-
/* Macros to check for valid port */
#define RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, retval) do { \
if (!rte_eth_dev_is_valid_port(port_id)) { \
diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h
index 988018f..4005b3c 100644
--- a/lib/librte_eventdev/rte_eventdev_pmd.h
+++ b/lib/librte_eventdev/rte_eventdev_pmd.h
@@ -54,13 +54,6 @@ extern "C" {
#include "rte_eventdev.h"
-#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
-#define RTE_PMD_DEBUG_TRACE(...) \
- rte_pmd_debug_trace(__func__, __VA_ARGS__)
-#else
-#define RTE_PMD_DEBUG_TRACE(...)
-#endif
-
/* Logging Macros */
#define RTE_EDEV_LOG_ERR(...) \
RTE_LOG(ERR, EVENTDEV, \
--
2.1.4
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v3 02/14] eventdev: fix errors with strict compilation flags
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
0 siblings, 0 replies; 66+ messages in thread
From: Jerin Jacob @ 2017-04-26 14:47 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dev, De Lara Guarch, Pablo
-----Original Message-----
> Date: Wed, 26 Apr 2017 14:07:10 +0200
> From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> To: dev@dpdk.org
> Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>, "De Lara Guarch, Pablo"
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v3 02/14] eventdev: fix errors with strict compilation flags
> X-Mailer: git-send-email 2.1.4
>
> Exported headers must allow compilation with the strictest flags. This
> commit addresses the following errors:
>
> In file included from build/include/rte_eventdev_pmd.h:55:0,
> from /tmp/check-includes.sh.25816.c:1:
> build/include/rte_eventdev.h:908:8: error: struct has no named members
> [-Werror=pedantic]
> [...]
> In file included from /tmp/check-includes.sh.25816.c:1:0:
> build/include/rte_eventdev_pmd.h:65:35: error: ISO C does not permit named
> variadic macros [-Werror=variadic-macros]
> [...]
>
> Fixes: 71f238432865 ("eventdev: introduce event driven programming model")
> Fixes: 4f0804bbdfb9 ("eventdev: implement the northbound APIs")
>
> Cc: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Cc: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v3 10/14] metrics: fix errors in exported header
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 10/14] metrics: fix errors " Adrien Mazarguil
@ 2017-04-26 15:07 ` Remy Horton
0 siblings, 0 replies; 66+ messages in thread
From: Remy Horton @ 2017-04-26 15:07 UTC (permalink / raw)
To: Adrien Mazarguil, dev
On 26/04/2017 13:07, Adrien Mazarguil wrote:
[..]
> Cc: Remy Horton <remy.horton@intel.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> ---
> lib/librte_metrics/rte_metrics.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
Acked-by: Remy Horton <remy.horton@intel.com>
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v3 08/14] bitrate: fix errors in exported header
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
0 siblings, 0 replies; 66+ messages in thread
From: Remy Horton @ 2017-04-26 15:07 UTC (permalink / raw)
To: Adrien Mazarguil, dev
On 26/04/2017 13:07, Adrien Mazarguil wrote:
[..]
> Cc: Remy Horton <remy.horton@intel.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> ---
> lib/librte_bitratestats/rte_bitrate.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
Acked-by: Remy Horton <remy.horton@intel.com>
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v3 09/14] efd: fix missing include in exported header
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
0 siblings, 0 replies; 66+ messages in thread
From: De Lara Guarch, Pablo @ 2017-04-26 15:36 UTC (permalink / raw)
To: Adrien Mazarguil, dev; +Cc: stable, Marohn, Byron
> -----Original Message-----
> From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> Sent: Wednesday, April 26, 2017 1:07 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Marohn, Byron; De Lara Guarch, Pablo
> Subject: [PATCH v3 09/14] efd: fix missing include in exported header
>
> This commit addresses the following compilation errors:
>
> In file included from /tmp/check-includes.sh.8373.c:1:0:
> build/include/rte_efd.h:133:9: error: unknown type name 'uint8_t'
> [...]
>
> Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
>
> Cc: stable@dpdk.org
> Cc: Byron Marohn <byron.marohn@intel.com>
> Cc: Pablo de Lara Guarch <pablo.de.lara.guarch@intel.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v3 13/14] ethdev: fix incomplete items in flow API
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
0 siblings, 0 replies; 66+ messages in thread
From: Lu, Wenzhuo @ 2017-04-27 1:03 UTC (permalink / raw)
To: Adrien Mazarguil, dev; +Cc: stable, Zhao1, Wei
Hi,
> -----Original Message-----
> From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com]
> Sent: Wednesday, April 26, 2017 8:07 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhao1, Wei; Lu, Wenzhuo
> Subject: [PATCH v3 13/14] ethdev: fix incomplete items in flow API
>
> E-Tag and NVGRE pattern items have been added hastily without updating
> documentation nor testpmd.
>
> This commit also adds default masks for these items based on the ixgbe
> implementation.
>
> Fixes: 99e7003831c3 ("net/ixgbe: parse L2 tunnel filter")
>
> Cc: stable@dpdk.org
> Cc: Wei Zhao <wei.zhao1@intel.com>
> Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Thanks for this patch :)
^ permalink raw reply [flat|nested] 66+ messages in thread
* Re: [dpdk-dev] [PATCH v3 00/14] Fixes for exported headers
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 00/14] " Adrien Mazarguil
` (13 preceding siblings ...)
2017-04-26 12:07 ` [dpdk-dev] [PATCH v3 14/14] eal: fix debug macro redefinition Adrien Mazarguil
@ 2017-04-30 22:13 ` Thomas Monjalon
14 siblings, 0 replies; 66+ messages in thread
From: Thomas Monjalon @ 2017-04-30 22:13 UTC (permalink / raw)
To: Adrien Mazarguil; +Cc: dev
26/04/2017 14:07, Adrien Mazarguil:
> This series addresses the remaining issues seen by check-includes.sh in
> exported headers. Most of them may cause compilation errors in user
> applications:
>
> - Dependencies on missing includes.
> - Non-standard C/C++ constructs usage without associated safeties.
> - Missing C++ awareness blocks.
>
> It also addresses the incomplete implementation of E-Tag and NVGRE flow API
> pattern items.
Applied, thanks
^ permalink raw reply [flat|nested] 66+ messages in thread
end of thread, other threads:[~2017-04-30 22:13 UTC | newest]
Thread overview: 66+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 15:52 [dpdk-dev] [PATCH 00/13] Fixes for exported headers 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 ` [dpdk-dev] [PATCH v2 07/13] net/avp: fix errors in exported headers Adrien Mazarguil
2017-04-25 12:31 ` 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
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).