Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
include/net/sock.h7b50ecfcc6("net: Rename ->stream_memory_read to ->sock_is_readable")4c1e34c0db("vsock: Enable y2038 safe timeval for timeout") drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c0daa55d033("octeontx2-af: cn10k: debugfs for dumping LMTST map table")e77bcdd1f6("octeontx2-af: Display all enabled PF VF rsrc_alloc entries.") Adjacent code addition in both cases, keep both. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -1213,7 +1213,7 @@ struct proto {
|
||||
int (*forward_alloc_get)(const struct sock *sk);
|
||||
|
||||
bool (*stream_memory_free)(const struct sock *sk, int wake);
|
||||
bool (*stream_memory_read)(const struct sock *sk);
|
||||
bool (*sock_is_readable)(struct sock *sk);
|
||||
/* Memory pressure */
|
||||
void (*enter_memory_pressure)(struct sock *sk);
|
||||
void (*leave_memory_pressure)(struct sock *sk);
|
||||
@@ -2854,4 +2854,10 @@ int sock_get_timeout(long timeo, void *optval, bool old_timeval);
|
||||
int sock_copy_user_timeval(struct __kernel_sock_timeval *tv,
|
||||
sockptr_t optval, int optlen, bool old_timeval);
|
||||
|
||||
static inline bool sk_is_readable(struct sock *sk)
|
||||
{
|
||||
if (sk->sk_prot->sock_is_readable)
|
||||
return sk->sk_prot->sock_is_readable(sk);
|
||||
return false;
|
||||
}
|
||||
#endif /* _SOCK_H */
|
||||
|
||||
Reference in New Issue
Block a user