aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorErik Hugne <erik.hugne@ericsson.com>2015-01-22 11:10:32 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-26 19:58:09 -0500
commit08bfc9cb76e26d2489c401fb1d2de58d06fd1ded (patch)
treea8de79af22702cfac387c99f3190b31b6534310e /net/core
parent3fa9cacd697eb26d99c59a8479d8a1b3d6311182 (diff)
flow_dissector: add tipc support
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@windriver.com> Signed-off-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/flow_dissector.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 45084938c403..beb83d1ac1c6 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -178,6 +178,20 @@ ipv6:
178 return false; 178 return false;
179 } 179 }
180 } 180 }
181 case htons(ETH_P_TIPC): {
182 struct {
183 __be32 pre[3];
184 __be32 srcnode;
185 } *hdr, _hdr;
186 hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr);
187 if (!hdr)
188 return false;
189 flow->src = hdr->srcnode;
190 flow->dst = 0;
191 flow->n_proto = proto;
192 flow->thoff = (u16)nhoff;
193 return true;
194 }
181 case htons(ETH_P_FCOE): 195 case htons(ETH_P_FCOE):
182 flow->thoff = (u16)(nhoff + FCOE_HEADER_LEN); 196 flow->thoff = (u16)(nhoff + FCOE_HEADER_LEN);
183 /* fall through */ 197 /* fall through */