Lines Matching defs:map

687  *	@map: configured settings for the device
693 static int netdev_boot_setup_add(char *name, struct ifmap *map)
703 memcpy(&s[i].map, map, sizeof(s[i].map));
728 dev->irq = s[i].map.irq;
729 dev->base_addr = s[i].map.base_addr;
730 dev->mem_start = s[i].map.mem_start;
731 dev->mem_end = s[i].map.mem_end;
767 return s[i].map.base_addr;
777 struct ifmap map;
784 memset(&map, 0, sizeof(map));
786 map.irq = ints[1];
788 map.base_addr = ints[2];
790 map.mem_start = ints[3];
792 map.mem_end = ints[4];
795 return netdev_boot_setup_add(str, &map);
1163 * id. It scans list of devices to build up a free map, then chooses
1256 * id. It scans list of devices to build up a free map, then chooses
2414 pr_warn("Number of in use tx queues changed. Priority %i to tc mapping %i is no longer valid. Setting map to 0\n",
2453 struct xps_map *map = NULL;
2457 map = xmap_dereference(dev_maps->attr_map[tci]);
2458 if (!map)
2461 for (pos = map->len; pos--;) {
2462 if (map->queues[pos] != index)
2465 if (map->len > 1) {
2466 map->queues[pos] = map->queues[--map->len];
2471 kfree_rcu(map, rcu);
2579 static struct xps_map *expand_xps_map(struct xps_map *map, int attr_index,
2586 for (pos = 0; map && pos < map->len; pos++) {
2587 if (map->queues[pos] != index)
2589 return map;
2592 /* Need to add tx-queue to this CPU's/rx-queue's existing map */
2593 if (map) {
2594 if (pos < map->alloc_len)
2595 return map;
2597 alloc_len = map->alloc_len * 2;
2600 /* Need to allocate new map to store tx-queue on this CPU's/rx-queue's
2601 * map
2612 new_map->queues[i] = map->queues[i];
2627 struct xps_map *map, *new_map;
2639 /* If queue belongs to subordinate dev use its map */
2676 map = dev_maps ? xmap_dereference(dev_maps->attr_map[tci]) :
2679 map = expand_xps_map(map, j, index, is_rxqs_map);
2680 if (!map)
2683 RCU_INIT_POINTER(new_dev_maps->attr_map[tci], map);
2700 /* fill in the new device map from the old device map */
2701 map = xmap_dereference(dev_maps->attr_map[tci]);
2702 RCU_INIT_POINTER(new_dev_maps->attr_map[tci], map);
2715 map = xmap_dereference(new_dev_maps->attr_map[tci]);
2716 while ((pos < map->len) && (map->queues[pos] != index))
2719 if (pos == map->len)
2720 map->queues[map->len++] = index;
2730 /* fill in the new device map from the old device map */
2731 map = xmap_dereference(dev_maps->attr_map[tci]);
2732 RCU_INIT_POINTER(new_dev_maps->attr_map[tci], map);
2737 /* fill in the new device map from the old device map */
2738 map = xmap_dereference(dev_maps->attr_map[tci]);
2739 RCU_INIT_POINTER(new_dev_maps->attr_map[tci], map);
2756 map = xmap_dereference(dev_maps->attr_map[tci]);
2757 if (map && map != new_map)
2758 kfree_rcu(map, rcu);
2791 /* free map if not active */
2805 map = dev_maps ?
2808 if (new_map && new_map != map)
2922 /* Provide a way for Tx queue to find the tc_to_txq map or
2923 * XPS map for itself.
3855 const struct netprio_map *map;
3861 map = rcu_dereference_bh(skb->dev->priomap);
3862 if (!map)
3870 if (prioidx < map->priomap_len)
3871 skb->priority = map->priomap[prioidx];
3944 struct xps_map *map;
3952 map = rcu_dereference(dev_maps->attr_map[tci]);
3953 if (map) {
3954 if (map->len == 1)
3955 queue_index = map->queues[0];
3957 queue_index = map->queues[reciprocal_scale(
3958 skb_get_hash(skb), map->len)];
4351 * CPU from the RPS map of the receiving queue for a given skb.
4360 struct rps_map *map;
4381 map = rcu_dereference(rxqueue->rps_map);
4382 if (!flow_table && !map)
4439 if (map) {
4440 tcpu = map->cpus[reciprocal_scale(hash, map->len)];