Lines Matching refs:analyzed_port

1005 	struct mlxsw_sp_span_analyzed_port *analyzed_port;  in mlxsw_sp_span_analyzed_port_find()  local
1007 list_for_each_entry(analyzed_port, &span->analyzed_ports_list, list) { in mlxsw_sp_span_analyzed_port_find()
1008 if (analyzed_port->local_port == local_port && in mlxsw_sp_span_analyzed_port_find()
1009 analyzed_port->ingress == ingress) in mlxsw_sp_span_analyzed_port_find()
1010 return analyzed_port; in mlxsw_sp_span_analyzed_port_find()
1121 struct mlxsw_sp_span_analyzed_port *analyzed_port; in mlxsw_sp_span_analyzed_port_create() local
1124 analyzed_port = kzalloc(sizeof(*analyzed_port), GFP_KERNEL); in mlxsw_sp_span_analyzed_port_create()
1125 if (!analyzed_port) in mlxsw_sp_span_analyzed_port_create()
1128 refcount_set(&analyzed_port->ref_count, 1); in mlxsw_sp_span_analyzed_port_create()
1129 analyzed_port->local_port = mlxsw_sp_port->local_port; in mlxsw_sp_span_analyzed_port_create()
1130 analyzed_port->ingress = ingress; in mlxsw_sp_span_analyzed_port_create()
1131 list_add_tail(&analyzed_port->list, &span->analyzed_ports_list); in mlxsw_sp_span_analyzed_port_create()
1142 return analyzed_port; in mlxsw_sp_span_analyzed_port_create()
1145 list_del(&analyzed_port->list); in mlxsw_sp_span_analyzed_port_create()
1146 kfree(analyzed_port); in mlxsw_sp_span_analyzed_port_create()
1153 analyzed_port) in mlxsw_sp_span_analyzed_port_destroy()
1158 if (!analyzed_port->ingress) in mlxsw_sp_span_analyzed_port_destroy()
1161 list_del(&analyzed_port->list); in mlxsw_sp_span_analyzed_port_destroy()
1162 kfree(analyzed_port); in mlxsw_sp_span_analyzed_port_destroy()
1169 struct mlxsw_sp_span_analyzed_port *analyzed_port; in mlxsw_sp_span_analyzed_port_get() local
1175 analyzed_port = mlxsw_sp_span_analyzed_port_find(mlxsw_sp->span, in mlxsw_sp_span_analyzed_port_get()
1177 if (analyzed_port) { in mlxsw_sp_span_analyzed_port_get()
1178 refcount_inc(&analyzed_port->ref_count); in mlxsw_sp_span_analyzed_port_get()
1182 analyzed_port = mlxsw_sp_span_analyzed_port_create(mlxsw_sp->span, in mlxsw_sp_span_analyzed_port_get()
1185 if (IS_ERR(analyzed_port)) in mlxsw_sp_span_analyzed_port_get()
1186 err = PTR_ERR(analyzed_port); in mlxsw_sp_span_analyzed_port_get()
1197 struct mlxsw_sp_span_analyzed_port *analyzed_port; in mlxsw_sp_span_analyzed_port_put() local
1202 analyzed_port = mlxsw_sp_span_analyzed_port_find(mlxsw_sp->span, in mlxsw_sp_span_analyzed_port_put()
1204 if (WARN_ON_ONCE(!analyzed_port)) in mlxsw_sp_span_analyzed_port_put()
1207 if (!refcount_dec_and_test(&analyzed_port->ref_count)) in mlxsw_sp_span_analyzed_port_put()
1210 mlxsw_sp_span_analyzed_port_destroy(mlxsw_sp_port, analyzed_port); in mlxsw_sp_span_analyzed_port_put()