Searched refs:dev_map (Results 1 – 4 of 4) sorted by relevance
62 static struct dev_map *dev_map_alloc(const char *dev_name) in dev_map_alloc()64 struct dev_map *dev_map; in dev_map_alloc() local66 dev_map = calloc(1, sizeof(*dev_map)); in dev_map_alloc()67 if (!dev_map) in dev_map_alloc()69 dev_map->dev_name = strdup(dev_name); in dev_map_alloc()71 return dev_map; in dev_map_alloc()74 static void dev_map_free(struct dev_map *dev_map) in dev_map_free() argument76 if (!dev_map) in dev_map_free()79 free(dev_map->dev_name); in dev_map_free()80 free(dev_map); in dev_map_free()[all …]
285 struct dev_map *dev_map; in link_show() local292 list_for_each_entry(dev_map, &rd->dev_map_list, list) { in link_show()293 rd->dev_idx = dev_map->idx; in link_show()294 for (port = 1; port < dev_map->num_ports + 1; port++) { in link_show()303 dev_map = dev_map_lookup(rd, true); in link_show()305 if (!dev_map || port > dev_map->num_ports) { in link_show()311 rd->dev_idx = dev_map->idx; in link_show()313 for (; rd->port_idx < dev_map->num_ports + 1; rd->port_idx++) { in link_show()
244 struct dev_map *dev_map; in dev_show() local250 list_for_each_entry(dev_map, &rd->dev_map_list, list) { in dev_show()251 rd->dev_idx = dev_map->idx; in dev_show()257 dev_map = dev_map_lookup(rd, false); in dev_show()258 if (!dev_map) { in dev_show()264 rd->dev_idx = dev_map->idx; in dev_show()
32 struct dev_map { struct80 struct dev_map *dev_map_lookup(struct rd *rd, bool allow_port_index);81 struct dev_map *_dev_map_lookup(struct rd *rd, const char *dev_name);