net: sctp: set chunk->tsn_gap_acked at the end of cycle
Subsystems (3)
PATCH 1/1 net: sctp: set chunk->tsn_gap_acked at the end of cycle
tsn_gap_acked is an important state flag in chunk, which indicates if the chunk has been acked in gap reports before. SFR-CACC algorithm depends on this variable. So set this at the end of each iteration, otherwise the SFR-CACC algorithm would never be toggled.
--- net/sctp/outqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/sctp/outqueue.c +2 -1
@@ -1396,7 +1396,6 @@ static void sctp_check_transmitted(struct sctp_outq *q,* while DATA was outstanding). */ if (!tchunk->tsn_gap_acked) { - tchunk->tsn_gap_acked =1 ;if (TSN_lt (*highest_new_tsn_in_sack, tsn)) *highest_new_tsn_in_sack = tsn; bytes_acked +=sctp_data_size (tchunk);
@@ -1460,6 +1459,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,*/ list_add_tail (lchunk, &tlist); } + + tchunk->tsn_gap_acked =1 ; }else {if (tchunk->tsn_gap_acked) { pr_debug("%s: receiver reneged on data TSN:0x%x\n",
Signature · 1 line
1.8.4.3
Quoted 35 lines · Chang Xiangzhong
tsn_gap_ackedis an important state flag in chunk, which indicates if the chunk has been acked in gap reports before. SFR-CACC algorithm depends on this variable. So set this at the end of each iteration, otherwise the SFR-CACC algorithm would never be toggled.Signed-off-by Chang Xiangzhong <[email protected]>--- net/sctp/outqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)net/sctp/outqueue.c +2
-1@@ -1396,7 +1396,6 @@ static void sctp_check_transmitted(struct sctp_outq *q,* while DATA was outstanding). */ if (!tchunk->tsn_gap_acked) { - tchunk->tsn_gap_acked =1 ;if (TSN_lt (*highest_new_tsn_in_sack, tsn)) *highest_new_tsn_in_sack = tsn; bytes_acked +=sctp_data_size (tchunk);@@ -1460,6 +1459,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,*/ list_add_tail (lchunk, &tlist); } + + tchunk->tsn_gap_acked =1 ; }else {if (tchunk->tsn_gap_acked) { pr_debug("%s: receiver reneged on data TSN:0x%x\n",Signature · 1 line
1.8.4.3
Quoted 2 lines · Chang Xiangzhong
tsn_gap_ackedis an important state flag in chunk, which indicates if the chunk has been acked in gap reports before.
Actually, this bit indicates simply that the chunk has been acked. It doesn't state whether it's been acked in a gap report or via cumulative tsn.
Quoted 22 lines
SFR-CACC algorithm depends on this
variable. So set this at the end of each iteration, otherwise the SFR-CACC algorithm would never be toggled.Signed-off-by Chang Xiangzhong <[email protected]>--- net/sctp/outqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)net/sctp/outqueue.c +0
-1@@ -1396,7 +1396,6 @@ static void sctp_check_transmitted(struct sctp_outq *q,* while DATA was outstanding). */ if (!tchunk->tsn_gap_acked) { - tchunk->tsn_gap_acked =1 ;if (TSN_lt (*highest_new_tsn_in_sack, tsn)) *highest_new_tsn_in_sack = tsn; bytes_acked +=sctp_data_size (tchunk);
net/sctp/outqueue.c static void sctp_check_transmitted(struct sctp_outq *q, · line 1463
Quoted 5 lines
net/sctp/outqueue.c +2
-0@@ -1460,6 +1459,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,*/ list_add_tail (lchunk, &tlist); } + + tchunk->tsn_gap_acked =1 ;
The current code will set the state if it hasn't been set yet. Why is this needed?
Now there is an issue with tracking highest_new_tsn_in_sack. The spec is a little vague on this, but the highest_new_tsn_in_sack only supposed to track tsns that have not been resent. If a tsn has been reneged, and then sent again, it is not considered 'new' thus should not count toward highest_new_tsn_in_sack. We currently do not track this right.
-vlad
-vlad
Quoted 4 lines
net/sctp/outqueue.c +0
-0}else {if (tchunk->tsn_gap_acked) { pr_debug("%s: receiver reneged on data TSN:0x%x\n",
Quoted 5 lines · Vlad Yasevich
Quoted 2 lines · Chang Xiangzhong
tsn_gap_ackedis an important state flag in chunk, which indicates if the chunk has been acked in gap reports before.Actually, this bit indicates simply that the chunk has been acked. It doesn't state whether it's been acked in a gap report or via cumulative tsn.
Thanks for pointing this out. Sorry for not having made that clear.
Quoted 22 lines
Quoted 22 lines
SFR-CACC algorithm depends on this
variable. So set this at the end of each iteration, otherwise the SFR-CACC algorithm would never be toggled.Signed-off-by Chang Xiangzhong <[email protected]>--- net/sctp/outqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)net/sctp/outqueue.c +0
-1@@ -1396,7 +1396,6 @@ static void sctp_check_transmitted(struct sctp_outq *q,* while DATA was outstanding). */ if (!tchunk->tsn_gap_acked) { - tchunk->tsn_gap_acked =1 ;if (TSN_lt (*highest_new_tsn_in_sack, tsn)) *highest_new_tsn_in_sack = tsn; bytes_acked +=sctp_data_size (tchunk);
Quoted 8 lines
net/sctp/outqueue.c static void sctp_check_transmitted(struct sctp_outq *q, · line 1463
Quoted 6 lines
net/sctp/outqueue.c +2
-0@@ -1460,6 +1459,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,*/ list_add_tail (lchunk, &tlist); } + + tchunk->tsn_gap_acked =1 ;The current code will set the state if it hasn't been set yet. Why is this needed?
Because in line 1420 ~ 1440 The SFR-CACC algorithms use tsn_gap_acked. That "if block" would never be triggered because the varaiable's been set. That's why I move the "state changing sentence" to the end of the iteration.
Quoted 5 lines
Now there is an issue with tracking
highest_new_tsn_in_sack. The spec is a little vague on this, but thehighest_new_tsn_in_sackonly supposed to track tsns that have not been resent. If a tsn has been reneged, and then sent again, it is not considered 'new' thus should not count towardhighest_new_tsn_in_sack. We currently do not track this right.
I'll try to figure this out.
Quoted 8 lines
(quoted diff) +0
-2-vlad -vladQuoted 5 lines
net/sctp/outqueue.c +0
-0}else {if (tchunk->tsn_gap_acked) { pr_debug("%s: receiver reneged on data TSN:0x%x\n",
Quoted 47 lines · Chang
Quoted 7 lines · Vlad Yasevich
Quoted 3 lines · Chang Xiangzhong
tsn_gap_ackedis an important state flag in chunk, which indicates if the
chunk has been acked in gap reports before.Actually, this bit indicates simply that the chunk has been acked. It doesn't state whether it's been acked in a gap report or via cumulative tsn.
Thanks for pointing this out. Sorry for not having made that clear.
Quoted 25 lines
Quoted 25 lines
SFR-CACC algorithm depends on this
variable. So set this at the end of each iteration, otherwise the SFR-CACC
algorithm would never be toggled.Signed-off-by Chang Xiangzhong <[email protected]>--- net/sctp/outqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)net/sctp/outqueue.c +0
-1@@ -1396,7 +1396,6 @@ static void sctp_check_transmitted(structsctp_outq *q, * while DATA was outstanding). */ if (!tchunk->tsn_gap_acked) { - tchunk->tsn_gap_acked =1 ;if (TSN_lt (*highest_new_tsn_in_sack, tsn)) *highest_new_tsn_in_sack = tsn;bytes_acked += sctp_data_size(tchunk);net/sctp/outqueue.c +0
-0@@ -1460,6 +1459,8 @@ static void sctp_check_transmitted(structQuoted 8 lines
net/sctp/outqueue.c static void sctp_check_transmitted(struct sctp_outq *q, · line 1463
Quoted 6 lines
net/sctp/outqueue.c +2
-0sctp_outq *q, */ list_add_tail (lchunk, &tlist); } + + tchunk->tsn_gap_acked =1 ;The current code will set the state if it hasn't been set yet. Why is this needed?
Because in line 1420 ~ 1440 The SFR-CACC algorithms use
tsn_gap_acked. That "if block" would never be triggered because the varaiable's been set. That's why I move the "state changing sentence" to the end of the iteration.
Quoted 6 lines
Quoted 5 lines
Now there is an issue with tracking
highest_new_tsn_in_sack. The spec is a little vague on this, but thehighest_new_tsn_in_sackonly supposed to track tsns that have not been resent. If a tsn has been reneged, and then sent again, it is not considered 'new' thus should not count towardhighest_new_tsn_in_sack. We currently do not track this right.I'll try to figure this out.
So the solution that's been proposed before is to move the CACC block up and merge it with the !tsn_gap_acked block. This requires additional change though to only mark highest_new_tsn if the chunk has not been retransmitted (which you've added in a prior patch).
-vlad
Quoted 9 lines
Quoted 8 lines
(quoted diff) +0
-2-vlad -vladQuoted 5 lines
net/sctp/outqueue.c +0
-0}else {if (tchunk->tsn_gap_acked) {pr_debug("%s: receiver reneged on data TSN:0x%x\n",
Quoted 51 lines · Vlad Yasevich
Quoted 50 lines · Chang
Quoted 7 lines · Vlad Yasevich
Quoted 3 lines · Chang Xiangzhong
tsn_gap_ackedis an important state flag in chunk, which indicates if the
chunk has been acked in gap reports before.Actually, this bit indicates simply that the chunk has been acked. It doesn't state whether it's been acked in a gap report or via cumulative tsn.
Thanks for pointing this out. Sorry for not having made that clear.
Quoted 24 lines
Quoted 24 lines
SFR-CACC algorithm depends on this
variable. So set this at the end of each iteration, otherwise the SFR-CACC
algorithm would never be toggled.Signed-off-by Chang Xiangzhong <[email protected]>--- net/sctp/outqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)net/sctp/outqueue.c +0
-1@@ -1396,7 +1396,6 @@ static void sctp_check_transmitted(structsctp_outq *q, * while DATA was outstanding). */ if (!tchunk->tsn_gap_acked) { - tchunk->tsn_gap_acked =1 ;if (TSN_lt (*highest_new_tsn_in_sack, tsn)) *highest_new_tsn_in_sack = tsn;bytes_acked += sctp_data_size(tchunk);net/sctp/outqueue.c +0
-0@@ -1460,6 +1459,8 @@ static void sctp_check_transmitted(structQuoted 8 lines
net/sctp/outqueue.c static void sctp_check_transmitted(struct sctp_outq *q, · line 1463
Quoted 6 lines
net/sctp/outqueue.c +2
-0sctp_outq *q, */ list_add_tail (lchunk, &tlist); } + + tchunk->tsn_gap_acked =1 ;The current code will set the state if it hasn't been set yet. Why is this needed?
Because in line 1420 ~ 1440 The SFR-CACC algorithms use
tsn_gap_acked. That "if block" would never be triggered because the varaiable's been set. That's why I move the "state changing sentence" to the end of the iteration.Quoted 5 lines
Now there is an issue with tracking
highest_new_tsn_in_sack. The spec is a little vague on this, but thehighest_new_tsn_in_sackonly supposed to track tsns that have not been resent. If a tsn has been reneged, and then sent again, it is not considered 'new' thus should not count towardhighest_new_tsn_in_sack. We currently do not track this right.
Quoted 7 lines
Quoted 1 line
I'll try to figure this out.
So the solution that's been proposed before is to move the CACC block up and merge it with the !tsn_gap_acked block. This requires additional change though to only mark
highest_new_tsnif the chunk has not been retransmitted (which you've added in a prior patch).-vlad
Yeah, I've mixed that up with a prior patch. How was the previous patch? Was it approved?
-chang
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
(quoted diff) +0
-2-vlad -vladQuoted 5 lines
net/sctp/outqueue.c +0
-0}else {if (tchunk->tsn_gap_acked) {pr_debug("%s: receiver reneged on data TSN:0x%x\n",
Hi,
Could you please why a **reneged** newly acked TSN doesn't qualify the highest_new_tsn? What's the wrongs of doing that?
I've been thinking a few scenarios, but I couldn't figure out what's wrong with that.
Quoted 7 lines · Chang
Hi,
Could you please why a **reneged** newly acked TSN doesn't qualify thehighest_new_tsn? What's the wrongs of doing that?I've been thinking a few scenarios, but I couldn't figure out what's wrong with that.
The spec is a bit conflicting on this topic. Here is what it says
Section 7.2.4
Miss indications SHOULD follow the HTNA (Highest TSN Newly Acknowledged) algorithm. For each incoming SACK, miss indications are incremented only for missing TSNs prior to the highest TSN newly acknowledged in the SACK. A newly acknowledged DATA chunk is one not previously acknowledged in a SACK.
But section 6.2.1 says:
iii) If the SACK is missing a TSN that was previously acknowledged
via a Gap Ack Block (e.g., the data receiver reneged on the data), then consider the corresponding DATA that might be possibly missing: Count one miss indication towards Fast Retransmit as described in Section 7.2.4, and if no retransmit timer is running for the destination address to which the DATA chunk was originally transmitted, then T3-rtx is started for that destination address.
So, the question becomes does the reneged tsn update HTNA counter? It has been acked by a previous SACK, but 6.2.1 says to treat as missing.
The more I look at this the more I think we should continue doing what we are doing which is following section 6.2.1.
-vlad