Home
last modified time | relevance | path

Searched refs:iter (Results 1 – 25 of 97) sorted by relevance

1234

/net/netlabel/
Dnetlabel_addrlist.c49 struct netlbl_af4list *iter; in netlbl_af4list_search() local
51 list_for_each_entry_rcu(iter, head, list) in netlbl_af4list_search()
52 if (iter->valid && (addr & iter->mask) == iter->addr) in netlbl_af4list_search()
53 return iter; in netlbl_af4list_search()
74 struct netlbl_af4list *iter; in netlbl_af4list_search_exact() local
76 list_for_each_entry_rcu(iter, head, list) in netlbl_af4list_search_exact()
77 if (iter->valid && iter->addr == addr && iter->mask == mask) in netlbl_af4list_search_exact()
78 return iter; in netlbl_af4list_search_exact()
99 struct netlbl_af6list *iter; in netlbl_af6list_search() local
101 list_for_each_entry_rcu(iter, head, list) in netlbl_af6list_search()
[all …]
Dnetlabel_addrlist.h82 #define netlbl_af4list_foreach(iter, head) \ argument
83 for (iter = __af4list_valid((head)->next, head); \
84 &iter->list != (head); \
85 iter = __af4list_valid(iter->list.next, head))
87 #define netlbl_af4list_foreach_rcu(iter, head) \ argument
88 for (iter = __af4list_valid_rcu((head)->next, head); \
89 &iter->list != (head); \
90 iter = __af4list_valid_rcu(iter->list.next, head))
92 #define netlbl_af4list_foreach_safe(iter, tmp, head) \ argument
93 for (iter = __af4list_valid((head)->next, head), \
[all …]
Dnetlabel_kapi.c559 struct netlbl_lsm_catmap *iter = *catmap; in _netlbl_catmap_getnode() local
562 if (iter == NULL) in _netlbl_catmap_getnode()
564 if (offset < iter->startbit) in _netlbl_catmap_getnode()
566 while (iter && offset >= (iter->startbit + NETLBL_CATMAP_SIZE)) { in _netlbl_catmap_getnode()
567 prev = iter; in _netlbl_catmap_getnode()
568 iter = iter->next; in _netlbl_catmap_getnode()
570 if (iter == NULL || offset < iter->startbit) in _netlbl_catmap_getnode()
573 return iter; in _netlbl_catmap_getnode()
577 return iter; in _netlbl_catmap_getnode()
582 iter = netlbl_catmap_alloc(gfp_flags); in _netlbl_catmap_getnode()
[all …]
Dnetlabel_cipso_v4.c84 u32 iter = 0; in netlbl_cipsov4_add_common() local
96 if (iter >= CIPSO_V4_TAG_MAXCNT) in netlbl_cipsov4_add_common()
98 doi_def->tags[iter++] = nla_get_u8(nla); in netlbl_cipsov4_add_common()
100 while (iter < CIPSO_V4_TAG_MAXCNT) in netlbl_cipsov4_add_common()
101 doi_def->tags[iter++] = CIPSO_V4_TAG_INVALID; in netlbl_cipsov4_add_common()
130 u32 iter; in netlbl_cipsov4_add_std() local
202 for (iter = 0; iter < doi_def->map.std->lvl.local_size; iter++) in netlbl_cipsov4_add_std()
203 doi_def->map.std->lvl.local[iter] = CIPSO_V4_INV_LVL; in netlbl_cipsov4_add_std()
204 for (iter = 0; iter < doi_def->map.std->lvl.cipso_size; iter++) in netlbl_cipsov4_add_std()
205 doi_def->map.std->lvl.cipso[iter] = CIPSO_V4_INV_LVL; in netlbl_cipsov4_add_std()
[all …]
Dnetlabel_domainhash.c107 u32 iter; in netlbl_domhsh_hash() local
114 for (iter = 0, val = 0, len = strlen(key); iter < len; iter++) in netlbl_domhsh_hash()
115 val = (val << 4 | (val >> (8 * sizeof(u32) - 4))) ^ key[iter]; in netlbl_domhsh_hash()
142 struct netlbl_dom_map *iter; in netlbl_domhsh_search() local
147 list_for_each_entry_rcu(iter, bkt_list, list, in netlbl_domhsh_search()
149 if (iter->valid && in netlbl_domhsh_search()
150 netlbl_family_match(iter->family, family) && in netlbl_domhsh_search()
151 strcmp(iter->domain, domain) == 0) in netlbl_domhsh_search()
152 return iter; in netlbl_domhsh_search()
364 u32 iter; in netlbl_domhsh_init() local
[all …]
/net/rds/
Dinfo.c104 void rds_info_iter_unmap(struct rds_info_iterator *iter) in rds_info_iter_unmap() argument
106 if (iter->addr) { in rds_info_iter_unmap()
107 kunmap_atomic(iter->addr); in rds_info_iter_unmap()
108 iter->addr = NULL; in rds_info_iter_unmap()
115 void rds_info_copy(struct rds_info_iterator *iter, void *data, in rds_info_copy() argument
121 if (!iter->addr) in rds_info_copy()
122 iter->addr = kmap_atomic(*iter->pages); in rds_info_copy()
124 this = min(bytes, PAGE_SIZE - iter->offset); in rds_info_copy()
127 "bytes %lu\n", *iter->pages, iter->addr, in rds_info_copy()
128 iter->offset, this, data, bytes); in rds_info_copy()
[all …]
Dconnection.c522 struct rds_info_iterator *iter, in __rds_inc_msg_cp() argument
527 rds6_inc_info_copy(inc, iter, saddr, daddr, flip); in __rds_inc_msg_cp()
530 rds_inc_info_copy(inc, iter, *(__be32 *)saddr, in __rds_inc_msg_cp()
535 struct rds_info_iterator *iter, in rds_conn_message_info_cmn() argument
581 iter, in rds_conn_message_info_cmn()
601 struct rds_info_iterator *iter, in rds_conn_message_info() argument
605 rds_conn_message_info_cmn(sock, len, iter, lens, want_send, false); in rds_conn_message_info()
610 struct rds_info_iterator *iter, in rds6_conn_message_info() argument
614 rds_conn_message_info_cmn(sock, len, iter, lens, want_send, true); in rds6_conn_message_info()
619 struct rds_info_iterator *iter, in rds_conn_message_info_send() argument
[all …]
Dstats.c84 void rds_stats_info_copy(struct rds_info_iterator *iter, in rds_stats_info_copy() argument
96 rds_info_copy(iter, &ctr, sizeof(ctr)); in rds_stats_info_copy()
112 struct rds_info_iterator *iter, in rds_stats_info() argument
136 rds_stats_info_copy(iter, (uint64_t *)&stats, rds_stat_names, in rds_stats_info()
142 lens->nr = rds_trans_stats_info_copy(iter, avail) + in rds_stats_info()
/net/ipv4/
Dcipso_ipv4.c169 u32 iter; in cipso_v4_cache_init() local
177 for (iter = 0; iter < CIPSO_V4_CACHE_BUCKETS; iter++) { in cipso_v4_cache_init()
178 spin_lock_init(&cipso_v4_cache[iter].lock); in cipso_v4_cache_init()
179 cipso_v4_cache[iter].size = 0; in cipso_v4_cache_init()
180 INIT_LIST_HEAD(&cipso_v4_cache[iter].list); in cipso_v4_cache_init()
196 u32 iter; in cipso_v4_cache_invalidate() local
198 for (iter = 0; iter < CIPSO_V4_CACHE_BUCKETS; iter++) { in cipso_v4_cache_invalidate()
199 spin_lock_bh(&cipso_v4_cache[iter].lock); in cipso_v4_cache_invalidate()
202 &cipso_v4_cache[iter].list, list) { in cipso_v4_cache_invalidate()
206 cipso_v4_cache[iter].size = 0; in cipso_v4_cache_invalidate()
[all …]
Dipmr_base.c114 void *mr_vif_seq_idx(struct net *net, struct mr_vif_iter *iter, loff_t pos) in mr_vif_seq_idx() argument
116 struct mr_table *mrt = iter->mrt; in mr_vif_seq_idx()
118 for (iter->ct = 0; iter->ct < mrt->maxvif; ++iter->ct) { in mr_vif_seq_idx()
119 if (!VIF_EXISTS(mrt, iter->ct)) in mr_vif_seq_idx()
122 return &mrt->vif_table[iter->ct]; in mr_vif_seq_idx()
130 struct mr_vif_iter *iter = seq->private; in mr_vif_seq_next() local
132 struct mr_table *mrt = iter->mrt; in mr_vif_seq_next()
136 return mr_vif_seq_idx(net, iter, 0); in mr_vif_seq_next()
138 while (++iter->ct < mrt->maxvif) { in mr_vif_seq_next()
139 if (!VIF_EXISTS(mrt, iter->ct)) in mr_vif_seq_next()
[all …]
Dfib_trie.c2455 static struct key_vector *fib_trie_get_next(struct fib_trie_iter *iter) in fib_trie_get_next() argument
2457 unsigned long cindex = iter->index; in fib_trie_get_next()
2458 struct key_vector *pn = iter->tnode; in fib_trie_get_next()
2462 iter->tnode, iter->index, iter->depth); in fib_trie_get_next()
2472 iter->tnode = pn; in fib_trie_get_next()
2473 iter->index = cindex; in fib_trie_get_next()
2476 iter->tnode = n; in fib_trie_get_next()
2477 iter->index = 0; in fib_trie_get_next()
2478 ++iter->depth; in fib_trie_get_next()
2488 --iter->depth; in fib_trie_get_next()
[all …]
/net/ipv6/
Dip6_fib.c1076 struct fib6_info *iter = NULL; in fib6_add_rt2node() local
1094 for (iter = leaf; iter; in fib6_add_rt2node()
1095 iter = rcu_dereference_protected(iter->fib6_next, in fib6_add_rt2node()
1101 if (iter->fib6_metric == rt->fib6_metric) { in fib6_add_rt2node()
1111 if (rt_can_ecmp == rt6_qualify_for_ecmp(iter)) { in fib6_add_rt2node()
1119 if (rt6_duplicate_nexthop(iter, rt)) { in fib6_add_rt2node()
1122 if (!(iter->fib6_flags & RTF_EXPIRES)) in fib6_add_rt2node()
1125 fib6_clean_expires(iter); in fib6_add_rt2node()
1127 fib6_set_expires(iter, rt->expires); in fib6_add_rt2node()
1130 fib6_metric_set(iter, RTAX_MTU, in fib6_add_rt2node()
[all …]
Dioam6.c249 struct rhashtable_iter *iter = (struct rhashtable_iter *)cb->args[0]; in ioam6_genl_dumpns_start() local
251 if (!iter) { in ioam6_genl_dumpns_start()
252 iter = kmalloc(sizeof(*iter), GFP_KERNEL); in ioam6_genl_dumpns_start()
253 if (!iter) in ioam6_genl_dumpns_start()
256 cb->args[0] = (long)iter; in ioam6_genl_dumpns_start()
259 rhashtable_walk_enter(&nsdata->namespaces, iter); in ioam6_genl_dumpns_start()
266 struct rhashtable_iter *iter = (struct rhashtable_iter *)cb->args[0]; in ioam6_genl_dumpns_done() local
268 rhashtable_walk_exit(iter); in ioam6_genl_dumpns_done()
269 kfree(iter); in ioam6_genl_dumpns_done()
276 struct rhashtable_iter *iter; in ioam6_genl_dumpns() local
[all …]
Dseg6.c338 struct rhashtable_iter *iter; in seg6_genl_dumphmac_start() local
341 iter = (struct rhashtable_iter *)cb->args[0]; in seg6_genl_dumphmac_start()
343 if (!iter) { in seg6_genl_dumphmac_start()
344 iter = kmalloc(sizeof(*iter), GFP_KERNEL); in seg6_genl_dumphmac_start()
345 if (!iter) in seg6_genl_dumphmac_start()
348 cb->args[0] = (long)iter; in seg6_genl_dumphmac_start()
351 rhashtable_walk_enter(&sdata->hmac_infos, iter); in seg6_genl_dumphmac_start()
358 struct rhashtable_iter *iter = (struct rhashtable_iter *)cb->args[0]; in seg6_genl_dumphmac_done() local
360 rhashtable_walk_exit(iter); in seg6_genl_dumphmac_done()
362 kfree(iter); in seg6_genl_dumphmac_done()
[all …]
Dcalipso.c134 u32 iter; in calipso_cache_init() local
142 for (iter = 0; iter < CALIPSO_CACHE_BUCKETS; iter++) { in calipso_cache_init()
143 spin_lock_init(&calipso_cache[iter].lock); in calipso_cache_init()
144 calipso_cache[iter].size = 0; in calipso_cache_init()
145 INIT_LIST_HEAD(&calipso_cache[iter].list); in calipso_cache_init()
162 u32 iter; in calipso_cache_invalidate() local
164 for (iter = 0; iter < CALIPSO_CACHE_BUCKETS; iter++) { in calipso_cache_invalidate()
165 spin_lock_bh(&calipso_cache[iter].lock); in calipso_cache_invalidate()
168 &calipso_cache[iter].list, list) { in calipso_cache_invalidate()
172 calipso_cache[iter].size = 0; in calipso_cache_invalidate()
[all …]
Dnetfilter.c163 struct ip6_fraglist_iter iter; in br_ip6_fragment() local
184 &iter); in br_ip6_fragment()
192 if (iter.frag) in br_ip6_fragment()
193 ip6_fraglist_prepare(skb, &iter); in br_ip6_fragment()
197 if (err || !iter.frag) in br_ip6_fragment()
200 skb = ip6_fraglist_next(&iter); in br_ip6_fragment()
203 kfree(iter.tmp_hdr); in br_ip6_fragment()
207 kfree_skb_list(iter.frag); in br_ip6_fragment()
/net/ipv6/ila/
Dila_xlat.c382 struct rhashtable_iter iter; in ila_xlat_nl_cmd_flush() local
387 rhashtable_walk_enter(&ilan->xlat.rhash_table, &iter); in ila_xlat_nl_cmd_flush()
388 rhashtable_walk_start(&iter); in ila_xlat_nl_cmd_flush()
391 ila = rhashtable_walk_next(&iter); in ila_xlat_nl_cmd_flush()
418 rhashtable_walk_stop(&iter); in ila_xlat_nl_cmd_flush()
419 rhashtable_walk_exit(&iter); in ila_xlat_nl_cmd_flush()
509 struct ila_dump_iter *iter; in ila_xlat_nl_dump_start() local
511 iter = kmalloc(sizeof(*iter), GFP_KERNEL); in ila_xlat_nl_dump_start()
512 if (!iter) in ila_xlat_nl_dump_start()
515 rhashtable_walk_enter(&ilan->xlat.rhash_table, &iter->rhiter); in ila_xlat_nl_dump_start()
[all …]
/net/netfilter/
Dnft_lookup.c213 struct nft_set_iter iter; in nft_lookup_validate() local
219 iter.genmask = nft_genmask_next(ctx->net); in nft_lookup_validate()
220 iter.skip = 0; in nft_lookup_validate()
221 iter.count = 0; in nft_lookup_validate()
222 iter.err = 0; in nft_lookup_validate()
223 iter.fn = nft_setelem_validate; in nft_lookup_validate()
225 priv->set->ops->walk(ctx, priv->set, &iter); in nft_lookup_validate()
226 if (!iter.err) in nft_lookup_validate()
227 iter.err = nft_set_catchall_validate(ctx, priv->set); in nft_lookup_validate()
229 if (iter.err < 0) in nft_lookup_validate()
[all …]
Dnft_set_hash.c258 struct nft_set_iter *iter) in nft_rhash_walk() argument
271 iter->err = PTR_ERR(he); in nft_rhash_walk()
278 if (iter->count < iter->skip) in nft_rhash_walk()
280 if (!nft_set_elem_active(&he->ext, iter->genmask)) in nft_rhash_walk()
285 iter->err = iter->fn(ctx, set, iter, &elem); in nft_rhash_walk()
286 if (iter->err < 0) in nft_rhash_walk()
290 iter->count++; in nft_rhash_walk()
633 struct nft_set_iter *iter) in nft_hash_walk() argument
642 if (iter->count < iter->skip) in nft_hash_walk()
644 if (!nft_set_elem_active(&he->ext, iter->genmask)) in nft_hash_walk()
[all …]
Dnft_set_bitmap.c217 struct nft_set_iter *iter) in nft_bitmap_walk() argument
224 if (iter->count < iter->skip) in nft_bitmap_walk()
226 if (!nft_set_elem_active(&be->ext, iter->genmask)) in nft_bitmap_walk()
231 iter->err = iter->fn(ctx, set, iter, &elem); in nft_bitmap_walk()
233 if (iter->err < 0) in nft_bitmap_walk()
236 iter->count++; in nft_bitmap_walk()
/net/netlink/
Dgenetlink.c212 static void genl_op_from_split(struct genl_op_iter *iter) in genl_op_from_split() argument
214 const struct genl_family *family = iter->family; in genl_op_from_split()
217 i = iter->entry_idx - family->n_ops - family->n_small_ops; in genl_op_from_split()
220 iter->doit = family->split_ops[i + cnt]; in genl_op_from_split()
221 genl_op_fill_in_reject_policy_split(family, &iter->doit); in genl_op_from_split()
224 memset(&iter->doit, 0, sizeof(iter->doit)); in genl_op_from_split()
229 iter->dumpit = family->split_ops[i + cnt]; in genl_op_from_split()
230 genl_op_fill_in_reject_policy_split(family, &iter->dumpit); in genl_op_from_split()
233 memset(&iter->dumpit, 0, sizeof(iter->dumpit)); in genl_op_from_split()
237 iter->entry_idx += cnt; in genl_op_from_split()
[all …]
/net/ipv4/netfilter/
Darp_tables.c525 struct arpt_entry *iter; in translate_table() local
545 xt_entry_foreach(iter, entry0, newinfo->size) { in translate_table()
546 ret = check_entry_size_and_hooks(iter, newinfo, entry0, in translate_table()
554 offsets[i] = (void *)iter - entry0; in translate_table()
556 if (strcmp(arpt_get_target(iter)->u.user.name, in translate_table()
577 xt_entry_foreach(iter, entry0, newinfo->size) { in translate_table()
578 ret = find_check_entry(iter, net, repl->name, repl->size, in translate_table()
586 xt_entry_foreach(iter, entry0, newinfo->size) { in translate_table()
589 cleanup_entry(iter, net); in translate_table()
603 struct arpt_entry *iter; in get_counters() local
[all …]
Dip_tables.c196 const struct ipt_entry *iter; in trace_packet() local
204 xt_entry_foreach(iter, root, private->size - private->hook_entry[hook]) in trace_packet()
205 if (get_chainname_rulenum(iter, e, hookname, in trace_packet()
664 struct ipt_entry *iter; in translate_table() local
683 xt_entry_foreach(iter, entry0, newinfo->size) { in translate_table()
684 ret = check_entry_size_and_hooks(iter, newinfo, entry0, in translate_table()
692 offsets[i] = (void *)iter - entry0; in translate_table()
694 if (strcmp(ipt_get_target(iter)->u.user.name, in translate_table()
715 xt_entry_foreach(iter, entry0, newinfo->size) { in translate_table()
716 ret = find_check_entry(iter, net, repl->name, repl->size, in translate_table()
[all …]
/net/ipv6/netfilter/
Dip6_tables.c221 const struct ip6t_entry *iter; in trace_packet() local
229 xt_entry_foreach(iter, root, private->size - private->hook_entry[hook]) in trace_packet()
230 if (get_chainname_rulenum(iter, e, hookname, in trace_packet()
681 struct ip6t_entry *iter; in translate_table() local
700 xt_entry_foreach(iter, entry0, newinfo->size) { in translate_table()
701 ret = check_entry_size_and_hooks(iter, newinfo, entry0, in translate_table()
709 offsets[i] = (void *)iter - entry0; in translate_table()
711 if (strcmp(ip6t_get_target(iter)->u.user.name, in translate_table()
732 xt_entry_foreach(iter, entry0, newinfo->size) { in translate_table()
733 ret = find_check_entry(iter, net, repl->name, repl->size, in translate_table()
[all …]
/net/sctp/
Dtsnmap.c143 struct sctp_tsnmap_iter *iter) in sctp_tsnmap_iter_init() argument
146 iter->start = map->cumulative_tsn_ack_point + 1; in sctp_tsnmap_iter_init()
153 struct sctp_tsnmap_iter *iter, in sctp_tsnmap_next_gap_ack() argument
160 if (TSN_lte(map->max_tsn_seen, iter->start)) in sctp_tsnmap_next_gap_ack()
163 offset = iter->start - map->base_tsn; in sctp_tsnmap_next_gap_ack()
182 iter->start = map->cumulative_tsn_ack_point + *end + 1; in sctp_tsnmap_next_gap_ack()
320 struct sctp_tsnmap_iter iter; in sctp_tsnmap_num_gabs() local
326 sctp_tsnmap_iter_init(map, &iter); in sctp_tsnmap_num_gabs()
327 while (sctp_tsnmap_next_gap_ack(map, &iter, in sctp_tsnmap_num_gabs()

1234