netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Crispin <john@phrozen.org>
To: Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Sean Wang <sean.wang@mediatek.com>
Cc: netdev@vger.kernel.org, John Crispin <john@phrozen.org>
Subject: [RFC 2/2] net-next: mt7530: add nh and proto offsets to the ops struct
Date: Tue, 20 Jun 2017 10:06:55 +0200	[thread overview]
Message-ID: <20170620080655.7251-2-john@phrozen.org> (raw)
In-Reply-To: <20170620080655.7251-1-john@phrozen.org>

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>
---
 drivers/net/dsa/mt7530.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 1e46418a3b74..b5385e554601 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1019,6 +1019,8 @@ static struct dsa_switch_ops mt7530_switch_ops = {
 	.port_fdb_add		= mt7530_port_fdb_add,
 	.port_fdb_del		= mt7530_port_fdb_del,
 	.port_fdb_dump		= mt7530_port_fdb_dump,
+	.hash_nh_off		= 4,
+	.hash_nh_proto		= 2,
 };
 
 static int
-- 
2.11.0

  reply	other threads:[~2017-06-20  8:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20  8:06 [RFC 1/2] net-next: fix DSA flow_disection John Crispin
2017-06-20  8:06 ` John Crispin [this message]
2017-06-20 13:54   ` [RFC 2/2] net-next: mt7530: add nh and proto offsets to the ops struct Andrew Lunn
2017-06-20 17:27     ` John Crispin
2017-06-20 18:02       ` Andrew Lunn
2017-06-20 10:17 ` [RFC 1/2] net-next: fix DSA flow_disection Sergei Shtylyov
2017-06-20 14:01 ` Andrew Lunn
2017-06-20 17:30   ` Florian Fainelli
2017-06-20 17:38     ` John Crispin
2017-06-20 17:37   ` John Crispin
2017-06-20 21:52     ` Andrew Lunn
2017-06-21  4:33       ` John Crispin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170620080655.7251-2-john@phrozen.org \
    --to=john@phrozen.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).