summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-08-09 22:51:47 -0700
committerDavid S. Miller <davem@davemloft.net>2017-08-09 22:53:40 -0700
commit7e1ecbcf79b2fdc7349da1bb90d6dadad1f9ac89 (patch)
tree1ad4d07ef9a12ae6fcccde731365c127e6b23ba3 /include
parent098b8d7e50736f959e8b76aea09105a86a71a58b (diff)
parent43e665287f931a167cd2eea3387efda901bff0ce (diff)
Merge branch 'dsa-flow-dissection'
John Crispin says: ==================== net-next: dsa: fix flow dissection RPS and probably other kernel features are currently broken on some if not all DSA devices. The root cause of this is that skb_hash will call the flow_dissector. At this point the skb still contains the magic switch header and the skb->protocol field is not set up to the correct 802.3 value yet. By the time the tag specific code is called, removing the header and properly setting the protocol an invalid hash is already set. In the case of the mt7530 this will result in all flows always having the same hash. Changes since RFC: * use a callback instead of static values * add cover letter ==================== Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/dsa.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index a4f66dbb4b7c..7f46b521313e 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -101,6 +101,15 @@ struct dsa_platform_data {
struct packet_type;
+struct dsa_device_ops {
+ struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
+ 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 {
struct list_head list;