Home
last modified time | relevance | path

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

/Linux-v4.19/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_acl_tcam.c27 struct mlxsw_sp_acl_tcam *tcam) in mlxsw_sp_acl_tcam_init() argument
44 alloc_size = sizeof(tcam->used_regions[0]) * BITS_TO_LONGS(max_regions); in mlxsw_sp_acl_tcam_init()
45 tcam->used_regions = kzalloc(alloc_size, GFP_KERNEL); in mlxsw_sp_acl_tcam_init()
46 if (!tcam->used_regions) in mlxsw_sp_acl_tcam_init()
48 tcam->max_regions = max_regions; in mlxsw_sp_acl_tcam_init()
51 alloc_size = sizeof(tcam->used_groups[0]) * BITS_TO_LONGS(max_groups); in mlxsw_sp_acl_tcam_init()
52 tcam->used_groups = kzalloc(alloc_size, GFP_KERNEL); in mlxsw_sp_acl_tcam_init()
53 if (!tcam->used_groups) { in mlxsw_sp_acl_tcam_init()
57 tcam->max_groups = max_groups; in mlxsw_sp_acl_tcam_init()
58 tcam->max_group_size = MLXSW_CORE_RES_GET(mlxsw_sp->core, in mlxsw_sp_acl_tcam_init()
[all …]
Dspectrum2_acl_tcam.c72 struct mlxsw_sp2_acl_tcam *tcam = priv; in mlxsw_sp2_acl_tcam_init() local
80 tcam->kvdl_count = _tcam->max_regions; in mlxsw_sp2_acl_tcam_init()
82 tcam->kvdl_count, &tcam->kvdl_index); in mlxsw_sp2_acl_tcam_init()
100 for (i = 0; i < tcam->kvdl_count; i++) { in mlxsw_sp2_acl_tcam_init()
101 mlxsw_reg_pefa_pack(pefa_pl, tcam->kvdl_index + i, in mlxsw_sp2_acl_tcam_init()
107 mlxsw_reg_pgcr_pack(pgcr_pl, tcam->kvdl_index); in mlxsw_sp2_acl_tcam_init()
112 err = mlxsw_sp_acl_atcam_init(mlxsw_sp, &tcam->atcam); in mlxsw_sp2_acl_tcam_init()
126 tcam->kvdl_count, tcam->kvdl_index); in mlxsw_sp2_acl_tcam_init()
132 struct mlxsw_sp2_acl_tcam *tcam = priv; in mlxsw_sp2_acl_tcam_fini() local
134 mlxsw_sp_acl_atcam_fini(mlxsw_sp, &tcam->atcam); in mlxsw_sp2_acl_tcam_fini()
[all …]
Dspectrum_acl_tcam.h26 struct mlxsw_sp_acl_tcam *tcam);
28 struct mlxsw_sp_acl_tcam *tcam);
36 struct mlxsw_sp_acl_tcam *tcam, void *ruleset_priv,
Dspectrum_acl.c33 struct mlxsw_sp_acl_tcam tcam; member
321 err = ops->ruleset_add(mlxsw_sp, &acl->tcam, ruleset->priv, in mlxsw_sp_acl_ruleset_create()
857 err = mlxsw_sp_acl_tcam_init(mlxsw_sp, &acl->tcam); in mlxsw_sp_acl_init()
884 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.h599 struct mlxsw_sp_acl_tcam *tcam);
/Linux-v4.19/drivers/net/ethernet/marvell/mvpp2/
Dmvpp2_prs.c30 pe->tcam[MVPP2_PRS_TCAM_INV_WORD] &= ~MVPP2_PRS_TCAM_INV_MASK; in mvpp2_prs_hw_write()
35 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.c746 mvpp2_write(priv, MVPP22_CLS_C2_TCAM_DATA0, c2->tcam[0]); in mvpp2_cls_c2_write()
747 mvpp2_write(priv, MVPP22_CLS_C2_TCAM_DATA1, c2->tcam[1]); in mvpp2_cls_c2_write()
748 mvpp2_write(priv, MVPP22_CLS_C2_TCAM_DATA2, c2->tcam[2]); in mvpp2_cls_c2_write()
749 mvpp2_write(priv, MVPP22_CLS_C2_TCAM_DATA3, c2->tcam[3]); in mvpp2_cls_c2_write()
750 mvpp2_write(priv, MVPP22_CLS_C2_TCAM_DATA4, c2->tcam[4]); in mvpp2_cls_c2_write()
767 c2->tcam[0] = mvpp2_read(priv, MVPP22_CLS_C2_TCAM_DATA0); in mvpp2_cls_c2_read()
768 c2->tcam[1] = mvpp2_read(priv, MVPP22_CLS_C2_TCAM_DATA1); in mvpp2_cls_c2_read()
769 c2->tcam[2] = mvpp2_read(priv, MVPP22_CLS_C2_TCAM_DATA2); in mvpp2_cls_c2_read()
770 c2->tcam[3] = mvpp2_read(priv, MVPP22_CLS_C2_TCAM_DATA3); in mvpp2_cls_c2_read()
771 c2->tcam[4] = mvpp2_read(priv, MVPP22_CLS_C2_TCAM_DATA4); in mvpp2_cls_c2_read()
[all …]
Dmvpp2_cls.h108 u32 tcam[MVPP2_CLS_C2_TCAM_WORDS]; member
Dmvpp2_prs.h271 u32 tcam[MVPP2_PRS_TCAM_WORDS]; member
Dmvpp2_debugfs.c389 ai = pe.tcam[MVPP2_PRS_TCAM_AI_WORD] & MVPP2_PRS_AI_MASK; in mvpp2_dbgfs_prs_ai_show()
390 ai_mask = (pe.tcam[MVPP2_PRS_TCAM_AI_WORD] >> 16) & MVPP2_PRS_AI_MASK; in mvpp2_dbgfs_prs_ai_show()
/Linux-v4.19/drivers/net/ethernet/chelsio/cxgb4/
Dcudbg_lib.c2108 struct cudbg_mps_tcam *tcam, u32 idx) in cudbg_collect_tcam_index() argument
2134 tcam->lookup_type = DATALKPTYPE_G(data2); in cudbg_collect_tcam_index()
2140 if (tcam->lookup_type && tcam->lookup_type != DATALKPTYPE_M) { in cudbg_collect_tcam_index()
2142 tcam->vniy = (data2 & DATAVIDH2_F) | DATAVIDH1_G(data2); in cudbg_collect_tcam_index()
2143 tcam->vniy = (tcam->vniy << 16) | VIDL_G(val); in cudbg_collect_tcam_index()
2144 tcam->dip_hit = data2 & DATADIPHIT_F; in cudbg_collect_tcam_index()
2146 tcam->vlan_vld = data2 & DATAVIDH2_F; in cudbg_collect_tcam_index()
2147 tcam->ivlan = VIDL_G(val); in cudbg_collect_tcam_index()
2150 tcam->port_num = DATAPORTNUM_G(data2); in cudbg_collect_tcam_index()
2159 if (tcam->lookup_type && tcam->lookup_type != DATALKPTYPE_M) { in cudbg_collect_tcam_index()
[all …]
/Linux-v4.19/drivers/net/ethernet/sun/
Dniu.c5002 tp = &parent->tcam[index]; in niu_set_ip_frag_rule()
7166 tp = &parent->tcam[idx]; in niu_get_ethtool_tcam_entry()
7249 tp = &parent->tcam[idx]; in niu_get_ethtool_tcam_all()
7502 tp = &parent->tcam[idx]; in niu_add_ethtool_tcam_entry()
7586 tp = &parent->tcam[idx]; in niu_del_ethtool_tcam_entry()
Dniu.h3116 struct niu_tcam_entry tcam[NIU_TCAM_ENTRIES_MAX]; member