History

skmsg: Extract and reuse sk_msg_is_readable()

tcp_bpf_sock_is_readable() is pretty much generic, we can extract it and reuse it for non-TCP sockets.

Cong Wang committed 5 years ago

Commit fb4e0a51 parent 7b50ecf3 files · +16 −14Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/skmsg.h+1−0
@@ -128,6 +128,7 @@ int sk_msg_memcopy_from_iter(struct sock *sk, struct iov_iter *from, · 127 unmodified lines
128 struct sk_msg *msg, u32 bytes);128 struct sk_msg *msg, u32 bytes);
129int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg,129int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg,
130 int len, int flags);130 int len, int flags);
131bool sk_msg_is_readable(struct sock *sk);
131 132
132static inline void sk_msg_check_to_free(struct sk_msg *msg, u32 i, u32 bytes)133static inline void sk_msg_check_to_free(struct sk_msg *msg, u32 i, u32 bytes)
133{134{