From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Deepa Dinamani <deepa.kernel@gmail.com>,
davem@davemloft.net, linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, arnd@arndb.de, y2038@lists.linaro.org,
ccaulfie@redhat.com, deller@gmx.de, paulus@samba.org,
ralf@linux-mips.org, rth@twiddle.net, cluster-devel@redhat.com,
linuxppc-dev@lists.ozlabs.org, linux-alpha@vger.kernel.org,
linux-arch@vger.kernel.org, linux-mips@vger.kernel.org,
linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org
Subject: Re: [PATCH net-next v5 12/12] sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW
Date: Sat, 2 Feb 2019 18:15:41 +0100 [thread overview]
Message-ID: <0fad3f4d-4c0e-d9f2-1af0-7890d40c19c0@hartkopp.net> (raw)
In-Reply-To: <20190202153454.7121-13-deepa.kernel@gmail.com>
Hi all,
On 02.02.19 16:34, Deepa Dinamani wrote:
> Add new socket timeout options that are y2038 safe.
(..)
>
> diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h
> index 9826d1db71d0..0d0fddb7e738 100644
> --- a/arch/alpha/include/uapi/asm/socket.h
> +++ b/arch/alpha/include/uapi/asm/socket.h
> @@ -119,19 +119,25 @@
> #define SO_TIMESTAMPNS_NEW 64
> #define SO_TIMESTAMPING_NEW 65
>
> -#if !defined(__KERNEL__)
> +#define SO_RCVTIMEO_NEW 66
> +#define SO_SNDTIMEO_NEW 67
>
> -#define SO_RCVTIMEO SO_RCVTIMEO_OLD
> -#define SO_SNDTIMEO SO_SNDTIMEO_OLD
> +#if !defined(__KERNEL__)
>
> #if __BITS_PER_LONG == 64
> #define SO_TIMESTAMP SO_TIMESTAMP_OLD
> #define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
> #define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
> +
> +#define SO_RCVTIMEO SO_RCVTIMEO_OLD
> +#define SO_SNDTIMEO SO_SNDTIMEO_OLD
Maybe I'm a bit late in this discussion as you are already in v5 ...
I can see patches making the transition in different steps where it
might be helpful to name them *_OLD and *_NEW to understand the patches.
But in the end the naming stays in the kernel for a very long time and I
remember myself (in early years) to name things 'new', 'new2', 'new3'.
In fact SO_TIMESTAMP_OLD should be named SO_TIMESTAMP32 and
SO_TIMESTAMP_NEW should be named SO_TIMESTAMP64.
Especially as it tells you what is 'inside', the naming of these new
introduced constants should be replaced with *32 and *64 names.
The documentation and the other comments still fit perfectly then.
Regards,
Oliver
next prev parent reply other threads:[~2019-02-02 17:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-02 15:34 [PATCH net-next v5 00/12] net: y2038-safe socket timestamps Deepa Dinamani
2019-02-02 15:34 ` [PATCH net-next v5 11/12] socket: Rename SO_RCVTIMEO/ SO_SNDTIMEO with _OLD suffixes Deepa Dinamani
2019-02-06 11:58 ` Michael Ellerman
2019-02-02 15:34 ` [PATCH net-next v5 12/12] sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW Deepa Dinamani
2019-02-02 17:15 ` Oliver Hartkopp [this message]
2019-02-03 2:47 ` Deepa Dinamani
2019-02-06 11:56 ` Michael Ellerman
2019-02-09 1:44 ` Deepa Dinamani
2019-02-10 22:12 ` Michael Ellerman
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=0fad3f4d-4c0e-d9f2-1af0-7890d40c19c0@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=arnd@arndb.de \
--cc=ccaulfie@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=davem@davemloft.net \
--cc=deepa.kernel@gmail.com \
--cc=deller@gmx.de \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
--cc=ralf@linux-mips.org \
--cc=rth@twiddle.net \
--cc=sparclinux@vger.kernel.org \
--cc=y2038@lists.linaro.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;
as well as URLs for NNTP newsgroup(s).