Lines Matching refs:analyzed_port

1003 	struct mlxsw_sp_span_analyzed_port *analyzed_port;  in mlxsw_sp_span_analyzed_port_find()  local
1005 list_for_each_entry(analyzed_port, &span->analyzed_ports_list, list) { in mlxsw_sp_span_analyzed_port_find()
1006 if (analyzed_port->local_port == local_port && in mlxsw_sp_span_analyzed_port_find()
1007 analyzed_port->ingress == ingress) in mlxsw_sp_span_analyzed_port_find()
1008 return analyzed_port; in mlxsw_sp_span_analyzed_port_find()
1119 struct mlxsw_sp_span_analyzed_port *analyzed_port; in mlxsw_sp_span_analyzed_port_create() local
1122 analyzed_port = kzalloc(sizeof(*analyzed_port), GFP_KERNEL); in mlxsw_sp_span_analyzed_port_create()
1123 if (!analyzed_port) in mlxsw_sp_span_analyzed_port_create()
1126 refcount_set(&analyzed_port->ref_count, 1); in mlxsw_sp_span_analyzed_port_create()
1127 analyzed_port->local_port = mlxsw_sp_port->local_port; in mlxsw_sp_span_analyzed_port_create()
1128 analyzed_port->ingress = ingress; in mlxsw_sp_span_analyzed_port_create()
1129 list_add_tail(&analyzed_port->list, &span->analyzed_ports_list); in mlxsw_sp_span_analyzed_port_create()
1140 return analyzed_port; in mlxsw_sp_span_analyzed_port_create()
1143 list_del(&analyzed_port->list); in mlxsw_sp_span_analyzed_port_create()
1144 kfree(analyzed_port); in mlxsw_sp_span_analyzed_port_create()
1151 analyzed_port) in mlxsw_sp_span_analyzed_port_destroy()
1156 if (!analyzed_port->ingress) in mlxsw_sp_span_analyzed_port_destroy()
1159 list_del(&analyzed_port->list); in mlxsw_sp_span_analyzed_port_destroy()
1160 kfree(analyzed_port); in mlxsw_sp_span_analyzed_port_destroy()
1167 struct mlxsw_sp_span_analyzed_port *analyzed_port; in mlxsw_sp_span_analyzed_port_get() local
1173 analyzed_port = mlxsw_sp_span_analyzed_port_find(mlxsw_sp->span, in mlxsw_sp_span_analyzed_port_get()
1175 if (analyzed_port) { in mlxsw_sp_span_analyzed_port_get()
1176 refcount_inc(&analyzed_port->ref_count); in mlxsw_sp_span_analyzed_port_get()
1180 analyzed_port = mlxsw_sp_span_analyzed_port_create(mlxsw_sp->span, in mlxsw_sp_span_analyzed_port_get()
1183 if (IS_ERR(analyzed_port)) in mlxsw_sp_span_analyzed_port_get()
1184 err = PTR_ERR(analyzed_port); in mlxsw_sp_span_analyzed_port_get()
1195 struct mlxsw_sp_span_analyzed_port *analyzed_port; in mlxsw_sp_span_analyzed_port_put() local
1200 analyzed_port = mlxsw_sp_span_analyzed_port_find(mlxsw_sp->span, in mlxsw_sp_span_analyzed_port_put()
1202 if (WARN_ON_ONCE(!analyzed_port)) in mlxsw_sp_span_analyzed_port_put()
1205 if (!refcount_dec_and_test(&analyzed_port->ref_count)) in mlxsw_sp_span_analyzed_port_put()
1208 mlxsw_sp_span_analyzed_port_destroy(mlxsw_sp_port, analyzed_port); in mlxsw_sp_span_analyzed_port_put()