Home
last modified time | relevance | path

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

12

/net/sctp/
Dtsnmap.c44 static void sctp_tsnmap_update(struct sctp_tsnmap *map);
45 static void sctp_tsnmap_find_gap_ack(unsigned long *map, __u16 off,
47 static int sctp_tsnmap_grow(struct sctp_tsnmap *map, u16 size);
50 struct sctp_tsnmap *sctp_tsnmap_init(struct sctp_tsnmap *map, __u16 len, in sctp_tsnmap_init() argument
53 if (!map->tsn_map) { in sctp_tsnmap_init()
54 map->tsn_map = kzalloc(len>>3, gfp); in sctp_tsnmap_init()
55 if (map->tsn_map == NULL) in sctp_tsnmap_init()
58 map->len = len; in sctp_tsnmap_init()
60 bitmap_zero(map->tsn_map, map->len); in sctp_tsnmap_init()
64 map->base_tsn = initial_tsn; in sctp_tsnmap_init()
[all …]
Dssnmap.c37 static struct sctp_ssnmap *sctp_ssnmap_init(struct sctp_ssnmap *map, __u16 in,
85 static struct sctp_ssnmap *sctp_ssnmap_init(struct sctp_ssnmap *map, __u16 in, in sctp_ssnmap_init() argument
88 memset(map, 0x00, sctp_ssnmap_size(in, out)); in sctp_ssnmap_init()
91 map->in.ssn = (__u16 *)&map[1]; in sctp_ssnmap_init()
92 map->in.len = in; in sctp_ssnmap_init()
95 map->out.ssn = &map->in.ssn[in]; in sctp_ssnmap_init()
96 map->out.len = out; in sctp_ssnmap_init()
98 return map; in sctp_ssnmap_init()
102 void sctp_ssnmap_clear(struct sctp_ssnmap *map) in sctp_ssnmap_clear() argument
106 size = (map->in.len + map->out.len) * sizeof(__u16); in sctp_ssnmap_clear()
[all …]
/net/rds/
Dcong.c109 struct rds_cong_map *map; in rds_cong_tree_walk() local
113 map = rb_entry(parent, struct rds_cong_map, m_rb_node); in rds_cong_tree_walk()
115 if (addr < map->m_addr) in rds_cong_tree_walk()
117 else if (addr > map->m_addr) in rds_cong_tree_walk()
120 return map; in rds_cong_tree_walk()
137 struct rds_cong_map *map; in rds_cong_from_addr() local
143 map = kzalloc(sizeof(struct rds_cong_map), GFP_KERNEL); in rds_cong_from_addr()
144 if (!map) in rds_cong_from_addr()
147 map->m_addr = addr; in rds_cong_from_addr()
148 init_waitqueue_head(&map->m_waitq); in rds_cong_from_addr()
[all …]
Dtcp_recv.c132 struct rds_cong_map *map; in rds_tcp_cong_recv() local
141 map = conn->c_fcong; in rds_tcp_cong_recv()
153 (void *)map->m_page_addrs[map_page] + map_off, in rds_tcp_cong_recv()
166 rds_cong_map_updated(map, ~(u64) 0); in rds_tcp_cong_recv()
Drecv.c70 struct rds_cong_map *map, in rds_recv_rcvbuf_delta() argument
90 rds_cong_set_bit(map, port); in rds_recv_rcvbuf_delta()
91 rds_cong_queue_updates(map); in rds_recv_rcvbuf_delta()
98 rds_cong_clear_bit(map, port); in rds_recv_rcvbuf_delta()
99 rds_cong_queue_updates(map); in rds_recv_rcvbuf_delta()
/net/ceph/
Dosdmap.c472 struct ceph_pg_pool_info *ceph_pg_pool_by_id(struct ceph_osdmap *map, u64 id) in ceph_pg_pool_by_id() argument
474 return __lookup_pg_pool(&map->pg_pools, id); in ceph_pg_pool_by_id()
477 const char *ceph_pg_pool_name_by_id(struct ceph_osdmap *map, u64 id) in ceph_pg_pool_name_by_id() argument
487 pi = __lookup_pg_pool(&map->pg_pools, (int) id); in ceph_pg_pool_name_by_id()
493 int ceph_pg_poolid_by_name(struct ceph_osdmap *map, const char *name) in ceph_pg_poolid_by_name() argument
497 for (rbp = rb_first(&map->pg_pools); rbp; rbp = rb_next(rbp)) { in ceph_pg_poolid_by_name()
595 static int decode_pool_names(void **p, void *end, struct ceph_osdmap *map) in decode_pool_names() argument
608 pi = __lookup_pg_pool(&map->pg_pools, pool); in decode_pool_names()
629 void ceph_osdmap_destroy(struct ceph_osdmap *map) in ceph_osdmap_destroy() argument
631 dout("osdmap_destroy %p\n", map); in ceph_osdmap_destroy()
[all …]
Ddebugfs.c56 struct ceph_osdmap *map = client->osdc.osdmap; in osdmap_show() local
59 if (map == NULL) in osdmap_show()
62 seq_printf(s, "epoch %d\n", map->epoch); in osdmap_show()
64 (map->flags & CEPH_OSDMAP_NEARFULL) ? " NEARFULL" : "", in osdmap_show()
65 (map->flags & CEPH_OSDMAP_FULL) ? " FULL" : ""); in osdmap_show()
67 for (n = rb_first(&map->pg_pools); n; n = rb_next(n)) { in osdmap_show()
75 for (i = 0; i < map->max_osd; i++) { in osdmap_show()
76 struct ceph_entity_addr *addr = &map->osd_addr[i]; in osdmap_show()
77 int state = map->osd_state[i]; in osdmap_show()
82 ((map->osd_weight[i]*100) >> 16), in osdmap_show()
[all …]
/net/netfilter/ipset/
Dip_set_bitmap_port.c61 const struct bitmap_port *map, size_t dsize) in bitmap_port_do_test() argument
63 return !!test_bit(e->id, map->members); in bitmap_port_do_test()
67 bitmap_port_gc_test(u16 id, const struct bitmap_port *map, size_t dsize) in bitmap_port_gc_test() argument
69 return !!test_bit(id, map->members); in bitmap_port_gc_test()
74 struct bitmap_port *map, u32 flags, size_t dsize) in bitmap_port_do_add() argument
76 return !!test_and_set_bit(e->id, map->members); in bitmap_port_do_add()
81 struct bitmap_port *map) in bitmap_port_do_del() argument
83 return !test_and_clear_bit(e->id, map->members); in bitmap_port_do_del()
87 bitmap_port_do_list(struct sk_buff *skb, const struct bitmap_port *map, u32 id, in bitmap_port_do_list() argument
91 htons(map->first_port + id)); in bitmap_port_do_list()
[all …]
Dip_set_bitmap_gen.h36 #define get_ext(set, map, id) ((map)->extensions + (set)->dsize * (id)) argument
41 struct mtype *map = set->data; in mtype_gc_init() local
43 init_timer(&map->gc); in mtype_gc_init()
44 map->gc.data = (unsigned long) set; in mtype_gc_init()
45 map->gc.function = gc; in mtype_gc_init()
46 map->gc.expires = jiffies + IPSET_GC_PERIOD(set->timeout) * HZ; in mtype_gc_init()
47 add_timer(&map->gc); in mtype_gc_init()
53 struct mtype *map = set->data; in mtype_ext_cleanup() local
56 for (id = 0; id < map->elements; id++) in mtype_ext_cleanup()
57 if (test_bit(id, map->members)) in mtype_ext_cleanup()
[all …]
Dip_set_list_set.c47 #define list_set_elem(set, map, id) \ argument
48 (struct set_elem *)((void *)(map)->members + (id) * (set)->dsize)
55 struct list_set *map = set->data; in list_set_ktest() local
64 for (i = 0; i < map->size; i++) { in list_set_ktest()
65 e = list_set_elem(set, map, i); in list_set_ktest()
92 struct list_set *map = set->data; in list_set_kadd() local
97 for (i = 0; i < map->size; i++) { in list_set_kadd()
98 e = list_set_elem(set, map, i); in list_set_kadd()
116 struct list_set *map = set->data; in list_set_kdel() local
121 for (i = 0; i < map->size; i++) { in list_set_kdel()
[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_and_set_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_elem(map->extensions, e->id, dsize); in bitmap_ipmac_do_test()
99 bitmap_ipmac_gc_test(u16 id, const struct bitmap_ipmac *map, size_t dsize) in bitmap_ipmac_gc_test() argument
103 if (!test_bit(id, map->members)) in bitmap_ipmac_gc_test()
105 elem = get_elem(map->extensions, id, dsize); in bitmap_ipmac_gc_test()
120 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_and_set_bit(e->id, map->members)) { in bitmap_ipmac_do_add()
[all …]
/net/sunrpc/
Drpcb_clnt.c156 struct rpcbind_args *map = data; in rpcb_map_release() local
158 rpcb_wake_rpcbind_waiters(map->r_xprt, map->r_status); in rpcb_map_release()
159 xprt_put(map->r_xprt); in rpcb_map_release()
160 kfree(map->r_addr); in rpcb_map_release()
161 kfree(map); in rpcb_map_release()
447 struct rpcbind_args map = { in rpcb_register() local
454 .rpc_argp = &map, in rpcb_register()
480 struct rpcbind_args *map = msg->rpc_argp; in rpcb_register_inet4() local
485 map->r_addr = rpc_sockaddr2uaddr(sap, GFP_KERNEL); in rpcb_register_inet4()
489 map->r_prog, map->r_vers, in rpcb_register_inet4()
[all …]
/net/netlabel/
Dnetlabel_cipso_v4.c164 doi_def->map.std = kzalloc(sizeof(*doi_def->map.std), GFP_KERNEL); in netlbl_cipsov4_add_std()
165 if (doi_def->map.std == NULL) { in netlbl_cipsov4_add_std()
191 doi_def->map.std->lvl.local_size) in netlbl_cipsov4_add_std()
192 doi_def->map.std->lvl.local_size = in netlbl_cipsov4_add_std()
200 doi_def->map.std->lvl.cipso_size) in netlbl_cipsov4_add_std()
201 doi_def->map.std->lvl.cipso_size = in netlbl_cipsov4_add_std()
206 doi_def->map.std->lvl.local = kcalloc(doi_def->map.std->lvl.local_size, in netlbl_cipsov4_add_std()
209 if (doi_def->map.std->lvl.local == NULL) { in netlbl_cipsov4_add_std()
213 doi_def->map.std->lvl.cipso = kcalloc(doi_def->map.std->lvl.cipso_size, in netlbl_cipsov4_add_std()
216 if (doi_def->map.std->lvl.cipso == NULL) { in netlbl_cipsov4_add_std()
[all …]
Dnetlabel_mgmt.c143 struct netlbl_domaddr4_map *map; in netlbl_mgmt_add_common() local
166 map = kzalloc(sizeof(*map), GFP_KERNEL); in netlbl_mgmt_add_common()
167 if (map == NULL) { in netlbl_mgmt_add_common()
171 map->list.addr = addr->s_addr & mask->s_addr; in netlbl_mgmt_add_common()
172 map->list.mask = mask->s_addr; in netlbl_mgmt_add_common()
173 map->list.valid = 1; in netlbl_mgmt_add_common()
174 map->def.type = entry->def.type; in netlbl_mgmt_add_common()
176 map->def.cipso = cipsov4; in netlbl_mgmt_add_common()
178 ret_val = netlbl_af4list_add(&map->list, &addrmap->list4); in netlbl_mgmt_add_common()
180 kfree(map); in netlbl_mgmt_add_common()
[all …]
/net/ceph/crush/
Dmapper.c36 int crush_find_rule(const struct crush_map *map, int ruleset, int type, int size) in crush_find_rule() argument
40 for (i = 0; i < map->max_rules; i++) { in crush_find_rule()
41 if (map->rules[i] && in crush_find_rule()
42 map->rules[i]->mask.ruleset == ruleset && in crush_find_rule()
43 map->rules[i]->mask.type == type && in crush_find_rule()
44 map->rules[i]->mask.min_size <= size && in crush_find_rule()
45 map->rules[i]->mask.max_size >= size) in crush_find_rule()
268 static int is_out(const struct crush_map *map, in is_out() argument
303 static int crush_choose_firstn(const struct crush_map *map, in crush_choose_firstn() argument
363 if (item >= map->max_devices) { in crush_choose_firstn()
[all …]
Dcrush.c102 void crush_destroy(struct crush_map *map) in crush_destroy() argument
105 if (map->buckets) { in crush_destroy()
107 for (b = 0; b < map->max_buckets; b++) { in crush_destroy()
108 if (map->buckets[b] == NULL) in crush_destroy()
110 crush_destroy_bucket(map->buckets[b]); in crush_destroy()
112 kfree(map->buckets); in crush_destroy()
116 if (map->rules) { in crush_destroy()
118 for (b = 0; b < map->max_rules; b++) in crush_destroy()
119 crush_destroy_rule(map->rules[b]); in crush_destroy()
120 kfree(map->rules); in crush_destroy()
[all …]
/net/core/
Dnetprio_cgroup.c91 struct netprio_map *map = rcu_dereference_rtnl(dev->priomap); in netprio_prio() local
94 if (map && id < map->priomap_len) in netprio_prio()
95 return map->priomap[id]; in netprio_prio()
111 struct netprio_map *map; in netprio_set_prio() local
116 map = rtnl_dereference(dev->priomap); in netprio_set_prio()
117 if (!prio && (!map || map->priomap_len <= id)) in netprio_set_prio()
124 map = rtnl_dereference(dev->priomap); in netprio_set_prio()
125 map->priomap[id] = prio; in netprio_set_prio()
Dnet-sysfs.c573 struct rps_map *map; in show_rps_map() local
582 map = rcu_dereference(queue->rps_map); in show_rps_map()
583 if (map) in show_rps_map()
584 for (i = 0; i < map->len; i++) in show_rps_map()
585 cpumask_set_cpu(map->cpus[i], mask); in show_rps_map()
604 struct rps_map *old_map, *map; in store_rps_map() local
621 map = kzalloc(max_t(unsigned int, in store_rps_map()
624 if (!map) { in store_rps_map()
631 map->cpus[i++] = cpu; in store_rps_map()
634 map->len = i; in store_rps_map()
[all …]
Ddev.c546 static int netdev_boot_setup_add(char *name, struct ifmap *map) in netdev_boot_setup_add() argument
556 memcpy(&s[i].map, map, sizeof(s[i].map)); in netdev_boot_setup_add()
581 dev->irq = s[i].map.irq; in netdev_boot_setup_check()
582 dev->base_addr = s[i].map.base_addr; in netdev_boot_setup_check()
583 dev->mem_start = s[i].map.mem_start; in netdev_boot_setup_check()
584 dev->mem_end = s[i].map.mem_end; in netdev_boot_setup_check()
620 return s[i].map.base_addr; in netdev_boot_base()
630 struct ifmap map; in netdev_boot_setup() local
637 memset(&map, 0, sizeof(map)); in netdev_boot_setup()
639 map.irq = ints[1]; in netdev_boot_setup()
[all …]
Dflow_dissector.c404 struct xps_map *map; in get_xps_queue() local
410 map = rcu_dereference( in get_xps_queue()
412 if (map) { in get_xps_queue()
413 if (map->len == 1) in get_xps_queue()
414 queue_index = map->queues[0]; in get_xps_queue()
416 queue_index = map->queues[reciprocal_scale(skb_get_hash(skb), in get_xps_queue()
417 map->len)]; in get_xps_queue()
/net/ipv4/netfilter/
Dnf_nat_snmp_basic.c623 const struct oct1_map *map,
899 const struct oct1_map *map, in mangle_address() argument
902 if (map->from == NOCT1(addr)) { in mangle_address()
908 *addr = map->to; in mangle_address()
913 &map->from, &map->to, addr - begin); in mangle_address()
925 const struct oct1_map *map, in snmp_trap_decode() argument
954 mangle_address(ctx->begin, ctx->pointer - 4, map, check); in snmp_trap_decode()
1019 const struct oct1_map *map, in snmp_parse_mangle() argument
1107 unsigned char ret = snmp_trap_decode(&ctx, &trap, map, check); in snmp_parse_mangle()
1159 mangle_address(ctx.begin, ctx.pointer - 4 , map, check); in snmp_parse_mangle()
[all …]
/net/tipc/
Dbcast.c889 if ((nm_ptr->map[w] & mask) == 0) { in tipc_nmap_add()
891 nm_ptr->map[w] |= mask; in tipc_nmap_add()
904 if ((nm_ptr->map[w] & mask) != 0) { in tipc_nmap_remove()
905 nm_ptr->map[w] &= ~mask; in tipc_nmap_remove()
920 int stop = ARRAY_SIZE(nm_a->map); in tipc_nmap_diff()
923 u32 map; in tipc_nmap_diff() local
927 map = nm_a->map[w] ^ (nm_a->map[w] & nm_b->map[w]); in tipc_nmap_diff()
928 nm_diff->map[w] = map; in tipc_nmap_diff()
929 if (map != 0) { in tipc_nmap_diff()
931 if (map & (1 << b)) in tipc_nmap_diff()
/net/netfilter/
Dnf_conntrack_proto_sctp.c199 unsigned long *map) in do_basic_checks() argument
228 if (map) in do_basic_checks()
229 set_bit(sch->type, map); in do_basic_checks()
317 unsigned long map[256 / sizeof(unsigned long)] = { 0 }; in sctp_packet() local
323 if (do_basic_checks(ct, skb, dataoff, map) != 0) in sctp_packet()
327 if (!test_bit(SCTP_CID_INIT, map) && in sctp_packet()
328 !test_bit(SCTP_CID_SHUTDOWN_COMPLETE, map) && in sctp_packet()
329 !test_bit(SCTP_CID_COOKIE_ECHO, map) && in sctp_packet()
330 !test_bit(SCTP_CID_ABORT, map) && in sctp_packet()
331 !test_bit(SCTP_CID_SHUTDOWN_ACK, map) && in sctp_packet()
[all …]
/net/ipv4/
Dcipso_ipv4.c553 kfree(doi_def->map.std->lvl.cipso); in cipso_v4_doi_free()
554 kfree(doi_def->map.std->lvl.local); in cipso_v4_doi_free()
555 kfree(doi_def->map.std->cat.cipso); in cipso_v4_doi_free()
556 kfree(doi_def->map.std->cat.local); in cipso_v4_doi_free()
738 if (doi_def->map.std->lvl.cipso[level] < CIPSO_V4_INV_LVL) in cipso_v4_map_lvl_valid()
767 if (host_lvl < doi_def->map.std->lvl.local_size && in cipso_v4_map_lvl_hton()
768 doi_def->map.std->lvl.local[host_lvl] < CIPSO_V4_INV_LVL) { in cipso_v4_map_lvl_hton()
769 *net_lvl = doi_def->map.std->lvl.local[host_lvl]; in cipso_v4_map_lvl_hton()
801 map_tbl = doi_def->map.std; in cipso_v4_map_lvl_ntoh()
804 *host_lvl = doi_def->map.std->lvl.cipso[net_lvl]; in cipso_v4_map_lvl_ntoh()
[all …]

12