aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
diff options
context:
space:
mode:
Diffstat (limited to 'platform/linux-dpdk/include/odp/api/plat/packet_inlines.h')
-rw-r--r--platform/linux-dpdk/include/odp/api/plat/packet_inlines.h14
1 files changed, 9 insertions, 5 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 b41a272ef..627ed1d44 100644
--- a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
+++ b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h
@@ -1,8 +1,6 @@
-/* Copyright (c) 2016-2018, Linaro Limited
- * Copyright (c) 2019-2023, Nokia
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright (c) 2016-2018 Linaro Limited
+ * Copyright (c) 2019-2024 Nokia
*/
/**
@@ -61,6 +59,7 @@ extern "C" {
#define odp_packet_data_seg_len __odp_packet_data_seg_len
#define odp_packet_len __odp_packet_len
#define odp_packet_buf_len __odp_packet_buf_len
+ #define odp_packet_reset_max_len __odp_packet_reset_max_len
#define odp_packet_headroom __odp_packet_headroom
#define odp_packet_tailroom __odp_packet_tailroom
#define odp_packet_pool __odp_packet_pool
@@ -187,6 +186,11 @@ _ODP_INLINE uint32_t odp_packet_buf_len(odp_packet_t pkt)
return (uint32_t)(mb->nb_segs * mb->buf_len);
}
+_ODP_INLINE uint32_t odp_packet_reset_max_len(odp_packet_t pkt)
+{
+ return odp_packet_buf_len(pkt) - RTE_PKTMBUF_HEADROOM;
+}
+
_ODP_INLINE void *odp_packet_data_seg_len(odp_packet_t pkt,
uint32_t *seg_len)
{