MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_vnic_queue_db_add

Function bnxt_vnic_queue_db_add

dpdk/drivers/net/bnxt/bnxt_vnic.c:539–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537}
538
539static int32_t
540bnxt_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 */
563static

Calls 1

rte_hash_add_keyFunction · 0.85

Tested by

no test coverage detected