tipc: step sk->sk_drops when rcv buffer is full
authorGhantaKrishnamurthy MohanKrishna <mohan.krishna.ghanta.krishnamurthy@ericsson.com>
Wed, 21 Mar 2018 13:37:45 +0000 (14:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Mar 2018 18:43:37 +0000 (14:43 -0400)
commit872619d8cf810c17279335ef531a2a34f3b4e589
tree832466ed602f57586e25a2707d201e47d7bc2a9d
parentc30b70deb5f4861f590031c33fd3ec6cc63f1df1
tipc: step sk->sk_drops when rcv buffer is full

Currently when tipc is unable to queue a received message on a
socket, the message is rejected back to the sender with error
TIPC_ERR_OVERLOAD. However, the application on this socket
has no knowledge about these discards.

In this commit, we try to step the sk_drops counter when tipc
is unable to queue a received message. Export sk_drops
using tipc socket diagnostics.

Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: GhantaKrishnamurthy MohanKrishna <mohan.krishna.ghanta.krishnamurthy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/tipc_netlink.h
net/tipc/socket.c