Home
last modified time | relevance | path

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

/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_acl_tcam.c59 static int mlxsw_sp_acl_tcam_region_id_get(struct mlxsw_sp_acl_tcam *tcam, in mlxsw_sp_acl_tcam_region_id_get() argument
64 id = ida_alloc_max(&tcam->used_regions, tcam->max_regions - 1, in mlxsw_sp_acl_tcam_region_id_get()
74 static void mlxsw_sp_acl_tcam_region_id_put(struct mlxsw_sp_acl_tcam *tcam, in mlxsw_sp_acl_tcam_region_id_put() argument
77 ida_free(&tcam->used_regions, id); in mlxsw_sp_acl_tcam_region_id_put()
80 static int mlxsw_sp_acl_tcam_group_id_get(struct mlxsw_sp_acl_tcam *tcam, in mlxsw_sp_acl_tcam_group_id_get() argument
85 id = ida_alloc_max(&tcam->used_groups, tcam->max_groups - 1, in mlxsw_sp_acl_tcam_group_id_get()
95 static void mlxsw_sp_acl_tcam_group_id_put(struct mlxsw_sp_acl_tcam *tcam, in mlxsw_sp_acl_tcam_group_id_put() argument
98 ida_free(&tcam->used_groups, id); in mlxsw_sp_acl_tcam_group_id_put()
107 struct mlxsw_sp_acl_tcam *tcam; member
155 struct mlxsw_sp_acl_tcam *tcam; member
[all …]
H A 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 …]
H A Dspectrum_acl_tcam.h30 struct mlxsw_sp_acl_tcam *tcam);
32 struct mlxsw_sp_acl_tcam *tcam);
40 struct mlxsw_sp_acl_tcam *tcam, void *ruleset_priv,
H A Dspectrum_acl.c36 struct mlxsw_sp_acl_tcam tcam; member
46 return &acl->tcam; in mlxsw_sp_acl_to_tcam()
189 err = ops->ruleset_add(mlxsw_sp, &acl->tcam, ruleset->priv, in mlxsw_sp_acl_ruleset_create()
1087 err = mlxsw_sp_acl_tcam_init(mlxsw_sp, &acl->tcam); in mlxsw_sp_acl_init()
1115 mlxsw_sp_acl_tcam_fini(mlxsw_sp, &acl->tcam); in mlxsw_sp_acl_fini()
H A Dspectrum1_acl_tcam.c51 struct mlxsw_sp_acl_tcam *tcam) in mlxsw_sp1_acl_tcam_init() argument
/linux/drivers/net/ethernet/intel/ice/
H A 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 …]
H A Dice_ddp.h385 struct ice_boost_tcam_entry tcam[]; member
390 tcam, 1) - \
405 struct ice_marker_ptype_tcam_entry tcam[]; member
409 ICE_MAX_ENTRIES_IN_BUF(struct_size_t(struct ice_marker_ptype_tcam_section, tcam, \
H A Dice_ddp.c483 return marker_ptype->tcam + index; in ice_marker_ptype_tcam_handler()
627 return boost->tcam + index; in ice_boost_tcam_handler()
643 struct ice_boost_tcam_entry *tcam; in ice_find_boost_entry() local
652 tcam = ice_pkg_enum_entry(ice_seg, &state, in ice_find_boost_entry()
655 if (tcam && le16_to_cpu(tcam->addr) == addr) { in ice_find_boost_entry()
656 *entry = tcam; in ice_find_boost_entry()
661 } while (tcam); in ice_find_boost_entry()
2153 struct ice_marker_ptype_tcam_entry *tcam; in ice_fill_hw_ptype() local
2164 tcam = ice_pkg_enum_entry(seg, &state, in ice_fill_hw_ptype()
2167 if (tcam && in ice_fill_hw_ptype()
[all …]
H A Dice_flex_type.h204 struct ice_tcam_inf tcam[ICE_MAX_TCAM_PER_PROFILE]; member
/linux/drivers/net/ethernet/marvell/mvpp2/
H A 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 …]
H A 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 …]
H A Dmvpp2_cls.h117 u32 tcam[MVPP2_CLS_C2_TCAM_WORDS]; member
H A 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()
H A Dmvpp2_prs.h273 u32 tcam[MVPP2_PRS_TCAM_WORDS]; member
/linux/drivers/net/ethernet/chelsio/cxgb4/
H A 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/drivers/net/ethernet/sun/
H A Dniu.c5017 tp = &parent->tcam[index]; in niu_set_ip_frag_rule()
7186 tp = &parent->tcam[idx]; in niu_get_ethtool_tcam_entry()
7269 tp = &parent->tcam[idx]; in niu_get_ethtool_tcam_all()
7523 tp = &parent->tcam[idx]; in niu_add_ethtool_tcam_entry()
7607 tp = &parent->tcam[idx]; in niu_del_ethtool_tcam_entry()
H A Dniu.h3116 struct niu_tcam_entry tcam[NIU_TCAM_ENTRIES_MAX]; member