Lines Matching refs:span_entry
147 mlxsw_sp1_span_entry_cpu_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp1_span_entry_cpu_configure() argument
154 mlxsw_sp1_span_entry_cpu_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp1_span_entry_cpu_deconfigure() argument
177 mlxsw_sp_span_entry_phys_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_phys_configure() argument
184 int pa_id = span_entry->id; in mlxsw_sp_span_entry_phys_configure()
197 mlxsw_sp_span_entry_deconfigure_common(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_deconfigure_common() argument
200 struct mlxsw_sp_port *dest_port = span_entry->parms.dest_port; in mlxsw_sp_span_entry_deconfigure_common()
204 int pa_id = span_entry->id; in mlxsw_sp_span_entry_deconfigure_common()
207 mlxsw_reg_mpat_session_id_set(mpat_pl, span_entry->parms.session_id); in mlxsw_sp_span_entry_deconfigure_common()
212 mlxsw_sp_span_entry_phys_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_phys_deconfigure() argument
214 mlxsw_sp_span_entry_deconfigure_common(span_entry, in mlxsw_sp_span_entry_phys_deconfigure()
478 mlxsw_sp_span_entry_gretap4_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_gretap4_configure() argument
485 int pa_id = span_entry->id; in mlxsw_sp_span_entry_gretap4_configure()
505 mlxsw_sp_span_entry_gretap4_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_gretap4_deconfigure() argument
507 mlxsw_sp_span_entry_deconfigure_common(span_entry, in mlxsw_sp_span_entry_gretap4_deconfigure()
582 mlxsw_sp_span_entry_gretap6_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_gretap6_configure() argument
589 int pa_id = span_entry->id; in mlxsw_sp_span_entry_gretap6_configure()
608 mlxsw_sp_span_entry_gretap6_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_gretap6_deconfigure() argument
610 mlxsw_sp_span_entry_deconfigure_common(span_entry, in mlxsw_sp_span_entry_gretap6_deconfigure()
648 mlxsw_sp_span_entry_vlan_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_vlan_configure() argument
655 int pa_id = span_entry->id; in mlxsw_sp_span_entry_vlan_configure()
667 mlxsw_sp_span_entry_vlan_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_vlan_deconfigure() argument
669 mlxsw_sp_span_entry_deconfigure_common(span_entry, in mlxsw_sp_span_entry_vlan_deconfigure()
708 mlxsw_sp2_span_entry_cpu_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp2_span_entry_cpu_configure() argument
714 return mlxsw_sp_span_entry_phys_configure(span_entry, sparms); in mlxsw_sp2_span_entry_cpu_configure()
718 mlxsw_sp2_span_entry_cpu_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp2_span_entry_cpu_deconfigure() argument
723 mlxsw_sp_span_entry_deconfigure_common(span_entry, span_type); in mlxsw_sp2_span_entry_cpu_deconfigure()
757 mlxsw_sp_span_entry_nop_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_nop_configure() argument
764 mlxsw_sp_span_entry_nop_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_nop_deconfigure() argument
776 struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_configure() argument
791 err = span_entry->ops->configure(span_entry, sparms); in mlxsw_sp_span_entry_configure()
799 span_entry->parms = sparms; in mlxsw_sp_span_entry_configure()
803 mlxsw_sp_span_entry_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_deconfigure() argument
805 if (span_entry->parms.dest_port) in mlxsw_sp_span_entry_deconfigure()
806 span_entry->ops->deconfigure(span_entry); in mlxsw_sp_span_entry_deconfigure()
855 struct mlxsw_sp_span_entry *span_entry = NULL; in mlxsw_sp_span_entry_create() local
861 span_entry = &mlxsw_sp->span->entries[i]; in mlxsw_sp_span_entry_create()
865 if (!span_entry) in mlxsw_sp_span_entry_create()
878 span_entry->ops = ops; in mlxsw_sp_span_entry_create()
879 refcount_set(&span_entry->ref_count, 1); in mlxsw_sp_span_entry_create()
880 span_entry->to_dev = to_dev; in mlxsw_sp_span_entry_create()
881 mlxsw_sp_span_entry_configure(mlxsw_sp, span_entry, sparms); in mlxsw_sp_span_entry_create()
883 return span_entry; in mlxsw_sp_span_entry_create()
887 struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_destroy() argument
889 mlxsw_sp_span_entry_deconfigure(span_entry); in mlxsw_sp_span_entry_destroy()
891 if (span_entry->parms.policer_enable) in mlxsw_sp_span_entry_destroy()
911 struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_invalidate() argument
913 mlxsw_sp_span_entry_deconfigure(span_entry); in mlxsw_sp_span_entry_invalidate()
914 span_entry->ops = &mlxsw_sp_span_entry_ops_nop; in mlxsw_sp_span_entry_invalidate()
956 struct mlxsw_sp_span_entry *span_entry; in mlxsw_sp_span_entry_get() local
958 span_entry = mlxsw_sp_span_entry_find_by_parms(mlxsw_sp, to_dev, in mlxsw_sp_span_entry_get()
960 if (span_entry) { in mlxsw_sp_span_entry_get()
962 refcount_inc(&span_entry->ref_count); in mlxsw_sp_span_entry_get()
963 return span_entry; in mlxsw_sp_span_entry_get()
970 struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_put() argument
972 if (refcount_dec_and_test(&span_entry->ref_count)) in mlxsw_sp_span_entry_put()
973 mlxsw_sp_span_entry_destroy(mlxsw_sp, span_entry); in mlxsw_sp_span_entry_put()
1072 struct mlxsw_sp_span_entry *span_entry; in mlxsw_sp_span_agent_get() local
1092 span_entry = mlxsw_sp_span_entry_get(mlxsw_sp, to_dev, ops, sparms); in mlxsw_sp_span_agent_get()
1093 if (!span_entry) in mlxsw_sp_span_agent_get()
1096 *p_span_id = span_entry->id; in mlxsw_sp_span_agent_get()
1103 struct mlxsw_sp_span_entry *span_entry; in mlxsw_sp_span_agent_put() local
1107 span_entry = mlxsw_sp_span_entry_find_by_id(mlxsw_sp, span_id); in mlxsw_sp_span_agent_put()
1108 if (WARN_ON_ONCE(!span_entry)) in mlxsw_sp_span_agent_put()
1111 mlxsw_sp_span_entry_put(mlxsw_sp, span_entry); in mlxsw_sp_span_agent_put()