diff options
author | Matias Elo <matias.elo@nokia.com> | 2022-11-07 09:12:53 +0200 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-11-17 14:09:14 +0200 |
commit | 08bb08813855aaf3ed6984315ea9b7fb3301caef (patch) | |
tree | b65dae498783cb964c3c9e2f06176bcd6f392902 /platform/linux-dpdk/include/odp/api | |
parent | 0ca7ec352df9e05cc0a6c88af662723d961db910 (diff) |
Port 4c59e3d73 "linux-gen: packet: inline odp_packet_ts_request() 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 | 8 |
1 files changed, 8 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 9d4849a7e..91d302cd9 100644 --- a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h +++ b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h @@ -94,6 +94,7 @@ extern "C" { #define odp_packet_flow_hash __odp_packet_flow_hash #define odp_packet_flow_hash_set __odp_packet_flow_hash_set #define odp_packet_ts __odp_packet_ts + #define odp_packet_ts_request __odp_packet_ts_request #define odp_packet_head __odp_packet_head #define odp_packet_is_segmented __odp_packet_is_segmented #define odp_packet_first_seg __odp_packet_first_seg @@ -482,6 +483,13 @@ _ODP_INLINE odp_time_t odp_packet_ts(odp_packet_t pkt) return _odp_pkt_get(pkt, odp_time_t, timestamp); } +_ODP_INLINE void odp_packet_ts_request(odp_packet_t pkt, int enable) +{ + _odp_packet_flags_t *flags = _odp_pkt_get_ptr(pkt, _odp_packet_flags_t, flags); + + flags->ts_set = !!enable; +} + _ODP_INLINE void *odp_packet_head(odp_packet_t pkt) { return (uint8_t *)odp_packet_data(pkt) - odp_packet_headroom(pkt); |