| 537 | } |
| 538 | |
| 539 | static int32_t |
| 540 | bnxt_vnic_queue_db_add(struct bnxt *bp, uint64_t *q_list) |
| 541 | { |
| 542 | struct bnxt_vnic_info *vnic_info; |
| 543 | int32_t vnic_id, rc = -1; |
| 544 | |
| 545 | vnic_id = rte_hash_add_key(bp->vnic_queue_db.rss_q_db, |
| 546 | (const void *)q_list); |
| 547 | |
| 548 | if (vnic_id < 0 || vnic_id >= bp->max_vnics) { |
| 549 | PMD_DRV_LOG(DEBUG, "unable to assign vnic index %d\n", |
| 550 | vnic_id); |
| 551 | return rc; |
| 552 | } |
| 553 | |
| 554 | vnic_info = &bp->vnic_info[vnic_id]; |
| 555 | if (vnic_info->fw_vnic_id != INVALID_HW_RING_ID) { |
| 556 | PMD_DRV_LOG(DEBUG, "Invalid ring id for %d.\n", vnic_id); |
| 557 | return rc; |
| 558 | } |
| 559 | return vnic_id; |
| 560 | } |
| 561 | |
| 562 | /* Function to validate the incoming rss configuration */ |
| 563 | static |
no test coverage detected