From: Joe Perches <joe@perches.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
Changli Gao <xiaosuo@gmail.com>, Joel Sing <jsing@google.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH] ipv4/route.c: respect prefsrc for local routes
Date: Tue, 04 Jan 2011 07:32:09 -0800 [thread overview]
Message-ID: <1294155129.6617.37.camel@Joe-Laptop> (raw)
In-Reply-To: <1294150591.3435.0.camel@bwh-desktop>
On Tue, 2011-01-04 at 14:16 +0000, Ben Hutchings wrote:
> On Tue, 2011-01-04 at 09:38 +0100, Eric Dumazet wrote:
> > Le mardi 04 janvier 2011 à 16:07 +0800, Changli Gao a écrit :
> > > On Tue, Jan 4, 2011 at 3:33 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > > > Le mardi 04 janvier 2011 à 08:24 +0100, Eric Dumazet a écrit :
> > > >> Please use FIB_RES_PREFSRC(res)
> > > > Hmm no, this is not applicable, but this could be shorter :
> > > > fl.fl4_src = res.fi->fib_prefsrc ? : fl.fl4_dst;
> > > I think Joe may object the use of "? :"
> > Ternary operator is standard C idiom, used in networking stuff, for
> > example in FIB_RES_PREFSRC() ;)
> However, the option to omit the second operand is a GNU extension.
I don't object to using GNU extensions.
The ?: extension is used in most every major subsystem.
$ grep -rP --include=*.[ch] "\?\s*:" * | wc -l
515
(with some false positives)
next prev parent reply other threads:[~2011-01-04 15:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-04 6:24 [PATCH] ipv4/route.c: respect prefsrc for local routes Joel Sing
2011-01-04 7:24 ` Eric Dumazet
2011-01-04 7:33 ` Eric Dumazet
2011-01-04 8:07 ` Changli Gao
2011-01-04 8:38 ` Eric Dumazet
2011-01-04 8:40 ` Eric Dumazet
2011-01-04 14:16 ` Ben Hutchings
2011-01-04 15:32 ` Joe Perches [this message]
2011-01-04 19:35 ` 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=1294155129.6617.37.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=bhutchings@solarflare.com \
--cc=eric.dumazet@gmail.com \
--cc=jsing@google.com \
--cc=netdev@vger.kernel.org \
--cc=xiaosuo@gmail.com \
/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