From: William Allen Simpson <william.allen.simpson@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [net-next-2.6 PATCH v7 5/7 RFC] TCPCT part 1e: implement socket option TCP_COOKIE_TRANSACTIONS
Date: Mon, 23 Nov 2009 06:16:03 -0500 [thread overview]
Message-ID: <4B0A6EF3.8040302@gmail.com> (raw)
In-Reply-To: <1258873848.16503.12.camel@Joe-Laptop.home>
Joe Perches wrote:
> On Sun, 2009-11-22 at 01:25 -0500, William Allen Simpson wrote:
>> David Miller wrote:
>>> From: William Allen Simpson <william.allen.simpson@gmail.com>
>>> Date: Fri, 20 Nov 2009 09:48:12 -0500
>>>> + if (ctd.tcpct_used > 0
>>>> + || (tp->cookie_values == NULL
>>>> + && (sysctl_tcp_cookie_size > 0
>>>> + || ctd.tcpct_cookie_desired > 0
>>>> + || ctd.tcpct_s_data_desired > 0))) {
>>> Please fix the conditional coding style, and the alignment of
>>> the lines, it's not right here.
>
> I think the rather significantly majority style, especially
> for net/... is to use || and && at the end of the line rather
> than the start and it should be used.
>
> Treewide:
>
> $ grep -rP --include=*.[ch] "(\|\||\&\&)\s*$" * | wc -l
> 34180
>
> $ grep -rP --include=*.[ch] "^\s*(\|\||\&\&)" * | wc -l
> 7855
>
> net: 3859 to 382 (more than 10:1, so it's the one to follow)
> drivers/net: 4610 to 666
>
Thanks for measuring.
I'll note that during the previous review back at the v4 round, you
(Joe) passed along a formerly private message from Linus expressing his
preference for variable lvalues:
http://www.spinics.net/lists/netdev/msg111212.html
But my example code in that thread also had both leading && and || -- and
neither David nor Eric nor Ilpo nor you mentioned that as an issue in that
entire thread:
http://www.spinics.net/lists/netdev/msg111172.html
In the previous plaint about lvalues, there were merely 500+ examples
using the same constant lvalue form as my code -- in arch, drivers, net,
and sound. For this example, many *thousands* are found everywhere!
Therefore, it's plain as can be that this is just more jumping through
arbitrary and capricious hoops that others are not required to follow.
> Besides, it's the one David wants...
>
At *thousands* of examples, including in the tcp*.c files themselves, it
really becomes obvious that that may be a personal preference of David,
but is *not* a tree-wide or even a net-wide coding style.
However, a private message to me nearly 2 months ago expressed:
"As unpalatable as it may be, all the more reason to genuflect as
required to get the changes into the net-next-2.6 tree so they will
flow down to future distros."
I followed that advice for a month. That last patch submitted for
inclusion was v4 on Oct 27th. Then, as some have noticed, I quit using
the net-next tree for actual development. I've only sent weekly RFC
versions to solicit more widespread comments from subject matter experts,
and keep the patch offsets in sync with the rapidly changing tree.
As a more recent private comment asked:
"So your frustration is nothing but normal. And guess what ? Few
people accept the challenge, so keep trying !"
So, I'll try again now, with the assurance that this is the final hoop.
next prev parent reply other threads:[~2009-11-23 11:16 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-20 14:04 [net-next-2.6 PATCH v7 0/7 RFC] TCPCT part 1: cookie option exchange William Allen Simpson
2009-11-20 14:12 ` [net-next-2.6 PATCH v7 1/7 RFC] TCPCT part 1a: add request_values parameter for sending SYNACK William Allen Simpson
2009-11-20 17:20 ` David Miller
2009-11-20 14:23 ` [net-next-2.6 PATCH v7 2/7 RFC] TCPCT part 1b: generate Responder Cookie secret William Allen Simpson
2009-11-20 17:22 ` David Miller
2009-11-20 20:47 ` Andi Kleen
2009-11-20 20:51 ` David Miller
2009-11-21 16:09 ` William Allen Simpson
2009-11-20 14:33 ` [net-next-2.6 PATCH v7 3/7 RFC] TCPCT part 1c: sysctl_tcp_cookie_size, socket option TCP_COOKIE_TRANSACTIONS William Allen Simpson
2009-11-20 17:24 ` David Miller
2009-11-21 16:51 ` William Allen Simpson
2009-11-21 19:18 ` David Miller
2009-11-21 19:22 ` David Miller
2009-11-22 4:40 ` William Allen Simpson
2009-11-20 14:38 ` [net-next-2.6 PATCH v7 4/7 RFC] TCPCT part 1d: define TCP cookie option, extend existing struct's William Allen Simpson
2009-11-20 17:25 ` David Miller
2009-11-22 4:53 ` William Allen Simpson
2009-11-20 14:48 ` [net-next-2.6 PATCH v7 5/7 RFC] TCPCT part 1e: implement socket option TCP_COOKIE_TRANSACTIONS William Allen Simpson
2009-11-20 17:26 ` David Miller
2009-11-20 20:54 ` Joe Perches
2009-11-22 6:25 ` William Allen Simpson
2009-11-22 7:10 ` Joe Perches
2009-11-23 11:16 ` William Allen Simpson [this message]
2009-11-23 17:25 ` Joe Perches
2009-11-23 17:49 ` David Miller
2009-11-23 0:31 ` David Miller
2009-11-23 18:28 ` [net-next-2.6 PATCH] net/ipv4: Move && and || to end of previous line Joe Perches
2009-11-23 18:31 ` David Miller
2009-11-23 18:38 ` Joe Perches
2009-11-23 18:41 ` David Miller
2009-11-29 21:00 ` [PATCH net-next-2.6 PATCH] net: " Joe Perches
2009-11-30 0:55 ` David Miller
2009-11-30 17:28 ` Stephen Hemminger
2009-11-30 17:57 ` Joe Perches
2009-11-30 21:00 ` David Miller
2009-12-03 17:58 ` [PATCH net-next-2.6] drivers/net: " Joe Perches
2009-12-03 20:40 ` David Miller
2009-12-04 13:10 ` Brice Goglin
2009-12-04 17:21 ` Joe Perches
2009-12-05 12:43 ` William Allen Simpson
2009-12-05 17:50 ` Joe Perches
2009-12-05 22:05 ` Jarek Poplawski
2009-12-06 3:36 ` William Allen Simpson
2009-12-05 22:21 ` David Miller
2009-12-06 3:00 ` William Allen Simpson
2009-12-06 17:01 ` Jonathan Corbet
2009-12-04 22:42 ` David Miller
2009-11-23 22:08 ` [net-next-2.6 PATCH] net/ipv4: " Ilpo Järvinen
2009-11-23 22:14 ` Joe Perches
2009-11-23 22:32 ` Ilpo Järvinen
2009-11-23 18:58 ` [net-next-2.6 PATCH] net/ipv6: " Joe Perches
2009-11-24 22:53 ` David Miller
2009-11-23 19:49 ` [net-next-2.6 PATCH] net/ipv[46]/netfilter: " Joe Perches
2009-11-23 22:20 ` Patrick McHardy
2009-11-20 14:55 ` [net-next-2.6 PATCH v7 6/7 RFC] TCPCT part 1f: Initiator Cookie => Responder William Allen Simpson
2009-11-20 17:29 ` David Miller
2009-11-20 15:06 ` [net-next-2.6 PATCH v7 7/7 RFC] TCPCT part 1g: Responder Cookie => Initiator William Allen Simpson
2009-11-20 17:31 ` 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=4B0A6EF3.8040302@gmail.com \
--to=william.allen.simpson@gmail.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.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).