* [PATCH] net: sctp: find the correct highest_new_tsn in sack
@ 2013-11-21 21:56 Chang Xiangzhong
2013-11-21 22:14 ` Vlad Yasevich
2013-11-22 11:56 ` Neil Horman
0 siblings, 2 replies; 4+ messages in thread
From: Chang Xiangzhong @ 2013-11-21 21:56 UTC (permalink / raw)
To: vyasevich, nhorman, davem
Cc: linux-sctp, netdev, linux-kernel, Chang Xiangzhong
Function sctp_check_transmitted(transport t, ...) would iterate all of
transport->transmitted queue and looking for the highest __newly__ acked tsn.
The original algorithm would depend on the order of the assoc->transport_list
(in function sctp_outq_sack line 1215 - 1226). The result might not be the
expected due to the order of the tranport_list.
Solution: checking if the exising is smaller than the new one before assigning
Signed-off-by: Chang Xiangzhong <changxiangzhong@gmail.com>
---
net/sctp/outqueue.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index ef9e2bb..1b494fa 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -1397,7 +1397,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
*/
if (!tchunk->tsn_gap_acked) {
tchunk->tsn_gap_acked = 1;
- *highest_new_tsn_in_sack = tsn;
+ if (TSN_lt(*highest_new_tsn_in_sack, tsn))
+ *highest_new_tsn_in_sack = tsn;
bytes_acked += sctp_data_size(tchunk);
if (!tchunk->transport)
migrate_bytes += sctp_data_size(tchunk);
--
1.8.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: sctp: find the correct highest_new_tsn in sack
2013-11-21 21:56 [PATCH] net: sctp: find the correct highest_new_tsn in sack Chang Xiangzhong
@ 2013-11-21 22:14 ` Vlad Yasevich
2013-11-23 22:46 ` David Miller
2013-11-22 11:56 ` Neil Horman
1 sibling, 1 reply; 4+ messages in thread
From: Vlad Yasevich @ 2013-11-21 22:14 UTC (permalink / raw)
To: Chang Xiangzhong, nhorman, davem; +Cc: linux-sctp, netdev, linux-kernel
On 11/21/2013 04:56 PM, Chang Xiangzhong wrote:
> Function sctp_check_transmitted(transport t, ...) would iterate all of
> transport->transmitted queue and looking for the highest __newly__ acked tsn.
> The original algorithm would depend on the order of the assoc->transport_list
> (in function sctp_outq_sack line 1215 - 1226). The result might not be the
> expected due to the order of the tranport_list.
>
> Solution: checking if the exising is smaller than the new one before assigning
>
> Signed-off-by: Chang Xiangzhong <changxiangzhong@gmail.com>
Good find. This has been around for since day 1. It doesn't so much
depend on the order of the transport list, but on the order the
transports been used. I agree it is a problem if chunks have been
distributed across multiple transports and a singe SACK acking them all.
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
-vlad
> ---
> net/sctp/outqueue.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
> index ef9e2bb..1b494fa 100644
> --- a/net/sctp/outqueue.c
> +++ b/net/sctp/outqueue.c
> @@ -1397,7 +1397,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
> */
> if (!tchunk->tsn_gap_acked) {
> tchunk->tsn_gap_acked = 1;
> - *highest_new_tsn_in_sack = tsn;
> + if (TSN_lt(*highest_new_tsn_in_sack, tsn))
> + *highest_new_tsn_in_sack = tsn;
> bytes_acked += sctp_data_size(tchunk);
> if (!tchunk->transport)
> migrate_bytes += sctp_data_size(tchunk);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: sctp: find the correct highest_new_tsn in sack
2013-11-21 21:56 [PATCH] net: sctp: find the correct highest_new_tsn in sack Chang Xiangzhong
2013-11-21 22:14 ` Vlad Yasevich
@ 2013-11-22 11:56 ` Neil Horman
1 sibling, 0 replies; 4+ messages in thread
From: Neil Horman @ 2013-11-22 11:56 UTC (permalink / raw)
To: Chang Xiangzhong; +Cc: vyasevich, davem, linux-sctp, netdev, linux-kernel
On Thu, Nov 21, 2013 at 10:56:28PM +0100, Chang Xiangzhong wrote:
> Function sctp_check_transmitted(transport t, ...) would iterate all of
> transport->transmitted queue and looking for the highest __newly__ acked tsn.
> The original algorithm would depend on the order of the assoc->transport_list
> (in function sctp_outq_sack line 1215 - 1226). The result might not be the
> expected due to the order of the tranport_list.
>
> Solution: checking if the exising is smaller than the new one before assigning
>
> Signed-off-by: Chang Xiangzhong <changxiangzhong@gmail.com>
> ---
> net/sctp/outqueue.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
> index ef9e2bb..1b494fa 100644
> --- a/net/sctp/outqueue.c
> +++ b/net/sctp/outqueue.c
> @@ -1397,7 +1397,8 @@ static void sctp_check_transmitted(struct sctp_outq *q,
> */
> if (!tchunk->tsn_gap_acked) {
> tchunk->tsn_gap_acked = 1;
> - *highest_new_tsn_in_sack = tsn;
> + if (TSN_lt(*highest_new_tsn_in_sack, tsn))
> + *highest_new_tsn_in_sack = tsn;
> bytes_acked += sctp_data_size(tchunk);
> if (!tchunk->transport)
> migrate_bytes += sctp_data_size(tchunk);
> --
> 1.8.4.3
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: sctp: find the correct highest_new_tsn in sack
2013-11-21 22:14 ` Vlad Yasevich
@ 2013-11-23 22:46 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-11-23 22:46 UTC (permalink / raw)
To: vyasevich; +Cc: changxiangzhong, nhorman, linux-sctp, netdev, linux-kernel
From: Vlad Yasevich <vyasevich@gmail.com>
Date: Thu, 21 Nov 2013 17:14:01 -0500
> On 11/21/2013 04:56 PM, Chang Xiangzhong wrote:
>> Function sctp_check_transmitted(transport t, ...) would iterate all of
>> transport->transmitted queue and looking for the highest __newly__ acked tsn.
>> The original algorithm would depend on the order of the assoc->transport_list
>> (in function sctp_outq_sack line 1215 - 1226). The result might not be the
>> expected due to the order of the tranport_list.
>>
>> Solution: checking if the exising is smaller than the new one before assigning
>>
>> Signed-off-by: Chang Xiangzhong <changxiangzhong@gmail.com>
>
> Good find. This has been around for since day 1. It doesn't so much
> depend on the order of the transport list, but on the order the
> transports been used. I agree it is a problem if chunks have been
> distributed across multiple transports and a singe SACK acking them all.
>
> Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-23 22:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-21 21:56 [PATCH] net: sctp: find the correct highest_new_tsn in sack Chang Xiangzhong
2013-11-21 22:14 ` Vlad Yasevich
2013-11-23 22:46 ` David Miller
2013-11-22 11:56 ` Neil Horman
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).