net: dsa: Implement flow_dissect callback for tag_qca
Subsystems (5)
PATCH 1/1 net: dsa: Implement flow_dissect callback for tag_qca
Add flow_dissect for qca tagged packet to get the right hash.
--- net/dsa/tag_qca.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
net/dsa/tag_qca.c +10 -0
@@ -113,8 +113,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 , };
Signature · 1 line
1.9.1
Quoted 3 lines · xiaofeis
Add
flow_dissectfor qca tagged packet to get the right hash.Signed-off-by Xiaofei Shen <[email protected]>
Andrew
Quoted 1 line · xiaofeis
Add
flow_dissectfor qca tagged packet to get the right hash.
Ideally this patch should have been tagged as V2. Anyhow the change looks fine so:
Quoted 30 lines
Signed-off-by Xiaofei Shen <[email protected]>--- net/dsa/tag_qca.c | 10 ++++++++++ 1 file changed, 10 insertions(+)net/dsa/tag_qca.c +10
-0@@ -113,8 +113,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 , };Signature · 1 line
1.9.1
Signature · 1 line
~Vinod
Quoted 32 lines · Vinod Koul
Quoted 1 line · xiaofeis
Add
flow_dissectfor qca tagged packet to get the right hash.Ideally this patch should have been tagged as V2. Anyhow the change looks fine so:
Reviewed-by Vinod Koul <[email protected]>Quoted 24 lines
Signed-off-by Xiaofei Shen <[email protected]>--- net/dsa/tag_qca.c | 10 ++++++++++ 1 file changed, 10 insertions(+)net/dsa/tag_qca.c +9
-0@@ -113,8 +113,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 ; +} +
Quoted 8 lines
Quoted 8 lines
net/dsa/tag_qca.c +1
-0const 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,
};
--
1.9.1
Thanks Vinod, will take care next time.
Quoted 3 lines · xiaofeis
Add
flow_dissectfor qca tagged packet to get the right hash.Signed-off-by Xiaofei Shen <[email protected]>
Signature · 1 line
Florian
From: xiaofeis <[email protected]>
Date: Wed, 27 Mar 2019 11:59:06 +0800
Quoted 3 lines
Add
flow_dissectfor qca tagged packet to get the right hash.Signed-off-by Xiaofei Shen <[email protected]>
Applied.