Message ID | fd9e850f1e00691204f1dfebc63c01c6a4318c10.1711705327.git.geliang@kernel.org (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | [iproute2-next] ss: mptcp: print out last time counters | expand |
Hi Geliang, On 29/03/2024 10:42, Geliang Tang wrote: > There new last time counters have been added in struct mptcp_info named (I guess we can remove the "There" here above) > last_data_sent, last_data_recv and last_ack_recv into kernel in the commit > "mptcp: add last time fields in mptcp_info". > > This patch prints out these counters into mptcp_stats output. Thank you for this patch! It looks good to me. Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Of course, we will need to wait for the kernel patch to be in our tree, then in net-next, before sending this one to IPRoute2 maintainers. (if the kernel structure doesn't change in between) Cheers, Matt
Hi Geliang, On 29/03/2024 16:01, Matthieu Baerts wrote: > Hi Geliang, > > On 29/03/2024 10:42, Geliang Tang wrote: >> There new last time counters have been added in struct mptcp_info named > > (I guess we can remove the "There" here above) > >> last_data_sent, last_data_recv and last_ack_recv into kernel in the commit >> "mptcp: add last time fields in mptcp_info". >> >> This patch prints out these counters into mptcp_stats output. > > Thank you for this patch! > > It looks good to me. > > Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> > > Of course, we will need to wait for the kernel patch to be in our tree, > then in net-next, before sending this one to IPRoute2 maintainers. The kernel patch has been applied in net-next. Do you want to send this patch to IPRoute2 maintainers, or do you prefer if I do that? Cheers, Matt
Hi Matt, On Thu, 2024-04-11 at 19:33 +0200, Matthieu Baerts wrote: > Hi Geliang, > > On 29/03/2024 16:01, Matthieu Baerts wrote: > > Hi Geliang, > > > > On 29/03/2024 10:42, Geliang Tang wrote: > > > There new last time counters have been added in struct mptcp_info > > > named > > > > (I guess we can remove the "There" here above) It should be "Three". > > > > > last_data_sent, last_data_recv and last_ack_recv into kernel in > > > the commit > > > "mptcp: add last time fields in mptcp_info". > > > > > > This patch prints out these counters into mptcp_stats output. > > > > Thank you for this patch! > > > > It looks good to me. > > > > Acked-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> > > > > Of course, we will need to wait for the kernel patch to be in our > > tree, > > then in net-next, before sending this one to IPRoute2 maintainers. > > The kernel patch has been applied in net-next. Do you want to send > this > patch to IPRoute2 maintainers, or do you prefer if I do that? Please send it for me, thanks. -Geliang > > Cheers, > Matt
diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h index c2e6f3be..a0da2632 100644 --- a/include/uapi/linux/mptcp.h +++ b/include/uapi/linux/mptcp.h @@ -56,6 +56,10 @@ struct mptcp_info { __u64 mptcpi_bytes_received; __u64 mptcpi_bytes_acked; __u8 mptcpi_subflows_total; + __u8 reserved[3]; + __u32 mptcpi_last_data_sent; + __u32 mptcpi_last_data_recv; + __u32 mptcpi_last_ack_recv; }; /* MPTCP Reset reason codes, rfc8684 */ diff --git a/misc/ss.c b/misc/ss.c index 87008d7c..81b813c1 100644 --- a/misc/ss.c +++ b/misc/ss.c @@ -3279,6 +3279,12 @@ static void mptcp_stats_print(struct mptcp_info *s) out(" bytes_acked:%llu", s->mptcpi_bytes_acked); if (s->mptcpi_subflows_total) out(" subflows_total:%u", s->mptcpi_subflows_total); + if (s->mptcpi_last_data_sent) + out(" last_data_sent:%u", s->mptcpi_last_data_sent); + if (s->mptcpi_last_data_recv) + out(" last_data_recv:%u", s->mptcpi_last_data_recv); + if (s->mptcpi_last_ack_recv) + out(" last_ack_recv:%u", s->mptcpi_last_ack_recv); } static void mptcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
There new last time counters have been added in struct mptcp_info named last_data_sent, last_data_recv and last_ack_recv into kernel in the commit "mptcp: add last time fields in mptcp_info". This patch prints out these counters into mptcp_stats output. Signed-off-by: Geliang Tang <geliang@kernel.org> --- include/uapi/linux/mptcp.h | 4 ++++ misc/ss.c | 6 ++++++ 2 files changed, 10 insertions(+)