diff options
author | Matias Elo <matias.elo@nokia.com> | 2022-10-11 16:11:55 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-10-28 14:58:46 +0300 |
commit | 113ce0269d74f177f273c98e43fd0abae42fc684 (patch) | |
tree | 5e9971235bffe5990e6377b7a0dfcf6f94306914 /platform/linux-dpdk/include/odp/api | |
parent | fe8883cdb311ecec81088767769f532e5ce37ca7 (diff) |
Port 8238d7e42 "linux-gen: packet: inline odp_packet_buf_data_len() implementation"
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Diffstat (limited to 'platform/linux-dpdk/include/odp/api')
-rw-r--r-- | platform/linux-dpdk/include/odp/api/plat/packet_inlines.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 655cef727..d8365772c 100644 --- a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h +++ b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h @@ -108,6 +108,7 @@ extern "C" { #define odp_packet_color __odp_packet_color #define odp_packet_drop_eligible __odp_packet_drop_eligible #define odp_packet_shaper_len_adjust __odp_packet_shaper_len_adjust + #define odp_packet_buf_data_len __odp_packet_buf_data_len #else #undef _ODP_INLINE #define _ODP_INLINE @@ -542,6 +543,11 @@ _ODP_INLINE int8_t odp_packet_shaper_len_adjust(odp_packet_t pkt) return (int8_t)flags.shaper_len_adj; } +_ODP_INLINE uint32_t odp_packet_buf_data_len(odp_packet_buf_t pkt_buf) +{ + return odp_packet_seg_data_len(ODP_PACKET_INVALID, (odp_packet_seg_t)pkt_buf); +} + #ifdef __cplusplus } #endif |