Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8637)

Issue 307530043: TCP LEDBAT implementation in ns-3.26 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 6 months ago by adadeepak8
Modified:
7 years, 1 month ago
Reviewers:
Tom Henderson, n.p
CC:
ns-3-reviews_googlegroups.com
Visibility:
Public.

Description

This patch provides an implementation of TCP LEDBAT [1] in ns-3.26. Patch contains: - Implementation of TCP LEDBAT in ns-3.26 - Documentation - Test suite - Extended examples/tcp/tcp-variants-compare.cc to provide an option to simulate TCP LEDBAT This patch is aligned with the Linux kernel code [2] of TCP LEDBAT. Thanks, Ankit Deepak [1] RFC 6817: https://tools.ietf.org/html/rfc6817 [2] M. Kuehlewind's Linux code: http://mirja.kuehlewind.net/src/tcp_ledbat.c

Patch Set 1 #

Total comments: 10

Patch Set 2 : Revised patch #

Total comments: 18

Patch Set 3 : Modified patch with suggested correction #

Total comments: 18
Unified diffs Side-by-side diffs Delta from patch set Stats (+852 lines, -4 lines) Patch
M examples/tcp/tcp-variants-comparison.cc View 1 2 3 chunks +7 lines, -2 lines 0 comments Download
M src/internet/doc/tcp.rst View 1 2 chunks +64 lines, -0 lines 0 comments Download
A src/internet/model/tcp-ledbat.h View 1 2 1 chunk +215 lines, -0 lines 3 comments Download
A src/internet/model/tcp-ledbat.cc View 1 2 1 chunk +308 lines, -0 lines 10 comments Download
M src/internet/model/tcp-socket-base.h View 1 2 1 chunk +3 lines, -0 lines 2 comments Download
M src/internet/model/tcp-socket-base.cc View 1 2 3 chunks +9 lines, -2 lines 3 comments Download
A src/internet/test/tcp-ledbat-test.cc View 1 2 1 chunk +243 lines, -0 lines 0 comments Download
M src/internet/wscript View 1 2 3 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 7
Tom Henderson
https://codereview.appspot.com/307530043/diff/1/src/internet/doc/tcp.rst File src/internet/doc/tcp.rst (right): https://codereview.appspot.com/307530043/diff/1/src/internet/doc/tcp.rst#newcode699 src/internet/doc/tcp.rst:699: More information (RFC): https://tools.ietf.org/html/rfc6817 Please comment in the documentation ...
7 years, 6 months ago (2016-10-30 16:31:58 UTC) #1
adadeepak8
Dear Sir, Thank you reviewing and providing suggestions. I have incorporated all the suggested changes ...
7 years, 5 months ago (2016-11-15 13:19:27 UTC) #2
n.p
Done, please solve the circular buffer issue and some small thing here and here. Thank ...
7 years, 2 months ago (2017-02-03 14:28:17 UTC) #3
adadeepak8
Hi Natale, Thanks for taking out time to review this patch. I have uploaded a ...
7 years, 2 months ago (2017-02-04 07:53:37 UTC) #4
n.p
Good work, I've pointed out some other thing that I've missed in the first review. ...
7 years, 2 months ago (2017-02-04 19:22:35 UTC) #5
n.p
https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-socket-base.cc File src/internet/model/tcp-socket-base.cc (right): https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-socket-base.cc#newcode3678 src/internet/model/tcp-socket-base.cc:3678: On 2017/02/04 19:22:35, n.p wrote: > Good :) No, ...
7 years, 2 months ago (2017-02-04 19:48:53 UTC) #6
adadeepak8
7 years, 2 months ago (2017-02-06 11:25:27 UTC) #7
Hi Natale,

I have pushed the changed LEDBAT files at
https://github.com/adeepkit01/TCP-Ledbat, as you instructed. 

Thank you for reviewing and will be looking forward to further suggestions.

-Ankit

https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-le...
File src/internet/model/tcp-ledbat.cc (right):

https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-le...
src/internet/model/tcp-ledbat.cc:62: MakeUintegerChecker<uint32_t> ())
On 2017/02/04 19:22:35, n.p wrote:
> We have EnumChecker, which control if the values of the Attribute are inside
the
> bounds. Here, the user could insert "2" and the code will not fail.

Done.

https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-le...
src/internet/model/tcp-ledbat.cc:205: base_delay = (int64_t)BaseDelay ();
On 2017/02/04 19:22:34, n.p wrote:
> Please avoid doing C-style casts. In general, I don't like working with uint
and
> then converting to int, because it is possible to lose precision. I would like
> to keep working with uint, preventing the case of overflow by using
conditional
> statements. So, it would be:
> 
> uint64_t current_delay = CurrentDelay (&TcpLedbat::MinCircBuf);
> uint64_t base_delay = BaseDelay ();
> 
> if (current_delay > base_delay)
> {
>   uint64_t queue_delay = current_delay - base_delay;
>   offset = m_Target.GetMilliSeconds () - queue_delay;
> }
> else
> {
>   uint64_t queue_delay = base_delay - current_delay;
>   offset = m_Target.GetMilliSeconds () + queue_delay;
> }
> 
> Probably, the else branch will never be taken, but in a simulator who knows
what
> kind of technologies will be employed? So, it's better to stay safe.
> Another thing is, can offset be negative? Because in this case there will be a
> problem in the following line. Again, don't assume too much in a simulator... 
> 
> 
> If you think that these things will not appear, simply use uint64_t and add an
> ASSERT (current_delay >= base_delay).

Done.

https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-le...
src/internet/model/tcp-ledbat.cc:211: cwnd += (inc * tcb->m_segmentSize);
I feel that is an expected behaviour, as the congestion window should reduce
when the queue_delay is more than the target delay.

https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-le...
src/internet/model/tcp-ledbat.cc:245: for (uint32_t i = 1; i < maxlen - 1; i++)
We assume that the minimum element is at 0 initially (i.e., cb.min = 0), hence
we compare the rest of array with it, to find the index of minimum element

https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-le...
src/internet/model/tcp-ledbat.cc:259: }
On 2017/02/04 19:22:35, n.p wrote:
> This just waste stack space. Please remove this function (UpdateCurrentDelay)
> and replace directly with AddDelay (...)

Done.

https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-le...
File src/internet/model/tcp-ledbat.h (right):

https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-le...
src/internet/model/tcp-ledbat.h:201: Time m_Target;                     //!<
Target Queue Delay
On 2017/02/04 19:22:35, n.p wrote:
> ns-3 naming style here is missing, it should be m_target

Done.

https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-so...
File src/internet/model/tcp-socket-base.cc (right):

https://codereview.appspot.com/307530043/diff/40001/src/internet/model/tcp-so...
src/internet/model/tcp-socket-base.cc:3678: 
I am unable to find the function "ProcessOptionTs", please let me know where can
I find it or else did you mean any other function?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b