diff options
author | Tuomas Taipale <tuomas.taipale@nokia.com> | 2022-01-24 07:00:17 +0000 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-02-21 12:23:55 +0200 |
commit | 5c68df2524edb0403df1ee2a0b7afe821f0227bd (patch) | |
tree | 3dea4052e97679bea3287bd4be8853714f3b83d7 /platform/linux-generic/odp_event.c | |
parent | aca3db82e21a9de83e6b141ab4277c424f8e8af8 (diff) |
linux-gen: pktio: implement tx completion event
Add support for event completion for transmitted and dropped packets to
packet io.
For successfully sent packets, completion event sending is handled
commonly inside `odp_pktout_send()`.
For to-be-dropped packets, control typically returns to application to
decide what to do with the unsent packets, with the exception of
`packet_vector_send()` where event sending is handled internally.
Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform/linux-generic/odp_event.c')
-rw-r--r-- | platform/linux-generic/odp_event.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/linux-generic/odp_event.c b/platform/linux-generic/odp_event.c index 652dbdbab..95be9dec2 100644 --- a/platform/linux-generic/odp_event.c +++ b/platform/linux-generic/odp_event.c @@ -76,6 +76,9 @@ void odp_event_free(odp_event_t event) case ODP_EVENT_IPSEC_STATUS: _odp_ipsec_status_free(_odp_ipsec_status_from_event(event)); break; + case ODP_EVENT_PACKET_TX_COMPL: + odp_packet_tx_compl_free(odp_packet_tx_compl_from_event(event)); + break; case ODP_EVENT_DMA_COMPL: odp_dma_compl_free(odp_dma_compl_from_event(event)); break; @@ -124,6 +127,8 @@ int odp_event_is_valid(odp_event_t event) case ODP_EVENT_PACKET_VECTOR: /* Fall through */ case ODP_EVENT_DMA_COMPL: + /* Fall through */ + case ODP_EVENT_PACKET_TX_COMPL: break; default: return 0; |