Commit 3e215c8d authored by James M Leddy's avatar James M Leddy Committed by David S. Miller

udp: Add MIB counters for rcvbuferrors

Add MIB counters for rcvbuferrors in UDP to help diagnose problems.
Signed-off-by: default avatarJames M Leddy <james.leddy@redhat.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 73413ffa
...@@ -1588,8 +1588,11 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) ...@@ -1588,8 +1588,11 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
goto csum_error; goto csum_error;
if (sk_rcvqueues_full(sk, skb, sk->sk_rcvbuf)) if (sk_rcvqueues_full(sk, skb, sk->sk_rcvbuf)) {
UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS,
is_udplite);
goto drop; goto drop;
}
rc = 0; rc = 0;
......
...@@ -674,8 +674,11 @@ int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) ...@@ -674,8 +674,11 @@ int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
goto csum_error; goto csum_error;
} }
if (sk_rcvqueues_full(sk, skb, sk->sk_rcvbuf)) if (sk_rcvqueues_full(sk, skb, sk->sk_rcvbuf)) {
UDP6_INC_STATS_BH(sock_net(sk),
UDP_MIB_RCVBUFERRORS, is_udplite);
goto drop; goto drop;
}
skb_dst_drop(skb); skb_dst_drop(skb);
...@@ -690,6 +693,7 @@ int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) ...@@ -690,6 +693,7 @@ int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
bh_unlock_sock(sk); bh_unlock_sock(sk);
return rc; return rc;
csum_error: csum_error:
UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite); UDP6_INC_STATS_BH(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite);
drop: drop:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment