Skip to content

Commit

Permalink
linux-gen: pktio: enable TX completion poll mode
Browse files Browse the repository at this point in the history
Enable TX completion poll mode packet I/O capabilities and set a maximum
supported completion ID.

Signed-off-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Matias Elo <matias.elo@nokia.com>
  • Loading branch information
TuomasTaipale committed Sep 13, 2023
1 parent 4733d03 commit 4aa0f56
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion platform/linux-generic/odp_packet_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,7 @@ int odp_pktio_capability(odp_pktio_t pktio, odp_pktio_capability_t *capa)

capa->tx_compl.queue_type_sched = 1;
capa->tx_compl.queue_type_plain = 1;
capa->tx_compl.max_compl_id = 0;
capa->tx_compl.max_compl_id = UINT32_MAX - 1;
capa->free_ctrl.dont_free = 0;

capa->config.pktout.bit.aging_ena = 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 @@ -1820,7 +1820,7 @@ static int dpdk_init_capability(pktio_entry_t *pktio_entry,
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
capa->tx_compl.mode_event = 1;
capa->tx_compl.mode_poll = 0;
capa->tx_compl.mode_poll = 1;
}

/* Copy for fast path access */
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 @@ -926,7 +926,7 @@ static int ipc_capability(pktio_entry_t *pktio_entry ODP_UNUSED, odp_pktio_capab
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
capa->tx_compl.mode_event = 1;
capa->tx_compl.mode_poll = 0;
capa->tx_compl.mode_poll = 1;

return 0;
}
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 @@ -677,7 +677,7 @@ static int loopback_init_capability(pktio_entry_t *pktio_entry)
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
capa->tx_compl.mode_event = 1;
capa->tx_compl.mode_poll = 0;
capa->tx_compl.mode_poll = 1;

if (odp_global_ro.disable.ipsec == 0) {
capa->config.inbound_ipsec = 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 @@ -142,7 +142,7 @@ static int null_capability(pktio_entry_t *pktio_entry ODP_UNUSED,
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
capa->tx_compl.mode_event = 1;
capa->tx_compl.mode_poll = 0;
capa->tx_compl.mode_poll = 1;

return 0;
}
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 @@ -508,7 +508,7 @@ static int pcapif_capability(pktio_entry_t *pktio_entry ODP_UNUSED,
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
capa->tx_compl.mode_event = 1;
capa->tx_compl.mode_poll = 0;
capa->tx_compl.mode_poll = 1;

capa->stats.pktio.counter.in_octets = 1;
capa->stats.pktio.counter.in_packets = 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 @@ -590,7 +590,7 @@ static int sock_capability(pktio_entry_t *pktio_entry,
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
capa->tx_compl.mode_event = 1;
capa->tx_compl.mode_poll = 0;
capa->tx_compl.mode_poll = 1;

/* Fill statistics capabilities */
_odp_sock_stats_capa(pktio_entry, capa);
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 @@ -894,7 +894,7 @@ static int sock_mmap_capability(pktio_entry_t *pktio_entry,
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
capa->tx_compl.mode_event = 1;
capa->tx_compl.mode_poll = 0;
capa->tx_compl.mode_poll = 1;

/* Fill statistics capabilities */
_odp_sock_stats_capa(pktio_entry, capa);
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 @@ -539,7 +539,7 @@ static int tap_capability(pktio_entry_t *pktio_entry ODP_UNUSED,
capa->config.pktout.bit.tx_compl_ena = 1;
capa->tx_compl.mode_all = 1;
capa->tx_compl.mode_event = 1;
capa->tx_compl.mode_poll = 0;
capa->tx_compl.mode_poll = 1;

return 0;
}
Expand Down

0 comments on commit 4aa0f56

Please sign in to comment.