Yes, that is reasonable because ODP_PACKET is in global include.
Maxim.
On 10/20/2014 03:49 PM, Jerin Jacob wrote:
- Definition of ODPH_PACKED is in include/api/odp_align.h so changing to
ODP_PACKED
Signed-off-by: Jerin Jacob <[email protected]>
---
example/ipsec/odp_ipsec_stream.c | 2 +-
helper/include/odph_eth.h | 6 +++---
helper/include/odph_icmp.h | 2 +-
helper/include/odph_ip.h | 4 ++--
helper/include/odph_ipsec.h | 6 +++---
helper/include/odph_udp.h | 2 +-
platform/linux-generic/include/api/odp_align.h | 2 +-
7 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c
index fba425c..a9a52ec 100644
--- a/example/ipsec/odp_ipsec_stream.c
+++ b/example/ipsec/odp_ipsec_stream.c
@@ -39,7 +39,7 @@
/**
* Stream packet header
*/
-typedef struct ODPH_PACKED stream_pkt_hdr_s {
+typedef struct ODP_PACKED stream_pkt_hdr_s {
uint64be_t magic; /**< Stream magic value for verification */
uint8_t data[0]; /**< Incrementing data stream */
} stream_pkt_hdr_t;
diff --git a/helper/include/odph_eth.h b/helper/include/odph_eth.h
index 55a2b1e..065a94b 100644
--- a/helper/include/odph_eth.h
+++ b/helper/include/odph_eth.h
@@ -34,7 +34,7 @@ extern "C" {
/**
* Ethernet MAC address
*/
-typedef struct ODPH_PACKED {
+typedef struct ODP_PACKED {
uint8_t addr[ODPH_ETHADDR_LEN]; /**< @private Address */
} odph_ethaddr_t;
@@ -44,7 +44,7 @@ ODP_STATIC_ASSERT(sizeof(odph_ethaddr_t) == ODPH_ETHADDR_LEN, "ODPH_ETHADDR_T__S
/**
* Ethernet header
*/
-typedef struct ODPH_PACKED {
+typedef struct ODP_PACKED {
odph_ethaddr_t dst; /**< Destination address */
odph_ethaddr_t src; /**< Source address */
uint16be_t type; /**< Type */
@@ -58,7 +58,7 @@ ODP_STATIC_ASSERT(sizeof(odph_ethhdr_t) == ODPH_ETHHDR_LEN,
"ODPH_ETHHDR_T__SIZE
*
* @todo Check usage of tpid vs ethertype. Check outer VLAN TPID.
*/
-typedef struct ODPH_PACKED {
+typedef struct ODP_PACKED {
uint16be_t tpid; /**< Tag protocol ID (located after ethhdr.src) */
uint16be_t tci; /**< Priority / CFI / VLAN ID */
} odph_vlanhdr_t;
diff --git a/helper/include/odph_icmp.h b/helper/include/odph_icmp.h
index 8414d7e..8533fb5 100644
--- a/helper/include/odph_icmp.h
+++ b/helper/include/odph_icmp.h
@@ -26,7 +26,7 @@ extern "C" {
#define ODPH_ICMPHDR_LEN 8
/** ICMP header */
-typedef struct ODPH_PACKED {
+typedef struct ODP_PACKED {
uint8_t type; /**< message type */
uint8_t code; /**< type sub-code */
uint16sum_t chksum; /**< checksum of icmp header */
diff --git a/helper/include/odph_ip.h b/helper/include/odph_ip.h
index ca71c44..2c83c0f 100644
--- a/helper/include/odph_ip.h
+++ b/helper/include/odph_ip.h
@@ -48,7 +48,7 @@ extern "C" {
#define ODPH_IPV4HDR_IS_FRAGMENT(frag_offset) ((frag_offset) & 0x3fff)
/** IPv4 header */
-typedef struct ODPH_PACKED {
+typedef struct ODP_PACKED {
uint8_t ver_ihl; /**< Version / Header length */
uint8_t tos; /**< Type of service */
uint16be_t tot_len; /**< Total length */
@@ -125,7 +125,7 @@ static inline uint16sum_t
odph_ipv4_csum_update(odp_packet_t pkt)
/**
* IPv6 header
*/
-typedef struct ODPH_PACKED {
+typedef struct ODP_PACKED {
uint32be_t ver_tc_flow; /**< Version / Traffic class / Flow label */
uint16be_t payload_len; /**< Payload length */
uint8_t next_hdr; /**< Next header */
diff --git a/helper/include/odph_ipsec.h b/helper/include/odph_ipsec.h
index f547b90..c58a1c8 100644
--- a/helper/include/odph_ipsec.h
+++ b/helper/include/odph_ipsec.h
@@ -30,7 +30,7 @@ extern "C" {
/**
* IPSec ESP header
*/
-typedef struct ODPH_PACKED {
+typedef struct ODP_PACKED {
uint32be_t spi; /**< Security Parameter Index */
uint32be_t seq_no; /**< Sequence Number */
uint8_t iv[0]; /**< Initialization vector */
@@ -42,7 +42,7 @@ ODP_STATIC_ASSERT(sizeof(odph_esphdr_t) == ODPH_ESPHDR_LEN,
"ODPH_ESPHDR_T__SIZE
/**
* IPSec ESP trailer
*/
-typedef struct ODPH_PACKED {
+typedef struct ODP_PACKED {
uint8_t pad_len; /**< Padding length (0-255) */
uint8_t next_header; /**< Next header protocol */
uint8_t icv[0]; /**< Integrity Check Value (optional) */
@@ -54,7 +54,7 @@ ODP_STATIC_ASSERT(sizeof(odph_esptrl_t) == ODPH_ESPTRL_LEN,
"ODPH_ESPTRL_T__SIZE
/**
* IPSec AH header
*/
-typedef struct ODPH_PACKED {
+typedef struct ODP_PACKED {
uint8_t next_header; /**< Next header protocol */
uint8_t ah_len; /**< AH header length */
uint16be_t pad; /**< Padding (must be 0) */
diff --git a/helper/include/odph_udp.h b/helper/include/odph_udp.h
index 3970f00..b2eaf03 100644
--- a/helper/include/odph_udp.h
+++ b/helper/include/odph_udp.h
@@ -26,7 +26,7 @@ extern "C" {
#define ODPH_UDPHDR_LEN 8
/** UDP header */
-typedef struct ODPH_PACKED {
+typedef struct ODP_PACKED {
uint16be_t src_port; /**< Source port */
uint16be_t dst_port; /**< Destination port */
uint16be_t length; /**< UDP datagram length in bytes (header+data) */
diff --git a/platform/linux-generic/include/api/odp_align.h
b/platform/linux-generic/include/api/odp_align.h
index a93dd24..5ee61be 100644
--- a/platform/linux-generic/include/api/odp_align.h
+++ b/platform/linux-generic/include/api/odp_align.h
@@ -31,7 +31,7 @@ extern "C" {
/**
* Defines type/struct to be packed
*/
-#define ODPH_PACKED __attribute__((__packed__))
+#define ODP_PACKED __attribute__((__packed__))
/**
* Returns offset of member in type
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp