lkml.org 
[lkml]   [2019]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH RFC net-next 11/19] net: dsa: tag_lan9303: add .flow_dissect() callback
Date
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(-)

diff --git a/net/dsa/tag_lan9303.c b/net/dsa/tag_lan9303.c
index eb0e7a32e53d..d328a44381a9 100644
--- a/net/dsa/tag_lan9303.c
+++ b/net/dsa/tag_lan9303.c
@@ -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");
--
2.24.1
\
 
 \ /
  Last update: 2019-12-30 15:32    [W:1.125 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site