]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/net/udp.h
netfilter: uapi: Avoid undefined left-shift in xt_sctp.h
[mirror_ubuntu-bionic-kernel.git] / include / net / udp.h
index 6c759c8594e25c7f9f79dc6bf76325c39e705f94..18391015233ef26daf3651b11f112ec1a63bf790 100644 (file)
@@ -244,6 +244,11 @@ static inline __be16 udp_flow_src_port(struct net *net, struct sk_buff *skb,
        return htons((((u64) hash * (max - min)) >> 32) + min);
 }
 
+static inline int udp_rqueue_get(struct sock *sk)
+{
+       return sk_rmem_alloc_get(sk) - READ_ONCE(udp_sk(sk)->forward_deficit);
+}
+
 /* net/ipv4/udp.c */
 void udp_destruct_sock(struct sock *sk);
 void skb_consume_udp(struct sock *sk, struct sk_buff *skb, int len);