summaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorxiaofeis <xiaofeis@codeaurora.org>2019-03-27 11:59:06 +0800
committerDavid S. Miller <davem@davemloft.net>2019-03-28 16:57:19 -0700
commit6e57d72a84db9f2e565992f76b6a6bc907f13b77 (patch)
tree3d016e8c26749a3ce199b5642dd930075efd4e32 /net/dsa
parent5ac4b47d1a887ef978967b381e9b403084f0b6d3 (diff)
downloadlinux-6e57d72a84db9f2e565992f76b6a6bc907f13b77.tar.bz2
net: dsa: Implement flow_dissect callback for tag_qca
Add flow_dissect for qca tagged packet to get the right hash. Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/tag_qca.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index ed4f6dc26365..85c22ada4744 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -98,8 +98,18 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev,
return skb;
}
+static int qca_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto,
+ int *offset)
+{
+ *offset = QCA_HDR_LEN;
+ *proto = ((__be16 *)skb->data)[0];
+
+ return 0;
+}
+
const struct dsa_device_ops qca_netdev_ops = {
.xmit = qca_tag_xmit,
.rcv = qca_tag_rcv,
+ .flow_dissect = qca_tag_flow_dissect,
.overhead = QCA_HDR_LEN,
};