From d83caf6605ab5411b787830a16033e0b8870c411 Mon Sep 17 00:00:00 2001 From: Matias Elo Date: Wed, 25 Oct 2023 14:43:01 +0300 Subject: Port 926a4cbc0 "linux-gen: packet: add fields for TX completion poll mode" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port original commit from linux-generic. Signed-off-by: Matias Elo Reviewed-by: Jere Leppänen --- platform/linux-dpdk/include/odp/api/plat/packet_inline_types.h | 9 +++++---- platform/linux-dpdk/include/odp_packet_internal.h | 3 +++ platform/linux-dpdk/odp_packet.c | 4 ++-- 3 files changed, 10 insertions(+), 6 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 5466ce58b..5bbcadd32 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 @@ -121,7 +121,7 @@ typedef union { uint32_t all_flags; struct { - uint32_t reserved1: 5; + uint32_t reserved1: 4; /* * Init flags @@ -139,7 +139,8 @@ typedef union { uint32_t l4_chksum_set: 1; /* L4 chksum bit is valid */ uint32_t l4_chksum: 1; /* L4 chksum override */ uint32_t ts_set: 1; /* Set Tx timestamp */ - uint32_t tx_compl: 1; /* Tx completion event requested */ + uint32_t tx_compl_ev: 1; /* Tx completion event requested */ + uint32_t tx_compl_poll: 1; /* Tx completion poll requested */ uint32_t free_ctrl: 1; /* Don't free option */ uint32_t tx_aging: 1; /* Packet aging at Tx requested */ uint32_t shaper_len_adj: 8; /* Adjustment for traffic mgr */ @@ -158,8 +159,8 @@ typedef union { /* Flag groups */ struct { - uint32_t reserved2: 5; - uint32_t other: 20; /* All other flags */ + uint32_t reserved2: 4; + uint32_t other: 21; /* All other flags */ uint32_t error: 7; /* All error flags */ } all; diff --git a/platform/linux-dpdk/include/odp_packet_internal.h b/platform/linux-dpdk/include/odp_packet_internal.h index b4d1f5d44..c86f0646a 100644 --- a/platform/linux-dpdk/include/odp_packet_internal.h +++ b/platform/linux-dpdk/include/odp_packet_internal.h @@ -161,6 +161,9 @@ typedef struct ODP_ALIGNED_CACHE odp_packet_hdr_t { * request + requested drop timeout). */ uint64_t tx_aging_ns; + /* Tx completion poll completion identifier */ + uint32_t tx_compl_id; + /* LSO profile index */ uint8_t lso_profile_idx; diff --git a/platform/linux-dpdk/odp_packet.c b/platform/linux-dpdk/odp_packet.c index 95149118e..a77b7f907 100644 --- a/platform/linux-dpdk/odp_packet.c +++ b/platform/linux-dpdk/odp_packet.c @@ -1766,7 +1766,7 @@ int odp_packet_tx_compl_request(odp_packet_t pkt, const odp_packet_tx_compl_opt_ { odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt); - pkt_hdr->p.flags.tx_compl = opt->mode == ODP_PACKET_TX_COMPL_EVENT ? 1 : 0; + pkt_hdr->p.flags.tx_compl_ev = opt->mode == ODP_PACKET_TX_COMPL_EVENT ? 1 : 0; pkt_hdr->dst_queue = opt->queue; return 0; @@ -1776,7 +1776,7 @@ int odp_packet_has_tx_compl_request(odp_packet_t pkt) { odp_packet_hdr_t *pkt_hdr = packet_hdr(pkt); - return pkt_hdr->p.flags.tx_compl; + return pkt_hdr->p.flags.tx_compl_ev; } void odp_packet_tx_compl_free(odp_packet_tx_compl_t tx_compl) -- cgit v1.2.3