Home
last modified time | relevance | path

Searched refs:tcam (Results 1 – 18 of 18) sorted by relevance

/linux-6.6.21/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_acl_tcam.c57 static int mlxsw_sp_acl_tcam_region_id_get(struct mlxsw_sp_acl_tcam *tcam, in mlxsw_sp_acl_tcam_region_id_get() argument
62 id = find_first_zero_bit(tcam->used_regions, tcam->max_regions); in mlxsw_sp_acl_tcam_region_id_get()
63 if (id < tcam->max_regions) { in mlxsw_sp_acl_tcam_region_id_get()
64 __set_bit(id, tcam->used_regions); in mlxsw_sp_acl_tcam_region_id_get()
71 static void mlxsw_sp_acl_tcam_region_id_put(struct mlxsw_sp_acl_tcam *tcam, in mlxsw_sp_acl_tcam_region_id_put() argument
74 __clear_bit(id, tcam->used_regions); in mlxsw_sp_acl_tcam_region_id_put()
77 static int mlxsw_sp_acl_tcam_group_id_get(struct mlxsw_sp_acl_tcam *tcam, in mlxsw_sp_acl_tcam_group_id_get() argument
82 id = find_first_zero_bit(tcam->used_groups, tcam->max_groups); in mlxsw_sp_acl_tcam_group_id_get()
83 if (id < tcam->max_groups) { in mlxsw_sp_acl_tcam_group_id_get()
84 __set_bit(id, tcam->used_groups); in mlxsw_sp_acl_tcam_group_id_get()
[all …]
Dspectrum2_acl_tcam.c72 struct mlxsw_sp2_acl_tcam *tcam = priv; in mlxsw_sp2_acl_tcam_init() local
84 tcam->kvdl_count = _tcam->max_regions; in mlxsw_sp2_acl_tcam_init()
86 tcam->kvdl_count = MLXSW_CORE_RES_GET(mlxsw_sp->core, in mlxsw_sp2_acl_tcam_init()
89 tcam->kvdl_count, &tcam->kvdl_index); in mlxsw_sp2_acl_tcam_init()
111 mlxsw_reg_pefa_pack(pefa_pl, tcam->kvdl_index + i, in mlxsw_sp2_acl_tcam_init()
117 mlxsw_reg_pgcr_pack(pgcr_pl, tcam->kvdl_index); in mlxsw_sp2_acl_tcam_init()
122 err = mlxsw_sp_acl_atcam_init(mlxsw_sp, &tcam->atcam); in mlxsw_sp2_acl_tcam_init()
136 tcam->kvdl_count, tcam->kvdl_index); in mlxsw_sp2_acl_tcam_init()
142 struct mlxsw_sp2_acl_tcam *tcam = priv; in mlxsw_sp2_acl_tcam_fini() local
144 mlxsw_sp_acl_atcam_fini(mlxsw_sp, &tcam->atcam); in mlxsw_sp2_acl_tcam_fini()
[all …]
Dspectrum_acl_tcam.h29 struct mlxsw_sp_acl_tcam *tcam);
31 struct mlxsw_sp_acl_tcam *tcam);
39 struct mlxsw_sp_acl_tcam *tcam, void *ruleset_priv,
Dspectrum_acl.c35 struct mlxsw_sp_acl_tcam tcam; member
45 return &acl->tcam; in mlxsw_sp_acl_to_tcam()
188 err = ops->ruleset_add(mlxsw_sp, &acl->tcam, ruleset->priv, in mlxsw_sp_acl_ruleset_create()
1086 err = mlxsw_sp_acl_tcam_init(mlxsw_sp, &acl->tcam); in mlxsw_sp_acl_init()
1114 mlxsw_sp_acl_tcam_fini(mlxsw_sp, &acl->tcam); in mlxsw_sp_acl_fini()
Dspectrum1_acl_tcam.c51 struct mlxsw_sp_acl_tcam *tcam) in mlxsw_sp1_acl_tcam_init() argument
Dspectrum.h1122 struct mlxsw_sp_acl_tcam *tcam);
/linux-6.6.21/drivers/net/ethernet/intel/ice/
Dice_flex_pipe.c345 struct_size(sect_rx, tcam, 1)); in ice_upd_dvm_boost_entry()
351 struct_size(sect_tx, tcam, 1)); in ice_upd_dvm_boost_entry()
357 memcpy(sect_rx->tcam, entry->boost_entry, sizeof(*sect_rx->tcam)); in ice_upd_dvm_boost_entry()
372 ice_set_key((u8 *)&sect_rx->tcam[0].key, sizeof(sect_rx->tcam[0].key), in ice_upd_dvm_boost_entry()
376 memcpy(sect_tx->tcam, sect_rx->tcam, sizeof(*sect_tx->tcam)); in ice_upd_dvm_boost_entry()
464 struct_size(sect_rx, tcam, 1)); in ice_create_tunnel()
470 struct_size(sect_tx, tcam, 1)); in ice_create_tunnel()
476 memcpy(sect_rx->tcam, hw->tnl.tbl[index].boost_entry, in ice_create_tunnel()
477 sizeof(*sect_rx->tcam)); in ice_create_tunnel()
482 ice_set_key((u8 *)&sect_rx->tcam[0].key, sizeof(sect_rx->tcam[0].key), in ice_create_tunnel()
[all …]
Dice_ddp.h351 struct ice_boost_tcam_entry tcam[]; member
356 tcam, 1) - \
371 struct ice_marker_ptype_tcam_entry tcam[]; member
375 ICE_MAX_ENTRIES_IN_BUF(struct_size_t(struct ice_marker_ptype_tcam_section, tcam, \
Dice_ddp.c482 return marker_ptype->tcam + index; in ice_marker_ptype_tcam_handler()
626 return boost->tcam + index; in ice_boost_tcam_handler()
642 struct ice_boost_tcam_entry *tcam; in ice_find_boost_entry() local
651 tcam = ice_pkg_enum_entry(ice_seg, &state, in ice_find_boost_entry()
654 if (tcam && le16_to_cpu(tcam->addr) == addr) { in ice_find_boost_entry()
655 *entry = tcam; in ice_find_boost_entry()
660 } while (tcam); in ice_find_boost_entry()
1741 struct ice_marker_ptype_tcam_entry *tcam; in ice_fill_hw_ptype() local
1752 tcam = ice_pkg_enum_entry(seg, &state, in ice_fill_hw_ptype()
1755 if (tcam && in ice_fill_hw_ptype()
[all …]
Dice_flex_type.h202 struct ice_tcam_inf tcam[ICE_MAX_TCAM_PER_PROFILE]; member
/linux-6.6.21/drivers/net/ethernet/marvell/mvpp2/
Dmvpp2_cls.c521 mvpp2_write(priv, MVPP22_CLS_C2_TCAM_DATA0, c2->tcam[0]); in mvpp2_cls_c2_write()
522 mvpp2_write(priv, MVPP22_CLS_C2_TCAM_DATA1, c2->tcam[1]); in mvpp2_cls_c2_write()
523 mvpp2_write(priv, MVPP22_CLS_C2_TCAM_DATA2, c2->tcam[2]); in mvpp2_cls_c2_write()
524 mvpp2_write(priv, MVPP22_CLS_C2_TCAM_DATA3, c2->tcam[3]); in mvpp2_cls_c2_write()
526 mvpp2_write(priv, MVPP22_CLS_C2_TCAM_DATA4, c2->tcam[4]); in mvpp2_cls_c2_write()
537 c2->tcam[0] = mvpp2_read(priv, MVPP22_CLS_C2_TCAM_DATA0); in mvpp2_cls_c2_read()
538 c2->tcam[1] = mvpp2_read(priv, MVPP22_CLS_C2_TCAM_DATA1); in mvpp2_cls_c2_read()
539 c2->tcam[2] = mvpp2_read(priv, MVPP22_CLS_C2_TCAM_DATA2); in mvpp2_cls_c2_read()
540 c2->tcam[3] = mvpp2_read(priv, MVPP22_CLS_C2_TCAM_DATA3); in mvpp2_cls_c2_read()
541 c2->tcam[4] = mvpp2_read(priv, MVPP22_CLS_C2_TCAM_DATA4); in mvpp2_cls_c2_read()
[all …]
Dmvpp2_prs.c30 pe->tcam[MVPP2_PRS_TCAM_INV_WORD] &= ~MVPP2_PRS_TCAM_INV_MASK; in mvpp2_prs_hw_write()
40 mvpp2_write(priv, MVPP2_PRS_TCAM_DATA_REG(i), pe->tcam[i]); in mvpp2_prs_hw_write()
60 pe->tcam[MVPP2_PRS_TCAM_INV_WORD] = mvpp2_read(priv, in mvpp2_prs_init_from_hw()
62 if (pe->tcam[MVPP2_PRS_TCAM_INV_WORD] & MVPP2_PRS_TCAM_INV_MASK) in mvpp2_prs_init_from_hw()
66 pe->tcam[i] = mvpp2_read(priv, MVPP2_PRS_TCAM_DATA_REG(i)); in mvpp2_prs_init_from_hw()
103 pe->tcam[MVPP2_PRS_TCAM_LU_WORD] &= ~MVPP2_PRS_TCAM_LU(MVPP2_PRS_LU_MASK); in mvpp2_prs_tcam_lu_set()
104 pe->tcam[MVPP2_PRS_TCAM_LU_WORD] &= ~MVPP2_PRS_TCAM_LU_EN(MVPP2_PRS_LU_MASK); in mvpp2_prs_tcam_lu_set()
105 pe->tcam[MVPP2_PRS_TCAM_LU_WORD] |= MVPP2_PRS_TCAM_LU(lu & MVPP2_PRS_LU_MASK); in mvpp2_prs_tcam_lu_set()
106 pe->tcam[MVPP2_PRS_TCAM_LU_WORD] |= MVPP2_PRS_TCAM_LU_EN(MVPP2_PRS_LU_MASK); in mvpp2_prs_tcam_lu_set()
114 pe->tcam[MVPP2_PRS_TCAM_PORT_WORD] &= ~MVPP2_PRS_TCAM_PORT_EN(BIT(port)); in mvpp2_prs_tcam_port_set()
[all …]
Dmvpp2_cls.h117 u32 tcam[MVPP2_CLS_C2_TCAM_WORDS]; member
Dmvpp2_prs.h273 u32 tcam[MVPP2_PRS_TCAM_WORDS]; member
Dmvpp2_debugfs.c375 ai = pe.tcam[MVPP2_PRS_TCAM_AI_WORD] & MVPP2_PRS_AI_MASK; in mvpp2_dbgfs_prs_ai_show()
376 ai_mask = (pe.tcam[MVPP2_PRS_TCAM_AI_WORD] >> 16) & MVPP2_PRS_AI_MASK; in mvpp2_dbgfs_prs_ai_show()
/linux-6.6.21/drivers/net/ethernet/chelsio/cxgb4/
Dcudbg_lib.c2540 struct cudbg_mps_tcam *tcam, u32 idx) in cudbg_collect_tcam_index() argument
2566 tcam->lookup_type = DATALKPTYPE_G(data2); in cudbg_collect_tcam_index()
2572 if (tcam->lookup_type && tcam->lookup_type != DATALKPTYPE_M) { in cudbg_collect_tcam_index()
2574 tcam->vniy = (data2 & DATAVIDH2_F) | DATAVIDH1_G(data2); in cudbg_collect_tcam_index()
2575 tcam->vniy = (tcam->vniy << 16) | VIDL_G(val); in cudbg_collect_tcam_index()
2576 tcam->dip_hit = data2 & DATADIPHIT_F; in cudbg_collect_tcam_index()
2578 tcam->vlan_vld = data2 & DATAVIDH2_F; in cudbg_collect_tcam_index()
2579 tcam->ivlan = VIDL_G(val); in cudbg_collect_tcam_index()
2582 tcam->port_num = DATAPORTNUM_G(data2); in cudbg_collect_tcam_index()
2591 if (tcam->lookup_type && tcam->lookup_type != DATALKPTYPE_M) { in cudbg_collect_tcam_index()
[all …]
/linux-6.6.21/drivers/net/ethernet/sun/
Dniu.c5017 tp = &parent->tcam[index]; in niu_set_ip_frag_rule()
7180 tp = &parent->tcam[idx]; in niu_get_ethtool_tcam_entry()
7263 tp = &parent->tcam[idx]; in niu_get_ethtool_tcam_all()
7517 tp = &parent->tcam[idx]; in niu_add_ethtool_tcam_entry()
7601 tp = &parent->tcam[idx]; in niu_del_ethtool_tcam_entry()
Dniu.h3116 struct niu_tcam_entry tcam[NIU_TCAM_ENTRIES_MAX]; member