Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1693494 > unrolled thread

[PATCH V2 4/4] net-next: tag_mtk: add nh and proto offsets to the ops struct

Started byJohn Crispin <john@phrozen.org>
First post2017-07-21 11:00 +0200
Last post2017-07-21 11:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH V2 4/4] net-next: tag_mtk: add nh and proto offsets to the ops struct John Crispin <john@phrozen.org> - 2017-07-21 11:00 +0200

#1693494 — [PATCH V2 4/4] net-next: tag_mtk: add nh and proto offsets to the ops struct

FromJohn Crispin <john@phrozen.org>
Date2017-07-21 11:00 +0200
Subject[PATCH V2 4/4] net-next: tag_mtk: add nh and proto offsets to the ops struct
Message-ID<u5BWW-2C2-37@gated-at.bofh.it>
The MT7530 inserts the 4 magic header in between the 802.3 address and
protocol field. The patch defines these header such that the flow_disector
can properly parse the packet and thus allows hashing to function properly.

Signed-off-by: John Crispin <john@phrozen.org>
---
 net/dsa/tag_mtk.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/dsa/tag_mtk.c b/net/dsa/tag_mtk.c
index 2f32b7ea3365..142322988202 100644
--- a/net/dsa/tag_mtk.c
+++ b/net/dsa/tag_mtk.c
@@ -88,6 +88,8 @@ static struct sk_buff *mtk_tag_rcv(struct sk_buff *skb, struct net_device *dev,
 }
 
 const struct dsa_device_ops mtk_netdev_ops = {
-	.xmit	= mtk_tag_xmit,
-	.rcv	= mtk_tag_rcv,
+	.xmit		= mtk_tag_xmit,
+	.rcv		= mtk_tag_rcv,
+	.hash_nh_off	= 4,
+	.hash_proto_off	= 2,
 };
-- 
2.11.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web