Skip to content

Commit 6e57d72

Browse files
xiaofeisdavem330
authored andcommitted
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>
1 parent 5ac4b47 commit 6e57d72

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

net/dsa/tag_qca.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,18 @@ static struct sk_buff *qca_tag_rcv(struct sk_buff *skb, struct net_device *dev,
9898
return skb;
9999
}
100100

101+
static int qca_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto,
102+
int *offset)
103+
{
104+
*offset = QCA_HDR_LEN;
105+
*proto = ((__be16 *)skb->data)[0];
106+
107+
return 0;
108+
}
109+
101110
const struct dsa_device_ops qca_netdev_ops = {
102111
.xmit = qca_tag_xmit,
103112
.rcv = qca_tag_rcv,
113+
.flow_dissect = qca_tag_flow_dissect,
104114
.overhead = QCA_HDR_LEN,
105115
};

0 commit comments

Comments
 (0)