1f068588ef
Signed-off-by: Muciri Gatimu <muciri@openmesh.com> Signed-off-by: Shashidhar Lakkavalli <shashidhar.lakkavalli@openmesh.com> Signed-off-by: John Crispin <john@phrozen.org>
32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
From 22e8b65ea4bf8a1fa757137bdcbdefe505fa4044 Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Mon, 7 Aug 2017 16:35:43 +0200
|
|
Subject: [PATCH 39/57] net-next: dsa: add flow_dissect callback to struct
|
|
dsa_device_ops
|
|
|
|
When the flow dissector first sees packets coming in on a DSA devices the
|
|
802.3 header wont be located where the code expects it to be as the tag
|
|
is still present. Adding this new callback allows a DSA device to provide a
|
|
new function that the flow_disscetor can use to get the correct offsets
|
|
for the protocol field and network header offset.
|
|
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
---
|
|
include/net/dsa.h | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
--- a/include/net/dsa.h
|
|
+++ b/include/net/dsa.h
|
|
@@ -90,9 +90,11 @@ struct packet_type;
|
|
|
|
struct dsa_device_ops {
|
|
struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
|
|
- int sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
|
|
+ int (*rcv)(struct sk_buff *skb, struct net_device *dev,
|
|
struct packet_type *pt,
|
|
struct net_device *orig_dev);
|
|
+ int (*flow_dissect)(const struct sk_buff *skb, __be16 *proto,
|
|
+ int *offset);
|
|
};
|
|
|
|
struct dsa_switch_tree {
|