Lines Matching defs:chain

181 xfrm_policy_insert_list(struct hlist_head *chain, struct xfrm_policy *policy,
183 static void xfrm_policy_insert_inexact_list(struct hlist_head *chain,
1191 struct hlist_head *chain;
1201 chain = xfrm_policy_inexact_alloc_chain(bin, policy, dir);
1202 if (!chain) {
1207 delpol = xfrm_policy_insert_list(chain, policy, excl);
1213 chain = &net->xfrm.policy_inexact[dir];
1214 xfrm_policy_insert_inexact_list(chain, policy);
1229 struct hlist_head *chain;
1338 chain = policy_hash_bysel(net, &policy->selector,
1341 if (!chain) {
1348 hlist_for_each_entry(pol, chain, bydst) {
1357 hlist_add_head_rcu(&policy->bydst, chain);
1504 static void xfrm_policy_insert_inexact_list(struct hlist_head *chain,
1511 hlist_for_each_entry(pol, chain, bydst_inexact_list) {
1532 hlist_add_head_rcu(&policy->bydst_inexact_list, chain);
1534 hlist_for_each_entry(pol, chain, bydst_inexact_list) {
1540 static struct xfrm_policy *xfrm_policy_insert_list(struct hlist_head *chain,
1546 hlist_for_each_entry(pol, chain, bydst) {
1572 hlist_add_head_rcu(&policy->bydst, chain);
1581 struct hlist_head *chain;
1584 chain = policy_hash_bysel(net, &policy->selector, policy->family, dir);
1585 if (chain)
1586 delpol = xfrm_policy_insert_list(chain, policy, excl);
1625 __xfrm_policy_bysel_ctx(struct hlist_head *chain, const struct xfrm_mark *mark,
1631 if (!chain)
1634 hlist_for_each_entry(pol, chain, bydst) {
1653 struct hlist_head *chain;
1657 chain = policy_hash_bysel(net, sel, sel->family, dir);
1658 if (!chain) {
1690 pol = __xfrm_policy_bysel_ctx(chain, mark, if_id, type, dir,
1721 struct hlist_head *chain;
1729 chain = net->xfrm.policy_byidx + idx_hash(net, id);
1731 hlist_for_each_entry(pol, chain, byidx) {
2092 __xfrm_policy_eval_candidates(struct hlist_head *chain,
2100 if (!chain)
2103 hlist_for_each_entry_rcu(pol, chain, bydst) {
2163 struct hlist_head *chain;
2176 chain = policy_hash_direct(net, daddr, saddr, family, dir);
2180 hlist_for_each_entry_rcu(pol, chain, bydst) {
2609 /* Allocate chain of dst_entry's, attach known xfrm's, calculate
4365 struct hlist_head *chain;
4369 chain = policy_hash_direct(net, &sel->daddr, &sel->saddr, sel->family, dir);
4370 hlist_for_each_entry(pol, chain, bydst) {
4379 chain = &net->xfrm.policy_inexact[dir];
4380 hlist_for_each_entry(pol, chain, bydst_inexact_list) {