[CATERPILLAR,v6,2/4] linux-gen: packet: remove duplicated _odp_packet_from_buf_hdr() function

Message ID 1515614416-28481-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • Reduce segmentation metadata
Related show

Commit Message

Github ODP bot Jan. 10, 2018, 8 p.m.
From: Brian Brooks <brian.brooks@arm.com>


_odp_packet_from_buf_hdr() and packet_from_buf_hdr() are both
internal-only functions that do the exact same thing. Remove
_odp_packet_from_buf_hdr() version since internal-only identifiers
should not use any form of an "odp_" prefix. This is also
consistent with other packet_xxx() internal-only functions.

Signed-off-by: Brian Brooks <brian.brooks@arm.com>

Reviewed-by: Yi He <yi.he@arm.com>

Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com>

Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

---
/** Email created from pull request 354 (brbrooks:caterpillar)
 ** https://github.com/Linaro/odp/pull/354
 ** Patch: https://github.com/Linaro/odp/pull/354.patch
 ** Base sha: 4d17f8ae64aba0e6f24877be30f86ae5880cef7e
 ** Merge commit sha: 4901013db66aec2119d9705f69569107629ee938
 **/
 platform/linux-generic/include/odp_packet_internal.h | 3 ---
 platform/linux-generic/odp_packet.c                  | 5 -----
 platform/linux-generic/odp_traffic_mngr.c            | 2 +-
 3 files changed, 1 insertion(+), 9 deletions(-)

Patch

diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index 3a86ce928..98d364a8d 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -290,9 +290,6 @@  int packet_parse_l3_l4(odp_packet_hdr_t *pkt_hdr,
 /* Reset parser metadata for a new parse */
 void packet_parse_reset(odp_packet_hdr_t *pkt_hdr);
 
-/* Convert a buffer handle to a packet handle */
-odp_packet_t _odp_packet_from_buf_hdr(odp_buffer_hdr_t *buf_hdr);
-
 static inline int packet_hdr_has_l2(odp_packet_hdr_t *pkt_hdr)
 {
 	return pkt_hdr->p.input_flags.l2;
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index 239506e10..bc4777cff 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -56,11 +56,6 @@  static inline odp_packet_hdr_t *buf_to_packet_hdr(odp_buffer_t buf)
 	return (odp_packet_hdr_t *)buf_hdl_to_hdr(buf);
 }
 
-odp_packet_t _odp_packet_from_buf_hdr(odp_buffer_hdr_t *buf_hdr)
-{
-	return (odp_packet_t)buf_hdr;
-}
-
 static inline seg_entry_t *seg_entry(odp_packet_hdr_t *hdr,
 				     uint32_t seg_idx)
 {
diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c
index 20af537fa..4f4acba2b 100644
--- a/platform/linux-generic/odp_traffic_mngr.c
+++ b/platform/linux-generic/odp_traffic_mngr.c
@@ -108,7 +108,7 @@  static int queue_tm_reenq(queue_t queue, odp_buffer_hdr_t *buf_hdr)
 	odp_tm_queue_t tm_queue = MAKE_ODP_TM_QUEUE((uint8_t *)queue -
 						    offsetof(tm_queue_obj_t,
 							     tm_qentry));
-	odp_packet_t pkt = _odp_packet_from_buf_hdr(buf_hdr);
+	odp_packet_t pkt = packet_from_buf_hdr(buf_hdr);
 
 	return odp_tm_enq(tm_queue, pkt);
 }