From: Brian Brooks <brian.bro...@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.bro...@arm.com> Reviewed-by: Yi He <yi...@arm.com> Reviewed-by: Ola Liljedahl <ola.liljed...@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@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: 63fd88635cc10caaa02fdccd3f52c9494487bdd2 ** Merge commit sha: 2bc3e40e5d3ff0479394387816b7a53c20978284 **/ 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(-) 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 80ea0384e..e0fc01b29 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -55,11 +55,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 ab06b3c0d..416b1d099 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); }