tcp_bpf_sock_is_readable() is pretty much generic, we can extract it and reuse it for non-TCP sockets.
Showing the changes to include (1 of 3 files). Show all
Unified · Split
| @@ -128,6 +128,7 @@ int sk_msg_memcopy_from_iter(struct sock *sk, struct iov_iter *from, · 127 unmodified lines | ||
| 128 | 128 | struct sk_msg *msg, u32 bytes); |
| 129 | 129 | int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg, |
| 130 | 130 | int len, int flags); |
| 131 | +bool sk_msg_is_readable(struct sock *sk); | |
| 131 | 132 | |
| 132 | 133 | static inline void sk_msg_check_to_free(struct sk_msg *msg, u32 i, u32 bytes) |
| 133 | 134 | { |