Lines Matching full:php

3538 ipsec_policy_delete(ipsec_policy_head_t *php, ipsec_selkey_t *keys, int dir,  in ipsec_policy_delete()  argument
3544 ipsec_policy_root_t *pr = &php->iph_root[dir]; in ipsec_policy_delete()
3553 rw_enter(&php->iph_lock, RW_WRITER); in ipsec_policy_delete()
3567 IPPOL_UNCHAIN(php, ip); in ipsec_policy_delete()
3569 php->iph_gen++; in ipsec_policy_delete()
3572 rw_exit(&php->iph_lock); in ipsec_policy_delete()
3579 rw_exit(&php->iph_lock); in ipsec_policy_delete()
3585 ipsec_policy_delete_index(ipsec_policy_head_t *php, uint64_t policy_index, in ipsec_policy_delete_index() argument
3596 rw_enter(&php->iph_lock, RW_WRITER); in ipsec_policy_delete_index()
3604 ip = (ipsec_policy_t *)avl_find(&php->iph_rulebyid, in ipsec_policy_delete_index()
3608 ip = avl_nearest(&php->iph_rulebyid, where, AVL_AFTER); in ipsec_policy_delete_index()
3618 IPPOL_UNCHAIN(php, ip); in ipsec_policy_delete_index()
3623 php->iph_gen++; in ipsec_policy_delete_index()
3627 rw_exit(&php->iph_lock); in ipsec_policy_delete_index()
3642 ipsec_check_policy(ipsec_policy_head_t *php, ipsec_policy_t *ipp, int direction) in ipsec_check_policy() argument
3644 ipsec_policy_root_t *pr = &php->iph_root[direction]; in ipsec_check_policy()
3661 ASSERT(RW_WRITE_HELD(&php->iph_lock)); in ipsec_check_policy()
3816 ipsec_enter_policy(ipsec_policy_head_t *php, ipsec_policy_t *ipp, int direction, in ipsec_enter_policy() argument
3819 ipsec_policy_root_t *pr = &php->iph_root[direction]; in ipsec_enter_policy()
3825 ASSERT(RW_WRITE_HELD(&php->iph_lock)); in ipsec_enter_policy()
3835 php->iph_gen++; in ipsec_enter_policy()
3845 ipsec_insert_always(&php->iph_rulebyid, ipp); in ipsec_enter_policy()
3851 ipsec_ipr_flush(ipsec_policy_head_t *php, ipsec_policy_root_t *ipr) in ipsec_ipr_flush() argument
3859 IPPOL_UNCHAIN(php, ip); in ipsec_ipr_flush()
3869 IPPOL_UNCHAIN(php, ip); in ipsec_ipr_flush()
3900 ipsec_polhead_flush(ipsec_policy_head_t *php, netstack_t *ns) in ipsec_polhead_flush() argument
3904 ASSERT(RW_WRITE_HELD(&php->iph_lock)); in ipsec_polhead_flush()
3907 ipsec_ipr_flush(php, &php->iph_root[dir]); in ipsec_polhead_flush()
3909 php->iph_gen++; in ipsec_polhead_flush()
3914 ipsec_polhead_free(ipsec_policy_head_t *php, netstack_t *ns) in ipsec_polhead_free() argument
3918 ASSERT(php->iph_refs == 0); in ipsec_polhead_free()
3920 rw_enter(&php->iph_lock, RW_WRITER); in ipsec_polhead_free()
3921 ipsec_polhead_flush(php, ns); in ipsec_polhead_free()
3922 rw_exit(&php->iph_lock); in ipsec_polhead_free()
3923 rw_destroy(&php->iph_lock); in ipsec_polhead_free()
3925 ipsec_policy_root_t *ipr = &php->iph_root[dir]; in ipsec_polhead_free()
3932 ipsec_polhead_free_table(php); in ipsec_polhead_free()
3933 kmem_free(php, sizeof (*php)); in ipsec_polhead_free()
3952 ipsec_policy_head_t *php; in ipsec_polhead_create() local
3954 php = kmem_alloc(sizeof (*php), KM_NOSLEEP); in ipsec_polhead_create()
3955 if (php == NULL) in ipsec_polhead_create()
3956 return (php); in ipsec_polhead_create()
3958 rw_init(&php->iph_lock, NULL, RW_DEFAULT, NULL); in ipsec_polhead_create()
3959 php->iph_refs = 1; in ipsec_polhead_create()
3960 php->iph_gen = 0; in ipsec_polhead_create()
3962 ipsec_ipr_init(&php->iph_root[IPSEC_TYPE_INBOUND]); in ipsec_polhead_create()
3963 ipsec_ipr_init(&php->iph_root[IPSEC_TYPE_OUTBOUND]); in ipsec_polhead_create()
3965 avl_create(&php->iph_rulebyid, ipsec_policy_cmpbyid, in ipsec_polhead_create()
3968 return (php); in ipsec_polhead_create()
3977 ipsec_polhead_split(ipsec_policy_head_t *php, netstack_t *ns) in ipsec_polhead_split() argument
3981 if (php == NULL) in ipsec_polhead_split()
3983 else if (php->iph_refs == 1) in ipsec_polhead_split()
3984 return (php); in ipsec_polhead_split()
3990 if (ipsec_copy_polhead(php, nphp, ns) != 0) { in ipsec_polhead_split()
3994 IPPH_REFRELE(php, ns); in ipsec_polhead_split()