All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] Re: [MPTCP][PATCH mptcp-next 4/5] mptcp: add the mibs for MP_PRIO
@ 2020-11-21  1:19 Mat Martineau
  0 siblings, 0 replies; only message in thread
From: Mat Martineau @ 2020-11-21  1:19 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 2403 bytes --]

On Fri, 20 Nov 2020, Geliang Tang wrote:

> This patch added the mibs for MP_PRIO, MPTCP_MIB_MPPRIOTX for transmitting
> of the MP_PRIO suboption, and MPTCP_MIB_MPPRIORX for receiving of it.
>
> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
> ---
> net/mptcp/mib.c        | 2 ++
> net/mptcp/mib.h        | 2 ++
> net/mptcp/options.c    | 1 +
> net/mptcp/pm_netlink.c | 1 +
> 4 files changed, 6 insertions(+)
>
> diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c
> index 5e8f7827cfe0..49fb978aeb7e 100644
> --- a/net/mptcp/mib.c
> +++ b/net/mptcp/mib.c
> @@ -35,6 +35,8 @@ static const struct snmp_mib mptcp_snmp_list[] = {
> 	SNMP_MIB_ITEM("PortAckRx", MPTCP_MIB_PORTACKRX),
> 	SNMP_MIB_ITEM("RmAddr", MPTCP_MIB_RMADDR),
> 	SNMP_MIB_ITEM("RmSubflow", MPTCP_MIB_RMSUBFLOW),
> +	SNMP_MIB_ITEM("MPPrioTx", MPTCP_MIB_MPPRIOTX),

Thanks for adding the Tx MIB. Patch looks good to me.

> +	SNMP_MIB_ITEM("MPPrioRx", MPTCP_MIB_MPPRIORX),
> 	SNMP_MIB_SENTINEL
> };
>
> diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h
> index b762941d492f..e023d8435d18 100644
> --- a/net/mptcp/mib.h
> +++ b/net/mptcp/mib.h
> @@ -28,6 +28,8 @@ enum linux_mptcp_mib_field {
> 	MPTCP_MIB_PORTACKRX,		/* Received an ACK + MP_JOIN with port */
> 	MPTCP_MIB_RMADDR,		/* Received RM_ADDR */
> 	MPTCP_MIB_RMSUBFLOW,		/* Remove a subflow */
> +	MPTCP_MIB_MPPRIOTX,		/* Transmit a MP_PRIO */
> +	MPTCP_MIB_MPPRIORX,		/* Received a MP_PRIO */
> 	__MPTCP_MIB_MAX
> };
>
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index b1cb43c76be8..3171b620cab1 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -1011,6 +1011,7 @@ void mptcp_incoming_options(struct sock *sk, struct sk_buff *skb)
>
> 	if (mp_opt.mp_prio) {
> 		mptcp_pm_mp_prio_received(sk, mp_opt.backup);
> +		MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPPRIORX);
> 		mp_opt.mp_prio = 0;
> 	}
>
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index 58960e1cdc32..90943138da7e 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -545,6 +545,7 @@ void mptcp_pm_nl_mp_prio_send_ack(struct mptcp_sock *msk,
>
> 		subflow->send_mp_prio = 1;
> 		subflow->request_bkup = bkup;
> +		__MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPPRIOTX);
>
> 		spin_unlock_bh(&msk->pm.lock);
> 		pr_debug("send ack for mp_prio");
> -- 
> 2.26.2

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-21  1:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21  1:19 [MPTCP] Re: [MPTCP][PATCH mptcp-next 4/5] mptcp: add the mibs for MP_PRIO Mat Martineau

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.