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,
1190 struct hlist_head *chain;
1200 chain = xfrm_policy_inexact_alloc_chain(bin, policy, dir);
1201 if (!chain) {
1206 delpol = xfrm_policy_insert_list(chain, policy, excl);
1212 chain = &net->xfrm.policy_inexact[dir];
1213 xfrm_policy_insert_inexact_list(chain, policy);
1228 struct hlist_head *chain;
1334 chain = policy_hash_bysel(net, &policy->selector,
1337 if (!chain) {
1344 hlist_for_each_entry(pol, chain, bydst) {
1353 hlist_add_head_rcu(&policy->bydst, chain);
1500 static void xfrm_policy_insert_inexact_list(struct hlist_head *chain,
1507 hlist_for_each_entry(pol, chain, bydst_inexact_list) {
1528 hlist_add_head_rcu(&policy->bydst_inexact_list, chain);
1530 hlist_for_each_entry(pol, chain, bydst_inexact_list) {
1536 static struct xfrm_policy *xfrm_policy_insert_list(struct hlist_head *chain,
1542 hlist_for_each_entry(pol, chain, bydst) {
1565 hlist_add_head_rcu(&policy->bydst, chain);
1574 struct hlist_head *chain;
1577 chain = policy_hash_bysel(net, &policy->selector, policy->family, dir);
1578 if (chain)
1579 delpol = xfrm_policy_insert_list(chain, policy, excl);
1618 __xfrm_policy_bysel_ctx(struct hlist_head *chain, const struct xfrm_mark *mark,
1624 if (!chain)
1627 hlist_for_each_entry(pol, chain, bydst) {
1646 struct hlist_head *chain;
1650 chain = policy_hash_bysel(net, sel, sel->family, dir);
1651 if (!chain) {
1683 pol = __xfrm_policy_bysel_ctx(chain, mark, if_id, type, dir,
1714 struct hlist_head *chain;
1722 chain = net->xfrm.policy_byidx + idx_hash(net, id);
1724 hlist_for_each_entry(pol, chain, byidx) {
2013 __xfrm_policy_eval_candidates(struct hlist_head *chain,
2021 if (!chain)
2024 hlist_for_each_entry_rcu(pol, chain, bydst) {
2085 struct hlist_head *chain;
2098 chain = policy_hash_direct(net, daddr, saddr, family, dir);
2102 hlist_for_each_entry_rcu(pol, chain, bydst) {
2530 /* Allocate chain of dst_entry's, attach known xfrm's, calculate
4317 struct hlist_head *chain;
4321 chain = policy_hash_direct(net, &sel->daddr, &sel->saddr, sel->family, dir);
4322 hlist_for_each_entry(pol, chain, bydst) {
4331 chain = &net->xfrm.policy_inexact[dir];
4332 hlist_for_each_entry(pol, chain, bydst_inexact_list) {