All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 mptcp-next] mptcp: add MIB counter for invalid mapping
@ 2021-06-03 15:16 Paolo Abeni
  2021-06-04  0:08 ` Mat Martineau
  2021-06-07 15:16 ` Matthieu Baerts
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Abeni @ 2021-06-03 15:16 UTC (permalink / raw)
  To: mptcp; +Cc: Maxim Galaganov

Account this exceptional events for better introspection.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
v1 -> v2:
 - update mptcp_snmp_list accordingly - Max
---
 net/mptcp/mib.c     | 1 +
 net/mptcp/mib.h     | 1 +
 net/mptcp/subflow.c | 4 +++-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c
index e7e60bc1fb96..52ea2517e856 100644
--- a/net/mptcp/mib.c
+++ b/net/mptcp/mib.c
@@ -25,6 +25,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {
 	SNMP_MIB_ITEM("MPJoinAckHMacFailure", MPTCP_MIB_JOINACKMAC),
 	SNMP_MIB_ITEM("DSSNotMatching", MPTCP_MIB_DSSNOMATCH),
 	SNMP_MIB_ITEM("InfiniteMapRx", MPTCP_MIB_INFINITEMAPRX),
+	SNMP_MIB_ITEM("DSSNoMatchTCP", MPTCP_MIB_DSSTCPMISMATCH),
 	SNMP_MIB_ITEM("DataCsumErr", MPTCP_MIB_DATACSUMERR),
 	SNMP_MIB_ITEM("OFOQueueTail", MPTCP_MIB_OFOQUEUETAIL),
 	SNMP_MIB_ITEM("OFOQueue", MPTCP_MIB_OFOQUEUE),
diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h
index 92e56c0cfbdd..193466c9b549 100644
--- a/net/mptcp/mib.h
+++ b/net/mptcp/mib.h
@@ -18,6 +18,7 @@ enum linux_mptcp_mib_field {
 	MPTCP_MIB_JOINACKMAC,		/* HMAC was wrong on ACK + MP_JOIN */
 	MPTCP_MIB_DSSNOMATCH,		/* Received a new mapping that did not match the previous one */
 	MPTCP_MIB_INFINITEMAPRX,	/* Received an infinite mapping */
+	MPTCP_MIB_DSSTCPMISMATCH,	/* DSS-mapping did not map with TCP's sequence numbers */
 	MPTCP_MIB_DATACSUMERR,		/* The data checksum fail */
 	MPTCP_MIB_OFOQUEUETAIL,	/* Segments inserted into OoO queue tail */
 	MPTCP_MIB_OFOQUEUE,		/* Segments inserted into OoO queue */
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
index 259f99b61c35..ccc07cbab867 100644
--- a/net/mptcp/subflow.c
+++ b/net/mptcp/subflow.c
@@ -1046,8 +1046,10 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
 	/* we revalidate valid mapping on new skb, because we must ensure
 	 * the current skb is completely covered by the available mapping
 	 */
-	if (!validate_mapping(ssk, skb))
+	if (!validate_mapping(ssk, skb)) {
+		MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_DSSTCPMISMATCH);
 		return MAPPING_INVALID;
+	}
 
 	skb_ext_del(skb, SKB_EXT_MPTCP);
 
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 mptcp-next] mptcp: add MIB counter for invalid mapping
  2021-06-03 15:16 [PATCH v2 mptcp-next] mptcp: add MIB counter for invalid mapping Paolo Abeni
@ 2021-06-04  0:08 ` Mat Martineau
  2021-06-07 15:16 ` Matthieu Baerts
  1 sibling, 0 replies; 3+ messages in thread
From: Mat Martineau @ 2021-06-04  0:08 UTC (permalink / raw)
  To: Paolo Abeni; +Cc: mptcp, Maxim Galaganov

On Thu, 3 Jun 2021, Paolo Abeni wrote:

> Account this exceptional events for better introspection.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> v1 -> v2:
> - update mptcp_snmp_list accordingly - Max
> ---
> net/mptcp/mib.c     | 1 +
> net/mptcp/mib.h     | 1 +
> net/mptcp/subflow.c | 4 +++-
> 3 files changed, 5 insertions(+), 1 deletion(-)
>

