Lines Matching refs:pq
707 struct xfrm_policy_queue *pq = &old->polq; in xfrm_policy_requeue() local
712 spin_lock_bh(&pq->hold_queue.lock); in xfrm_policy_requeue()
713 skb_queue_splice_init(&pq->hold_queue, &list); in xfrm_policy_requeue()
714 if (del_timer(&pq->hold_timer)) in xfrm_policy_requeue()
716 spin_unlock_bh(&pq->hold_queue.lock); in xfrm_policy_requeue()
721 pq = &new->polq; in xfrm_policy_requeue()
723 spin_lock_bh(&pq->hold_queue.lock); in xfrm_policy_requeue()
724 skb_queue_splice(&list, &pq->hold_queue); in xfrm_policy_requeue()
725 pq->timeout = XFRM_QUEUE_TMO_MIN; in xfrm_policy_requeue()
726 if (!mod_timer(&pq->hold_timer, jiffies)) in xfrm_policy_requeue()
728 spin_unlock_bh(&pq->hold_queue.lock); in xfrm_policy_requeue()
1841 struct xfrm_policy_queue *pq = &pol->polq; in xfrm_policy_queue_process() local
1845 spin_lock(&pq->hold_queue.lock); in xfrm_policy_queue_process()
1846 skb = skb_peek(&pq->hold_queue); in xfrm_policy_queue_process()
1848 spin_unlock(&pq->hold_queue.lock); in xfrm_policy_queue_process()
1854 spin_unlock(&pq->hold_queue.lock); in xfrm_policy_queue_process()
1865 if (pq->timeout >= XFRM_QUEUE_TMO_MAX) in xfrm_policy_queue_process()
1868 pq->timeout = pq->timeout << 1; in xfrm_policy_queue_process()
1869 if (!mod_timer(&pq->hold_timer, jiffies + pq->timeout)) in xfrm_policy_queue_process()
1878 spin_lock(&pq->hold_queue.lock); in xfrm_policy_queue_process()
1879 pq->timeout = 0; in xfrm_policy_queue_process()
1880 skb_queue_splice_init(&pq->hold_queue, &list); in xfrm_policy_queue_process()
1881 spin_unlock(&pq->hold_queue.lock); in xfrm_policy_queue_process()
1907 pq->timeout = 0; in xfrm_policy_queue_process()
1908 xfrm_queue_purge(&pq->hold_queue); in xfrm_policy_queue_process()
1918 struct xfrm_policy_queue *pq = &pol->polq; in xdst_queue_output() local
1925 if (pq->hold_queue.qlen > XFRM_MAX_QUEUE_LEN) { in xdst_queue_output()
1932 spin_lock_bh(&pq->hold_queue.lock); in xdst_queue_output()
1934 if (!pq->timeout) in xdst_queue_output()
1935 pq->timeout = XFRM_QUEUE_TMO_MIN; in xdst_queue_output()
1937 sched_next = jiffies + pq->timeout; in xdst_queue_output()
1939 if (del_timer(&pq->hold_timer)) { in xdst_queue_output()
1940 if (time_before(pq->hold_timer.expires, sched_next)) in xdst_queue_output()
1941 sched_next = pq->hold_timer.expires; in xdst_queue_output()
1945 __skb_queue_tail(&pq->hold_queue, skb); in xdst_queue_output()
1946 if (!mod_timer(&pq->hold_timer, sched_next)) in xdst_queue_output()
1949 spin_unlock_bh(&pq->hold_queue.lock); in xdst_queue_output()