Skip to content

Commit 598a968

Browse files
blogicdavem330
authored andcommitted
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_dissector can use to get the correct protocol and offset of the network header. 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> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 68277a2 commit 598a968

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎include/net/dsa.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ struct dsa_device_ops {
106106
struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
107107
struct packet_type *pt,
108108
struct net_device *orig_dev);
109+
int (*flow_dissect)(const struct sk_buff *skb, __be16 *proto,
110+
int *offset);
109111
};
110112

111113
struct dsa_switch_tree {

0 commit comments

Comments
 (0)