event/cnxk: add preliminary Tx queue depth check
Add preliminary Tx queue depth check and return on failure. Once the check passes, tx_adapter_enqueue() function becomes a blocking call till it succeeds. Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
This commit is contained in:
parent
fbb9f7e215
commit
1c47a13510
@ -673,6 +673,11 @@ cn10k_sso_hws_event_tx(struct cn10k_sso_hws *ws, struct rte_event *ev,
|
||||
}
|
||||
|
||||
m = ev->mbuf;
|
||||
txq = cn10k_sso_hws_xtract_meta(m, txq_data);
|
||||
if (((txq->nb_sqb_bufs_adj -
|
||||
__atomic_load_n((int16_t *)txq->fc_mem, __ATOMIC_RELAXED))
|
||||
<< txq->sqes_per_sqb_log2) <= 0)
|
||||
return 0;
|
||||
cn10k_sso_tx_one(ws, m, cmd, lmt_id, lmt_addr, ev->sched_type, txq_data,
|
||||
flags);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user