Commit 6e57d72a authored by xiaofeis's avatar xiaofeis Committed by David S. Miller

net: dsa: Implement flow_dissect callback for tag_qca

Add flow_dissect for qca tagged packet to get the right hash.
Signed-off-by: default avatarXiaofei Shen <xiaofeis@codeaurora.org>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarVinod Koul <vkoul@kernel.org>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5ac4b47d
......@@ -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,
};
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