Lines Matching refs:sk
18 static void qpolicy_simple_push(struct sock *sk, struct sk_buff *skb) in qpolicy_simple_push() argument
20 skb_queue_tail(&sk->sk_write_queue, skb); in qpolicy_simple_push()
23 static bool qpolicy_simple_full(struct sock *sk) in qpolicy_simple_full() argument
25 return dccp_sk(sk)->dccps_tx_qlen && in qpolicy_simple_full()
26 sk->sk_write_queue.qlen >= dccp_sk(sk)->dccps_tx_qlen; in qpolicy_simple_full()
29 static struct sk_buff *qpolicy_simple_top(struct sock *sk) in qpolicy_simple_top() argument
31 return skb_peek(&sk->sk_write_queue); in qpolicy_simple_top()
39 static struct sk_buff *qpolicy_prio_best_skb(struct sock *sk) in qpolicy_prio_best_skb() argument
43 skb_queue_walk(&sk->sk_write_queue, skb) in qpolicy_prio_best_skb()
49 static struct sk_buff *qpolicy_prio_worst_skb(struct sock *sk) in qpolicy_prio_worst_skb() argument
53 skb_queue_walk(&sk->sk_write_queue, skb) in qpolicy_prio_worst_skb()
59 static bool qpolicy_prio_full(struct sock *sk) in qpolicy_prio_full() argument
61 if (qpolicy_simple_full(sk)) in qpolicy_prio_full()
62 dccp_qpolicy_drop(sk, qpolicy_prio_worst_skb(sk)); in qpolicy_prio_full()
73 void (*push) (struct sock *sk, struct sk_buff *skb);
74 bool (*full) (struct sock *sk);
75 struct sk_buff* (*top) (struct sock *sk);
96 void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb) in dccp_qpolicy_push() argument
98 qpol_table[dccp_sk(sk)->dccps_qpolicy].push(sk, skb); in dccp_qpolicy_push()
101 bool dccp_qpolicy_full(struct sock *sk) in dccp_qpolicy_full() argument
103 return qpol_table[dccp_sk(sk)->dccps_qpolicy].full(sk); in dccp_qpolicy_full()
106 void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb) in dccp_qpolicy_drop() argument
109 skb_unlink(skb, &sk->sk_write_queue); in dccp_qpolicy_drop()
114 struct sk_buff *dccp_qpolicy_top(struct sock *sk) in dccp_qpolicy_top() argument
116 return qpol_table[dccp_sk(sk)->dccps_qpolicy].top(sk); in dccp_qpolicy_top()
119 struct sk_buff *dccp_qpolicy_pop(struct sock *sk) in dccp_qpolicy_pop() argument
121 struct sk_buff *skb = dccp_qpolicy_top(sk); in dccp_qpolicy_pop()
126 skb_unlink(skb, &sk->sk_write_queue); in dccp_qpolicy_pop()
131 bool dccp_qpolicy_param_ok(struct sock *sk, __be32 param) in dccp_qpolicy_param_ok() argument
136 return (qpol_table[dccp_sk(sk)->dccps_qpolicy].params & param) == param; in dccp_qpolicy_param_ok()