diff options
author | Hans Wippel <hwippel@linux.ibm.com> | 2018-05-18 10:34:10 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-18 20:15:01 +0300 |
commit | 69cb7dc0218b2c54416722eddf181e720f24c305 (patch) | |
tree | 521471fca3a62bfcd69228b4ea9224a86bf133f5 /net/smc/smc_diag.c | |
parent | d6830519a9de10621651433459d2c72a7145dd25 (diff) | |
download | linux-69cb7dc0218b2c54416722eddf181e720f24c305.tar.xz |
net/smc: add common buffer size in send and receive buffer descriptors
In addition to the buffer references, SMC currently stores the sizes of
the receive and send buffers in each connection as separate variables.
This patch introduces a buffer length variable in the common buffer
descriptor and uses this length instead.
Signed-off-by: Hans Wippel <hwippel@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_diag.c')
-rw-r--r-- | net/smc/smc_diag.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/smc/smc_diag.c b/net/smc/smc_diag.c index 05dd7e6d314d..839354402215 100644 --- a/net/smc/smc_diag.c +++ b/net/smc/smc_diag.c @@ -101,8 +101,9 @@ static int __smc_diag_dump(struct sock *sk, struct sk_buff *skb, struct smc_connection *conn = &smc->conn; struct smc_diag_conninfo cinfo = { .token = conn->alert_token_local, - .sndbuf_size = conn->sndbuf_size, - .rmbe_size = conn->rmbe_size, + .sndbuf_size = conn->sndbuf_desc ? + conn->sndbuf_desc->len : 0, + .rmbe_size = conn->rmb_desc ? conn->rmb_desc->len : 0, .peer_rmbe_size = conn->peer_rmbe_size, .rx_prod.wrap = conn->local_rx_ctrl.prod.wrap, |