• Home
  • Raw
  • Download

Lines Matching refs:analyzed_port

1000 	struct mlxsw_sp_span_analyzed_port *analyzed_port;  in mlxsw_sp_span_analyzed_port_find()  local
1002 list_for_each_entry(analyzed_port, &span->analyzed_ports_list, list) { in mlxsw_sp_span_analyzed_port_find()
1003 if (analyzed_port->local_port == local_port && in mlxsw_sp_span_analyzed_port_find()
1004 analyzed_port->ingress == ingress) in mlxsw_sp_span_analyzed_port_find()
1005 return analyzed_port; in mlxsw_sp_span_analyzed_port_find()
1115 struct mlxsw_sp_span_analyzed_port *analyzed_port; in mlxsw_sp_span_analyzed_port_create() local
1118 analyzed_port = kzalloc(sizeof(*analyzed_port), GFP_KERNEL); in mlxsw_sp_span_analyzed_port_create()
1119 if (!analyzed_port) in mlxsw_sp_span_analyzed_port_create()
1122 refcount_set(&analyzed_port->ref_count, 1); in mlxsw_sp_span_analyzed_port_create()
1123 analyzed_port->local_port = mlxsw_sp_port->local_port; in mlxsw_sp_span_analyzed_port_create()
1124 analyzed_port->ingress = ingress; in mlxsw_sp_span_analyzed_port_create()
1125 list_add_tail(&analyzed_port->list, &span->analyzed_ports_list); in mlxsw_sp_span_analyzed_port_create()
1136 return analyzed_port; in mlxsw_sp_span_analyzed_port_create()
1139 list_del(&analyzed_port->list); in mlxsw_sp_span_analyzed_port_create()
1140 kfree(analyzed_port); in mlxsw_sp_span_analyzed_port_create()
1147 analyzed_port) in mlxsw_sp_span_analyzed_port_destroy()
1152 if (!analyzed_port->ingress) in mlxsw_sp_span_analyzed_port_destroy()
1155 list_del(&analyzed_port->list); in mlxsw_sp_span_analyzed_port_destroy()
1156 kfree(analyzed_port); in mlxsw_sp_span_analyzed_port_destroy()
1163 struct mlxsw_sp_span_analyzed_port *analyzed_port; in mlxsw_sp_span_analyzed_port_get() local
1169 analyzed_port = mlxsw_sp_span_analyzed_port_find(mlxsw_sp->span, in mlxsw_sp_span_analyzed_port_get()
1171 if (analyzed_port) { in mlxsw_sp_span_analyzed_port_get()
1172 refcount_inc(&analyzed_port->ref_count); in mlxsw_sp_span_analyzed_port_get()
1176 analyzed_port = mlxsw_sp_span_analyzed_port_create(mlxsw_sp->span, in mlxsw_sp_span_analyzed_port_get()
1179 if (IS_ERR(analyzed_port)) in mlxsw_sp_span_analyzed_port_get()
1180 err = PTR_ERR(analyzed_port); in mlxsw_sp_span_analyzed_port_get()
1191 struct mlxsw_sp_span_analyzed_port *analyzed_port; in mlxsw_sp_span_analyzed_port_put() local
1196 analyzed_port = mlxsw_sp_span_analyzed_port_find(mlxsw_sp->span, in mlxsw_sp_span_analyzed_port_put()
1198 if (WARN_ON_ONCE(!analyzed_port)) in mlxsw_sp_span_analyzed_port_put()
1201 if (!refcount_dec_and_test(&analyzed_port->ref_count)) in mlxsw_sp_span_analyzed_port_put()
1204 mlxsw_sp_span_analyzed_port_destroy(mlxsw_sp_port, analyzed_port); in mlxsw_sp_span_analyzed_port_put()