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>
This commit is contained in:
GhantaKrishnamurthy MohanKrishna 2018-03-21 14:37:45 +01:00 committed by David S. Miller
parent c30b70deb5
commit 872619d8cf
2 changed files with 8 additions and 2 deletions

View file

@ -251,6 +251,7 @@ enum {
TIPC_NLA_SOCK_STAT_SENDQ, /* u32 */
TIPC_NLA_SOCK_STAT_LINK_CONG, /* flag */
TIPC_NLA_SOCK_STAT_CONN_CONG, /* flag */
TIPC_NLA_SOCK_STAT_DROP, /* u32 */
__TIPC_NLA_SOCK_STAT_MAX,
TIPC_NLA_SOCK_STAT_MAX = __TIPC_NLA_SOCK_STAT_MAX - 1