@@ -128,12 +128,20 @@ static struct sk_buff *lan9303_rcv(struct sk_buff *skb, struct net_device *dev,
return skb;
}
+static void lan9303_flow_dissect(const struct sk_buff *skb, __be16 *proto,
+ int *offset)
+{
+ *offset = LAN9303_TAG_LEN;
+ *proto = *(__be16 *)(skb->data + 2);
+}
+
static const struct dsa_device_ops lan9303_netdev_ops = {
- .name = "lan9303",
- .proto = DSA_TAG_PROTO_LAN9303,
- .xmit = lan9303_xmit,
- .rcv = lan9303_rcv,
- .overhead = LAN9303_TAG_LEN,
+ .name = "lan9303",
+ .proto = DSA_TAG_PROTO_LAN9303,
+ .xmit = lan9303_xmit,
+ .rcv = lan9303_rcv,
+ .flow_dissect = lan9303_flow_dissect,
+ .overhead = LAN9303_TAG_LEN,
};
MODULE_LICENSE("GPL");
This fixes Rx packet hashing on RPS-enabled systems. Misc: fix lan9303_netdev_ops identation. Signed-off-by: Alexander Lobakin <alobakin@dlink.ru> --- net/dsa/tag_lan9303.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)