From f3746d47758367a881073279f18b135f4c283e5e Mon Sep 17 00:00:00 2001 From: "oscar.medina@motorola.com" Date: Tue, 30 Jun 2009 03:25:39 +0000 Subject: [PATCH] --- yaml --- r: 158740 b: refs/heads/master c: 6650613d3387dcc30685e2781818ea7d0f840027 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/tipc.h | 2 ++ trunk/net/tipc/socket.c | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 7a297c3307ef..63b48713b506 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: af794c74240d8d788058bdfee339512e7ac029b2 +refs/heads/master: 6650613d3387dcc30685e2781818ea7d0f840027 diff --git a/trunk/include/linux/tipc.h b/trunk/include/linux/tipc.h index bea469455a0c..3d92396639de 100644 --- a/trunk/include/linux/tipc.h +++ b/trunk/include/linux/tipc.h @@ -209,5 +209,7 @@ struct sockaddr_tipc { #define TIPC_SRC_DROPPABLE 128 /* Default: 0 (resend congested msg) */ #define TIPC_DEST_DROPPABLE 129 /* Default: based on socket type */ #define TIPC_CONN_TIMEOUT 130 /* Default: 8000 (ms) */ +#define TIPC_NODE_RECVQ_DEPTH 131 /* Default: none (read only) */ +#define TIPC_SOCK_RECVQ_DEPTH 132 /* Default: none (read only) */ #endif diff --git a/trunk/net/tipc/socket.c b/trunk/net/tipc/socket.c index 1848693ebb82..e8254e809b79 100644 --- a/trunk/net/tipc/socket.c +++ b/trunk/net/tipc/socket.c @@ -1748,6 +1748,12 @@ static int getsockopt(struct socket *sock, value = jiffies_to_msecs(sk->sk_rcvtimeo); /* no need to set "res", since already 0 at this point */ break; + case TIPC_NODE_RECVQ_DEPTH: + value = (u32)atomic_read(&tipc_queue_size); + break; + case TIPC_SOCK_RECVQ_DEPTH: + value = skb_queue_len(&sk->sk_receive_queue); + break; default: res = -EINVAL; }