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
176 mlxsw_sp_span_entry_phys_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_phys_configure() argument
183 int pa_id = span_entry->id; in mlxsw_sp_span_entry_phys_configure()
195 mlxsw_sp_span_entry_deconfigure_common(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_deconfigure_common() argument
198 struct mlxsw_sp_port *dest_port = span_entry->parms.dest_port; in mlxsw_sp_span_entry_deconfigure_common()
202 int pa_id = span_entry->id; in mlxsw_sp_span_entry_deconfigure_common()
209 mlxsw_sp_span_entry_phys_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_phys_deconfigure() argument
211 mlxsw_sp_span_entry_deconfigure_common(span_entry, in mlxsw_sp_span_entry_phys_deconfigure()
474 mlxsw_sp_span_entry_gretap4_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_gretap4_configure() argument
481 int pa_id = span_entry->id; in mlxsw_sp_span_entry_gretap4_configure()
501 mlxsw_sp_span_entry_gretap4_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_gretap4_deconfigure() argument
503 mlxsw_sp_span_entry_deconfigure_common(span_entry, in mlxsw_sp_span_entry_gretap4_deconfigure()
578 mlxsw_sp_span_entry_gretap6_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_gretap6_configure() argument
585 int pa_id = span_entry->id; in mlxsw_sp_span_entry_gretap6_configure()
604 mlxsw_sp_span_entry_gretap6_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_gretap6_deconfigure() argument
606 mlxsw_sp_span_entry_deconfigure_common(span_entry, in mlxsw_sp_span_entry_gretap6_deconfigure()
644 mlxsw_sp_span_entry_vlan_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_vlan_configure() argument
651 int pa_id = span_entry->id; in mlxsw_sp_span_entry_vlan_configure()
663 mlxsw_sp_span_entry_vlan_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_vlan_deconfigure() argument
665 mlxsw_sp_span_entry_deconfigure_common(span_entry, in mlxsw_sp_span_entry_vlan_deconfigure()
704 mlxsw_sp2_span_entry_cpu_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp2_span_entry_cpu_configure() argument
710 return mlxsw_sp_span_entry_phys_configure(span_entry, sparms); in mlxsw_sp2_span_entry_cpu_configure()
714 mlxsw_sp2_span_entry_cpu_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp2_span_entry_cpu_deconfigure() argument
719 mlxsw_sp_span_entry_deconfigure_common(span_entry, span_type); in mlxsw_sp2_span_entry_cpu_deconfigure()
752 mlxsw_sp_span_entry_nop_configure(struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_nop_configure() argument
759 mlxsw_sp_span_entry_nop_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_nop_deconfigure() argument
771 struct mlxsw_sp_span_entry *span_entry, in mlxsw_sp_span_entry_configure() argument
786 err = span_entry->ops->configure(span_entry, sparms); in mlxsw_sp_span_entry_configure()
794 span_entry->parms = sparms; in mlxsw_sp_span_entry_configure()
798 mlxsw_sp_span_entry_deconfigure(struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_deconfigure() argument
800 if (span_entry->parms.dest_port) in mlxsw_sp_span_entry_deconfigure()
801 span_entry->ops->deconfigure(span_entry); in mlxsw_sp_span_entry_deconfigure()
850 struct mlxsw_sp_span_entry *span_entry = NULL; in mlxsw_sp_span_entry_create() local
856 span_entry = &mlxsw_sp->span->entries[i]; in mlxsw_sp_span_entry_create()
860 if (!span_entry) in mlxsw_sp_span_entry_create()
873 span_entry->ops = ops; in mlxsw_sp_span_entry_create()
874 refcount_set(&span_entry->ref_count, 1); in mlxsw_sp_span_entry_create()
875 span_entry->to_dev = to_dev; in mlxsw_sp_span_entry_create()
876 mlxsw_sp_span_entry_configure(mlxsw_sp, span_entry, sparms); in mlxsw_sp_span_entry_create()
878 return span_entry; in mlxsw_sp_span_entry_create()
882 struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_destroy() argument
884 mlxsw_sp_span_entry_deconfigure(span_entry); in mlxsw_sp_span_entry_destroy()
886 if (span_entry->parms.policer_enable) in mlxsw_sp_span_entry_destroy()
906 struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_invalidate() argument
908 mlxsw_sp_span_entry_deconfigure(span_entry); in mlxsw_sp_span_entry_invalidate()
909 span_entry->ops = &mlxsw_sp_span_entry_ops_nop; in mlxsw_sp_span_entry_invalidate()
950 struct mlxsw_sp_span_entry *span_entry; in mlxsw_sp_span_entry_get() local
952 span_entry = mlxsw_sp_span_entry_find_by_parms(mlxsw_sp, to_dev, in mlxsw_sp_span_entry_get()
954 if (span_entry) { in mlxsw_sp_span_entry_get()
956 refcount_inc(&span_entry->ref_count); in mlxsw_sp_span_entry_get()
957 return span_entry; in mlxsw_sp_span_entry_get()
964 struct mlxsw_sp_span_entry *span_entry) in mlxsw_sp_span_entry_put() argument
966 if (refcount_dec_and_test(&span_entry->ref_count)) in mlxsw_sp_span_entry_put()
967 mlxsw_sp_span_entry_destroy(mlxsw_sp, span_entry); in mlxsw_sp_span_entry_put()
1063 struct mlxsw_sp_span_entry *span_entry; in mlxsw_sp_span_agent_get() local
1082 span_entry = mlxsw_sp_span_entry_get(mlxsw_sp, to_dev, ops, sparms); in mlxsw_sp_span_agent_get()
1083 if (!span_entry) in mlxsw_sp_span_agent_get()
1086 *p_span_id = span_entry->id; in mlxsw_sp_span_agent_get()
1093 struct mlxsw_sp_span_entry *span_entry; in mlxsw_sp_span_agent_put() local
1097 span_entry = mlxsw_sp_span_entry_find_by_id(mlxsw_sp, span_id); in mlxsw_sp_span_agent_put()
1098 if (WARN_ON_ONCE(!span_entry)) in mlxsw_sp_span_agent_put()
1101 mlxsw_sp_span_entry_put(mlxsw_sp, span_entry); in mlxsw_sp_span_agent_put()