* [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check
@ 2019-12-25 8:27 Kevin Kou
2019-12-25 13:07 ` Marcelo Ricardo Leitner
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Kevin Kou @ 2019-12-25 8:27 UTC (permalink / raw)
To: linux-sctp, netdev
Cc: vyasevich, nhorman, marcelo.leitner, davem, qdkevin.kou
The function sctp_sf_eat_sack_6_2 now performs the Verification
Tag validation, Chunk length validation, Bogu check, and also
the detection of out-of-order SACK based on the RFC2960
Section 6.2 at the beginning, and finally performs the further
processing of SACK. The trace_sctp_probe now triggered before
the above necessary validation and check.
this patch is to do the trace_sctp_probe after the chunk sanity
tests, but keep doing trace if the SACK received is out of order,
for the out-of-order SACK is valuable to congestion control
debugging.
v1->v2:
- keep doing SCTP trace if the SACK is out of order as Marcelo's
suggestion.
v2->v3:
- regenerate the patch as v2 generated on top of v1, and add
'net-next' tag to the new one as Marcelo's comments.
Signed-off-by: Kevin Kou <qdkevin.kou@gmail.com>
---
net/sctp/sm_statefuns.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 42558fa..748e3b1 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -3281,8 +3281,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
struct sctp_sackhdr *sackh;
__u32 ctsn;
- trace_sctp_probe(ep, asoc, chunk);
-
if (!sctp_vtag_verify(chunk, asoc))
return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
@@ -3299,6 +3297,15 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
chunk->subh.sack_hdr = sackh;
ctsn = ntohl(sackh->cum_tsn_ack);
+ /* If Cumulative TSN Ack beyond the max tsn currently
+ * send, terminating the association and respond to the
+ * sender with an ABORT.
+ */
+ if (TSN_lte(asoc->next_tsn, ctsn))
+ return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands);
+
+ trace_sctp_probe(ep, asoc, chunk);
+
/* i) If Cumulative TSN Ack is less than the Cumulative TSN
* Ack Point, then drop the SACK. Since Cumulative TSN
* Ack is monotonically increasing, a SACK whose
@@ -3312,13 +3319,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
return SCTP_DISPOSITION_DISCARD;
}
- /* If Cumulative TSN Ack beyond the max tsn currently
- * send, terminating the association and respond to the
- * sender with an ABORT.
- */
- if (!TSN_lt(ctsn, asoc->next_tsn))
- return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands);
-
/* Return this SACK for further processing. */
sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, SCTP_CHUNK(chunk));
--
1.8.3.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check
2019-12-25 8:27 [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check Kevin Kou
@ 2019-12-25 13:07 ` Marcelo Ricardo Leitner
2019-12-26 21:09 ` Neil Horman
2019-12-28 0:36 ` David Miller
2 siblings, 0 replies; 7+ messages in thread
From: Marcelo Ricardo Leitner @ 2019-12-25 13:07 UTC (permalink / raw)
To: Kevin Kou; +Cc: linux-sctp, netdev, vyasevich, nhorman, davem
On Wed, Dec 25, 2019 at 08:27:25AM +0000, Kevin Kou wrote:
> The function sctp_sf_eat_sack_6_2 now performs the Verification
> Tag validation, Chunk length validation, Bogu check, and also
> the detection of out-of-order SACK based on the RFC2960
> Section 6.2 at the beginning, and finally performs the further
> processing of SACK. The trace_sctp_probe now triggered before
> the above necessary validation and check.
>
> this patch is to do the trace_sctp_probe after the chunk sanity
> tests, but keep doing trace if the SACK received is out of order,
> for the out-of-order SACK is valuable to congestion control
> debugging.
>
> v1->v2:
> - keep doing SCTP trace if the SACK is out of order as Marcelo's
> suggestion.
> v2->v3:
> - regenerate the patch as v2 generated on top of v1, and add
> 'net-next' tag to the new one as Marcelo's comments.
>
> Signed-off-by: Kevin Kou <qdkevin.kou@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Thanks Kevin.
> ---
> net/sctp/sm_statefuns.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
> index 42558fa..748e3b1 100644
> --- a/net/sctp/sm_statefuns.c
> +++ b/net/sctp/sm_statefuns.c
> @@ -3281,8 +3281,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> struct sctp_sackhdr *sackh;
> __u32 ctsn;
>
> - trace_sctp_probe(ep, asoc, chunk);
> -
> if (!sctp_vtag_verify(chunk, asoc))
> return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
>
> @@ -3299,6 +3297,15 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> chunk->subh.sack_hdr = sackh;
> ctsn = ntohl(sackh->cum_tsn_ack);
>
> + /* If Cumulative TSN Ack beyond the max tsn currently
> + * send, terminating the association and respond to the
> + * sender with an ABORT.
> + */
> + if (TSN_lte(asoc->next_tsn, ctsn))
> + return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands);
> +
> + trace_sctp_probe(ep, asoc, chunk);
> +
> /* i) If Cumulative TSN Ack is less than the Cumulative TSN
> * Ack Point, then drop the SACK. Since Cumulative TSN
> * Ack is monotonically increasing, a SACK whose
> @@ -3312,13 +3319,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> return SCTP_DISPOSITION_DISCARD;
> }
>
> - /* If Cumulative TSN Ack beyond the max tsn currently
> - * send, terminating the association and respond to the
> - * sender with an ABORT.
> - */
> - if (!TSN_lt(ctsn, asoc->next_tsn))
> - return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands);
> -
> /* Return this SACK for further processing. */
> sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, SCTP_CHUNK(chunk));
>
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check
@ 2019-12-25 13:07 ` Marcelo Ricardo Leitner
0 siblings, 0 replies; 7+ messages in thread
From: Marcelo Ricardo Leitner @ 2019-12-25 13:07 UTC (permalink / raw)
To: Kevin Kou; +Cc: linux-sctp, netdev, vyasevich, nhorman, davem
On Wed, Dec 25, 2019 at 08:27:25AM +0000, Kevin Kou wrote:
> The function sctp_sf_eat_sack_6_2 now performs the Verification
> Tag validation, Chunk length validation, Bogu check, and also
> the detection of out-of-order SACK based on the RFC2960
> Section 6.2 at the beginning, and finally performs the further
> processing of SACK. The trace_sctp_probe now triggered before
> the above necessary validation and check.
>
> this patch is to do the trace_sctp_probe after the chunk sanity
> tests, but keep doing trace if the SACK received is out of order,
> for the out-of-order SACK is valuable to congestion control
> debugging.
>
> v1->v2:
> - keep doing SCTP trace if the SACK is out of order as Marcelo's
> suggestion.
> v2->v3:
> - regenerate the patch as v2 generated on top of v1, and add
> 'net-next' tag to the new one as Marcelo's comments.
>
> Signed-off-by: Kevin Kou <qdkevin.kou@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Thanks Kevin.
> ---
> net/sctp/sm_statefuns.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
> index 42558fa..748e3b1 100644
> --- a/net/sctp/sm_statefuns.c
> +++ b/net/sctp/sm_statefuns.c
> @@ -3281,8 +3281,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> struct sctp_sackhdr *sackh;
> __u32 ctsn;
>
> - trace_sctp_probe(ep, asoc, chunk);
> -
> if (!sctp_vtag_verify(chunk, asoc))
> return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
>
> @@ -3299,6 +3297,15 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> chunk->subh.sack_hdr = sackh;
> ctsn = ntohl(sackh->cum_tsn_ack);
>
> + /* If Cumulative TSN Ack beyond the max tsn currently
> + * send, terminating the association and respond to the
> + * sender with an ABORT.
> + */
> + if (TSN_lte(asoc->next_tsn, ctsn))
> + return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands);
> +
> + trace_sctp_probe(ep, asoc, chunk);
> +
> /* i) If Cumulative TSN Ack is less than the Cumulative TSN
> * Ack Point, then drop the SACK. Since Cumulative TSN
> * Ack is monotonically increasing, a SACK whose
> @@ -3312,13 +3319,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> return SCTP_DISPOSITION_DISCARD;
> }
>
> - /* If Cumulative TSN Ack beyond the max tsn currently
> - * send, terminating the association and respond to the
> - * sender with an ABORT.
> - */
> - if (!TSN_lt(ctsn, asoc->next_tsn))
> - return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands);
> -
> /* Return this SACK for further processing. */
> sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, SCTP_CHUNK(chunk));
>
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check
2019-12-25 8:27 [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check Kevin Kou
@ 2019-12-26 21:09 ` Neil Horman
2019-12-26 21:09 ` Neil Horman
2019-12-28 0:36 ` David Miller
2 siblings, 0 replies; 7+ messages in thread
From: Neil Horman @ 2019-12-26 21:09 UTC (permalink / raw)
To: Kevin Kou; +Cc: linux-sctp, netdev, vyasevich, marcelo.leitner, davem
On Wed, Dec 25, 2019 at 08:27:25AM +0000, Kevin Kou wrote:
> The function sctp_sf_eat_sack_6_2 now performs the Verification
> Tag validation, Chunk length validation, Bogu check, and also
> the detection of out-of-order SACK based on the RFC2960
> Section 6.2 at the beginning, and finally performs the further
> processing of SACK. The trace_sctp_probe now triggered before
> the above necessary validation and check.
>
> this patch is to do the trace_sctp_probe after the chunk sanity
> tests, but keep doing trace if the SACK received is out of order,
> for the out-of-order SACK is valuable to congestion control
> debugging.
>
> v1->v2:
> - keep doing SCTP trace if the SACK is out of order as Marcelo's
> suggestion.
> v2->v3:
> - regenerate the patch as v2 generated on top of v1, and add
> 'net-next' tag to the new one as Marcelo's comments.
>
> Signed-off-by: Kevin Kou <qdkevin.kou@gmail.com>
> ---
> net/sctp/sm_statefuns.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
> index 42558fa..748e3b1 100644
> --- a/net/sctp/sm_statefuns.c
> +++ b/net/sctp/sm_statefuns.c
> @@ -3281,8 +3281,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> struct sctp_sackhdr *sackh;
> __u32 ctsn;
>
> - trace_sctp_probe(ep, asoc, chunk);
> -
> if (!sctp_vtag_verify(chunk, asoc))
> return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
>
> @@ -3299,6 +3297,15 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> chunk->subh.sack_hdr = sackh;
> ctsn = ntohl(sackh->cum_tsn_ack);
>
> + /* If Cumulative TSN Ack beyond the max tsn currently
> + * send, terminating the association and respond to the
> + * sender with an ABORT.
> + */
> + if (TSN_lte(asoc->next_tsn, ctsn))
> + return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands);
> +
> + trace_sctp_probe(ep, asoc, chunk);
> +
> /* i) If Cumulative TSN Ack is less than the Cumulative TSN
> * Ack Point, then drop the SACK. Since Cumulative TSN
> * Ack is monotonically increasing, a SACK whose
> @@ -3312,13 +3319,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> return SCTP_DISPOSITION_DISCARD;
> }
>
> - /* If Cumulative TSN Ack beyond the max tsn currently
> - * send, terminating the association and respond to the
> - * sender with an ABORT.
> - */
> - if (!TSN_lt(ctsn, asoc->next_tsn))
> - return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands);
> -
> /* Return this SACK for further processing. */
> sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, SCTP_CHUNK(chunk));
>
> --
> 1.8.3.1
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check
@ 2019-12-26 21:09 ` Neil Horman
0 siblings, 0 replies; 7+ messages in thread
From: Neil Horman @ 2019-12-26 21:09 UTC (permalink / raw)
To: Kevin Kou; +Cc: linux-sctp, netdev, vyasevich, marcelo.leitner, davem
On Wed, Dec 25, 2019 at 08:27:25AM +0000, Kevin Kou wrote:
> The function sctp_sf_eat_sack_6_2 now performs the Verification
> Tag validation, Chunk length validation, Bogu check, and also
> the detection of out-of-order SACK based on the RFC2960
> Section 6.2 at the beginning, and finally performs the further
> processing of SACK. The trace_sctp_probe now triggered before
> the above necessary validation and check.
>
> this patch is to do the trace_sctp_probe after the chunk sanity
> tests, but keep doing trace if the SACK received is out of order,
> for the out-of-order SACK is valuable to congestion control
> debugging.
>
> v1->v2:
> - keep doing SCTP trace if the SACK is out of order as Marcelo's
> suggestion.
> v2->v3:
> - regenerate the patch as v2 generated on top of v1, and add
> 'net-next' tag to the new one as Marcelo's comments.
>
> Signed-off-by: Kevin Kou <qdkevin.kou@gmail.com>
> ---
> net/sctp/sm_statefuns.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
> index 42558fa..748e3b1 100644
> --- a/net/sctp/sm_statefuns.c
> +++ b/net/sctp/sm_statefuns.c
> @@ -3281,8 +3281,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> struct sctp_sackhdr *sackh;
> __u32 ctsn;
>
> - trace_sctp_probe(ep, asoc, chunk);
> -
> if (!sctp_vtag_verify(chunk, asoc))
> return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands);
>
> @@ -3299,6 +3297,15 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> chunk->subh.sack_hdr = sackh;
> ctsn = ntohl(sackh->cum_tsn_ack);
>
> + /* If Cumulative TSN Ack beyond the max tsn currently
> + * send, terminating the association and respond to the
> + * sender with an ABORT.
> + */
> + if (TSN_lte(asoc->next_tsn, ctsn))
> + return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands);
> +
> + trace_sctp_probe(ep, asoc, chunk);
> +
> /* i) If Cumulative TSN Ack is less than the Cumulative TSN
> * Ack Point, then drop the SACK. Since Cumulative TSN
> * Ack is monotonically increasing, a SACK whose
> @@ -3312,13 +3319,6 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,
> return SCTP_DISPOSITION_DISCARD;
> }
>
> - /* If Cumulative TSN Ack beyond the max tsn currently
> - * send, terminating the association and respond to the
> - * sender with an ABORT.
> - */
> - if (!TSN_lt(ctsn, asoc->next_tsn))
> - return sctp_sf_violation_ctsn(net, ep, asoc, type, arg, commands);
> -
> /* Return this SACK for further processing. */
> sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, SCTP_CHUNK(chunk));
>
> --
> 1.8.3.1
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check
2019-12-25 8:27 [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check Kevin Kou
@ 2019-12-28 0:36 ` David Miller
2019-12-26 21:09 ` Neil Horman
2019-12-28 0:36 ` David Miller
2 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2019-12-28 0:36 UTC (permalink / raw)
To: qdkevin.kou; +Cc: linux-sctp, netdev, vyasevich, nhorman, marcelo.leitner
From: Kevin Kou <qdkevin.kou@gmail.com>
Date: Wed, 25 Dec 2019 08:27:25 +0000
> The function sctp_sf_eat_sack_6_2 now performs the Verification
> Tag validation, Chunk length validation, Bogu check, and also
> the detection of out-of-order SACK based on the RFC2960
> Section 6.2 at the beginning, and finally performs the further
> processing of SACK. The trace_sctp_probe now triggered before
> the above necessary validation and check.
>
> this patch is to do the trace_sctp_probe after the chunk sanity
> tests, but keep doing trace if the SACK received is out of order,
> for the out-of-order SACK is valuable to congestion control
> debugging.
>
> v1->v2:
> - keep doing SCTP trace if the SACK is out of order as Marcelo's
> suggestion.
> v2->v3:
> - regenerate the patch as v2 generated on top of v1, and add
> 'net-next' tag to the new one as Marcelo's comments.
>
> Signed-off-by: Kevin Kou <qdkevin.kou@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check
@ 2019-12-28 0:36 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2019-12-28 0:36 UTC (permalink / raw)
To: qdkevin.kou; +Cc: linux-sctp, netdev, vyasevich, nhorman, marcelo.leitner
From: Kevin Kou <qdkevin.kou@gmail.com>
Date: Wed, 25 Dec 2019 08:27:25 +0000
> The function sctp_sf_eat_sack_6_2 now performs the Verification
> Tag validation, Chunk length validation, Bogu check, and also
> the detection of out-of-order SACK based on the RFC2960
> Section 6.2 at the beginning, and finally performs the further
> processing of SACK. The trace_sctp_probe now triggered before
> the above necessary validation and check.
>
> this patch is to do the trace_sctp_probe after the chunk sanity
> tests, but keep doing trace if the SACK received is out of order,
> for the out-of-order SACK is valuable to congestion control
> debugging.
>
> v1->v2:
> - keep doing SCTP trace if the SACK is out of order as Marcelo's
> suggestion.
> v2->v3:
> - regenerate the patch as v2 generated on top of v1, and add
> 'net-next' tag to the new one as Marcelo's comments.
>
> Signed-off-by: Kevin Kou <qdkevin.kou@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-12-28 0:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-25 8:27 [PATCHv3 net-next] sctp: do trace_sctp_probe after SACK validation and check Kevin Kou
2019-12-25 13:07 ` Marcelo Ricardo Leitner
2019-12-25 13:07 ` Marcelo Ricardo Leitner
2019-12-26 21:09 ` Neil Horman
2019-12-26 21:09 ` Neil Horman
2019-12-28 0:36 ` David Miller
2019-12-28 0:36 ` David Miller
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.