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

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

On Thu, 5 Nov 2020, Geliang Tang wrote:

> This patch added the mib for MP_PRIO, named MPTCP_MIB_MPPRIO, for
> receiving of the MP_PRIO suboption.
>
> Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>

Hi Geliang & Matt -

Do you think it makes sense to also have a MIB for number of MP_PRIOs 
sent?


Mat


> ---
> net/mptcp/mib.c     | 1 +
> net/mptcp/mib.h     | 1 +
> net/mptcp/options.c | 1 +
> 3 files changed, 3 insertions(+)
>
> diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c
> index a8744ad62087..3812c6417c00 100644
> --- a/net/mptcp/mib.c
> +++ b/net/mptcp/mib.c
> @@ -32,6 +32,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {
> 	SNMP_MIB_ITEM("PortAdd", MPTCP_MIB_PORTADD),
> 	SNMP_MIB_ITEM("RmAddr", MPTCP_MIB_RMADDR),
> 	SNMP_MIB_ITEM("RmSubflow", MPTCP_MIB_RMSUBFLOW),
> +	SNMP_MIB_ITEM("MPPrio", MPTCP_MIB_MPPRIO),
> 	SNMP_MIB_SENTINEL
> };
>
> diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h
> index 1b07fc1ad1a0..522b3b191654 100644
> --- a/net/mptcp/mib.h
> +++ b/net/mptcp/mib.h
> @@ -25,6 +25,7 @@ enum linux_mptcp_mib_field {
> 	MPTCP_MIB_PORTADD,		/* Received ADD_ADDR with port */
> 	MPTCP_MIB_RMADDR,		/* Received RM_ADDR */
> 	MPTCP_MIB_RMSUBFLOW,		/* Remove a subflow */
> +	MPTCP_MIB_MPPRIO,		/* Received MP_PRIO */
> 	__MPTCP_MIB_MAX
> };
>
> diff --git a/net/mptcp/options.c b/net/mptcp/options.c
> index affbadb77faf..c09695dba1e1 100644
> --- a/net/mptcp/options.c
> +++ b/net/mptcp/options.c
> @@ -1010,6 +1010,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.prio_bkup);
> +		MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPPRIO);
> 		mp_opt.mp_prio = 0;
> 	}
>
> -- 
> 2.26.2

--
Mat Martineau
Intel

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

only message in thread, other threads:[~2020-11-10  2:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10  2:09 [MPTCP] Re: [MPTCP][RFC PATCH mptcp-next 5/6] mptcp: add the mib 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.