Netdev List
 help / color / mirror / Atom feed
* Kernel 3.7+ tcp_metric cache system
@ 2013-09-04 12:09 Simon Jouet
  2013-09-04 12:34 ` Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Jouet @ 2013-09-04 12:09 UTC (permalink / raw)
  To: netdev

Hi,

First of all apologies if this mailing list doesn't this kind of
discussions, if not could you please redirect me to a more suitable
one ?

So, for my current research I require to be able to specify for
specific hosts what cwnd and rto to use, after some investigation I
came accross the modifications that have been done in kernel 3.7 to
bring the tcp_metric cache and the get/del netlink commands.

I added a new command "tcp_metrics_nl_cmd_add" to be able to add
entries to the cache (the code is available here
http://pastebin.com/gSvhyjWU, this is very much work in progress).
This work well enough and calling "ip tcpm show" afterwards to list
the entries show the correct information.

The issue is that these values are never used or at least from what I
can see. So once an entry is added it is attempted to be read by the
function tcp_init_metrics(struct sock *sk) and it's read only if it's
locked (tcp_metric_locked) I'm not sure what the lock flag is used
for, f anybody has any pointer for that ...

Anyway the connection will go to the "reset" goto label, the cwnd will
be reinitialised by tcp_init_cwnd (defined in tcp_input.c), in what
I've tested  "__u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) :
0);" will always return 0 and the cwnd will be defaulted to 10.

I'm probably doing something wrong .... But in which condition is the
cached cwnd used ? I tried to find some documentation on tcp_metric
but I couldn't find much.

Best regards,
Simon

P.S : If anything is unclear please let me know, so I can rephrase or
provide more details

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-04 12:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04 12:09 Kernel 3.7+ tcp_metric cache system Simon Jouet
2013-09-04 12:34 ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox