-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
smcr/smcd: add statistics on sndbufs/RMBs usage #11
base: main
Are you sure you want to change the base?
Conversation
Hi, any comments on this PR ? Thanks! :) |
Hi @Geywn I'm looking into it and review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the spaces. Otherwise this looks good to me.
smctools_common.h
Outdated
SMC_NLA_LGR_R_NET_COOKIE, /* u64 */ | ||
SMC_NLA_LGR_R_PAD, /* flag */ | ||
SMC_NLA_LGR_R_BUF_TYPE, /* u8 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are not used, yet. I'm fine with them being added in order to be complete.
Please use tabs infront of the comments instead of spaces for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will improve this.
smctools_common.h
Outdated
SMC_NLA_LGR_D_EXT_GID, /* u64 */ | ||
SMC_NLA_LGR_D_PEER_EXT_GID, /* u64 */ | ||
SMC_NLA_LGR_D_SNDBUF_ALLOC, /* uint */ | ||
SMC_NLA_LGR_D_DMB_ALLOC, /* uint */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, tabs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
The kernel introduced some new smc netlink enum values, so add them to smctool_common.h as well. Signed-off-by: Wen Gu <[email protected]>
The NLA_UINT attribute type is introduced for variable-length integers, whose length are 32bits or 64bits. So add appropriate functions to get NLA_UINT attributes. Signed-off-by: Wen Gu <[email protected]>
The kernel introduced statistics on the amount of sndbufs/RMBs maintained by the smcr/smcd linkgroup. So show the information in smcr/smcd linkgroup detailed output. Signed-off-by: Wen Gu <[email protected]>
The kernel introduced statistics on the amount of sndbuf/RMBs in use by smcr/smcd connections. So show the information in smcr/smcd stats. Signed-off-by: Wen Gu <[email protected]>
995baf0
to
845ab35
Compare
Hi, Jan. I have fixed the tab things. Thanks! |
@Geywn looks good to me now. We'll include the changes in the next release of smc-tools. |
The kernel introduced statistics on the amount of sndbufs/RMBs maintained
by the linkgroups and being used by connections. So show the information in
smc{r|d} -d l
andsmc{r|d} -d s
.And before that, synchronize the latest smc netlink attribute enum values and
introduce a helper to get new-added netlink attribute type
NLA_UINT
.