diff options
author | Matias Elo <matias.elo@nokia.com> | 2024-02-29 16:07:57 +0200 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2024-03-11 15:02:59 +0200 |
commit | 889080035df939b09c447bb296af49baead168e7 (patch) | |
tree | a63f90a4bad39ccd27104ee54a255c4c2859ed9b /platform/linux-dpdk/include/odp_packet_internal.h | |
parent | df2b373200e1d65d30e2d840e80e4f224a6b09a2 (diff) |
Port 187680b44 "linux-gen: event: move subtype into event header"
Port original commit from linux-generic.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Diffstat (limited to 'platform/linux-dpdk/include/odp_packet_internal.h')
-rw-r--r-- | platform/linux-dpdk/include/odp_packet_internal.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/platform/linux-dpdk/include/odp_packet_internal.h b/platform/linux-dpdk/include/odp_packet_internal.h index c86f0646a..cae77245a 100644 --- a/platform/linux-dpdk/include/odp_packet_internal.h +++ b/platform/linux-dpdk/include/odp_packet_internal.h @@ -218,9 +218,9 @@ static inline struct rte_mbuf *pkt_to_mbuf(odp_packet_t pkt) return (struct rte_mbuf *)(uintptr_t)pkt; } -static inline void packet_subtype_set(odp_packet_t pkt, int ev) +static inline void packet_subtype_set(odp_packet_t pkt, int subtype) { - packet_hdr(pkt)->event_hdr.subtype = ev; + packet_hdr(pkt)->event_hdr.subtype = subtype; } /** @@ -236,7 +236,9 @@ static inline void packet_init(odp_packet_hdr_t *pkt_hdr, odp_pktio_t input) pkt_hdr->p.l3_offset = ODP_PACKET_OFFSET_INVALID; pkt_hdr->p.l4_offset = ODP_PACKET_OFFSET_INVALID; - pkt_hdr->event_hdr.subtype = ODP_EVENT_PACKET_BASIC; + if (odp_unlikely(pkt_hdr->event_hdr.subtype != ODP_EVENT_PACKET_BASIC)) + pkt_hdr->event_hdr.subtype = ODP_EVENT_PACKET_BASIC; + pkt_hdr->input = input; } |