Home
last modified time | relevance | path

Searched refs:map (Results 1 – 25 of 37) sorted by relevance

12

/net/sctp/
Dtsnmap.c29 static void sctp_tsnmap_update(struct sctp_tsnmap *map);
30 static void sctp_tsnmap_find_gap_ack(unsigned long *map, __u16 off,
32 static int sctp_tsnmap_grow(struct sctp_tsnmap *map, u16 size);
35 struct sctp_tsnmap *sctp_tsnmap_init(struct sctp_tsnmap *map, __u16 len, in sctp_tsnmap_init() argument
38 if (!map->tsn_map) { in sctp_tsnmap_init()
39 map->tsn_map = kzalloc(len>>3, gfp); in sctp_tsnmap_init()
40 if (map->tsn_map == NULL) in sctp_tsnmap_init()
43 map->len = len; in sctp_tsnmap_init()
45 bitmap_zero(map->tsn_map, map->len); in sctp_tsnmap_init()
49 map->base_tsn = initial_tsn; in sctp_tsnmap_init()
[all …]
/net/rds/
Dcong.c109 struct rds_cong_map *map; in rds_cong_tree_walk() local
115 map = rb_entry(parent, struct rds_cong_map, m_rb_node); in rds_cong_tree_walk()
117 diff = rds_addr_cmp(addr, &map->m_addr); in rds_cong_tree_walk()
123 return map; in rds_cong_tree_walk()
140 struct rds_cong_map *map; in rds_cong_from_addr() local
146 map = kzalloc(sizeof(struct rds_cong_map), GFP_KERNEL); in rds_cong_from_addr()
147 if (!map) in rds_cong_from_addr()
150 map->m_addr = *addr; in rds_cong_from_addr()
151 init_waitqueue_head(&map->m_waitq); in rds_cong_from_addr()
152 INIT_LIST_HEAD(&map->m_conn_list); in rds_cong_from_addr()
[all …]
Dtcp_recv.c112 struct rds_cong_map *map; in rds_tcp_cong_recv() local
121 map = conn->c_fcong; in rds_tcp_cong_recv()
133 (void *)map->m_page_addrs[map_page] + map_off, in rds_tcp_cong_recv()
146 rds_cong_map_updated(map, ~(u64) 0); in rds_tcp_cong_recv()
Drds.h754 void rds_cong_set_bit(struct rds_cong_map *map, __be16 port);
755 void rds_cong_clear_bit(struct rds_cong_map *map, __be16 port);
756 int rds_cong_wait(struct rds_cong_map *map, __be16 port, int nonblock, struct rds_sock *rs);
757 void rds_cong_queue_updates(struct rds_cong_map *map);
758 void rds_cong_map_updated(struct rds_cong_map *map, uint64_t);
/net/core/
Dsock_map.c15 struct bpf_map map; member
42 bpf_map_init_from_attr(&stab->map, attr); in sock_map_alloc()
46 cost = (u64) stab->map.max_entries * sizeof(struct sock *); in sock_map_alloc()
47 err = bpf_map_charge_init(&stab->map.memory, cost); in sock_map_alloc()
51 stab->sks = bpf_map_area_alloc((u64) stab->map.max_entries * in sock_map_alloc()
53 stab->map.numa_node); in sock_map_alloc()
55 return &stab->map; in sock_map_alloc()
57 bpf_map_charge_finish(&stab->map.memory); in sock_map_alloc()
66 struct bpf_map *map; in sock_map_get_from_fd() local
71 map = __bpf_map_get(f); in sock_map_get_from_fd()
[all …]
Dbpf_sk_storage.c42 struct bpf_map map; member
133 memcpy(SDATA(selem)->data, value, smap->map.value_size); in selem_alloc()
299 sk_storage_lookup(struct sock *sk, struct bpf_map *map, bool cacheit_lockit) in sk_storage_lookup() argument
308 smap = (struct bpf_sk_storage_map *)map; in sk_storage_lookup()
388 struct bpf_map *map, in sk_storage_update() argument
401 unlikely((map_flags & BPF_F_LOCK) && !map_value_has_spin_lock(map))) in sk_storage_update()
404 smap = (struct bpf_sk_storage_map *)map; in sk_storage_update()
436 copy_map_value_locked(map, old_sdata->data, in sk_storage_update()
461 copy_map_value_locked(map, old_sdata->data, value, false); in sk_storage_update()
501 static int sk_storage_delete(struct sock *sk, struct bpf_map *map) in sk_storage_delete() argument
[all …]
Dnetprio_cgroup.c95 struct netprio_map *map = rcu_dereference_rtnl(dev->priomap); in netprio_prio() local
98 if (map && id < map->priomap_len) in netprio_prio()
99 return map->priomap[id]; in netprio_prio()
115 struct netprio_map *map; in netprio_set_prio() local
120 map = rtnl_dereference(dev->priomap); in netprio_set_prio()
121 if (!prio && (!map || map->priomap_len <= id)) in netprio_set_prio()
128 map = rtnl_dereference(dev->priomap); in netprio_set_prio()
129 map->priomap[id] = prio; in netprio_set_prio()
Dnet-sysfs.c737 struct rps_map *map; in show_rps_map() local
745 map = rcu_dereference(queue->rps_map); in show_rps_map()
746 if (map) in show_rps_map()
747 for (i = 0; i < map->len; i++) in show_rps_map()
748 cpumask_set_cpu(map->cpus[i], mask); in show_rps_map()
760 struct rps_map *old_map, *map; in store_rps_map() local
777 map = kzalloc(max_t(unsigned int, in store_rps_map()
780 if (!map) { in store_rps_map()
787 map->cpus[i++] = cpu; in store_rps_map()
790 map->len = i; in store_rps_map()
[all …]
Ddev.c492 static int netdev_boot_setup_add(char *name, struct ifmap *map) in netdev_boot_setup_add() argument
502 memcpy(&s[i].map, map, sizeof(s[i].map)); in netdev_boot_setup_add()
527 dev->irq = s[i].map.irq; in netdev_boot_setup_check()
528 dev->base_addr = s[i].map.base_addr; in netdev_boot_setup_check()
529 dev->mem_start = s[i].map.mem_start; in netdev_boot_setup_check()
530 dev->mem_end = s[i].map.mem_end; in netdev_boot_setup_check()
566 return s[i].map.base_addr; in netdev_boot_base()
576 struct ifmap map; in netdev_boot_setup() local
583 memset(&map, 0, sizeof(map)); in netdev_boot_setup()
585 map.irq = ints[1]; in netdev_boot_setup()
[all …]
Dfilter.c3492 struct bpf_map *map, in __bpf_tx_xdp() argument
3544 struct bpf_map *map, in __bpf_tx_xdp_map() argument
3550 switch (map->map_type) { in __bpf_tx_xdp_map()
3571 err = __xsk_map_redirect(map, xdp, xs); in __bpf_tx_xdp_map()
3583 struct bpf_map *map = ri->map_to_flush; in xdp_do_flush_map() local
3586 if (map) { in xdp_do_flush_map()
3587 switch (map->map_type) { in xdp_do_flush_map()
3590 __dev_map_flush(map); in xdp_do_flush_map()
3593 __cpu_map_flush(map); in xdp_do_flush_map()
3596 __xsk_map_flush(map); in xdp_do_flush_map()
[all …]
/net/netfilter/ipset/
Dip_set_bitmap_gen.h34 #define get_ext(set, map, id) ((map)->extensions + ((set)->dsize * (id))) argument
39 struct mtype *map = set->data; in mtype_gc_init() local
41 timer_setup(&map->gc, gc, 0); in mtype_gc_init()
42 mod_timer(&map->gc, jiffies + IPSET_GC_PERIOD(set->timeout) * HZ); in mtype_gc_init()
48 struct mtype *map = set->data; in mtype_ext_cleanup() local
51 for (id = 0; id < map->elements; id++) in mtype_ext_cleanup()
52 if (test_bit(id, map->members)) in mtype_ext_cleanup()
53 ip_set_ext_destroy(set, get_ext(set, map, id)); in mtype_ext_cleanup()
59 struct mtype *map = set->data; in mtype_destroy() local
63 ip_set_free(map->members); in mtype_destroy()
[all …]
Dip_set_bitmap_port.c59 const struct bitmap_port *map, size_t dsize) in bitmap_port_do_test() argument
61 return !!test_bit(e->id, map->members); in bitmap_port_do_test()
65 bitmap_port_gc_test(u16 id, const struct bitmap_port *map, size_t dsize) in bitmap_port_gc_test() argument
67 return !!test_bit(id, map->members); in bitmap_port_gc_test()
72 struct bitmap_port *map, u32 flags, size_t dsize) in bitmap_port_do_add() argument
74 return !!test_bit(e->id, map->members); in bitmap_port_do_add()
79 struct bitmap_port *map) in bitmap_port_do_del() argument
81 return !test_and_clear_bit(e->id, map->members); in bitmap_port_do_del()
85 bitmap_port_do_list(struct sk_buff *skb, const struct bitmap_port *map, u32 id, in bitmap_port_do_list() argument
89 htons(map->first_port + id)); in bitmap_port_do_list()
[all …]
Dip_set_bitmap_ip.c68 struct bitmap_ip *map, size_t dsize) in bitmap_ip_do_test() argument
70 return !!test_bit(e->id, map->members); in bitmap_ip_do_test()
74 bitmap_ip_gc_test(u16 id, const struct bitmap_ip *map, size_t dsize) in bitmap_ip_gc_test() argument
76 return !!test_bit(id, map->members); in bitmap_ip_gc_test()
80 bitmap_ip_do_add(const struct bitmap_ip_adt_elem *e, struct bitmap_ip *map, in bitmap_ip_do_add() argument
83 return !!test_bit(e->id, map->members); in bitmap_ip_do_add()
87 bitmap_ip_do_del(const struct bitmap_ip_adt_elem *e, struct bitmap_ip *map) in bitmap_ip_do_del() argument
89 return !test_and_clear_bit(e->id, map->members); in bitmap_ip_do_del()
93 bitmap_ip_do_list(struct sk_buff *skb, const struct bitmap_ip *map, u32 id, in bitmap_ip_do_list() argument
97 htonl(map->first_ip + id * map->hosts)); in bitmap_ip_do_list()
[all …]
Dip_set_bitmap_ipmac.c84 const struct bitmap_ipmac *map, size_t dsize) in bitmap_ipmac_do_test() argument
88 if (!test_bit(e->id, map->members)) in bitmap_ipmac_do_test()
90 elem = get_const_elem(map->extensions, e->id, dsize); in bitmap_ipmac_do_test()
98 bitmap_ipmac_gc_test(u16 id, const struct bitmap_ipmac *map, size_t dsize) in bitmap_ipmac_gc_test() argument
102 if (!test_bit(id, map->members)) in bitmap_ipmac_gc_test()
104 elem = get_const_elem(map->extensions, id, dsize); in bitmap_ipmac_gc_test()
119 struct bitmap_ipmac *map, int mode) in bitmap_ipmac_add_timeout() argument
144 struct bitmap_ipmac *map, u32 flags, size_t dsize) in bitmap_ipmac_do_add() argument
148 elem = get_elem(map->extensions, e->id, dsize); in bitmap_ipmac_do_add()
149 if (test_bit(e->id, map->members)) { in bitmap_ipmac_do_add()
[all …]
Dip_set_list_set.c53 struct list_set *map = set->data; in list_set_ktest() local
63 list_for_each_entry_rcu(e, &map->members, list) { in list_set_ktest()
78 struct list_set *map = set->data; in list_set_kadd() local
82 list_for_each_entry(e, &map->members, list) { in list_set_kadd()
98 struct list_set *map = set->data; in list_set_kdel() local
102 list_for_each_entry(e, &map->members, list) { in list_set_kdel()
155 struct list_set *map = set->data; in list_set_del() local
159 ip_set_put_byindex(map->net, e->id); in list_set_del()
166 struct list_set *map = set->data; in list_set_replace() local
169 ip_set_put_byindex(map->net, old->id); in list_set_replace()
[all …]
/net/ceph/
Dosdmap.c678 struct ceph_pg_pool_info *ceph_pg_pool_by_id(struct ceph_osdmap *map, u64 id) in ceph_pg_pool_by_id() argument
680 return __lookup_pg_pool(&map->pg_pools, id); in ceph_pg_pool_by_id()
683 const char *ceph_pg_pool_name_by_id(struct ceph_osdmap *map, u64 id) in ceph_pg_pool_name_by_id() argument
693 pi = __lookup_pg_pool(&map->pg_pools, (int) id); in ceph_pg_pool_name_by_id()
699 int ceph_pg_poolid_by_name(struct ceph_osdmap *map, const char *name) in ceph_pg_poolid_by_name() argument
703 for (rbp = rb_first(&map->pg_pools); rbp; rbp = rb_next(rbp)) { in ceph_pg_poolid_by_name()
713 u64 ceph_pg_pool_flags(struct ceph_osdmap *map, u64 id) in ceph_pg_pool_flags() argument
717 pi = __lookup_pg_pool(&map->pg_pools, id); in ceph_pg_pool_flags()
893 static int decode_pool_names(void **p, void *end, struct ceph_osdmap *map) in decode_pool_names() argument
906 pi = __lookup_pg_pool(&map->pg_pools, pool); in decode_pool_names()
[all …]
Ddebugfs.c59 struct ceph_osdmap *map = osdc->osdmap; in osdmap_show() local
62 if (map == NULL) in osdmap_show()
66 seq_printf(s, "epoch %u barrier %u flags 0x%x\n", map->epoch, in osdmap_show()
67 osdc->epoch_barrier, map->flags); in osdmap_show()
69 for (n = rb_first(&map->pg_pools); n; n = rb_next(n)) { in osdmap_show()
79 for (i = 0; i < map->max_osd; i++) { in osdmap_show()
80 struct ceph_entity_addr *addr = &map->osd_addr[i]; in osdmap_show()
81 u32 state = map->osd_state[i]; in osdmap_show()
86 ((map->osd_weight[i]*100) >> 16), in osdmap_show()
88 ((ceph_get_primary_affinity(map, i)*100) >> 16)); in osdmap_show()
[all …]
/net/ceph/crush/
Dmapper.c42 int crush_find_rule(const struct crush_map *map, int ruleset, int type, int size) in crush_find_rule() argument
46 for (i = 0; i < map->max_rules; i++) { in crush_find_rule()
47 if (map->rules[i] && in crush_find_rule()
48 map->rules[i]->mask.ruleset == ruleset && in crush_find_rule()
49 map->rules[i]->mask.type == type && in crush_find_rule()
50 map->rules[i]->mask.min_size <= size && in crush_find_rule()
51 map->rules[i]->mask.max_size >= size) in crush_find_rule()
413 static int is_out(const struct crush_map *map, in is_out() argument
449 static int crush_choose_firstn(const struct crush_map *map, in crush_choose_firstn() argument
519 if (item >= map->max_devices) { in crush_choose_firstn()
[all …]
Dcrush.c109 void crush_destroy(struct crush_map *map) in crush_destroy() argument
112 if (map->buckets) { in crush_destroy()
114 for (b = 0; b < map->max_buckets; b++) { in crush_destroy()
115 if (map->buckets[b] == NULL) in crush_destroy()
117 crush_destroy_bucket(map->buckets[b]); in crush_destroy()
119 kfree(map->buckets); in crush_destroy()
123 if (map->rules) { in crush_destroy()
125 for (b = 0; b < map->max_rules; b++) in crush_destroy()
126 crush_destroy_rule(map->rules[b]); in crush_destroy()
127 kfree(map->rules); in crush_destroy()
[all …]
/net/netlabel/
Dnetlabel_cipso_v4.c145 doi_def->map.std = kzalloc(sizeof(*doi_def->map.std), GFP_KERNEL); in netlbl_cipsov4_add_std()
146 if (doi_def->map.std == NULL) { in netlbl_cipsov4_add_std()
173 doi_def->map.std->lvl.local_size) in netlbl_cipsov4_add_std()
174 doi_def->map.std->lvl.local_size = in netlbl_cipsov4_add_std()
182 doi_def->map.std->lvl.cipso_size) in netlbl_cipsov4_add_std()
183 doi_def->map.std->lvl.cipso_size = in netlbl_cipsov4_add_std()
188 doi_def->map.std->lvl.local = kcalloc(doi_def->map.std->lvl.local_size, in netlbl_cipsov4_add_std()
191 if (doi_def->map.std->lvl.local == NULL) { in netlbl_cipsov4_add_std()
195 doi_def->map.std->lvl.cipso = kcalloc(doi_def->map.std->lvl.cipso_size, in netlbl_cipsov4_add_std()
198 if (doi_def->map.std->lvl.cipso == NULL) { in netlbl_cipsov4_add_std()
[all …]
Dnetlabel_mgmt.c151 struct netlbl_domaddr4_map *map; in netlbl_mgmt_add_common() local
174 map = kzalloc(sizeof(*map), GFP_KERNEL); in netlbl_mgmt_add_common()
175 if (map == NULL) { in netlbl_mgmt_add_common()
179 pmap = map; in netlbl_mgmt_add_common()
180 map->list.addr = addr->s_addr & mask->s_addr; in netlbl_mgmt_add_common()
181 map->list.mask = mask->s_addr; in netlbl_mgmt_add_common()
182 map->list.valid = 1; in netlbl_mgmt_add_common()
183 map->def.type = entry->def.type; in netlbl_mgmt_add_common()
185 map->def.cipso = cipsov4; in netlbl_mgmt_add_common()
187 ret_val = netlbl_af4list_add(&map->list, &addrmap->list4); in netlbl_mgmt_add_common()
[all …]
/net/sunrpc/
Drpcb_clnt.c157 struct rpcbind_args *map = data; in rpcb_map_release() local
159 rpcb_wake_rpcbind_waiters(map->r_xprt, map->r_status); in rpcb_map_release()
160 xprt_put(map->r_xprt); in rpcb_map_release()
161 kfree(map->r_addr); in rpcb_map_release()
162 kfree(map); in rpcb_map_release()
452 struct rpcbind_args map = { in rpcb_register() local
459 .rpc_argp = &map, in rpcb_register()
485 struct rpcbind_args *map = msg->rpc_argp; in rpcb_register_inet4() local
490 map->r_addr = rpc_sockaddr2uaddr(sap, GFP_KERNEL); in rpcb_register_inet4()
494 map->r_prog, map->r_vers, in rpcb_register_inet4()
[all …]
/net/netfilter/
Dnf_conntrack_proto_sctp.c153 unsigned long *map) in do_basic_checks() argument
182 if (map) in do_basic_checks()
183 set_bit(sch->type, map); in do_basic_checks()
360 unsigned long map[256 / sizeof(unsigned long)] = { 0 }; in nf_conntrack_sctp_packet() local
369 if (do_basic_checks(ct, skb, dataoff, map) != 0) in nf_conntrack_sctp_packet()
374 if (test_bit(SCTP_CID_ABORT, map) || in nf_conntrack_sctp_packet()
375 test_bit(SCTP_CID_SHUTDOWN_COMPLETE, map) || in nf_conntrack_sctp_packet()
376 test_bit(SCTP_CID_COOKIE_ACK, map)) in nf_conntrack_sctp_packet()
384 if (!test_bit(SCTP_CID_INIT, map) && in nf_conntrack_sctp_packet()
385 !test_bit(SCTP_CID_SHUTDOWN_COMPLETE, map) && in nf_conntrack_sctp_packet()
[all …]
/net/ipv4/
Dcipso_ipv4.c472 kfree(doi_def->map.std->lvl.cipso); in cipso_v4_doi_free()
473 kfree(doi_def->map.std->lvl.local); in cipso_v4_doi_free()
474 kfree(doi_def->map.std->cat.cipso); in cipso_v4_doi_free()
475 kfree(doi_def->map.std->cat.local); in cipso_v4_doi_free()
476 kfree(doi_def->map.std); in cipso_v4_doi_free()
649 if ((level < doi_def->map.std->lvl.cipso_size) && in cipso_v4_map_lvl_valid()
650 (doi_def->map.std->lvl.cipso[level] < CIPSO_V4_INV_LVL)) in cipso_v4_map_lvl_valid()
679 if (host_lvl < doi_def->map.std->lvl.local_size && in cipso_v4_map_lvl_hton()
680 doi_def->map.std->lvl.local[host_lvl] < CIPSO_V4_INV_LVL) { in cipso_v4_map_lvl_hton()
681 *net_lvl = doi_def->map.std->lvl.local[host_lvl]; in cipso_v4_map_lvl_hton()
[all …]
/net/xdp/
Dxsk.c496 struct xsk_map *map = NULL; in xsk_get_map_list_entry() local
505 WARN_ON(xsk_map_inc(node->map)); in xsk_get_map_list_entry()
506 map = node->map; in xsk_get_map_list_entry()
510 return map; in xsk_get_map_list_entry()
531 struct xsk_map *map; in xsk_delete_from_maps() local
533 while ((map = xsk_get_map_list_entry(xs, &map_entry))) { in xsk_delete_from_maps()
534 xsk_map_try_sock_delete(map, xs, map_entry); in xsk_delete_from_maps()
535 xsk_map_put(map); in xsk_delete_from_maps()

12