* [MPTCP] Re: [MPTCP][PATCH v3 mptcp-next] mptcp: add local addr info in mptcp_info
@ 2021-02-04 0:00 Mat Martineau
0 siblings, 0 replies; 2+ messages in thread
From: Mat Martineau @ 2021-02-04 0:00 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 3733 bytes --]
On Wed, 3 Feb 2021, Geliang Tang wrote:
> Add mptcpi_local_addr_used and mptcpi_local_addr_max in struct mptcp_info.
>
> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
> ---
> v3:
> - keep mptcpi_add_addr_signal unchanged
Looks good for the export branch, thanks!
Reviewed-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>
Mat
>
> v2:
> - append new fields in the end of struct mptcp_info.
> - This patch is split from "add trace events" patch set as a single one
> as Paolo suggested.
> - tag: export/20210131T062218
> ---
> include/uapi/linux/mptcp.h | 2 ++
> net/mptcp/mptcp_diag.c | 2 ++
> net/mptcp/pm_netlink.c | 3 ++-
> net/mptcp/protocol.h | 1 +
> 4 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h
> index c91578aaab32..e1172c1ffdfd 100644
> --- a/include/uapi/linux/mptcp.h
> +++ b/include/uapi/linux/mptcp.h
> @@ -103,6 +103,8 @@ struct mptcp_info {
> __u64 mptcpi_write_seq;
> __u64 mptcpi_snd_una;
> __u64 mptcpi_rcv_nxt;
> + __u8 mptcpi_local_addr_used;
> + __u8 mptcpi_local_addr_max;
> };
>
> /*
> diff --git a/net/mptcp/mptcp_diag.c b/net/mptcp/mptcp_diag.c
> index 00ed742f48a4..f16d9b5ee978 100644
> --- a/net/mptcp/mptcp_diag.c
> +++ b/net/mptcp/mptcp_diag.c
> @@ -128,11 +128,13 @@ static void mptcp_diag_get_info(struct sock *sk, struct inet_diag_msg *r,
> info->mptcpi_subflows = READ_ONCE(msk->pm.subflows);
> info->mptcpi_add_addr_signal = READ_ONCE(msk->pm.add_addr_signaled);
> info->mptcpi_add_addr_accepted = READ_ONCE(msk->pm.add_addr_accepted);
> + info->mptcpi_local_addr_used = READ_ONCE(msk->pm.local_addr_used);
> info->mptcpi_subflows_max = mptcp_pm_get_subflows_max(msk);
> val = mptcp_pm_get_add_addr_signal_max(msk);
> info->mptcpi_add_addr_signal_max = val;
> val = mptcp_pm_get_add_addr_accept_max(msk);
> info->mptcpi_add_addr_accepted_max = val;
> + info->mptcpi_local_addr_max = mptcp_pm_get_local_addr_max(msk);
> if (test_bit(MPTCP_FALLBACK_DONE, &msk->flags))
> flags |= MPTCP_INFO_FLAG_FALLBACK;
> if (READ_ONCE(msk->can_ack))
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index 6b6dacd0e03a..75ab3d308ab5 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -228,13 +228,14 @@ unsigned int mptcp_pm_get_subflows_max(struct mptcp_sock *msk)
> }
> EXPORT_SYMBOL_GPL(mptcp_pm_get_subflows_max);
>
> -static unsigned int mptcp_pm_get_local_addr_max(struct mptcp_sock *msk)
> +unsigned int mptcp_pm_get_local_addr_max(struct mptcp_sock *msk)
> {
> struct pm_nl_pernet *pernet;
>
> pernet = net_generic(sock_net((struct sock *)msk), pm_nl_pernet_id);
> return READ_ONCE(pernet->local_addr_max);
> }
> +EXPORT_SYMBOL_GPL(mptcp_pm_get_local_addr_max);
>
> static void check_work_pending(struct mptcp_sock *msk)
> {
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index 92658c34f091..d385651ff6a9 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -736,6 +736,7 @@ int mptcp_pm_nl_get_local_id(struct mptcp_sock *msk, struct sock_common *skc);
> unsigned int mptcp_pm_get_add_addr_signal_max(struct mptcp_sock *msk);
> unsigned int mptcp_pm_get_add_addr_accept_max(struct mptcp_sock *msk);
> unsigned int mptcp_pm_get_subflows_max(struct mptcp_sock *msk);
> +unsigned int mptcp_pm_get_local_addr_max(struct mptcp_sock *msk);
>
> static inline struct mptcp_ext *mptcp_get_ext(struct sk_buff *skb)
> {
> --
> 2.29.2
> _______________________________________________
> mptcp mailing list -- mptcp(a)lists.01.org
> To unsubscribe send an email to mptcp-leave(a)lists.01.org
>
--
Mat Martineau
Intel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [MPTCP] Re: [MPTCP][PATCH v3 mptcp-next] mptcp: add local addr info in mptcp_info
@ 2021-02-06 10:49 Matthieu Baerts
0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Baerts @ 2021-02-06 10:49 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 471 bytes --]
Hi Geliang, Mat, Paolo,
On 03/02/2021 03:30, Geliang Tang wrote:
> Add mptcpi_local_addr_used and mptcpi_local_addr_max in struct mptcp_info.
>
> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
Thank you for this patch and the reviews!
- e883b6ef770e: mptcp: add local addr info in mptcp_info
- Results: 5b0efe263fdc..d74233042997
Tests + export are in progress!
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-06 10:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 0:00 [MPTCP] Re: [MPTCP][PATCH v3 mptcp-next] mptcp: add local addr info in mptcp_info Mat Martineau
2021-02-06 10:49 Matthieu Baerts
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.