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


Groups > linux.kernel > #1693491

[PATCH V2 2/4] net-next: dsa: add 802.3 protocol offset to struct dsa_device_ops

From John Crispin <john@phrozen.org>
Newsgroups linux.kernel
Subject [PATCH V2 2/4] net-next: dsa: add 802.3 protocol offset to struct dsa_device_ops
Date 2017-07-21 11:00 +0200
Message-ID <u5BWW-2C2-33@gated-at.bofh.it> (permalink)
References <u5BWW-2C2-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Adding these 2 new fields allows a DSA device to indicate the offsets of
the 802.3 header caused by the insertion of the switches tag.

Signed-off-by: John Crispin <john@phrozen.org>
---
 include/net/dsa.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/net/dsa.h b/include/net/dsa.h
index a4c0d52abc80..b98bc3621905 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -106,6 +106,11 @@ struct dsa_device_ops {
 	struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
 			       struct packet_type *pt,
 			       struct net_device *orig_dev);
+	/*
+	 * Network header and 802.3 protocol offsets
+	 */
+	int hash_nh_off;
+	int hash_proto_off;
 };
 
 struct dsa_switch_tree {
-- 
2.11.0

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH V2 2/4] net-next: dsa: add 802.3 protocol offset to struct dsa_device_ops John Crispin <john@phrozen.org> - 2017-07-21 11:00 +0200

csiph-web