Lines Matching refs:fid_index
29 u16 fid_index; member
53 .key_len = sizeof_field(struct mlxsw_sp_fid, fid_index),
54 .key_offset = offsetof(struct mlxsw_sp_fid, fid_index),
130 bool mlxsw_sp_fid_is_dummy(struct mlxsw_sp *mlxsw_sp, u16 fid_index) in mlxsw_sp_fid_is_dummy() argument
137 return fid_family->start_index == fid_index; in mlxsw_sp_fid_is_dummy()
146 u16 fid_index) in mlxsw_sp_fid_lookup_by_index() argument
150 fid = rhashtable_lookup_fast(&mlxsw_sp->fid_core->fid_ht, &fid_index, in mlxsw_sp_fid_lookup_by_index()
365 return fid->fid_index; in mlxsw_sp_fid_index()
416 static int mlxsw_sp_fid_op(struct mlxsw_sp *mlxsw_sp, u16 fid_index, in mlxsw_sp_fid_op() argument
421 mlxsw_reg_sfmr_pack(sfmr_pl, mlxsw_sp_sfmr_op(valid), fid_index, in mlxsw_sp_fid_op()
426 static int mlxsw_sp_fid_vni_op(struct mlxsw_sp *mlxsw_sp, u16 fid_index, in mlxsw_sp_fid_vni_op() argument
432 mlxsw_reg_sfmr_pack(sfmr_pl, MLXSW_REG_SFMR_OP_CREATE_FID, fid_index, in mlxsw_sp_fid_vni_op()
441 static int __mlxsw_sp_fid_port_vid_map(struct mlxsw_sp *mlxsw_sp, u16 fid_index, in __mlxsw_sp_fid_port_vid_map() argument
447 mlxsw_reg_svfa_pack(svfa_pl, local_port, mt, valid, fid_index, vid); in __mlxsw_sp_fid_port_vid_map()
468 return mlxsw_sp_fid_op(fid_family->mlxsw_sp, fid->fid_index, 0, true); in mlxsw_sp_fid_8021d_configure()
475 mlxsw_sp_fid_op(fid->fid_family->mlxsw_sp, fid->fid_index, 0, false); in mlxsw_sp_fid_8021d_deconfigure()
482 u16 nr_fids, fid_index; in mlxsw_sp_fid_8021d_index_alloc() local
485 fid_index = find_first_zero_bit(fid_family->fids_bitmap, nr_fids); in mlxsw_sp_fid_8021d_index_alloc()
486 if (fid_index == nr_fids) in mlxsw_sp_fid_8021d_index_alloc()
488 *p_fid_index = fid_family->start_index + fid_index; in mlxsw_sp_fid_8021d_index_alloc()
503 return fid->fid_index - VLAN_N_VID; in mlxsw_sp_fid_8021d_flood_index()
520 err = __mlxsw_sp_fid_port_vid_map(mlxsw_sp, fid->fid_index, in mlxsw_sp_port_vp_mode_trans()
543 __mlxsw_sp_fid_port_vid_map(mlxsw_sp, fid->fid_index, in mlxsw_sp_port_vp_mode_trans()
565 __mlxsw_sp_fid_port_vid_map(mlxsw_sp, fid->fid_index, in mlxsw_sp_port_vlan_mode_trans()
579 err = __mlxsw_sp_fid_port_vid_map(mlxsw_sp, fid->fid_index, in mlxsw_sp_fid_8021d_port_vid_map()
594 __mlxsw_sp_fid_port_vid_map(mlxsw_sp, fid->fid_index, in mlxsw_sp_fid_8021d_port_vid_map()
609 __mlxsw_sp_fid_port_vid_map(mlxsw_sp, fid->fid_index, in mlxsw_sp_fid_8021d_port_vid_unmap()
617 return mlxsw_sp_fid_vni_op(fid_family->mlxsw_sp, fid->fid_index, vni, in mlxsw_sp_fid_8021d_vni_set()
626 mlxsw_sp_fid_vni_op(fid_family->mlxsw_sp, fid->fid_index, 0, false, in mlxsw_sp_fid_8021d_vni_clear()
635 return mlxsw_sp_fid_vni_op(fid_family->mlxsw_sp, fid->fid_index, in mlxsw_sp_fid_8021d_nve_flood_index_set()
644 mlxsw_sp_fid_vni_op(fid_family->mlxsw_sp, fid->fid_index, fid->vni, in mlxsw_sp_fid_8021d_nve_flood_index_clear()
779 return fid->fid_index == rif_index + fid->fid_family->start_index; in mlxsw_sp_fid_rfid_compare()
843 return mlxsw_sp_fid_op(mlxsw_sp, fid->fid_index, 0, true); in mlxsw_sp_fid_dummy_configure()
848 mlxsw_sp_fid_op(fid->fid_family->mlxsw_sp, fid->fid_index, 0, false); in mlxsw_sp_fid_dummy_deconfigure()
911 u16 fid_index; in mlxsw_sp_fid_get() local
924 err = fid->fid_family->ops->index_alloc(fid, arg, &fid_index); in mlxsw_sp_fid_get()
927 fid->fid_index = fid_index; in mlxsw_sp_fid_get()
928 __set_bit(fid_index - fid_family->start_index, fid_family->fids_bitmap); in mlxsw_sp_fid_get()
949 __clear_bit(fid_index - fid_family->start_index, in mlxsw_sp_fid_get()
968 __clear_bit(fid->fid_index - fid_family->start_index, in mlxsw_sp_fid_put()