Lines Matching full:ways

474 	/* Check all the 4 ways for a free slot. */  in rvu_npc_exact_alloc_mem_table_entry()
476 for (i = 0; i < table->mem_table.ways; i++) { in rvu_npc_exact_alloc_mem_table_entry()
771 * @ways: MEM table ways.
784 static int rvu_npc_exact_add_to_list(struct rvu *rvu, enum npc_exact_opc_type opc_type, u8 ways, in rvu_npc_exact_add_to_list() argument
792 WARN_ON(ways >= NPC_EXACT_TBL_MAX_WAYS); in rvu_npc_exact_add_to_list()
814 lhead = &table->lhead_mem_tbl_entry[ways]; in rvu_npc_exact_add_to_list()
832 entry->ways = ways; in rvu_npc_exact_add_to_list()
868 * @ways: ways for MEM table.
872 static void rvu_npc_exact_mem_table_write(struct rvu *rvu, int blkaddr, u8 ways, in rvu_npc_exact_mem_table_write() argument
875 rvu_write64(rvu, blkaddr, NPC_AF_EXACT_MEM_ENTRY(ways, index), mdata); in rvu_npc_exact_mem_table_write()
895 * @ways: ways if opc_type is MEM table.
900 u8 ways, u32 index) in rvu_npc_exact_dealloc_table_entry() argument
921 dev_err(rvu->dev, "%s: Trying to free an unused entry ways=%d index=%d\n", in rvu_npc_exact_dealloc_table_entry()
922 __func__, ways, index); in rvu_npc_exact_dealloc_table_entry()
933 if (!test_bit(index + ways * depth, table->mem_table.bmap)) { in rvu_npc_exact_dealloc_table_entry()
940 rvu_npc_exact_mem_table_write(rvu, blkaddr, ways, index, null_mdata); in rvu_npc_exact_dealloc_table_entry()
941 clear_bit(index + ways * depth, table->mem_table.bmap); in rvu_npc_exact_dealloc_table_entry()
952 dev_dbg(rvu->dev, "%s: Successfully deleted entry (index=%d, ways=%d opc_type=%d\n", in rvu_npc_exact_dealloc_table_entry()
953 __func__, index, ways, opc_type); in rvu_npc_exact_dealloc_table_entry()
965 * @ways: Ways. Only valid for MEM table.
968 * Try allocating a slot from MEM table. If all 4 ways
974 u32 *index, u8 *ways, enum npc_exact_opc_type *opc_type) in rvu_npc_exact_alloc_table_entry() argument
982 /* Check in 4-ways mem entry for free slote */ in rvu_npc_exact_alloc_table_entry()
985 err = rvu_npc_exact_alloc_mem_table_entry(rvu, ways, index, hash); in rvu_npc_exact_alloc_table_entry()
988 dev_dbg(rvu->dev, "%s: inserted in 4 ways hash table ways=%d, index=%d\n", in rvu_npc_exact_alloc_table_entry()
989 __func__, *ways, *index); in rvu_npc_exact_alloc_table_entry()
993 dev_dbg(rvu->dev, "%s: failed to insert in 4 ways hash table\n", __func__); in rvu_npc_exact_alloc_table_entry()
996 *ways = 0; in rvu_npc_exact_alloc_table_entry()
1288 rvu_npc_exact_dealloc_table_entry(rvu, entry->opc_type, entry->ways, entry->index); in rvu_npc_exact_del_table_entry_by_id()
1328 u8 ways; in rvu_npc_exact_add_table_entry() local
1332 err = rvu_npc_exact_alloc_table_entry(rvu, mac, chan, ctype, &index, &ways, &opc_type); in rvu_npc_exact_add_table_entry()
1344 rvu_npc_exact_mem_table_write(rvu, blkaddr, ways, index, mdata); in rvu_npc_exact_add_table_entry()
1347 err = rvu_npc_exact_add_to_list(rvu, opc_type, ways, index, cgx_id, lmac_id, in rvu_npc_exact_add_table_entry()
1350 rvu_npc_exact_dealloc_table_entry(rvu, opc_type, ways, index); in rvu_npc_exact_add_table_entry()
1358 rvu_npc_exact_dealloc_table_entry(rvu, opc_type, ways, index); in rvu_npc_exact_add_table_entry()
1375 "%s: Successfully added entry (index=%d, dmac=%pM, ways=%d opc_type=%d\n", in rvu_npc_exact_add_table_entry()
1376 __func__, index, mac, ways, opc_type); in rvu_npc_exact_add_table_entry()
1436 rvu_npc_exact_mem_table_write(rvu, blkaddr, entry->ways, entry->index, mdata); in rvu_npc_exact_update_table_entry()
1445 "%s: Successfully updated entry (index=%d, dmac=%pM, ways=%d opc_type=%d\n", in rvu_npc_exact_update_table_entry()
1446 __func__, entry->index, entry->mac, entry->ways, entry->opc_type); in rvu_npc_exact_update_table_entry()
1906 /* Read table size, ways and depth */ in rvu_npc_exact_init()
1907 table->mem_table.ways = FIELD_GET(GENMASK_ULL(19, 16), npc_const3); in rvu_npc_exact_init()
1911 dev_dbg(rvu->dev, "%s: NPC exact match 4way_2k table(ways=%d, depth=%d)\n", in rvu_npc_exact_init()
1912 __func__, table->mem_table.ways, table->cam_table.depth); in rvu_npc_exact_init()
1924 table_size = table->mem_table.depth * table->mem_table.ways; in rvu_npc_exact_init()