diff mbox series

[PATCHv2,02/11] linux-generic: packet: move pull_tail to packet mainline for consistency

Message ID 20170312123045.3852-3-bill.fischofer@linaro.org
State New
Headers show
Series Optimized Packet References | expand

Commit Message

Bill Fischofer March 12, 2017, 12:30 p.m. UTC
Move the pull_tail() internal routine to odp_packet.c for consistency
with other internal head/tail manipulation routines.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

---
 platform/linux-generic/include/odp_packet_internal.h | 9 ---------
 platform/linux-generic/odp_packet.c                  | 9 +++++++++
 2 files changed, 9 insertions(+), 9 deletions(-)

-- 
2.12.0.rc1
diff mbox series

Patch

diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index 0a9f1779..589e204a 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -184,15 +184,6 @@  static inline void copy_packet_cls_metadata(odp_packet_hdr_t *src_hdr,
 	dst_hdr->op_result = src_hdr->op_result;
 }
 
-static inline void pull_tail(odp_packet_hdr_t *pkt_hdr, uint32_t len)
-{
-	int last = pkt_hdr->buf_hdr.segcount - 1;
-
-	pkt_hdr->tailroom  += len;
-	pkt_hdr->frame_len -= len;
-	pkt_hdr->buf_hdr.seg[last].len -= len;
-}
-
 static inline uint32_t packet_len(odp_packet_hdr_t *pkt_hdr)
 {
 	return pkt_hdr->frame_len;
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index 60eef3a6..d0f76332 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -145,6 +145,15 @@  static inline void push_tail(odp_packet_hdr_t *pkt_hdr, uint32_t len)
 	pkt_hdr->buf_hdr.seg[last].len += len;
 }
 
+static inline void pull_tail(odp_packet_hdr_t *pkt_hdr, uint32_t len)
+{
+	int last = pkt_hdr->buf_hdr.segcount - 1;
+
+	pkt_hdr->tailroom  += len;
+	pkt_hdr->frame_len -= len;
+	pkt_hdr->buf_hdr.seg[last].len -= len;
+}
+
 /* Copy all metadata for segmentation modification. Segment data and lengths
  * are not copied. */
 static inline void packet_seg_copy_md(odp_packet_hdr_t *dst,