struct mbox *mbox = (&nix->dev)->mbox;
struct nix_txschq_config *req = NULL;
struct nix_tm_node_list *list;
+ uint16_t link = nix->tx_link;
struct nix_tm_node *sq_node;
struct nix_tm_node *parent;
struct nix_tm_node *node;
uint8_t k = 0;
- uint16_t link;
int rc = 0;
sq_node = nix_tm_node_search(nix, sq, nix->tm_tree);
+ if (!sq_node)
+ return -ENOENT;
+
parent = sq_node->parent;
while (parent) {
if (parent->lvl == ROC_TM_LVL_SCH2)
parent = parent->parent;
}
+ if (!parent)
+ return -ENOENT;
list = nix_tm_node_list(nix, tree);
- link = nix->tx_link;
if (parent->rel_chan != NIX_TM_CHAN_INVALID && parent->rel_chan != tc) {
rc = -EINVAL;
return -EFAULT;
}
- if (!slab) {
- if (!plt_bitmap_scan(bmp, &pos, &slab))
- return -ENOENT;
- }
+ if (!slab)
+ plt_bitmap_scan(bmp, &pos, &slab);
if (child->priority == parent->rr_prio && spare_schq != -1) {
/* Use spare schq first if present */
bmp_mem = PLT_PTR_ADD(bmp_mem, bmp_sz);
}
+ rc = nix_tm_mark_init(nix);
+ if (rc)
+ goto exit;
+
/* Disable TL1 Static Priority when VF's are enabled
* as otherwise VF's TL2 reallocation will be needed
* runtime to support a specific topology of PF.