aboutsummaryrefslogtreecommitdiff
path: root/helper
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@nokia.com>2016-02-09 14:25:09 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2016-03-03 22:32:04 +0300
commitb6c21ca841467d0266ee974752b41d4492bcb802 (patch)
tree9435f79ad8bf3d8f2584e73a77eb5dc5620144b8 /helper
parent96cef77a0aad6940f5b210277ffb0bccb6e5b3c1 (diff)
helper: remove odp_ definitions
Many helper files included ODP internal headers and defined types or functions with odp_ prefix. A helper can be consider as part of application - from ODP headers it may include only odp.h and it must not define anything with odp_ prefix. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Juha-Matti Tilli <juha-matti.tilli@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'helper')
-rw-r--r--helper/include/odp/helper/chksum.h10
-rw-r--r--helper/include/odp/helper/icmp.h4
-rw-r--r--helper/include/odp/helper/ip.h4
-rw-r--r--helper/include/odp/helper/ipsec.h5
-rw-r--r--helper/include/odp/helper/linux.h8
-rw-r--r--helper/include/odp/helper/table.h2
-rw-r--r--helper/include/odp/helper/tcp.h4
-rw-r--r--helper/include/odp/helper/udp.h4
-rw-r--r--helper/linux.c8
-rw-r--r--helper/test/odp_table.c2
10 files changed, 20 insertions, 31 deletions
diff --git a/helper/include/odp/helper/chksum.h b/helper/include/odp/helper/chksum.h
index 215917cc9..01dc47057 100644
--- a/helper/include/odp/helper/chksum.h
+++ b/helper/include/odp/helper/chksum.h
@@ -8,16 +8,16 @@
/**
* @file
*
- * ODP Checksum
+ * ODP checksum helper
*/
-#ifndef ODP_CHKSUM_H_
-#define ODP_CHKSUM_H_
+#ifndef ODPH_CHKSUM_H_
+#define ODPH_CHKSUM_H_
#ifdef __cplusplus
extern "C" {
#endif
-#include <odp/std_types.h>
+#include <odp.h>
/**
* Checksum
@@ -27,7 +27,7 @@ extern "C" {
*
* @return checksum value in host cpu order
*/
-static inline odp_u16sum_t odp_chksum(void *buffer, int len)
+static inline odp_u16sum_t odph_chksum(void *buffer, int len)
{
uint16_t *buf = buffer;
uint32_t sum = 0;
diff --git a/helper/include/odp/helper/icmp.h b/helper/include/odp/helper/icmp.h
index 7f5097ba8..b187c3a60 100644
--- a/helper/include/odp/helper/icmp.h
+++ b/helper/include/odp/helper/icmp.h
@@ -18,9 +18,7 @@
extern "C" {
#endif
-#include <odp/align.h>
-#include <odp/debug.h>
-#include <odp/byteorder.h>
+#include <odp.h>
/** @addtogroup odph_header ODPH HEADER
* @{
diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h
index 769384f62..616ccba52 100644
--- a/helper/include/odp/helper/ip.h
+++ b/helper/include/odp/helper/ip.h
@@ -98,7 +98,7 @@ static inline int odph_ipv4_csum_valid(odp_packet_t pkt)
chksum = ip.chksum;
ip.chksum = 0x0;
- res = odp_chksum(w, nleft);
+ res = odph_chksum(w, nleft);
return (res == chksum) ? 1 : 0;
}
@@ -123,7 +123,7 @@ static inline odp_u16sum_t odph_ipv4_csum_update(odp_packet_t pkt)
ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL);
w = (uint16_t *)(void *)ip;
- ip->chksum = odp_chksum(w, nleft);
+ ip->chksum = odph_chksum(w, nleft);
return ip->chksum;
}
diff --git a/helper/include/odp/helper/ipsec.h b/helper/include/odp/helper/ipsec.h
index 2cc2403f4..80d900ccb 100644
--- a/helper/include/odp/helper/ipsec.h
+++ b/helper/include/odp/helper/ipsec.h
@@ -18,10 +18,7 @@
extern "C" {
#endif
-#include <odp/std_types.h>
-#include <odp/byteorder.h>
-#include <odp/align.h>
-#include <odp/debug.h>
+#include <odp.h>
/** @addtogroup odph_header ODPH HEADER
* @{
diff --git a/helper/include/odp/helper/linux.h b/helper/include/odp/helper/linux.h
index c48b3ed04..d38d5908d 100644
--- a/helper/include/odp/helper/linux.h
+++ b/helper/include/odp/helper/linux.h
@@ -15,8 +15,8 @@
* setups in otherways (not via this API).
*/
-#ifndef ODP_LINUX_H_
-#define ODP_LINUX_H_
+#ifndef ODPH_LINUX_H_
+#define ODPH_LINUX_H_
#ifdef __cplusplus
extern "C" {
@@ -32,7 +32,7 @@ typedef struct {
void *(*start_routine) (void *); /**< The function to run */
void *arg; /**< The functions arguemnts */
odp_thread_type_t thr_type; /**< The thread type */
-} odp_start_args_t;
+} odph_start_args_t;
/** Linux pthread state information */
typedef struct {
@@ -40,7 +40,7 @@ typedef struct {
pthread_attr_t attr; /**< Pthread attributes */
int cpu; /**< CPU ID */
/** Saved starting args for join to later free */
- odp_start_args_t *start_args;
+ odph_start_args_t *start_args;
} odph_linux_pthread_t;
diff --git a/helper/include/odp/helper/table.h b/helper/include/odp/helper/table.h
index d78801051..81022e55b 100644
--- a/helper/include/odp/helper/table.h
+++ b/helper/include/odp/helper/table.h
@@ -216,7 +216,7 @@ typedef int (*odph_table_remove_value)(odph_table_t table, void *key);
/**
* Table interface set. Defining the table operations.
*/
-typedef struct odp_table_ops {
+typedef struct odph_table_ops_t {
odph_table_create f_create; /**< Table Create */
odph_table_lookup f_lookup; /**< Table Lookup */
odph_table_destroy f_des; /**< Table Destroy */
diff --git a/helper/include/odp/helper/tcp.h b/helper/include/odp/helper/tcp.h
index eb0a268b2..4a3ee8664 100644
--- a/helper/include/odp/helper/tcp.h
+++ b/helper/include/odp/helper/tcp.h
@@ -18,9 +18,7 @@
extern "C" {
#endif
-#include <odp/align.h>
-#include <odp/debug.h>
-#include <odp/byteorder.h>
+#include <odp.h>
/** @addtogroup odph_header ODPH HEADER
* @{
diff --git a/helper/include/odp/helper/udp.h b/helper/include/odp/helper/udp.h
index 88a77f858..163b610b7 100644
--- a/helper/include/odp/helper/udp.h
+++ b/helper/include/odp/helper/udp.h
@@ -17,9 +17,7 @@
extern "C" {
#endif
-#include <odp/align.h>
-#include <odp/debug.h>
-#include <odp/byteorder.h>
+#include <odp.h>
/** @addtogroup odph_header ODPH HEADER
* @{
diff --git a/helper/linux.c b/helper/linux.c
index 25f7b6a75..610aed8b2 100644
--- a/helper/linux.c
+++ b/helper/linux.c
@@ -17,15 +17,13 @@
#include <string.h>
#include <stdio.h>
+#include <odp.h>
#include <odp/helper/linux.h>
-#include <odp/thread.h>
-#include <odp/init.h>
-#include <odp/system_info.h>
#include "odph_debug.h"
static void *odp_run_start_routine(void *arg)
{
- odp_start_args_t *start_args = arg;
+ odph_start_args_t *start_args = arg;
/* ODP thread local init */
if (odp_init_local(start_args->thr_type)) {
@@ -81,7 +79,7 @@ int odph_linux_pthread_create(odph_linux_pthread_t *thread_tbl,
pthread_attr_setaffinity_np(&thread_tbl[i].attr,
sizeof(cpu_set_t), &cpu_set);
- thread_tbl[i].start_args = malloc(sizeof(odp_start_args_t));
+ thread_tbl[i].start_args = malloc(sizeof(odph_start_args_t));
if (thread_tbl[i].start_args == NULL)
ODPH_ABORT("Malloc failed");
diff --git a/helper/test/odp_table.c b/helper/test/odp_table.c
index 16de16584..9d5c5dce0 100644
--- a/helper/test/odp_table.c
+++ b/helper/test/odp_table.c
@@ -30,7 +30,7 @@ int main(int argc TEST_UNUSED, char *argv[] TEST_UNUSED)
int ret = 0;
odph_table_t table;
odph_table_t tmp_tbl;
- struct odp_table_ops *test_ops;
+ odph_table_ops_t *test_ops;
char tmp[32];
char ip_addr1[] = "12345678";
char ip_addr2[] = "11223344";