* [PATCH] event/cnxk: add preliminary Tx queue depth check
@ 2022-08-16 15:35 pbhagavatula
2022-09-14 12:58 ` Jerin Jacob
0 siblings, 1 reply; 2+ messages in thread
From: pbhagavatula @ 2022-08-16 15:35 UTC (permalink / raw)
To: jerinj, Pavan Nikhilesh, Shijith Thotton; +Cc: dev
From: Pavan Nikhilesh <pbhagavatula@marvell.com>
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>
---
drivers/event/cnxk/cn10k_worker.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h
index 0915f404e0..a71e076ff8 100644
--- a/drivers/event/cnxk/cn10k_worker.h
+++ b/drivers/event/cnxk/cn10k_worker.h
@@ -655,6 +655,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);
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] event/cnxk: add preliminary Tx queue depth check
2022-08-16 15:35 [PATCH] event/cnxk: add preliminary Tx queue depth check pbhagavatula
@ 2022-09-14 12:58 ` Jerin Jacob
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2022-09-14 12:58 UTC (permalink / raw)
To: pbhagavatula; +Cc: jerinj, Shijith Thotton, dev
On Tue, Aug 16, 2022 at 9:05 PM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> 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>
Applied to dpdk-next-net-eventdev/for-main. Thanks
> ---
> drivers/event/cnxk/cn10k_worker.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/event/cnxk/cn10k_worker.h b/drivers/event/cnxk/cn10k_worker.h
> index 0915f404e0..a71e076ff8 100644
> --- a/drivers/event/cnxk/cn10k_worker.h
> +++ b/drivers/event/cnxk/cn10k_worker.h
> @@ -655,6 +655,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);
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-14 12:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16 15:35 [PATCH] event/cnxk: add preliminary Tx queue depth check pbhagavatula
2022-09-14 12:58 ` Jerin Jacob
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).