Useful counter, thanks for adding.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>


> diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c
> index e7e60bc1fb96..52ea2517e856 100644
> --- a/net/mptcp/mib.c
> +++ b/net/mptcp/mib.c
> @@ -25,6 +25,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {
> 	SNMP_MIB_ITEM("MPJoinAckHMacFailure", MPTCP_MIB_JOINACKMAC),
> 	SNMP_MIB_ITEM("DSSNotMatching", MPTCP_MIB_DSSNOMATCH),
> 	SNMP_MIB_ITEM("InfiniteMapRx", MPTCP_MIB_INFINITEMAPRX),
> +	SNMP_MIB_ITEM("DSSNoMatchTCP", MPTCP_MIB_DSSTCPMISMATCH),
> 	SNMP_MIB_ITEM("DataCsumErr", MPTCP_MIB_DATACSUMERR),
> 	SNMP_MIB_ITEM("OFOQueueTail", MPTCP_MIB_OFOQUEUETAIL),
> 	SNMP_MIB_ITEM("OFOQueue", MPTCP_MIB_OFOQUEUE),
> diff --git a/net/mptcp/mib.h b/net/mptcp/mib.h
> index 92e56c0cfbdd..193466c9b549 100644
> --- a/net/mptcp/mib.h
> +++ b/net/mptcp/mib.h
> @@ -18,6 +18,7 @@ enum linux_mptcp_mib_field {
> 	MPTCP_MIB_JOINACKMAC,		/* HMAC was wrong on ACK + MP_JOIN */
> 	MPTCP_MIB_DSSNOMATCH,		/* Received a new mapping that did not match the previous one */
> 	MPTCP_MIB_INFINITEMAPRX,	/* Received an infinite mapping */
> +	MPTCP_MIB_DSSTCPMISMATCH,	/* DSS-mapping did not map with TCP's sequence numbers */
> 	MPTCP_MIB_DATACSUMERR,		/* The data checksum fail */
> 	MPTCP_MIB_OFOQUEUETAIL,	/* Segments inserted into OoO queue tail */
> 	MPTCP_MIB_OFOQUEUE,		/* Segments inserted into OoO queue */
> diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
> index 259f99b61c35..ccc07cbab867 100644
> --- a/net/mptcp/subflow.c
> +++ b/net/mptcp/subflow.c
> @@ -1046,8 +1046,10 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
> 	/* we revalidate valid mapping on new skb, because we must ensure
> 	 * the current skb is completely covered by the available mapping
> 	 */
> -	if (!validate_mapping(ssk, skb))
> +	if (!validate_mapping(ssk, skb)) {
> +		MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_DSSTCPMISMATCH);
> 		return MAPPING_INVALID;
> +	}
>
> 	skb_ext_del(skb, SKB_EXT_MPTCP);
>
> -- 
> 2.26.3
>
>
>

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 mptcp-next] mptcp: add MIB counter for invalid mapping
  2021-06-03 15:16 [PATCH v2 mptcp-next] mptcp: add MIB counter for invalid mapping Paolo Abeni
  2021-06-04  0:08 ` Mat Martineau
@ 2021-06-07 15:16 ` Matthieu Baerts
  1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2021-06-07 15:16 UTC (permalink / raw)
  To: Paolo Abeni, Mat Martineau; +Cc: Maxim Galaganov, mptcp

Hi Paolo, Mat,

On 03/06/2021 17:16, Paolo Abeni wrote:
> Account this exceptional events for better introspection.
> 
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Thank you for the patch and the review!

Now in our tree:

- 57a908ed79be: mptcp: add MIB counter for invalid mapping
- Results: a4f45379c78f..605dd61e1d4e

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20210607T151624
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export/20210607T151624

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-07 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 15:16 [PATCH v2 mptcp-next] mptcp: add MIB counter for invalid mapping Paolo Abeni
2021-06-04  0:08 ` Mat Martineau
2021-06-07 15:16 ` 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.