<div>Hi,</div><div><br></div><div>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. </div>
<div><br></div><div>However I got confused due to the comment on its declaration.</div><div><br></div><div>u32 srtt; /* smoothed round trip time << 3 */</div><div><br></div><div>Questions I have </div>
<div>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 ?</div><div>Or the value is simply the computed rtt in jiffies and it has no relation with the left shift operation ?</div>
<div><br></div><div>2) Is the SRTT correct value to look at for rtt or should another metric / value be used for this?</div><div><br></div><br clear="all">Regards,<br>Vikash Kumar<br><a href="http://VikashKumar.com/">http://VikashKumar.com/</a><br>
<br>