Lines Matching refs:psock

136 static inline void sk_msg_apply_bytes(struct sk_psock *psock, u32 bytes)  in sk_msg_apply_bytes()  argument
138 if (psock->apply_bytes) { in sk_msg_apply_bytes()
139 if (psock->apply_bytes < bytes) in sk_msg_apply_bytes()
140 psock->apply_bytes = 0; in sk_msg_apply_bytes()
142 psock->apply_bytes -= bytes; in sk_msg_apply_bytes()
287 static inline void sk_psock_queue_msg(struct sk_psock *psock, in sk_psock_queue_msg() argument
290 list_add_tail(&msg->list, &psock->ingress_msg); in sk_psock_queue_msg()
293 static inline bool sk_psock_queue_empty(const struct sk_psock *psock) in sk_psock_queue_empty() argument
295 return psock ? list_empty(&psock->ingress_msg) : true; in sk_psock_queue_empty()
298 static inline void sk_psock_report_error(struct sk_psock *psock, int err) in sk_psock_report_error() argument
300 struct sock *sk = psock->sk; in sk_psock_report_error()
308 int sk_psock_init_strp(struct sock *sk, struct sk_psock *psock);
309 void sk_psock_start_strp(struct sock *sk, struct sk_psock *psock);
310 void sk_psock_stop_strp(struct sock *sk, struct sk_psock *psock);
311 void sk_psock_start_verdict(struct sock *sk, struct sk_psock *psock);
312 void sk_psock_stop_verdict(struct sock *sk, struct sk_psock *psock);
314 int sk_psock_msg_verdict(struct sock *sk, struct sk_psock *psock,
328 struct sk_psock_link *sk_psock_link_pop(struct sk_psock *psock);
330 void __sk_psock_purge_ingress_msg(struct sk_psock *psock);
332 static inline void sk_psock_cork_free(struct sk_psock *psock) in sk_psock_cork_free() argument
334 if (psock->cork) { in sk_psock_cork_free()
335 sk_msg_free(psock->sk, psock->cork); in sk_psock_cork_free()
336 kfree(psock->cork); in sk_psock_cork_free()
337 psock->cork = NULL; in sk_psock_cork_free()
342 struct sk_psock *psock, in sk_psock_update_proto() argument
350 struct sk_psock *psock) in sk_psock_restore_proto() argument
352 sk->sk_prot->unhash = psock->saved_unhash; in sk_psock_restore_proto()
354 tcp_update_ulp(sk, psock->sk_proto, psock->saved_write_space); in sk_psock_restore_proto()
356 sk->sk_write_space = psock->saved_write_space; in sk_psock_restore_proto()
358 WRITE_ONCE(sk->sk_prot, psock->sk_proto); in sk_psock_restore_proto()
362 static inline void sk_psock_set_state(struct sk_psock *psock, in sk_psock_set_state() argument
365 set_bit(bit, &psock->state); in sk_psock_set_state()
368 static inline void sk_psock_clear_state(struct sk_psock *psock, in sk_psock_clear_state() argument
371 clear_bit(bit, &psock->state); in sk_psock_clear_state()
374 static inline bool sk_psock_test_state(const struct sk_psock *psock, in sk_psock_test_state() argument
377 return test_bit(bit, &psock->state); in sk_psock_test_state()
382 struct sk_psock *psock; in sk_psock_get() local
385 psock = sk_psock(sk); in sk_psock_get()
386 if (psock && !refcount_inc_not_zero(&psock->refcnt)) in sk_psock_get()
387 psock = NULL; in sk_psock_get()
389 return psock; in sk_psock_get()
392 void sk_psock_stop(struct sock *sk, struct sk_psock *psock);
394 void sk_psock_drop(struct sock *sk, struct sk_psock *psock);
396 static inline void sk_psock_put(struct sock *sk, struct sk_psock *psock) in sk_psock_put() argument
398 if (refcount_dec_and_test(&psock->refcnt)) in sk_psock_put()
399 sk_psock_drop(sk, psock); in sk_psock_put()
402 static inline void sk_psock_data_ready(struct sock *sk, struct sk_psock *psock) in sk_psock_data_ready() argument
404 if (psock->parser.enabled) in sk_psock_data_ready()
405 psock->parser.saved_data_ready(sk); in sk_psock_data_ready()
438 int sk_psock_tls_strp_read(struct sk_psock *psock, struct sk_buff *skb);
440 static inline bool sk_psock_strp_enabled(struct sk_psock *psock) in sk_psock_strp_enabled() argument
442 if (!psock) in sk_psock_strp_enabled()
444 return psock->parser.enabled; in sk_psock_strp_enabled()