* [PATCH 1/1] net:sctp: disable to inform ULP about transition from PF to active state
@ 2015-12-08 9:47 zyjzyj2000
2015-12-08 12:11 ` Marcelo Ricardo Leitner
0 siblings, 1 reply; 2+ messages in thread
From: zyjzyj2000 @ 2015-12-08 9:47 UTC (permalink / raw)
To: vyasevich, nhorman, linux-sctp, netdev
Cc: alexandre.dietsch, stefan.costandache
From: yzhu1 <zyjzyj2000@gmail.com>
This feature is introduced in the commit 5aa93bc "sctp: Implement
quick failover draft from tsvwg". This feature should be disabled
if the quick failover feature is disabled.
Signed-off-by: yzhu1 <zyjzyj2000@gmail.com>
---
net/sctp/associola.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 559afd0..7438625 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -795,7 +795,8 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,
* active state and set cwnd to 1 MTU, see SCTP
* Quick failover draft section 5.1, point 5
*/
- if (transport->state == SCTP_PF) {
+ if ((asoc->pf_retrans < asoc->max_retrans) &&
+ (transport->state == SCTP_PF)) {
ulp_notify = false;
transport->cwnd = asoc->pathmtu;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] net:sctp: disable to inform ULP about transition from PF to active state
2015-12-08 9:47 [PATCH 1/1] net:sctp: disable to inform ULP about transition from PF to active state zyjzyj2000
@ 2015-12-08 12:11 ` Marcelo Ricardo Leitner
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Ricardo Leitner @ 2015-12-08 12:11 UTC (permalink / raw)
To: zyjzyj2000
Cc: vyasevich, nhorman, linux-sctp, netdev, alexandre.dietsch,
stefan.costandache
Hi,
On Tue, Dec 08, 2015 at 05:47:22PM +0800, zyjzyj2000@gmail.com wrote:
> From: yzhu1 <zyjzyj2000@gmail.com>
>
> This feature is introduced in the commit 5aa93bc "sctp: Implement
> quick failover draft from tsvwg". This feature should be disabled
> if the quick failover feature is disabled.
>
> Signed-off-by: yzhu1 <zyjzyj2000@gmail.com>
> ---
> net/sctp/associola.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
> index 559afd0..7438625 100644
> --- a/net/sctp/associola.c
> +++ b/net/sctp/associola.c
> @@ -795,7 +795,8 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,
> * active state and set cwnd to 1 MTU, see SCTP
> * Quick failover draft section 5.1, point 5
> */
> - if (transport->state == SCTP_PF) {
> + if ((asoc->pf_retrans < asoc->max_retrans) &&
> + (transport->state == SCTP_PF)) {
> ulp_notify = false;
> transport->cwnd = asoc->pathmtu;
> }
Didn't you confuse asoc->max_retrans with Path.Max.Retrans?
That draft refers to asoc->pf_retrans having to be bigger than
Path.Max.Retrans in order to disable PF, and asoc->max_retrans is
another thing, it's originated from net->sctp.max_retrans_association.
The check is performed later in the code:
+ if ((transport->state != SCTP_PF) &&
+ (asoc->pf_retrans < transport->pathmaxrxt) &&
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ (transport->error_count > asoc->pf_retrans)) {
This check should avoid that state transition as it will avoid the path
from entereing SCTP_PF state at all.
transport->pathmaxrst is originated from net->sctp.max_retrans_path.
Btw, you had indentantion issues with your patch. Extra () that aren't
needed and the second line should start at the column right after the
initial ( in the first line. Please run scripts/checkpatch.pl on it next
time.
Marcelo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-08 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08 9:47 [PATCH 1/1] net:sctp: disable to inform ULP about transition from PF to active state zyjzyj2000
2015-12-08 12:11 ` Marcelo Ricardo Leitner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).