Home
last modified time | relevance | path

Searched refs:chain (Results 1 – 25 of 67) sorted by relevance

123

/net/netfilter/
Dnft_immediate.c74 struct nft_chain *chain = priv->data.verdict.chain; in nft_immediate_init() local
79 err = nf_tables_bind_chain(ctx, chain); in nft_immediate_init()
101 struct nft_chain *chain; in nft_immediate_activate() local
108 chain = data->verdict.chain; in nft_immediate_activate()
109 if (!nft_chain_binding(chain)) in nft_immediate_activate()
113 chain_ctx.chain = chain; in nft_immediate_activate()
115 list_for_each_entry(rule, &chain->rules, list) in nft_immediate_activate()
118 nft_clear(ctx->net, chain); in nft_immediate_activate()
129 struct nft_chain *chain, in nft_immediate_chain_deactivate() argument
136 chain_ctx.chain = chain; in nft_immediate_chain_deactivate()
[all …]
Dnf_tables_offload.c264 static int nft_flow_offload_cmd(const struct nft_chain *chain, in nft_flow_offload_cmd() argument
273 if (!nft_is_base_chain(chain)) in nft_flow_offload_cmd()
276 basechain = nft_base_chain(chain); in nft_flow_offload_cmd()
284 static int nft_flow_offload_rule(const struct nft_chain *chain, in nft_flow_offload_rule() argument
291 return nft_flow_offload_cmd(chain, rule, flow, command, &cls_flow); in nft_flow_offload_rule()
294 int nft_flow_rule_stats(const struct nft_chain *chain, in nft_flow_rule_stats() argument
301 err = nft_flow_offload_cmd(chain, rule, NULL, FLOW_CLS_STATS, in nft_flow_rule_stats()
327 struct nft_chain *chain; in nft_flow_offload_unbind() local
330 chain = &basechain->chain; in nft_flow_offload_unbind()
331 list_for_each_entry(rule, &chain->rules, list) { in nft_flow_offload_unbind()
[all …]
Dnf_tables_api.c136 struct nft_chain *chain, in nft_ctx_init() argument
143 ctx->chain = chain; in nft_ctx_init()
222 struct nft_chain *chain, bool bind) in __nft_chain_trans_bind() argument
228 if (!nft_chain_binding(chain)) in __nft_chain_trans_bind()
235 if (nft_trans_chain(trans) == chain) in __nft_chain_trans_bind()
239 if (trans->ctx.chain == chain) in __nft_chain_trans_bind()
247 struct nft_chain *chain) in nft_chain_trans_bind() argument
249 __nft_chain_trans_bind(ctx, chain, true); in nft_chain_trans_bind()
252 int nf_tables_bind_chain(const struct nft_ctx *ctx, struct nft_chain *chain) in nf_tables_bind_chain() argument
254 if (!nft_chain_binding(chain)) in nf_tables_bind_chain()
[all …]
Dnf_tables_trace.c176 return &info->basechain->chain; in nft_trace_get_chain()
183 if (WARN_ON_ONCE(!last->chain)) in nft_trace_get_chain()
184 return &info->basechain->chain; in nft_trace_get_chain()
186 return last->chain; in nft_trace_get_chain()
194 const struct nft_chain *chain; in nft_trace_notify() local
204 chain = nft_trace_get_chain(rule, info); in nft_trace_notify()
207 nla_total_size(strlen(chain->table->name)) + in nft_trace_notify()
208 nla_total_size(strlen(chain->name)) + in nft_trace_notify()
226 size += nla_total_size(strlen(verdict->chain->name)); /* jump target */ in nft_trace_notify()
247 if (nla_put_string(skb, NFTA_TRACE_CHAIN, chain->name)) in nft_trace_notify()
[all …]
Dnft_chain_filter.c324 struct nft_base_chain *basechain = nft_base_chain(ctx->chain); in nft_netdev_event()
341 if (!(ctx->chain->table->flags & NFT_TABLE_F_DORMANT)) in nft_netdev_event()
364 struct nft_chain *chain, *nr; in nf_tables_netdev_event() local
383 list_for_each_entry_safe(chain, nr, &table->chains, list) { in nf_tables_netdev_event()
384 if (!nft_is_base_chain(chain)) in nf_tables_netdev_event()
387 basechain = nft_base_chain(chain); in nf_tables_netdev_event()
392 ctx.chain = chain; in nf_tables_netdev_event()
Dnf_tables_core.c181 static noinline void nft_update_chain_stats(const struct nft_chain *chain, in nft_update_chain_stats() argument
188 base_chain = nft_base_chain(chain); in nft_update_chain_stats()
255 const struct nft_chain *chain = priv, *basechain = chain; in nft_do_chain() local
271 blob = rcu_dereference(chain->blob_gen_1); in nft_do_chain()
273 blob = rcu_dereference(chain->blob_gen_0); in nft_do_chain()
325 chain = regs.verdict.chain; in nft_do_chain()
Dnft_compat.c35 const struct nft_chain *chain = ctx->chain; in nft_compat_chain_validate_dependency() local
39 !nft_is_base_chain(chain)) in nft_compat_chain_validate_dependency()
42 basechain = nft_base_chain(chain); in nft_compat_chain_validate_dependency()
172 if (nft_is_base_chain(ctx->chain)) { in nft_target_set_tgchk_param()
174 nft_base_chain(ctx->chain); in nft_target_set_tgchk_param()
367 ret = nft_chain_validate_hooks(ctx->chain, in nft_target_validate()
376 if (nft_is_base_chain(ctx->chain)) { in nft_target_validate()
378 nft_base_chain(ctx->chain); in nft_target_validate()
473 if (nft_is_base_chain(ctx->chain)) { in nft_match_set_mtchk_param()
475 nft_base_chain(ctx->chain); in nft_match_set_mtchk_param()
[all …]
Dnfnetlink_hook.c115 struct nft_chain *chain) in nfnl_hook_put_nft_chain_info() argument
121 if (WARN_ON_ONCE(!chain)) in nfnl_hook_put_nft_chain_info()
124 if (!nft_is_active(net, chain)) in nfnl_hook_put_nft_chain_info()
135 ret = nla_put_string(nlskb, NFNLA_CHAIN_TABLE, chain->table->name); in nfnl_hook_put_nft_chain_info()
139 ret = nla_put_string(nlskb, NFNLA_CHAIN_NAME, chain->name); in nfnl_hook_put_nft_chain_info()
143 ret = nla_put_u8(nlskb, NFNLA_CHAIN_FAMILY, chain->table->family); in nfnl_hook_put_nft_chain_info()
Dnft_nat.c151 err = nft_chain_validate_dependency(ctx->chain, NFT_CHAIN_T_NAT); in nft_nat_validate()
157 err = nft_chain_validate_hooks(ctx->chain, in nft_nat_validate()
162 err = nft_chain_validate_hooks(ctx->chain, in nft_nat_validate()
Dnft_redir.c35 err = nft_chain_validate_dependency(ctx->chain, NFT_CHAIN_T_NAT); in nft_redir_validate()
39 return nft_chain_validate_hooks(ctx->chain, in nft_redir_validate()
Dnft_masq.c35 err = nft_chain_validate_dependency(ctx->chain, NFT_CHAIN_T_NAT); in nft_masq_validate()
39 return nft_chain_validate_hooks(ctx->chain, in nft_masq_validate()
Dnft_reject_inet.c67 return nft_chain_validate_hooks(ctx->chain, in nft_reject_inet_validate()
Dnft_reject.c30 return nft_chain_validate_hooks(ctx->chain, in nft_reject_validate()
/net/sched/
Dcls_api.c54 const struct tcf_chain *chain; member
91 n->chain_index = tp->chain->index; in tcf_exts_miss_cookie_base_alloc()
92 n->chain = tp->chain; in tcf_exts_miss_cookie_base_alloc()
174 return jhash_3words(tp->chain->index, tp->prio, in destroy_obj_hashfn()
178 static void tcf_proto_signal_destroying(struct tcf_chain *chain, in tcf_proto_signal_destroying() argument
181 struct tcf_block *block = chain->block; in tcf_proto_signal_destroying()
192 return tp1->chain->index == tp2->chain->index && in tcf_proto_cmp()
197 static bool tcf_proto_exists_destroying(struct tcf_chain *chain, in tcf_proto_exists_destroying() argument
205 hash_for_each_possible_rcu(chain->block->proto_destroy_ht, iter, in tcf_proto_exists_destroying()
218 tcf_proto_signal_destroyed(struct tcf_chain *chain, struct tcf_proto *tp) in tcf_proto_signal_destroyed() argument
[all …]
Dcls_matchall.c74 struct tcf_block *block = tp->chain->block; in mall_destroy_hw_filter()
90 struct tcf_block *block = tp->chain->block; in mall_replace_hw_filter()
278 struct tcf_block *block = tp->chain->block; in mall_reoffload()
315 struct tcf_block *block = tp->chain->block; in mall_stats_hw_filter()
Dcls_flower.c102 struct tcf_chain *chain; member
440 struct tcf_block *block = tp->chain->block; in fl_hw_destroy_filter()
456 struct tcf_block *block = tp->chain->block; in fl_hw_replace_filter()
500 struct tcf_block *block = tp->chain->block; in fl_hw_update_stats()
2345 if (!fl_mask_fits_tmplt(tp->chain->tmplt_priv, mask)) { in fl_change()
2552 struct tcf_block *block = tp->chain->block; in fl_reoffload()
2635 static int fl_hw_create_tmplt(struct tcf_chain *chain, in fl_hw_create_tmplt() argument
2639 struct tcf_block *block = chain->block; in fl_hw_create_tmplt()
2645 cls_flower.common.chain_index = chain->index; in fl_hw_create_tmplt()
2661 static void fl_hw_destroy_tmplt(struct tcf_chain *chain, in fl_hw_destroy_tmplt() argument
[all …]
Dcls_bpf.c149 struct tcf_block *block = tp->chain->block; in cls_bpf_offload_cmd()
230 struct tcf_block *block = tp->chain->block; in cls_bpf_offload_update_stats()
404 tcf_block_netif_keep_dst(tp->chain->block); in cls_bpf_prog_from_efd()
654 struct tcf_block *block = tp->chain->block; in cls_bpf_reoffload()
/net/batman-adv/
Dfragmentation.c63 struct batadv_frag_table_entry *chain; in batadv_frag_purge_orig() local
67 chain = &orig_node->fragments[i]; in batadv_frag_purge_orig()
68 spin_lock_bh(&chain->lock); in batadv_frag_purge_orig()
70 if (!check_cb || check_cb(chain)) { in batadv_frag_purge_orig()
71 batadv_frag_clear_chain(&chain->fragment_list, true); in batadv_frag_purge_orig()
72 chain->size = 0; in batadv_frag_purge_orig()
75 spin_unlock_bh(&chain->lock); in batadv_frag_purge_orig()
107 static bool batadv_frag_init_chain(struct batadv_frag_table_entry *chain, in batadv_frag_init_chain() argument
110 lockdep_assert_held(&chain->lock); in batadv_frag_init_chain()
112 if (chain->seqno == seqno) in batadv_frag_init_chain()
[all …]
/net/xfrm/
Dxfrm_policy.c181 xfrm_policy_insert_list(struct hlist_head *chain, struct xfrm_policy *policy,
183 static void xfrm_policy_insert_inexact_list(struct hlist_head *chain,
1193 struct hlist_head *chain; in xfrm_policy_inexact_insert() local
1203 chain = xfrm_policy_inexact_alloc_chain(bin, policy, dir); in xfrm_policy_inexact_insert()
1204 if (!chain) { in xfrm_policy_inexact_insert()
1209 delpol = xfrm_policy_insert_list(chain, policy, excl); in xfrm_policy_inexact_insert()
1215 chain = &net->xfrm.policy_inexact[dir]; in xfrm_policy_inexact_insert()
1216 xfrm_policy_insert_inexact_list(chain, policy); in xfrm_policy_inexact_insert()
1231 struct hlist_head *chain; in xfrm_hash_rebuild() local
1340 chain = policy_hash_bysel(net, &policy->selector, in xfrm_hash_rebuild()
[all …]
/net/ipv4/
Dtcp_metrics.c89 struct tcp_metrics_block __rcu *chain; member
191 oldest = deref_locked(tcp_metrics_hash[hash].chain); in tcpm_new()
213 tm->tcpm_next = tcp_metrics_hash[hash].chain; in tcpm_new()
214 rcu_assign_pointer(tcp_metrics_hash[hash].chain, tm); in tcpm_new()
238 for (tm = rcu_dereference(tcp_metrics_hash[hash].chain); tm; in __tcp_get_metrics()
280 for (tm = rcu_dereference(tcp_metrics_hash[hash].chain); tm; in __tcp_get_metrics_req()
776 for (col = 0, tm = rcu_dereference(hb->chain); tm; in tcp_metrics_nl_dump()
870 for (tm = rcu_dereference(tcp_metrics_hash[hash].chain); tm; in tcp_metrics_nl_cmd_get()
902 struct tcp_metrics_block __rcu **pp = &hb->chain; in tcp_metrics_flush_all()
949 pp = &hb->chain; in tcp_metrics_nl_cmd_del()
Dinet_hashtables.c80 hlist_add_head(&tb->node, &head->chain); in inet_bind_bucket_create()
121 hlist_add_head(&tb->node, &head->chain); in inet_bind2_bucket_init()
254 inet_bind_bucket_for_each(tb, &head->chain) { in __inet_inherit_port()
515 sk_nulls_for_each_rcu(sk, node, &head->chain) { in __inet_lookup_established()
567 sk_nulls_for_each(sk2, node, &head->chain) { in __inet_check_established()
588 __sk_nulls_add_node_rcu(sk, &head->chain); in __inet_check_established()
673 list = &head->chain; in inet_ehash_insert()
860 inet_bind_bucket_for_each(bhash2, &head->chain) in inet_bind2_bucket_find()
1058 inet_bind_bucket_for_each(tb, &head->chain) { in __inet_hash_connect()
1276 INIT_HLIST_NULLS_HEAD(&new_hashinfo->ehash[i].chain, i); in inet_pernet_hashinfo_alloc()
Dinet_timewait_sock.c147 inet_twsk_add_node_rcu(tw, &ehead->chain); in inet_twsk_hashdance()
291 if (hlist_nulls_empty(&head->chain)) in inet_twsk_purge()
298 sk_nulls_for_each_rcu(sk, node, &head->chain) { in inet_twsk_purge()
/net/netfilter/ipvs/
Dip_vs_est.c78 static void ip_vs_chain_estimation(struct hlist_head *chain) in ip_vs_chain_estimation() argument
85 hlist_for_each_entry_rcu(e, chain, list) { in ip_vs_chain_estimation()
637 struct hlist_head chain; in ip_vs_est_calc_limits() local
648 INIT_HLIST_HEAD(&chain); in ip_vs_est_calc_limits()
655 hlist_add_head(&s->est.list, &chain); in ip_vs_est_calc_limits()
672 ip_vs_chain_estimation(&chain); in ip_vs_est_calc_limits()
676 ip_vs_chain_estimation(&chain); in ip_vs_est_calc_limits()
/net/ipv6/
Dinet6_hashtables.c70 sk_nulls_for_each_rcu(sk, node, &head->chain) { in __inet6_lookup_established()
286 sk_nulls_for_each(sk2, node, &head->chain) { in __inet6_check_established()
308 __sk_nulls_add_node_rcu(sk, &head->chain); in __inet6_check_established()
/net/switchdev/
Dswitchdev.c430 struct blocking_notifier_head *chain = &switchdev_blocking_notif_chain; in register_switchdev_blocking_notifier() local
432 return blocking_notifier_chain_register(chain, nb); in register_switchdev_blocking_notifier()
438 struct blocking_notifier_head *chain = &switchdev_blocking_notif_chain; in unregister_switchdev_blocking_notifier() local
440 return blocking_notifier_chain_unregister(chain, nb); in unregister_switchdev_blocking_notifier()

123