summaryrefslogtreecommitdiff
path: root/net/smc/smc_rx.c
diff options
context:
space:
mode:
authorGuvenc Gulce <guvenc@linux.ibm.com>2021-06-16 17:52:58 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-16 22:54:02 +0300
commit194730a9beb52d2b030ea45e12d94868d4a0e6fd (patch)
treee1cb5ba24809456bb50c4134dcfa9d826ca458aa /net/smc/smc_rx.c
parentf0dd7bf5e33066e554442c509ef6351728b95b51 (diff)
downloadlinux-194730a9beb52d2b030ea45e12d94868d4a0e6fd.tar.xz
net/smc: Make SMC statistics network namespace aware
Make the gathered SMC statistics network namespace aware, for each namespace collect an own set of statistic information. Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_rx.c')
-rw-r--r--net/smc/smc_rx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c
index ce1ae39923b1..170b733bc736 100644
--- a/net/smc/smc_rx.c
+++ b/net/smc/smc_rx.c
@@ -228,7 +228,7 @@ static int smc_rx_recv_urg(struct smc_sock *smc, struct msghdr *msg, int len,
conn->urg_state == SMC_URG_READ)
return -EINVAL;
- SMC_STAT_INC(!conn->lnk, urg_data_cnt);
+ SMC_STAT_INC(smc, urg_data_cnt);
if (conn->urg_state == SMC_URG_VALID) {
if (!(flags & MSG_PEEK))
smc->conn.urg_state = SMC_URG_READ;
@@ -307,10 +307,10 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg,
readable = atomic_read(&conn->bytes_to_rcv);
if (readable >= conn->rmb_desc->len)
- SMC_STAT_RMB_RX_FULL(!conn->lnk);
+ SMC_STAT_RMB_RX_FULL(smc, !conn->lnk);
if (len < readable)
- SMC_STAT_RMB_RX_SIZE_SMALL(!conn->lnk);
+ SMC_STAT_RMB_RX_SIZE_SMALL(smc, !conn->lnk);
/* we currently use 1 RMBE per RMB, so RMBE == RMB base addr */
rcvbuf_base = conn->rx_off + conn->rmb_desc->cpu_addr;