[v1,2/2] linux-gen: packet: remove duplicate conversion

Message ID 1518696012-23633-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • [v1,1/2] linux-gen: packet: remove unused function
Related show

Commit Message

Github ODP bot Feb. 15, 2018, noon
From: Petri Savolainen <petri.savolainen@linaro.org>


Remove _odp_packet_from_buf_hdr() as it is a duplicate of
packet_from_buf_hdr().

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 482 (psavol:master-packet-cleanup)
 ** https://github.com/Linaro/odp/pull/482
 ** Patch: https://github.com/Linaro/odp/pull/482.patch
 ** Base sha: 41b3fa2cd994a7ef68290a07dcde5564e4640847
 ** Merge commit sha: d02731c67b9c99ffdcddff0e00eb0b173b785a5f
 **/
 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 e6b65bab8..5058c02d1 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -302,9 +302,6 @@  int packet_parse_layer(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 cbb1ae306..ac453c23d 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -60,11 +60,6 @@  ODP_STATIC_ASSERT(ODP_BUFFER_INVALID == 0, "Buffer invalid not 0");
 ODP_STATIC_ASSERT(ODP_EVENT_INVALID  == 0, "Event invalid not 0");
 #endif
 
-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;
diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c
index 5c19b7c17..a6f066c2f 100644
--- a/platform/linux-generic/odp_traffic_mngr.c
+++ b/platform/linux-generic/odp_traffic_mngr.c
@@ -111,7 +111,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);
 }