netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: dsa: Implement flow_dissect callback for tag_qca
@ 2019-03-27  3:59 xiaofeis
  2019-03-27  8:57 ` Andrew Lunn
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: xiaofeis @ 2019-03-27  3:59 UTC (permalink / raw)
  To: davem
  Cc: vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha, xiaofeis

Add flow_dissect for qca tagged packet to get the right hash.

Signed-off-by: Xiaofei Shen <xiaofeis@codeaurora.org>
---
 net/dsa/tag_qca.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index e886a3c..f4b4de3 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -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,
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] net: dsa: Implement flow_dissect callback for tag_qca
@ 2019-03-27  1:32 xiaofeis
  2019-03-27  3:50 ` Bjorn Andersson
  0 siblings, 1 reply; 8+ messages in thread
From: xiaofeis @ 2019-03-27  1:32 UTC (permalink / raw)
  To: davem
  Cc: vkoul, netdev, andrew, linux-arm-msm, bjorn.andersson,
	vivien.didelot, f.fainelli, niklas.cassel, xiazha, xiaofeis

Add flow_dissect for qca tagged packet to get the right hash.

Signed-off-by: xiaofeis <xiaofeis@codeaurora.org>
---
 net/dsa/tag_qca.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/net/dsa/tag_qca.c b/net/dsa/tag_qca.c
index e886a3c..f4b4de3 100644
--- a/net/dsa/tag_qca.c
+++ b/net/dsa/tag_qca.c
@@ -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,
 };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-03-28 23:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-27  3:59 [PATCH] net: dsa: Implement flow_dissect callback for tag_qca xiaofeis
2019-03-27  8:57 ` Andrew Lunn
2019-03-27 10:15 ` Vinod Koul
2019-03-28  4:37   ` xiaofeis
2019-03-27 16:27 ` Florian Fainelli
2019-03-28 23:57 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2019-03-27  1:32 xiaofeis
2019-03-27  3:50 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).