Understanding and using socket RTT
Vikash Kumar
vikashskumar at gmail.com
Tue Aug 14 02:06:28 EDT 2012
Hi,
I am writing an application in kernel which needs to make decisions based
on RTT of the socket open with another host. So, I was looking at TCP code
to find out how can I get that information from it. Whatever little I have
understood from the code, it looks like tcp_sock->srtt (smoothed round trip
time) is the one I can more or less trust to be the current rtt of the
socket and that this value is in jiffies.
However I got confused due to the comment on its declaration.
u32 srtt; /* smoothed round trip time << 3 */
Questions I have
1) Does this mean that the value stored in this variable is already left
shifted by 3 or it should be left shifted by 3 before using it ?
Or the value is simply the computed rtt in jiffies and it has no relation
with the left shift operation ?
2) Is the SRTT correct value to look at for rtt or should another metric /
value be used for this?
Regards,
Vikash Kumar
http://VikashKumar.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120814/bef23fd9/attachment.html
More information about the Kernelnewbies
mailing list