return 1;
}
+uint16_t __rte_hot
+cn9k_sso_hws_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks)
+{
+ struct cn9k_sso_hws *ws = port;
+
+ RTE_SET_USED(timeout_ticks);
+
+ if (ws->swtag_req) {
+ ws->swtag_req = 0;
+ cnxk_sso_hws_swtag_wait(ws->tag_op);
+ return 1;
+ }
+
+ return cn9k_sso_hws_get_work(ws, ev);
+}
+
+uint16_t __rte_hot
+cn9k_sso_hws_deq_burst(void *port, struct rte_event ev[], uint16_t nb_events,
+ uint64_t timeout_ticks)
+{
+ RTE_SET_USED(nb_events);
+
+ return cn9k_sso_hws_deq(port, ev, timeout_ticks);
+}
+
+uint16_t __rte_hot
+cn9k_sso_hws_tmo_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks)
+{
+ struct cn9k_sso_hws *ws = port;
+ uint16_t ret = 1;
+ uint64_t iter;
+
+ if (ws->swtag_req) {
+ ws->swtag_req = 0;
+ cnxk_sso_hws_swtag_wait(ws->tag_op);
+ return ret;
+ }
+
+ ret = cn9k_sso_hws_get_work(ws, ev);
+ for (iter = 1; iter < timeout_ticks && (ret == 0); iter++)
+ ret = cn9k_sso_hws_get_work(ws, ev);
+
+ return ret;
+}
+
+uint16_t __rte_hot
+cn9k_sso_hws_tmo_deq_burst(void *port, struct rte_event ev[],
+ uint16_t nb_events, uint64_t timeout_ticks)
+{
+ RTE_SET_USED(nb_events);
+
+ return cn9k_sso_hws_tmo_deq(port, ev, timeout_ticks);
+}
+
/* Dual ws ops. */
uint16_t __rte_hot
return 1;
}
+
+uint16_t __rte_hot
+cn9k_sso_hws_dual_deq(void *port, struct rte_event *ev, uint64_t timeout_ticks)
+{
+ struct cn9k_sso_hws_dual *dws = port;
+ uint16_t gw;
+
+ RTE_SET_USED(timeout_ticks);
+ if (dws->swtag_req) {
+ dws->swtag_req = 0;
+ cnxk_sso_hws_swtag_wait(dws->ws_state[!dws->vws].tag_op);
+ return 1;
+ }
+
+ gw = cn9k_sso_hws_dual_get_work(&dws->ws_state[dws->vws],
+ &dws->ws_state[!dws->vws], ev);
+ dws->vws = !dws->vws;
+ return gw;
+}
+
+uint16_t __rte_hot
+cn9k_sso_hws_dual_deq_burst(void *port, struct rte_event ev[],
+ uint16_t nb_events, uint64_t timeout_ticks)
+{
+ RTE_SET_USED(nb_events);
+
+ return cn9k_sso_hws_dual_deq(port, ev, timeout_ticks);
+}
+
+uint16_t __rte_hot
+cn9k_sso_hws_dual_tmo_deq(void *port, struct rte_event *ev,
+ uint64_t timeout_ticks)
+{
+ struct cn9k_sso_hws_dual *dws = port;
+ uint16_t ret = 1;
+ uint64_t iter;
+
+ if (dws->swtag_req) {
+ dws->swtag_req = 0;
+ cnxk_sso_hws_swtag_wait(dws->ws_state[!dws->vws].tag_op);
+ return ret;
+ }
+
+ ret = cn9k_sso_hws_dual_get_work(&dws->ws_state[dws->vws],
+ &dws->ws_state[!dws->vws], ev);
+ dws->vws = !dws->vws;
+ for (iter = 1; iter < timeout_ticks && (ret == 0); iter++) {
+ ret = cn9k_sso_hws_dual_get_work(&dws->ws_state[dws->vws],
+ &dws->ws_state[!dws->vws], ev);
+ dws->vws = !dws->vws;
+ }
+
+ return ret;
+}
+
+uint16_t __rte_hot
+cn9k_sso_hws_dual_tmo_deq_burst(void *port, struct rte_event ev[],
+ uint16_t nb_events, uint64_t timeout_ticks)
+{
+ RTE_SET_USED(nb_events);
+
+ return cn9k_sso_hws_dual_tmo_deq(port, ev, timeout_ticks);
+}