From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: Re: [PATCH 3/4] Adjust TCP timestamp values by a scalar value
Date: Wed, 21 Oct 2009 13:06:38 -0500 [thread overview]
Message-ID: <20091021180638.GA24465@us.ibm.com> (raw)
In-Reply-To: <1256072803-3518-4-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Quoting Dan Smith (danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
> Adjust the sent and received TCP timestamp value by a scalar value
> in the tcp_sock structure. This will be zero most of the time, except
> when the socket has been migrated with c/r. If a socket is re-migrated,
> we take the new adjusted value as the saved value so that on restart it
> can be re-adjusted. Also, copy this into the timewait sock so that
> timestamps can continue to be adjusted in timewait state in the
> minisocks code.
>
> Note that TCP timestamps are just a jiffies stamp, which means they
> have no relation to wall-clock time and thus a simple correction
> factor should be enough to ensure correctness.
>
> Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
...
> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> index 8afac76..b845e21 100644
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
> @@ -399,6 +399,8 @@ struct tcp_sock {
> u32 probe_seq_end;
> } mtu_probe;
>
> + s32 ts_adjust; /* tcp_time_stamp adjustment factor */
> +
> #ifdef CONFIG_TCP_MD5SIG
> /* TCP AF-Specific parts; only used by MD5 Signature support so far */
> struct tcp_sock_af_ops *af_specific;
> @@ -420,6 +422,7 @@ struct tcp_timewait_sock {
> u32 tw_rcv_wnd;
> u32 tw_ts_recent;
> long tw_ts_recent_stamp;
> + s32 tw_ts_adjust;
> #ifdef CONFIG_TCP_MD5SIG
> u16 tw_md5_keylen;
> u8 tw_md5_key[TCP_MD5SIG_MAXKEYLEN];
I think this definately needs to go by netdev to see if they object
to the extra fields, and the (negligable?) extra processing in
frequent paths like tcp_send_ack.
-serge
next prev parent reply other threads:[~2009-10-21 18:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 21:06 c/r: Add support for connected AF_INET sockets Dan Smith
2009-10-20 21:06 ` [PATCH 2/4] [RFC] Add c/r support for connected INET sockets Dan Smith
2009-10-21 17:56 ` Serge E. Hallyn
2009-10-21 18:05 ` Dan Smith
2009-10-23 19:37 ` Oren Laadan
[not found] ` <1256072803-3518-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-20 21:06 ` [PATCH 1/4] Record and restore skb header marks Dan Smith
[not found] ` <1256072803-3518-2-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-21 15:52 ` Serge E. Hallyn
[not found] ` <20091021155201.GA15402-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-21 15:57 ` Dan Smith
2009-10-20 21:06 ` [PATCH 3/4] Adjust TCP timestamp values by a scalar value Dan Smith
[not found] ` <1256072803-3518-4-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-21 18:06 ` Serge E. Hallyn [this message]
[not found] ` <20091021180638.GA24465-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-21 18:10 ` Dan Smith
2009-10-20 21:06 ` [PATCH 4/4] Add some content to the readme.txt for socket c/r Dan Smith
[not found] ` <1256072803-3518-5-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-10-23 19:41 ` Oren Laadan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091021180638.GA24465@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox