From: John Crispin Date: Wed, 9 Aug 2017 12:41:17 +0000 (+0200) Subject: net-next: dsa: add flow_dissect callback to struct dsa_device_ops X-Git-Tag: v4.14~429^2~298^2~2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=598a968011ffc4d624934995fe46d06bd450cdf4;p=mirror_ubuntu-bionic-kernel.git 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 Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- diff --git a/include/net/dsa.h b/include/net/dsa.h index 65d7804c6f69..7f46b521313e 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -106,6 +106,8 @@ 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); + int (*flow_dissect)(const struct sk_buff *skb, __be16 *proto, + int *offset); }; struct dsa_switch_tree {