From: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux•com>
To: Deepa Dinamani <deepa.kernel@gmail•com>,
netdev@vger•kernel.org, y2038@lists•linaro.org
Cc: hideaki.yoshifuji@miraclelinux•com, arnd@arndb•de,
"David S. Miller" <davem@davemloft•net>,
Alexey Kuznetsov <kuznet@ms2•inr.ac.ru>,
James Morris <jmorris@namei•org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6•org>,
Patrick McHardy <kaber@trash•net>
Subject: Re: [PATCH v2 2/3] net: ipv4: tcp_probe: Replace timespec with timespec64
Date: Mon, 29 Feb 2016 13:27:17 +0900 [thread overview]
Message-ID: <56D3C8A5.5090507@miraclelinux.com> (raw)
In-Reply-To: <1456561938-7653-3-git-send-email-deepa.kernel@gmail.com>
Deepa Dinamani wrote:
> TCP probe log timestamps use struct timespec which is
> not y2038 safe. Even though timespec might be good enough here
> as it is used to represent delta time, the plan is to get rid
> of all uses of timespec in the kernel.
> Replace with struct timespec64 which is y2038 safe.
>
> Prints still use unsigned long format and type.
>
> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail•com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6•org>
> Reviewed-by: Arnd Bergmann <arnd@arndb•de>
> Cc: "David S. Miller" <davem@davemloft•net>
> Cc: Alexey Kuznetsov <kuznet@ms2•inr.ac.ru>
> Cc: James Morris <jmorris@namei•org>
> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6•org>
> Cc: Patrick McHardy <kaber@trash•net>
> ---
> net/ipv4/tcp_probe.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c
> index ebf5ff5..f6c50af 100644
> --- a/net/ipv4/tcp_probe.c
> +++ b/net/ipv4/tcp_probe.c
> @@ -187,13 +187,13 @@ static int tcpprobe_sprint(char *tbuf, int n)
> {
> const struct tcp_log *p
> = tcp_probe.log + tcp_probe.tail;
> - struct timespec tv
> - = ktime_to_timespec(ktime_sub(p->tstamp, tcp_probe.start));
> + struct timespec64 ts
> + = ktime_to_timespec64(ktime_sub(p->tstamp, tcp_probe.start));
>
> return scnprintf(tbuf, n,
> "%lu.%09lu %pISpc %pISpc %d %#x %#x %u %u %u %u %u\n",
> - (unsigned long)tv.tv_sec,
> - (unsigned long)tv.tv_nsec,
> + (unsigned long)ts.tv_sec,
> + (unsigned long)ts.tv_nsec,
> &p->src, &p->dst, p->length, p->snd_nxt, p->snd_una,
> p->snd_cwnd, p->ssthresh, p->snd_wnd, p->srtt, p->rcv_wnd);
> }
>
--
Hideaki Yoshifuji <hideaki.yoshifuji@miraclelinux•com>
Technical Division, MIRACLE LINUX CORPORATION
next prev parent reply other threads:[~2016-02-29 4:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 8:32 [PATCH v2 0/3] Convert network timestamps to be y2038 safe Deepa Dinamani
2016-02-27 8:32 ` [PATCH v2 1/3] net: ipv4: Convert IP " Deepa Dinamani
2016-02-29 4:26 ` YOSHIFUJI Hideaki
2016-02-29 16:31 ` Arnd Bergmann
2016-02-27 8:32 ` [PATCH v2 2/3] net: ipv4: tcp_probe: Replace timespec with timespec64 Deepa Dinamani
2016-02-29 4:27 ` YOSHIFUJI Hideaki [this message]
2016-02-27 8:32 ` [PATCH v2 3/3] net: sctp: Convert log timestamps to be y2038 safe Deepa Dinamani
2016-03-01 22:19 ` [PATCH v2 0/3] Convert network " David Miller
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=56D3C8A5.5090507@miraclelinux.com \
--to=hideaki.yoshifuji@miraclelinux$(echo .)com \
--cc=arnd@arndb$(echo .)de \
--cc=davem@davemloft$(echo .)net \
--cc=deepa.kernel@gmail$(echo .)com \
--cc=jmorris@namei$(echo .)org \
--cc=kaber@trash$(echo .)net \
--cc=kuznet@ms2$(echo .)inr.ac.ru \
--cc=netdev@vger$(echo .)kernel.org \
--cc=y2038@lists$(echo .)linaro.org \
--cc=yoshfuji@linux-ipv6$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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