Lines Matching defs:map

1063  *	id. It scans list of devices to build up a free map, then chooses
1177 * id. It scans list of devices to build up a free map, then chooses
2380 netdev_warn(dev, "Number of in use tx queues changed. Priority %i to tc mapping %i is no longer valid. Setting map to 0\n",
2417 struct xps_map *map = NULL;
2420 map = xmap_dereference(dev_maps->attr_map[tci]);
2421 if (!map)
2424 for (pos = map->len; pos--;) {
2425 if (map->queues[pos] != index)
2428 if (map->len > 1) {
2429 map->queues[pos] = map->queues[--map->len];
2436 kfree_rcu(map, rcu);
2524 static struct xps_map *expand_xps_map(struct xps_map *map, int attr_index,
2531 for (pos = 0; map && pos < map->len; pos++) {
2532 if (map->queues[pos] != index)
2534 return map;
2537 /* Need to add tx-queue to this CPU's/rx-queue's existing map */
2538 if (map) {
2539 if (pos < map->alloc_len)
2540 return map;
2542 alloc_len = map->alloc_len * 2;
2545 /* Need to allocate new map to store tx-queue on this CPU's/rx-queue's
2546 * map
2557 new_map->queues[i] = map->queues[i];
2570 struct xps_map *map;
2577 /* fill in the new device map from the old device map */
2578 map = xmap_dereference(dev_maps->attr_map[tci]);
2579 RCU_INIT_POINTER(new_dev_maps->attr_map[tci], map);
2592 struct xps_map *map, *new_map;
2603 /* If queue belongs to subordinate dev use its map */
2630 * copy foreign traffic classes if the two map sizes match.
2651 map = copy ? xmap_dereference(dev_maps->attr_map[tci]) : NULL;
2653 map = expand_xps_map(map, j, index, type == XPS_RXQS);
2654 if (!map)
2657 RCU_INIT_POINTER(new_dev_maps->attr_map[tci], map);
2681 map = xmap_dereference(new_dev_maps->attr_map[tci]);
2682 while ((pos < map->len) && (map->queues[pos] != index))
2685 if (pos == map->len)
2686 map->queues[map->len++] = index;
2710 map = xmap_dereference(dev_maps->attr_map[tci]);
2711 if (!map)
2716 if (map == new_map)
2721 kfree_rcu(map, rcu);
2760 /* free map if not active */
2773 map = copy ?
2776 if (new_map && new_map != map)
2890 /* Provide a way for Tx queue to find the tc_to_txq map or
2891 * XPS map for itself.
3881 const struct netprio_map *map;
3887 map = rcu_dereference_bh(skb->dev->priomap);
3888 if (!map)
3896 if (prioidx < map->priomap_len)
3897 skb->priority = map->priomap[prioidx];
4125 struct xps_map *map;
4134 map = rcu_dereference(dev_maps->attr_map[tci]);
4135 if (map) {
4136 if (map->len == 1)
4137 queue_index = map->queues[0];
4139 queue_index = map->queues[reciprocal_scale(
4140 skb_get_hash(skb), map->len)];
4557 * CPU from the RPS map of the receiving queue for a given skb.
4566 struct rps_map *map;
4587 map = rcu_dereference(rxqueue->rps_map);
4588 if (!flow_table && !map)
4645 if (map) {
4646 tcpu = map->cpus[reciprocal_scale(hash, map->len)];