aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/include/odp
diff options
context:
space:
mode:
authorJere Leppänen <jere.leppanen@nokia.com>2021-11-08 21:49:35 +0200
committerMatias Elo <matias.elo@nokia.com>2021-11-11 16:20:11 +0200
commitfd1b433b2f0d05915dcb1dd95a1180ad73937ea2 (patch)
tree3b9fb352103c90f394e8b1c3ba85c96dd820b949 /platform/linux-dpdk/include/odp
parent840ab48c2ec573583c0b7e3906c520dc37c1ad93 (diff)
linux-dpdk: pool: move user area from buffer to shm
Instead of storing the user area directly in each buffer, reserve a shared memory area for this purpose for each pool, and store only a pointer in each buffer. This is similar to linux-gen. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'platform/linux-dpdk/include/odp')
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/packet_inline_types.h2
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/packet_inlines.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_inline_types.h b/platform/linux-dpdk/include/odp/api/plat/packet_inline_types.h
index cb9bd7e34..2f4d65281 100644
--- a/platform/linux-dpdk/include/odp/api/plat/packet_inline_types.h
+++ b/platform/linux-dpdk/include/odp/api/plat/packet_inline_types.h
@@ -43,7 +43,7 @@ typedef struct _odp_packet_inline_offset_t {
uint16_t pkt_len;
uint16_t seg_len;
uint16_t nb_segs;
- uint16_t udata;
+ uint16_t user_area;
uint16_t rss;
uint16_t ol_flags;
uint64_t rss_flag;
diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
index ed2778789..f3526fb60 100644
--- a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
+++ b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
@@ -208,7 +208,7 @@ _ODP_INLINE void *odp_packet_user_ptr(odp_packet_t pkt)
_ODP_INLINE void *odp_packet_user_area(odp_packet_t pkt)
{
- return (void *)((char *)pkt + _odp_packet_inline.udata);
+ return _odp_pkt_get(pkt, void *, user_area);
}
_ODP_INLINE uint32_t odp_packet_user_area_size(odp_packet_t pkt)