Commit 08bfc9cb authored by Erik Hugne's avatar Erik Hugne Committed by David S. Miller

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: default avatarYing Xue <ying.xue@windriver.com>
Signed-off-by: default avatarErik Hugne <erik.hugne@ericsson.com>
Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3fa9cacd
...@@ -178,6 +178,20 @@ bool __skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow, ...@@ -178,6 +178,20 @@ bool __skb_flow_dissect(const struct sk_buff *skb, struct flow_keys *flow,
return false; return false;
} }
} }
case htons(ETH_P_TIPC): {
struct {
__be32 pre[3];
__be32 srcnode;
} *hdr, _hdr;
hdr = __skb_header_pointer(skb, nhoff, sizeof(_hdr), data, hlen, &_hdr);
if (!hdr)
return false;
flow->src = hdr->srcnode;
flow->dst = 0;
flow->n_proto = proto;
flow->thoff = (u16)nhoff;
return true;
}
case htons(ETH_P_FCOE): case htons(ETH_P_FCOE):
flow->thoff = (u16)(nhoff + FCOE_HEADER_LEN); flow->thoff = (u16)(nhoff + FCOE_HEADER_LEN);
/* fall through */ /* fall through */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment