aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2017-11-06 16:15:54 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2017-11-16 18:45:11 +0300
commit5d6a9f036cdeeb79215328a63b2dc63962e292a0 (patch)
tree9f4248ff5f6ef99d9151d44dee4153e9891c8a27 /platform
parent4459e1bd35534dd1b6a313890c74086c0e86c617 (diff)
linux-gen: pool: remove unnecessary pool_entry_from_hdl() calls
Pool entry pointer is already stored in the odp_buffer_hdr_t struct. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
-rw-r--r--platform/linux-generic/include/odp_packet_internal.h2
-rw-r--r--platform/linux-generic/odp_packet.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index 89fb34b6f..fb3d44498 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -193,7 +193,7 @@ static inline seg_entry_t *seg_entry_last(odp_packet_hdr_t *hdr)
*/
static inline void packet_init(odp_packet_hdr_t *pkt_hdr, uint32_t len)
{
- pool_t *pool = pool_entry_from_hdl(pkt_hdr->buf_hdr.pool_hdl);
+ pool_t *pool = pkt_hdr->buf_hdr.pool_ptr;
uint32_t seg_len;
int num = pkt_hdr->buf_hdr.segcount;
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index 6d1f1bd02..ca706b2e5 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -338,7 +338,7 @@ static inline void link_segments(odp_packet_hdr_t *pkt_hdr[], int num)
int cur, i;
odp_packet_hdr_t *hdr;
odp_packet_hdr_t *head = pkt_hdr[0];
- uint32_t seg_len = pool_entry_from_hdl(head->buf_hdr.pool_hdl)->seg_len;
+ uint32_t seg_len = ((pool_t *)(head->buf_hdr.pool_ptr))->seg_len;
cur = 0;
@@ -385,7 +385,7 @@ static inline void init_segments(odp_packet_hdr_t *pkt_hdr[], int num)
/* First segment is the packet descriptor */
hdr = pkt_hdr[0];
- seg_len = pool_entry_from_hdl(hdr->buf_hdr.pool_hdl)->seg_len;
+ seg_len = ((pool_t *)(hdr->buf_hdr.pool_ptr))->seg_len;
/* Defaults for single segment packet */
hdr->buf_hdr.seg[0].data = hdr->buf_hdr.base_data;
@@ -416,7 +416,7 @@ static inline void reset_seg(odp_packet_hdr_t *pkt_hdr, int first, int num)
void *base;
int i;
seg_entry_t *seg;
- uint32_t seg_len = pool_entry_from_hdl(hdr->buf_hdr.pool_hdl)->seg_len;
+ uint32_t seg_len = ((pool_t *)(hdr->buf_hdr.pool_ptr))->seg_len;
uint8_t idx;
seg_entry_find_idx(&hdr, &idx, first);