Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Geywn
Copy link

@Geywn Geywn commented Aug 17, 2024

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 and smc{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.

@Geywn
Copy link
Author

Geywn commented Aug 23, 2024

Hi, any comments on this PR ? Thanks! :)

@Geywn Geywn changed the title add statistics on sndbufs/RMBs usage smcr/smcd: add statistics on sndbufs/RMBs usage Aug 27, 2024
@JanKarcher
Copy link

Hi @Geywn I'm looking into it and review it.

Copy link

@JanKarcher JanKarcher left a 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.

Comment on lines 143 to 145
SMC_NLA_LGR_R_NET_COOKIE, /* u64 */
SMC_NLA_LGR_R_PAD, /* flag */
SMC_NLA_LGR_R_BUF_TYPE, /* u8 */

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will improve this.

Comment on lines 181 to 184
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 */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, tabs.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

Wen Gu added 4 commits September 4, 2024 10:07
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]>
@Geywn
Copy link
Author

Geywn commented Sep 4, 2024

Hi, Jan. I have fixed the tab things. Thanks!

@JanKarcher
Copy link

JanKarcher commented Sep 4, 2024

@Geywn looks good to me now. We'll include the changes in the next release of smc-tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants