/net/sctp/ |
D | tsnmap.c | 29 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/ |
D | cong.c | 109 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 …]
|
/net/xdp/ |
D | xskmap.c | 15 static struct xsk_map_node *xsk_map_node_alloc(struct xsk_map *map, in xsk_map_node_alloc() argument 20 node = bpf_map_kzalloc(&map->map, sizeof(*node), in xsk_map_node_alloc() 25 bpf_map_inc(&map->map); in xsk_map_node_alloc() 26 atomic_inc(&map->count); in xsk_map_node_alloc() 28 node->map = map; in xsk_map_node_alloc() 35 struct xsk_map *map = node->map; in xsk_map_node_free() local 37 bpf_map_put(&node->map->map); in xsk_map_node_free() 39 atomic_dec(&map->count); in xsk_map_node_free() 82 bpf_map_init_from_attr(&m->map, attr); in xsk_map_alloc() 85 return &m->map; in xsk_map_alloc() [all …]
|
D | xsk.h | 33 struct xsk_map *map; member 42 void xsk_map_try_sock_delete(struct xsk_map *map, struct xdp_sock *xs,
|
/net/core/ |
D | sock_map.c | 18 struct bpf_map map; member 27 static int sock_map_prog_update(struct bpf_map *map, struct bpf_prog *prog, 29 static struct sk_psock_progs *sock_map_progs(struct bpf_map *map); 46 bpf_map_init_from_attr(&stab->map, attr); in sock_map_alloc() 49 stab->sks = bpf_map_area_alloc((u64) stab->map.max_entries * in sock_map_alloc() 51 stab->map.numa_node); in sock_map_alloc() 57 return &stab->map; in sock_map_alloc() 63 struct bpf_map *map; in sock_map_get_from_fd() local 71 map = __bpf_map_get(f); in sock_map_get_from_fd() 72 if (IS_ERR(map)) in sock_map_get_from_fd() [all …]
|
D | bpf_sk_storage.c | 21 bpf_sk_storage_lookup(struct sock *sk, struct bpf_map *map, bool cacheit_lockit) in bpf_sk_storage_lookup() argument 31 smap = (struct bpf_local_storage_map *)map; in bpf_sk_storage_lookup() 35 static int bpf_sk_storage_del(struct sock *sk, struct bpf_map *map) in bpf_sk_storage_del() argument 39 sdata = bpf_sk_storage_lookup(sk, map, false); in bpf_sk_storage_del() 64 static void bpf_sk_storage_map_free(struct bpf_map *map) in bpf_sk_storage_map_free() argument 66 bpf_local_storage_map_free(map, &sk_cache, NULL); in bpf_sk_storage_map_free() 74 static int notsupp_get_next_key(struct bpf_map *map, void *key, in notsupp_get_next_key() argument 80 static void *bpf_fd_sk_storage_lookup_elem(struct bpf_map *map, void *key) in bpf_fd_sk_storage_lookup_elem() argument 89 sdata = bpf_sk_storage_lookup(sock->sk, map, true); in bpf_fd_sk_storage_lookup_elem() 97 static long bpf_fd_sk_storage_update_elem(struct bpf_map *map, void *key, in bpf_fd_sk_storage_update_elem() argument [all …]
|
D | netprio_cgroup.c | 95 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()
|
D | net-sysfs.c | 809 struct rps_map *map; in show_rps_map() local 817 map = rcu_dereference(queue->rps_map); in show_rps_map() 818 if (map) in show_rps_map() 819 for (i = 0; i < map->len; i++) in show_rps_map() 820 cpumask_set_cpu(map->cpus[i], mask); in show_rps_map() 833 struct rps_map *old_map, *map; in netdev_rx_queue_set_rps_mask() local 836 map = kzalloc(max_t(unsigned int, in netdev_rx_queue_set_rps_mask() 839 if (!map) in netdev_rx_queue_set_rps_mask() 844 map->cpus[i++] = cpu; in netdev_rx_queue_set_rps_mask() 847 map->len = i; in netdev_rx_queue_set_rps_mask() [all …]
|
/net/netfilter/ipset/ |
D | ip_set_bitmap_gen.h | 34 #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 …]
|
D | ip_set_bitmap_port.c | 59 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 …]
|
D | ip_set_bitmap_ip.c | 68 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 …]
|
D | ip_set_bitmap_ipmac.c | 84 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 …]
|
D | ip_set_list_set.c | 53 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_rcu(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_rcu(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/ |
D | osdmap.c | 15 void osdmap_info(const struct ceph_osdmap *map, const char *fmt, ...) in osdmap_info() argument 24 printk(KERN_INFO "%s (%pU e%u): %pV", KBUILD_MODNAME, &map->fsid, in osdmap_info() 25 map->epoch, &vaf); in osdmap_info() 738 struct ceph_pg_pool_info *ceph_pg_pool_by_id(struct ceph_osdmap *map, u64 id) in DEFINE_RB_FUNCS2() 740 return lookup_pg_pool(&map->pg_pools, id); in DEFINE_RB_FUNCS2() 743 const char *ceph_pg_pool_name_by_id(struct ceph_osdmap *map, u64 id) in ceph_pg_pool_name_by_id() argument 753 pi = lookup_pg_pool(&map->pg_pools, id); in ceph_pg_pool_name_by_id() 758 int ceph_pg_poolid_by_name(struct ceph_osdmap *map, const char *name) in ceph_pg_poolid_by_name() argument 762 for (rbp = rb_first(&map->pg_pools); rbp; rbp = rb_next(rbp)) { in ceph_pg_poolid_by_name() 772 u64 ceph_pg_pool_flags(struct ceph_osdmap *map, u64 id) in ceph_pg_pool_flags() argument [all …]
|
D | debugfs.c | 59 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/sunrpc/ |
D | rpcb_clnt.c | 156 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() 456 struct rpcbind_args map = { in rpcb_register() local 463 .rpc_argp = &map, in rpcb_register() 487 struct rpcbind_args *map = msg->rpc_argp; in rpcb_register_inet4() local 492 map->r_addr = rpc_sockaddr2uaddr(sap, GFP_KERNEL); in rpcb_register_inet4() 501 kfree(map->r_addr); in rpcb_register_inet4() [all …]
|
/net/ceph/crush/ |
D | mapper.c | 42 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 …]
|
D | crush.c | 108 void crush_destroy(struct crush_map *map) in crush_destroy() argument 111 if (map->buckets) { in crush_destroy() 113 for (b = 0; b < map->max_buckets; b++) { in crush_destroy() 114 if (map->buckets[b] == NULL) in crush_destroy() 116 crush_destroy_bucket(map->buckets[b]); in crush_destroy() 118 kfree(map->buckets); in crush_destroy() 122 if (map->rules) { in crush_destroy() 124 for (b = 0; b < map->max_rules; b++) in crush_destroy() 125 crush_destroy_rule(map->rules[b]); in crush_destroy() 126 kfree(map->rules); in crush_destroy() [all …]
|
/net/netfilter/ |
D | nft_set_pipapo_avx2.c | 152 static int nft_pipapo_avx2_refill(int offset, unsigned long *map, in nft_pipapo_avx2_refill() argument 160 while (map[(x)]) { \ in nft_pipapo_avx2_refill() 161 int r = __builtin_ctzl(map[(x)]); \ in nft_pipapo_avx2_refill() 172 map[(x)] &= ~(1UL << r); \ in nft_pipapo_avx2_refill() 214 static int nft_pipapo_avx2_lookup_4b_2(unsigned long *map, unsigned long *fill, in nft_pipapo_avx2_lookup_4b_2() argument 233 NFT_PIPAPO_AVX2_LOAD(2, map[i_ul]); in nft_pipapo_avx2_lookup_4b_2() 241 NFT_PIPAPO_AVX2_STORE(map[i_ul], 4); in nft_pipapo_avx2_lookup_4b_2() 243 b = nft_pipapo_avx2_refill(i_ul, &map[i_ul], fill, f->mt, last); in nft_pipapo_avx2_lookup_4b_2() 252 NFT_PIPAPO_AVX2_STORE(map[i_ul], 15); in nft_pipapo_avx2_lookup_4b_2() 277 static int nft_pipapo_avx2_lookup_4b_4(unsigned long *map, unsigned long *fill, in nft_pipapo_avx2_lookup_4b_4() argument [all …]
|
D | nf_conntrack_proto_sctp.c | 156 unsigned long *map, in do_basic_checks() argument 186 if (map) in do_basic_checks() 187 set_bit(sch->type, map); in do_basic_checks() 346 unsigned long map[256 / sizeof(unsigned long)] = { 0 }; in nf_conntrack_sctp_packet() local 356 if (do_basic_checks(ct, skb, dataoff, map, state) != 0) in nf_conntrack_sctp_packet() 361 if (test_bit(SCTP_CID_ABORT, map) || in nf_conntrack_sctp_packet() 362 test_bit(SCTP_CID_SHUTDOWN_COMPLETE, map) || in nf_conntrack_sctp_packet() 363 test_bit(SCTP_CID_COOKIE_ACK, map)) in nf_conntrack_sctp_packet() 371 if (!test_bit(SCTP_CID_INIT, map) && in nf_conntrack_sctp_packet() 372 !test_bit(SCTP_CID_SHUTDOWN_COMPLETE, map) && in nf_conntrack_sctp_packet() [all …]
|
D | nft_set_pipapo.c | 362 int pipapo_refill(unsigned long *map, int len, int rules, unsigned long *dst, in pipapo_refill() argument 369 bitset = map[k]; in pipapo_refill() 376 map[k] = 0; in pipapo_refill() 381 bitmap_clear(map, i, 1); in pipapo_refill() 391 map[k] = 0; in pipapo_refill() 432 res_map = scratch->map + (map_index ? m->bsize_max : 0); in nft_pipapo_lookup() 433 fill_map = scratch->map + (map_index ? 0 : m->bsize_max); in nft_pipapo_lookup() 1088 union nft_pipapo_map_bucket map[NFT_PIPAPO_MAX_FIELDS], 1095 for (j = 0; j < map[i].n; j++) { 1096 f->mt[map[i].to + j].to = map[i + 1].to; [all …]
|
/net/netlabel/ |
D | netlabel_cipso_v4.c | 145 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 …]
|
D | netlabel_mgmt.c | 151 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/ipv4/ |
D | cipso_ipv4.c | 471 kfree(doi_def->map.std->lvl.cipso); in cipso_v4_doi_free() 472 kfree(doi_def->map.std->lvl.local); in cipso_v4_doi_free() 473 kfree(doi_def->map.std->cat.cipso); in cipso_v4_doi_free() 474 kfree(doi_def->map.std->cat.local); in cipso_v4_doi_free() 475 kfree(doi_def->map.std); in cipso_v4_doi_free() 648 if ((level < doi_def->map.std->lvl.cipso_size) && in cipso_v4_map_lvl_valid() 649 (doi_def->map.std->lvl.cipso[level] < CIPSO_V4_INV_LVL)) in cipso_v4_map_lvl_valid() 678 if (host_lvl < doi_def->map.std->lvl.local_size && in cipso_v4_map_lvl_hton() 679 doi_def->map.std->lvl.local[host_lvl] < CIPSO_V4_INV_LVL) { in cipso_v4_map_lvl_hton() 680 *net_lvl = doi_def->map.std->lvl.local[host_lvl]; in cipso_v4_map_lvl_hton() [all …]
|
/net/ethtool/ |
D | bitset.c | 86 static bool ethnl_bitmap32_not_zero(const u32 *map, unsigned int start, in ethnl_bitmap32_not_zero() argument 100 return map[start_word] & mask; in ethnl_bitmap32_not_zero() 102 if (map[start_word] & mask) in ethnl_bitmap32_not_zero() 107 if (!memchr_inv(map + start_word, '\0', in ethnl_bitmap32_not_zero() 112 return map[end_word] & ethnl_lower_bits(end); in ethnl_bitmap32_not_zero() 153 static bool ethnl_bitmap32_test_bit(const u32 *map, unsigned int index) in ethnl_bitmap32_test_bit() argument 155 return map[index / 32] & (1U << (index % 32)); in ethnl_bitmap32_test_bit()
|