[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <A2BAEFC30C8FD34388F02C9B3121859D1C365C57@eusaamb103.ericsson.se>
Date: Thu, 22 Jan 2015 18:38:23 +0000
From: Jon Maloy <jon.maloy@...csson.com>
To: Eric Dumazet <eric.dumazet@...il.com>,
Erik Hugne <erik.hugne@...csson.com>
CC: Richard Alpe <richard.alpe@...csson.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"ying.xue@...driver.com" <ying.xue@...driver.com>,
"tipc-discussion@...ts.sourceforge.net"
<tipc-discussion@...ts.sourceforge.net>
Subject: RE: [PATCH net-next 2/2] flow_dissector: add tipc support
> -----Original Message-----
> From: Eric Dumazet [mailto:eric.dumazet@...il.com]
> Sent: January-22-15 12:29 PM
> To: Erik Hugne
> Cc: Richard Alpe; netdev@...r.kernel.org; Jon Maloy;
> ying.xue@...driver.com; tipc-discussion@...ts.sourceforge.net
> Subject: Re: [PATCH net-next 2/2] flow_dissector: add tipc support
>
> On Thu, 2015-01-22 at 17:10 +0100, erik.hugne@...csson.com wrote:
> > From: Erik Hugne <erik.hugne@...csson.com>
> >
> > The flows are hashed on the sending node address, which allows us to
> > spread out the TIPC link processing to RPS enabled cores. There is no
> > point to include the destination address in the hash as that will
> > always be the same for all inbound links. We have experimented with a
> > 3-tuple hash over [srcnode, sport, dport], but this showed to give
> > slightly lower performance because of increased lock contention when
> > the same link was handled by multiple cores.
> >
> > Signed-off-by: Ying Xue <ying.xue@...driver.com>
> > Signed-off-by: Erik Hugne <erik.hugne@...csson.com>
> > Reviewed-by: Jon Maloy <jon.maloy@...csson.com>
> > ---
> > net/core/flow_dissector.c | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
> > index 4508493..beb83d1 100644
> > --- a/net/core/flow_dissector.c
> > +++ b/net/core/flow_dissector.c
> > @@ -178,6 +178,20 @@ ipv6:
> > return false;
> > }
> > }
> > + case htons(ETH_P_TIPC): {
> > + struct {
> > + __be32 pre[3];
> > + __be32 srcnode;
> > + } *hdr, _hdr;
>
> Is this header defined somewhere in an include file ?
>
> This looks a bit ugly to locally define the format...
The header is defined in a file (msg.h) inside the TIPC
module code, and cannot be included from here. It is
also a lot more detailed, and comes with a number of
inline functions to manipulate the header. The point
with doing it this way is that we don't want to expose
this header file outside the module code, when it isn't
strictly necessary.
Defining it locally is also a way of making it clear that the
content of word 3 of the header is the only thing that
matters in this context, and that we want to keep the
rest private.
Regards
///jon
>
>
Powered by blists - more mailing lists