Skip to content

Commit

Permalink
api: pktio: explicitly deprecate odp_pktout_config_opt_t.bit.tx_compl…
Browse files Browse the repository at this point in the history
…_ena

Explicitly deprecate odp_pktout_config_opt_t.bit.tx_compl_ena field.

Signed-off-by: Matias Elo <[email protected]>
Reviewed-by: Petri Savolainen <[email protected]>
Reviewed-by: Jerin Jacob <[email protected]>
  • Loading branch information
MatiasElo committed Dec 20, 2024
1 parent c5f7e00 commit a71ff95
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion include/odp/api/spec/packet_io_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ typedef union odp_pktout_config_opt_t {
*
* @deprecated Use odp_pktio_config_t::mode_event instead.
*/
uint64_t tx_compl_ena : 1;
uint64_t ODP_DEPRECATE(tx_compl_ena) : 1;

/** Enable packet protocol stats update */
uint64_t proto_stats_ena : 1;
Expand Down
7 changes: 4 additions & 3 deletions platform/linux-generic/odp_packet_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <odp/api/buffer.h>
#include <odp/api/debug.h>
#include <odp/api/deprecated.h>
#include <odp/api/packet.h>
#include <odp/api/packet_io.h>
#include <odp/api/proto_stats.h>
Expand Down Expand Up @@ -650,13 +651,13 @@ int odp_pktio_config(odp_pktio_t hdl, const odp_pktio_config_t *config)
entry->config = *config;

entry->enabled.tx_ts = config->pktout.bit.ts_ena;
entry->enabled.tx_compl = (config->pktout.bit.tx_compl_ena ||
entry->enabled.tx_compl = (config->pktout.bit.ODP_DEPRECATE(tx_compl_ena) ||
config->tx_compl.mode_event ||
config->tx_compl.mode_poll);

if (entry->enabled.tx_compl) {
if ((config->pktout.bit.tx_compl_ena || config->tx_compl.mode_event) &&
configure_tx_event_compl(entry)) {
if ((config->pktout.bit.ODP_DEPRECATE(tx_compl_ena) ||
config->tx_compl.mode_event) && configure_tx_event_compl(entry)) {
unlock_entry(entry);
_ODP_ERR("Unable to configure Tx event completion\n");
return -1;
Expand Down
2 changes: 1 addition & 1 deletion platform/linux-generic/pktio/dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,8 +1775,8 @@ static int dpdk_init_capability(pktio_entry_t *pktio_entry,
capa->config.pktout.bit.ts_ena = 1;

if (!_ODP_DPDK_ZERO_COPY) {
capa->config.pktout.bit.tx_compl_ena = 1;
#if ODP_DEPRECATED_API
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
#endif
capa->tx_compl.mode_event = 1;
Expand Down
2 changes: 1 addition & 1 deletion platform/linux-generic/pktio/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,8 @@ static int ipc_capability(pktio_entry_t *pktio_entry ODP_UNUSED, odp_pktio_capab

capa->max_input_queues = 1;
capa->max_output_queues = 1;
capa->config.pktout.bit.tx_compl_ena = 1;
#if ODP_DEPRECATED_API
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
#endif
capa->tx_compl.mode_event = 1;
Expand Down
2 changes: 1 addition & 1 deletion platform/linux-generic/pktio/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,8 @@ static int loopback_init_capability(pktio_entry_t *pktio_entry)
capa->config.pktout.bit.udp_chksum = 1;
capa->config.pktout.bit.sctp_chksum = 1;
capa->config.pktout.bit.ts_ena = 1;
capa->config.pktout.bit.tx_compl_ena = 1;
#if ODP_DEPRECATED_API
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
#endif
capa->tx_compl.mode_event = 1;
Expand Down
2 changes: 1 addition & 1 deletion platform/linux-generic/pktio/null.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ static int null_capability(pktio_entry_t *pktio_entry ODP_UNUSED,
capa->config.pktin.bit.ts_ptp = 1;

capa->config.pktout.bit.ts_ena = 1;
capa->config.pktout.bit.tx_compl_ena = 1;
#if ODP_DEPRECATED_API
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
#endif
capa->tx_compl.mode_event = 1;
Expand Down
2 changes: 1 addition & 1 deletion platform/linux-generic/pktio/pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ static int pcapif_capability(pktio_entry_t *pktio_entry ODP_UNUSED,
capa->config.pktin.bit.ts_ptp = 1;

capa->config.pktout.bit.ts_ena = 1;
capa->config.pktout.bit.tx_compl_ena = 1;
#if ODP_DEPRECATED_API
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
#endif
capa->tx_compl.mode_event = 1;
Expand Down
2 changes: 1 addition & 1 deletion platform/linux-generic/pktio/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ static int sock_capability(pktio_entry_t *pktio_entry,
capa->config.pktin.bit.ts_ptp = 1;

capa->config.pktout.bit.ts_ena = 1;
capa->config.pktout.bit.tx_compl_ena = 1;
#if ODP_DEPRECATED_API
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
#endif
capa->tx_compl.mode_event = 1;
Expand Down
2 changes: 1 addition & 1 deletion platform/linux-generic/pktio/socket_mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,8 @@ static int sock_mmap_capability(pktio_entry_t *pktio_entry,
capa->config.pktin.bit.ts_ptp = 1;

capa->config.pktout.bit.ts_ena = 1;
capa->config.pktout.bit.tx_compl_ena = 1;
#if ODP_DEPRECATED_API
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
#endif
capa->tx_compl.mode_event = 1;
Expand Down
2 changes: 1 addition & 1 deletion platform/linux-generic/pktio/tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ static int tap_capability(pktio_entry_t *pktio_entry ODP_UNUSED,
capa->config.pktin.bit.ts_ptp = 1;

capa->config.pktout.bit.ts_ena = 1;
capa->config.pktout.bit.tx_compl_ena = 1;
#if ODP_DEPRECATED_API
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
#endif
capa->tx_compl.mode_event = 1;
Expand Down

0 comments on commit a71ff95

Please sign in to comment.