42 #define HAL_QTOP_DEBUG 0
88 hal->hal_rq_count = 0;
92 for (i = 0; i < ARRAY_SIZE(hal->wq_class_array); i++) {
94 if (hal->wq_class_array[i] == NULL) {
95 ocs_log_err(hal->os,
"ocs_varray_alloc for wq_class failed\n");
101 for (i = 0; i < ARRAY_SIZE(hal->wq_cpu_array); i++) {
103 if (hal->wq_cpu_array[i] == NULL) {
104 ocs_log_err(hal->os,
"ocs_varray_alloc for wq_class failed\n");
111 for (i = 0, qt = qtop->
entries; i < qtop->inuse_count; i++, qt++) {
123 ocs_log_info(hal->os,
"QTOP EQ len %d is invalid; using EQ len %d\n",
124 len, default_lengths[
QTOP_EQ]);
125 len = default_lengths[
QTOP_EQ];
129 default_lengths[
QTOP_EQ] = len;
137 eq->nvmeq = qt->
nvmeq;
140 eq->cpu_core = ocs_sched_cpu(eq->instance);
149 ocs_log_info(hal->os,
"QTOP CQ len %d is invalid; using CQ len %d\n",
150 len, default_lengths[
QTOP_CQ]);
151 len = default_lengths[
QTOP_CQ];
155 default_lengths[
QTOP_CQ] = len;
173 uint32_t max_wq_entries;
178 max_wq_entries = OCS_MIN((cq->entry_count / 2), hal->num_qentries[
SLI_QTYPE_WQ]);
182 ocs_log_info(hal->os,
"QTOP WQ len %d is invalid; using WQ len %d\n",
183 len, max_wq_entries);
184 len = max_wq_entries;
188 default_lengths[
QTOP_WQ] = len;
192 if ((hal->ulp_start + qt->
ulp) > hal->ulp_max) {
193 ocs_log_err(hal->os,
"invalid ULP %d for WQ\n", qt->
ulp);
209 ocs_log_err(hal->os,
"QTOP_WQ: EQ ocs_varray_add failed\n");
214 if (qt->
class < ARRAY_SIZE(hal->wq_class_array)) {
216 ocs_log_err(hal->os,
"HAL wq_class_array ocs_varray_add failed\n");
220 ocs_log_err(hal->os,
"Invalid class value: %d\n", qt->
class);
229 ocs_log_err(hal->os,
"HAL wq_cpu_array ocs_varray_add failed\n");
242 ocs_log_info(hal->os,
"QTOP RQ len %d is invalid; using RQ len %d\n",
243 len, default_lengths[
QTOP_RQ]);
244 len = default_lengths[
QTOP_RQ];
248 default_lengths[
QTOP_RQ] = len;
252 if ((hal->ulp_start + qt->
ulp) > hal->ulp_max) {
253 ocs_log_err(hal->os,
"invalid ULP %d for RQ\n", qt->
ulp);
274 ocs_log_info(hal->os,
"QTOP MQ len %d is invalid; using MQ len %d\n",
275 len, default_lengths[
QTOP_MQ]);
276 len = default_lengths[
QTOP_MQ];
280 default_lengths[
QTOP_MQ] = len;
304 for (i = 0; i < rqs_info.
num_pairs; i++) {
307 for (j = 0; j < rqs_info.
num_pairs; j++) {
321 if ((
id < 0) && !mrq_sets[k].num_pairs) {
328 ocs_log_crit(hal->os,
"Can't create more than %d RQ Sets\n",
329 OCS_HAL_MAX_MRQ_SETS);
333 if (!mrq_sets[
id].num_pairs) {
364 rq->nvmeq = rqs_info.
rq_cfg[i].
eq->nvmeq;
373 if (!mrq_sets[j].num_pairs) {
378 ocs_log_crit(hal->os,
"Max Supported MRQ pairs = %d\n",
383 if (!hal->hal_mrq_used) {
384 if (!hal->sli.config.features.flag.mrqp) {
385 ocs_log_err(hal->os,
"MRQ not supported by SLI4.\n");
388 hal->hal_mrq_used = TRUE;
399 mrq_sets[j].len, mrq_sets[j].ulp)) {
403 for (i = 0; i < mrq_sets[j].
num_pairs; i++) {
405 rqs[i]->policy = mrq_sets[j].
policy;
406 rqs[i]->nvmeq = mrq_sets[j].
nvmeq;
407 rqs[i]->is_mrq = TRUE;
408 rqs[i]->base_mrq_id = rqs[0]->hdr->id;
409 rqs[i]->mrq_set_count = mrq_sets[j].
num_pairs;
410 rqs[i]->mrq_set_num = j;
412 rqs[i]->protocol = mrq_sets[j].
protocol;
435 hal_eq_t *eq = ocs_malloc(hal->os,
sizeof(*eq), OCS_M_ZERO | OCS_M_NOWAIT);
440 eq->entry_count = entry_count;
441 eq->instance = hal->eq_count++;
442 eq->queue = hal->eq[eq->instance];
446 if (eq->wq_array == NULL) {
447 ocs_free(hal->os, eq,
sizeof(*eq));
451 ocs_log_err(hal->os,
"EQ[%d] allocation failure\n", eq->instance);
452 ocs_free(hal->os, eq,
sizeof(*eq));
456 hal->hal_eq[eq->instance] = eq;
458 ocs_log_debug(hal->os,
"create eq[%2d] id %3d len %4d\n", eq->instance, eq->queue->id,
479 ocs_hal_t *hal = eq->hal;
480 hal_cq_t *cq = ocs_malloc(hal->os,
sizeof(*cq), OCS_M_ZERO | OCS_M_NOWAIT);
485 cq->instance = eq->hal->cq_count++;
486 cq->entry_count = entry_count;
487 cq->queue = hal->cq[cq->instance];
492 ocs_log_err(hal->os,
"CQ[%d] allocation failure len=%d\n",
495 ocs_free(hal->os, cq,
sizeof(*cq));
498 hal->hal_cq[cq->instance] = cq;
500 ocs_log_debug(hal->os,
"create cq[%2d] id %3d len %4d\n", cq->instance, cq->queue->id,
518 hal_new_cq_set(hal_eq_t *eqs[], hal_cq_t *cqs[], uint32_t num_cqs, uint32_t entry_count)
521 ocs_hal_t *hal = eqs[0]->hal;
527 for (i = 0; i < num_cqs; i++) {
531 for (i = 0; i < num_cqs; i++) {
532 cq = ocs_malloc(hal->os,
sizeof(*cq), OCS_M_ZERO | OCS_M_NOWAIT);
539 cq->instance = hal->cq_count++;
540 cq->entry_count = entry_count;
541 cq->queue = hal->cq[cq->instance];
543 assocs[i] = eqs[i]->queue;
548 ocs_log_err(NULL,
"Failed to create CQ Set. \n");
552 for (i = 0; i < num_cqs; i++) {
553 hal->hal_cq[cqs[i]->instance] = cqs[i];
560 for (i = 0; i < num_cqs; i++) {
562 ocs_free(hal->os, cqs[i],
sizeof(*cqs[i]));
583 ocs_hal_t *hal = cq->eq->hal;
584 hal_mq_t *mq = ocs_malloc(hal->os,
sizeof(*mq), OCS_M_ZERO | OCS_M_NOWAIT);
589 mq->instance = cq->eq->hal->mq_count++;
590 mq->entry_count = entry_count;
591 mq->queue = hal->mq[mq->instance];
597 ocs_log_err(hal->os,
"MQ allocation failure\n");
598 ocs_free(hal->os, mq,
sizeof(*mq));
601 hal->hal_mq[mq->instance] = mq;
603 ocs_log_debug(hal->os,
"create mq[%2d] id %3d len %4d\n", mq->instance, mq->queue->id,
623 hal_new_wq(hal_cq_t *cq, uint32_t entry_count, uint32_t
class, uint32_t ulp)
625 ocs_hal_t *hal = cq->eq->hal;
626 hal_wq_t *wq = ocs_malloc(hal->os,
sizeof(*wq), OCS_M_ZERO | OCS_M_NOWAIT);
629 wq->hal = cq->eq->hal;
632 wq->instance = cq->eq->hal->wq_count++;
633 wq->entry_count = entry_count;
634 wq->queue = hal->wq[wq->instance];
637 wq->wqec_count = wq->wqec_set_count;
638 wq->free_count = wq->entry_count - 1;
643 ocs_log_err(hal->os,
"WQ allocation failure\n");
644 ocs_free(hal->os, wq,
sizeof(*wq));
647 hal->hal_wq[wq->instance] = wq;
649 ocs_log_debug(hal->os,
"create wq[%2d] id %3d len %4d cls %d ulp %d\n", wq->instance, wq->queue->id,
650 wq->entry_count, wq->class, wq->ulp);
670 ocs_hal_t *hal = cq->eq->hal;
671 hal_rq_t *rq = ocs_malloc(hal->os,
sizeof(*rq), OCS_M_ZERO | OCS_M_NOWAIT);
674 rq->instance = hal->hal_rq_count++;
678 rq->entry_count = entry_count;
682 rq->hdr = hal->rq[hal->rq_count];
690 ocs_log_err(hal->os,
"RQ allocation failure - header\n");
691 ocs_free(hal->os, rq,
sizeof(*rq));
694 hal->hal_rq_lookup[hal->rq_count] = rq->instance;
696 ocs_log_debug(hal->os,
"create rq[%2d] id %3d len %4d hdr size %4d ulp %d\n",
697 rq->instance, rq->hdr->id, rq->entry_count, rq->hdr_entry_size, rq->ulp);
701 rq->data = hal->rq[hal->rq_count];
702 rq->data_entry_size = hal->config.rq_default_buffer_size;
709 ocs_log_err(hal->os,
"RQ allocation failure - first burst\n");
710 ocs_free(hal->os, rq,
sizeof(*rq));
713 hal->hal_rq_lookup[hal->rq_count] = rq->instance;
715 ocs_log_debug(hal->os,
"create rq[%2d] id %3d len %4d data size %4d ulp %d\n", rq->instance,
716 rq->data->id, rq->entry_count, rq->data_entry_size, rq->ulp);
718 hal->hal_rq[rq->instance] = rq;
722 rq->entry_count, OCS_M_ZERO | OCS_M_NOWAIT);
723 if (rq->rq_tracker == NULL) {
724 ocs_log_err(hal->os,
"RQ tracker buf allocation failure\n");
747 hal_new_rq_set(hal_cq_t *cqs[], hal_rq_t *rqs[], uint32_t num_rq_pairs, uint32_t entry_count, uint32_t ulp)
749 ocs_hal_t *hal = cqs[0]->eq->hal;
755 for (i = 0; i < num_rq_pairs; i++) {
759 for (i = 0, q_count = 0; i < num_rq_pairs; i++, q_count += 2) {
760 rq = ocs_malloc(hal->os,
sizeof(*rq), OCS_M_ZERO | OCS_M_NOWAIT);
765 rq->instance = hal->hal_rq_count++;
769 rq->entry_count = entry_count;
772 rq->hdr = hal->rq[hal->rq_count];
774 hal->hal_rq_lookup[hal->rq_count] = rq->instance;
776 qs[q_count] = rq->hdr;
779 rq->data = hal->rq[hal->rq_count];
780 rq->data_entry_size = hal->config.rq_default_buffer_size;
781 hal->hal_rq_lookup[hal->rq_count] = rq->instance;
783 qs[q_count + 1] = rq->data;
785 rq->rq_tracker = NULL;
791 rqs[0]->hdr_entry_size,
792 rqs[0]->data_entry_size,
794 ocs_log_err(hal->os,
"RQ Set allocation failure for base CQ=%d\n", cqs[0]->queue->id);
799 for (i = 0; i < num_rq_pairs; i++) {
800 hal->hal_rq[rqs[i]->instance] = rqs[i];
803 rqs[i]->entry_count, OCS_M_ZERO | OCS_M_NOWAIT);
804 if (rqs[i]->rq_tracker == NULL) {
805 ocs_log_err(hal->os,
"RQ tracker buf allocation failure\n");
813 for (i = 0; i < num_rq_pairs; i++) {
814 if (rqs[i] != NULL) {
815 if (rqs[i]->rq_tracker != NULL) {
816 ocs_free(hal->os, rqs[i]->rq_tracker,
819 ocs_free(hal->os, rqs[i],
sizeof(*rqs[i]));
848 eq->hal->hal_eq[eq->instance] = NULL;
849 ocs_free(eq->hal->os, eq,
sizeof(*eq));
885 cq->eq->hal->hal_cq[cq->instance] = NULL;
886 ocs_free(cq->eq->hal->os, cq,
sizeof(*cq));
904 mq->cq->eq->hal->hal_mq[mq->instance] = NULL;
905 ocs_free(mq->cq->eq->hal->os, mq,
sizeof(*mq));
923 wq->cq->eq->hal->hal_wq[wq->instance] = NULL;
924 ocs_free(wq->cq->eq->hal->os, wq,
sizeof(*wq));
940 ocs_hal_t *hal = NULL;
943 hal = rq->cq->eq->hal;
946 if (rq->rq_tracker != NULL) {
948 rq->rq_tracker = NULL;
952 hal->hal_rq[rq->instance] = NULL;
953 ocs_free(hal->os, rq,
sizeof(*rq));
977 ocs_printf(
"eq[%d] id %2d\n", eq->instance, eq->queue->id);
979 ocs_printf(
" cq[%d] id %2d current\n", cq->instance, cq->queue->id);
984 ocs_printf(
" mq[%d] id %2d\n", mq->instance, mq->queue->id);
988 ocs_printf(
" wq[%d] id %2d\n", wq->instance, wq->queue->id);
992 ocs_printf(
" rq[%d] hdr id %2d\n", rq->instance, rq->hdr->id);
1023 for (i = 0; i < ARRAY_SIZE(hal->wq_cpu_array); i++) {
1025 hal->wq_cpu_array[i] = NULL;
1027 for (i = 0; i < ARRAY_SIZE(hal->wq_class_array); i++) {
1029 hal->wq_class_array[i] = NULL;
1056 hal_wq_t *wq = NULL;
1058 switch(io->wq_steering) {
1060 if (likely(io->wq_class < ARRAY_SIZE(hal->wq_class_array))) {
1066 if (likely(eq != NULL)) {
1071 uint32_t cpuidx = ocs_thread_getcpu();
1073 if (likely(cpuidx < ARRAY_SIZE(hal->wq_cpu_array))) {
1080 if (unlikely(wq == NULL)) {
1081 wq = hal->hal_wq[0];
1099 return hal->qtop->entry_counts[
QTOP_EQ];
1102 #define TOKEN_LEN 32
1115 #define P(x) case x: return #x;
1121 P(QTOP_THREAD_START)
1222 return isalpha(c) || (c ==
'_') || (c ==
'$');
1235 return idstart(c) || ocs_isdigit(c);
1280 memset(tok, 0,
sizeof(*tok));
1283 while (*s && ocs_isspace(*s)) {
1293 for (i = 0; i < ARRAY_SIZE(cmatches); i++) {
1294 if (cmatches[i].s[0] == *s) {
1303 if ((s[0] ==
'0') && ((s[1] ==
'x') || (s[1] ==
'X'))) {
1310 while ((*s ==
'.') || ocs_isxdigit(*s)) {
1311 if ((p - tok->
string) < (int32_t)
sizeof(tok->
string)) {
1321 }
else if (ocs_isdigit(*s)) {
1325 while ((*s ==
',') || ocs_isdigit(*s)) {
1326 if ((p - tok->
string) < (int32_t)
sizeof(tok->
string)) {
1342 for (*p++ = *s++;
idchar(*s); s++) {
1349 if (tok->
string[0] ==
'$') {
1353 for (i = 0; i < ARRAY_SIZE(smatches); i++) {
1354 if (strcmp(smatches[i].s, tok->
string) == 0) {
1376 #define P(x) case x: return #x;
1402 #define P(x) case x: return #x;
1436 ocs_log_test(hal->os,
"Syntax error:\n");
1438 for (i = 0, tok = tokarray->
tokens; (i <= tokarray->inuse_count); i++, tok++) {
1439 ocs_log_test(hal->os,
"%s [%2d] %-16s %-16s %s\n", (i == tokarray->
iter_idx) ?
">>>" :
" ", i,
1459 uint32_t num_cpus = ocs_get_num_cpus();
1463 if (ocs_strcmp(tok->
string,
"$ncpu") == 0) {
1465 }
else if (ocs_strcmp(tok->
string,
"$ncpu1") == 0) {
1466 rval = num_cpus - 1;
1467 }
else if (ocs_strcmp(tok->
string,
"$nwq") == 0) {
1469 rval = hal->config.n_wq;
1471 }
else if (ocs_strcmp(tok->
string,
"$maxmrq") == 0) {
1473 }
else if (ocs_strcmp(tok->
string,
"$nulp") == 0) {
1474 rval = hal->ulp_max - hal->ulp_start + 1;
1484 rval = ocs_strtoul(tok->
string, 0, 0);
1488 rval = ocs_strtoul(tok->
string, 0, 0);
1522 switch (tok[0].type)
1543 switch (tok[1].subtype) {
1569 while ((p != NULL) && *p) {
1572 v = ocs_strtoul(p, 0, 0);
1577 p = ocs_strchr(p,
',');
1608 switch(tok[0].subtype) {
1631 uint32_t rpt_count = 1;
1637 uint32_t iter_idx_save;
1642 iter_idx_save = tokarray->
iter_idx;
1644 for (i = 0; i < rpt_count; i++) {
1652 tokarray->
iter_idx = iter_idx_save;
1697 ocs_log_debug(hal->os,
"queue topology: %s\n", qtop_string);
1701 OCS_M_ZERO | OCS_M_NOWAIT | OCS_M_NONUMA);
1702 if (tokarray.
tokens == NULL) {
1716 qtop = ocs_malloc(hal->os,
sizeof(*qtop), OCS_M_ZERO | OCS_M_NOWAIT);
1719 ocs_log_err(hal->os,
"malloc qtop failed\n");
1726 OCS_M_ZERO | OCS_M_NOWAIT | OCS_M_NONUMA);
1728 ocs_log_err(hal->os,
"malloc qtop entries failed\n");
1729 ocs_free(hal->os, qtop,
sizeof(*qtop));
1738 ocs_log_err(hal->os,
"failed to parse tokens \n");
1745 for (i = 0, qt = qtop->
entries; i < qtop->inuse_count; i++, qt++) {
1746 ocs_log_debug(hal->os,
"entry %s set_df %d len %4d class %d ulp %d \n", qtopentry2s(qt->
entry), qt->
set_default, qt->
len,
1771 ocs_free(qtop->
os, qtop,
sizeof(*qtop));
ocs_hal_qtop_entry_t * entries
ocs_hal_qtop_entry_e entry
int32_t sli_eq_modify_delay(sli4_t *sli4, sli4_queue_t *eq, uint32_t num_eq, uint32_t shift, uint32_t delay_mult)
Modify the delay timer for all the EQs.
tok_type_e
return string given a QTOP entry
void hal_queue_teardown(ocs_hal_t *hal)
Teardown HAL queue objects.
#define OCS_HAL_WQEC_SET_COUNT
void hal_del_wq(hal_wq_t *wq)
Free a WQ object.
#define OCS_HAL_CQ_ENTRIES_MIN
#define SLI_MAX_CQ_SET_COUNT
#define OCS_HAL_RQ_ENTRIES_MIN
uint32_t ocs_hal_qtop_eq_count(ocs_hal_t *hal)
Return count of EQs for a queue topology object.
ocs_hal_rtn_e ocs_hal_init_queues(ocs_hal_t *hal, ocs_hal_qtop_t *qtop)
Initialize queues.
void hal_del_rq(hal_rq_t *rq)
Free an RQ object.
#define OCS_HAL_MAX_NUM_RQ
void hal_del_cq(hal_cq_t *cq)
Free a CQ object.
#define OCS_HAL_EQ_ENTRIES_DEF
#define OCS_HAL_MAX_MRQ_SETS
uint32_t entry_counts[QTOP_LAST]
static const char * tokenize(const char *s, tok_t *tok)
Scan string and return next token.
#define OCS_HAL_MAX_NUM_WQ
hal_rq_t * hal_new_rq(hal_cq_t *cq, uint32_t entry_count, uint32_t ulp)
Allocate a hal_rq_t object.
static void tok_syntax(ocs_hal_t *hal, tokarray_t *tokarray)
Generate syntax error message.
#define OCS_HAL_CQ_ENTRIES_DEF
hal_cq_t * hal_new_cq(hal_eq_t *eq, uint32_t entry_count)
Allocate a new CQ object.
static void * ocs_list_remove(ocs_list_t *list, void *item)
Remove an item from the list.
int32_t sli_fc_rq_alloc(sli4_t *sli4, sli4_queue_t *q, uint32_t n_entries, uint32_t buffer_size, sli4_queue_t *cq, uint16_t ulp, uint8_t is_hdr)
Allocate a receive queue.
static uint32_t tok_getnumber(ocs_hal_t *hal, ocs_hal_qtop_t *qtop, tok_t *tok)
parse a number
#define ocs_list_init(head, type, link)
static int ocs_list_valid(ocs_list_t *list)
Test if a list is valid (ready for use)
hal_wq_t * ocs_hal_queue_next_wq(ocs_hal_t *hal, ocs_hal_io_t *io)
Allocate a WQ to an IO object.
static int32_t parse_topology(ocs_hal_t *hal, tokarray_t *tokarray, ocs_hal_qtop_t *qtop)
parse an array of tokens
#define ocs_list_foreach_safe(list, item, nxt)
Iterate a linked list safely.
static tokmatch_t cmatches[]
Declare single character matches.
int32_t sli_fc_rq_set_alloc(sli4_t *sli4, uint32_t num_rq_pairs, sli4_queue_t *qs[], uint32_t base_cq_id, uint32_t n_entries, uint32_t header_buffer_size, uint32_t payload_buffer_size, uint16_t ulp)
Allocate a receive queue set.
static int32_t idstart(int c)
test if character is ID start character
void ocs_hal_qtop_free(ocs_hal_qtop_t *qtop)
free queue topology object
hal_mq_t * hal_new_mq(hal_cq_t *cq, uint32_t entry_count)
Allocate a new MQ object.
#define ocs_hal_verify(cond,...)
#define OCS_HAL_RQ_ENTRIES_DEF
static ocs_hal_qtop_entry_e subtype2qtop(tok_subtype_e q)
convert queue subtype to QTOP entry
uint32_t hal_new_rq_set(hal_cq_t *cqs[], hal_rq_t *rqs[], uint32_t num_rq_pairs, uint32_t entry_count, uint32_t ulp)
Allocate a hal_rq_t object SET.
#define OCS_HAL_MAX_QTOP_ENTRIES
static tokmatch_t smatches[]
Declare identifier match strings.
static const char * token_subtype2s(tok_subtype_e subtype)
convert token sub-type to string
Declare token array object.
void hal_queue_dump(ocs_hal_t *hal)
Display HAL queue objects.
int32_t sli_cq_alloc_set(sli4_t *sli4, sli4_queue_t *qs[], uint32_t num_cqs, uint32_t n_entries, sli4_queue_t *eqs[])
Allocate a c queue set.
void * ocs_varray_iter_next(ocs_varray_t *va)
Return next entry from a void pointer array.
#define OCS_HAL_MQ_ENTRIES_DEF
static void ocs_list_add_tail(ocs_list_t *list, void *item)
Add an item to the tail of the list.
void ocs_varray_free(ocs_varray_t *va)
Free a void pointer array.
static int32_t idchar(int c)
test if character is an ID character
ocs_hal_qtop_t * ocs_hal_qtop_parse(ocs_hal_t *hal, const char *qtop_string)
Parse queue topology string.
Defines a general FC sequence object, consisting of a header, payload buffers and a HAL IO in the cas...
hal_wq_t * hal_new_wq(hal_cq_t *cq, uint32_t entry_count, uint32_t class, uint32_t ulp)
Allocate a new WQ object.
hal_eq_t * hal_new_eq(ocs_hal_t *hal, uint32_t entry_count)
Allocate a new EQ object.
hal_eq_t * eqs[OCE_HAL_MAX_NUM_MRQ_PAIRS]
#define ocs_hal_assert(cond)
tok_subtype_e
Declare token sub-types.
#define P(type, name, value, desc)
void hal_del_eq(hal_eq_t *eq)
Free an EQ object.
#define OCS_HAL_EQ_ENTRIES_MIN
void hal_del_mq(hal_mq_t *mq)
Free a MQ object.
int32_t sli_queue_alloc(sli4_t *sli4, uint32_t qtype, sli4_queue_t *q, uint32_t n_entries, sli4_queue_t *assoc, uint16_t ulp)
Allocate a queue.
uint32_t hal_new_cq_set(hal_eq_t *eqs[], hal_cq_t *cqs[], uint32_t num_cqs, uint32_t entry_count)
Allocate a new CQ Set of objects.
Declare token match structure.
#define OCE_HAL_MAX_NUM_MRQ_PAIRS
#define OCS_HAL_RQ_HEADER_SIZE
static const char * token_type2s(tok_type_e type)
convert token type to string
#define OCS_HAL_MQ_ENTRIES_MIN
#define ocs_list_foreach(list, item)
Iterate a linked list.
#define OCS_HAL_WQ_ENTRIES_DEF
static bool ocs_qlen_valid(uint32_t qlen, uint32_t min, uint32_t max)
int32_t ocs_varray_add(ocs_varray_t *va, void *entry)
Add an entry to a void pointer array.
#define SLI_MAX_RQ_SET_COUNT
struct ocs_hal_rqs_info_t::rq_config rq_cfg[OCS_HAL_MAX_RQ_PAIRS]
#define OCS_HAL_WQ_ENTRIES_MIN
ocs_varray_t * ocs_varray_alloc(ocs_os_handle_t os, uint32_t array_count)
Allocate a void pointer array.