: Fix BUG in send time calculation
I think I found the bug, see description below.
The problem was clearly in CCID 3, with CCID 2 performance was good. I think it makes sense to use the other patch (RTO) as well. CCID 3 needs some more work, but I think with this the reported problem is solved.
------------> Commit Message <--------------------------------- [DCCP]: Fix BUG in retransmission delay calculation
This bug resulted in ccid3_hc_tx_send_packet returning negative delay values, which in turn triggered silently dequeueing packets in dccp_write_xmit. As a result, only a few out of the submitted packets made it at all onto the network. Occasionally, when dccp_wait_for_ccid was involved, this also triggered a bug warning since ccid3_hc_tx_send_packet returned a negative value (which in reality was a negative delay value).
The cause for this bug lies in the comparison
if (delay >= hctx->ccid3hctx_delta)
return delay / 1000L;
The type of delay' is long', that of ccid3hctx_delta is u32'. When comparing negative long values against u32 values, the test returned true' whenever delay was smaller than 0 (meaning the
packet was overdue to send).
The fix is by casting, subtracting, and then testing the difference with regard to 0.
This has been tested and shown to work.
--- net/dccp/ccids/ccid3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/dccp/ccids/ccid3.c +1 -1
@@ -339,7 +339,7 @@ static int ccid3_hc_tx_send_packet(struc* else * // send the packet in (t_nom - t_now) milliseconds. */ -if (delay >= hctx->ccid3hctx_delta) +if (delay - (long )hctx->ccid3hctx_delta >=0 )return delay /1000L ;break ;case TFRC_SSTATE_TERM :
Gerrit,
After applying both of your patches I am able to send packets over DCCP (CCID3). I will do more tests tomorrow and see how it behaves.
Many thanks
----- Original Message ----
From: Gerrit Renker <[email protected]>
To: Arnaldo de Melo <[email protected]>; [email protected]
Sent: Thursday, November 30, 2006 5:41:35 PM
Subject: [DCCP]: Fix BUG in send time calculation
I think I found the bug, see description below.
The problem was clearly in CCID 3, with CCID 2 performance was good. I think it makes sense to use the other patch (RTO) as well. CCID 3 needs some more work, but I think with this the reported problem is solved.
------------> Commit Message <--------------------------------- [DCCP]: Fix BUG in retransmission delay calculation
This bug resulted in ccid3_hc_tx_send_packet returning negative delay values, which in turn triggered silently dequeueing packets in dccp_write_xmit. As a result, only a few out of the submitted packets made it at all onto the network. Occasionally, when dccp_wait_for_ccid was involved, this also triggered a bug warning since ccid3_hc_tx_send_packet returned a negative value (which in reality was a negative delay value).
The cause for this bug lies in the comparison
if (delay >= hctx->ccid3hctx_delta)
return delay / 1000L;
The type of delay' is long', that of ccid3hctx_delta is u32'. When comparing negative long values against u32 values, the test returned true' whenever delay was smaller than 0 (meaning the
packet was overdue to send).
The fix is by casting, subtracting, and then testing the difference with regard to 0.
This has been tested and shown to work.
--- net/dccp/ccids/ccid3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/dccp/ccids/ccid3.c +1 -1
@@ -339,7 +339,7 @@ static int ccid3_hc_tx_send_packet(struc* else * // send the packet in (t_nom - t_now) milliseconds. */ -if (delay >= hctx->ccid3hctx_delta) +if (delay - (long )hctx->ccid3hctx_delta >=0 )return delay /1000L ;break ;case TFRC_SSTATE_TERM :
-
To unsubscribe from this list: send the line "unsubscribe dccp" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Burak Gorkemli
Gerrit,
After applying both of your patches I am able to send packets over DCCP (CCID3). I will do more tests tomorrow and see how it behaves.
Thanks for testing, I'm going to apply both now,
Regards,
- Arnaldo
Quoted 9 lines · Gerrit Renker
I think I found the bug, see description below.
The problem was clearly in CCID 3, with CCID 2 performance was good. I think it makes sense to use the other patch (RTO) as well. CCID 3 needs some more work, but I think with this the reported problem is solved.------------> Commit Message <--------------------------------- [DCCP]: Fix BUG in retransmission delay calculation
I'd just found the same patch being faulty using git-bisect so I agree...
Signature · 3 lines
Web: http://wand.net.nz/~iam4 Blog: http://imcdnzl.blogspot.com WAND Network Research Group
Hi Arnaldo,
| > I will do more tests tomorrow and see how it behaves. | | Thanks for testing, I'm going to apply both now,
That would be really great. I have done some testing - the bug is fixed by the second patch. However, the throughput is much higher when using a RTO timeout of 1 second (as per configuration menu), via the first patch - so it does seem to be useful (and different settings can be tested).
I'd be grateful for any further CCID 3 observations - hopefully we can get it up to speed soon.
Gerrit
Quoted 3 lines · Gerrit Renker
------------> Commit Message <--------------------------------- [DCCP]: Fix BUG in retransmission delay calculation
I can confirm this fixes the problem in this case. Performance still sucks but this fixes one aspect - tested by reverting to my code in this and comparing. See message to follow.
Ian
Signature · 3 lines
Web: http://wand.net.nz/~iam4 Blog: http://imcdnzl.blogspot.com WAND Network Research Group