Skip to content

Commit

Permalink
SUNRPC add xps_nunique_destaddr_xprts to xprt_switch_info in sysfs
Browse files Browse the repository at this point in the history
In sysfs's xprt_switch_info attribute also display the value of
number of transports with unique destination addresses for this
xprt_switch.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Olga Kornievskaia authored and Anna Schumaker committed Aug 27, 2021
1 parent 3a3f976 commit df205d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/sunrpc/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,10 @@ static ssize_t rpc_sysfs_xprt_switch_info_show(struct kobject *kobj,

if (!xprt_switch)
return 0;
ret = sprintf(buf, "num_xprts=%u\nnum_active=%u\nqueue_len=%ld\n",
ret = sprintf(buf, "num_xprts=%u\nnum_active=%u\n"
"num_unique_destaddr=%u\nqueue_len=%ld\n",
xprt_switch->xps_nxprts, xprt_switch->xps_nactive,
xprt_switch->xps_nunique_destaddr_xprts,
atomic_long_read(&xprt_switch->xps_queuelen));
xprt_switch_put(xprt_switch);
return ret + 1;
Expand Down

0 comments on commit df205d0

Please sign in to comment.