diff mbox series

[API-NEXT,v1,19/19] linux-gen: move packet_to_buffer to packet_inlines.h

Message ID 1505422809-5632-20-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v1,1/19] travis: fix powerpc test name | expand

Commit Message

Github ODP bot Sept. 14, 2017, 9 p.m. UTC
From: Maxim Uvarov <maxim.uvarov@linaro.org>


odp_crypto.c is also uses packet_to_buffer() so move
this function to common place.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 179 (muvarov:api-next)
 ** https://github.com/Linaro/odp/pull/179
 ** Patch: https://github.com/Linaro/odp/pull/179.patch
 ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1
 ** Merge commit sha: ada61f5ba5f940d03a95893940c21028d4c75d19
 **/
 platform/linux-generic/include/odp/api/plat/packet_inlines.h | 5 +++++
 platform/linux-generic/odp_crypto.c                          | 1 +
 platform/linux-generic/odp_packet.c                          | 5 -----
 3 files changed, 6 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/include/odp/api/plat/packet_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_inlines.h
index 6874d1496..be7e18ec3 100644
--- a/platform/linux-generic/include/odp/api/plat/packet_inlines.h
+++ b/platform/linux-generic/include/odp/api/plat/packet_inlines.h
@@ -157,6 +157,11 @@  static inline void _odp_packet_prefetch(odp_packet_t pkt, uint32_t offset,
 	(void)pkt; (void)offset; (void)len;
 }
 
+static inline odp_buffer_t packet_to_buffer(odp_packet_t pkt)
+{
+	return (odp_buffer_t)pkt;
+}
+
 /* Include inlined versions of API functions */
 #include <odp/api/plat/static_inline.h>
 #if ODP_ABI_COMPAT == 0
diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index 081fe178e..3174feee0 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -19,6 +19,7 @@ 
 #include <odp_debug_internal.h>
 #include <odp/api/hints.h>
 #include <odp/api/random.h>
+#include <odp/api/plat/packet_inlines.h>
 #include <odp_packet_internal.h>
 
 #include <string.h>
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index 5dbe65d34..ff0cb8fe5 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -69,11 +69,6 @@  odp_packet_t _odp_packet_from_buf_hdr(odp_buffer_hdr_t *buf_hdr)
 	return (odp_packet_t)buf_hdr;
 }
 
-static inline odp_buffer_t packet_to_buffer(odp_packet_t pkt)
-{
-	return (odp_buffer_t)pkt;
-}
-
 static inline seg_entry_t *seg_entry(odp_packet_hdr_t *hdr,
 				     uint32_t seg_idx)
 {