[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191230143028.27313-9-alobakin@dlink.ru>
Date: Mon, 30 Dec 2019 17:30:16 +0300
From: Alexander Lobakin <alobakin@...nk.ru>
To: "David S. Miller" <davem@...emloft.net>
Cc: Edward Cree <ecree@...arflare.com>, Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Hauke Mehrtens <hauke@...ke-m.de>,
Sean Wang <sean.wang@...iatek.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Jiri Pirko <jiri@...lanox.com>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Alexander Lobakin <alobakin@...nk.ru>,
Taehee Yoo <ap420073@...il.com>,
Stephen Hemminger <stephen@...workplumber.org>,
Stanislav Fomichev <sdf@...gle.com>,
Daniel Borkmann <daniel@...earbox.net>,
Song Liu <songliubraving@...com>,
Matteo Croce <mcroce@...hat.com>,
Jakub Sitnicki <jakub@...udflare.com>,
Paul Blakey <paulb@...lanox.com>,
Yoshiki Komachi <komachi.yoshiki@...il.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: [PATCH RFC net-next 08/19] net: dsa: tag_gswip: add .flow_dissect() callback
In case user would like to configure RPS on such systems.
Misc: fix identation of gswip_netdev_ops structure.
Signed-off-by: Alexander Lobakin <alobakin@...nk.ru>
---
net/dsa/tag_gswip.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/net/dsa/tag_gswip.c b/net/dsa/tag_gswip.c
index de920f6aac5b..d37289540ef3 100644
--- a/net/dsa/tag_gswip.c
+++ b/net/dsa/tag_gswip.c
@@ -97,12 +97,20 @@ static struct sk_buff *gswip_tag_rcv(struct sk_buff *skb,
return skb;
}
+static void gswip_tag_flow_dissect(const struct sk_buff *skb, __be16 *proto,
+ int *offset)
+{
+ *offset = GSWIP_RX_HEADER_LEN;
+ *proto = *(__be16 *)(skb->data + 6);
+}
+
static const struct dsa_device_ops gswip_netdev_ops = {
- .name = "gswip",
- .proto = DSA_TAG_PROTO_GSWIP,
- .xmit = gswip_tag_xmit,
- .rcv = gswip_tag_rcv,
- .overhead = GSWIP_RX_HEADER_LEN,
+ .name = "gswip",
+ .proto = DSA_TAG_PROTO_GSWIP,
+ .xmit = gswip_tag_xmit,
+ .rcv = gswip_tag_rcv,
+ .flow_dissect = gswip_tag_flow_dissect,
+ .overhead = GSWIP_RX_HEADER_LEN,
};
MODULE_LICENSE("GPL");
--
2.24.1
Powered by blists - more mailing lists