[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091002.110049.252043637.davem@davemloft.net>
Date: Fri, 02 Oct 2009 11:00:49 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: zenczykowski@...il.com
Cc: eric.dumazet@...il.com, atis@...rotik.com, panther@...abit.hu,
netdev@...r.kernel.org
Subject: Re: [PATCH] Use sk_mark for routing lookup in more places
From: Maciej Żenczykowski <zenczykowski@...il.com>
Date: Fri, 2 Oct 2009 10:25:13 -0700
> Maybe it would make more sense to create some constructor-like
> functions for the flowi struct?
Maybe just an initializer like "FLOWI_SOCK(sk)" or similar.
So you can say:
struct flowi fl = FLOWI_SOCK(sk);
But the thing is we usually want to initialize all of the
details in one go, so we'd need a very messy macro for this
that would take many arguments.
It's important to use an initializer rather than assignments in some
inline function so that GCC can better coalesce many small members
into since large stores to the stack. It doesn't do this as well with
real assignment statements.
Powered by blists - more mailing lists