diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-06-01 16:07:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-01 17:34:56 -0400 |
commit | 73a7ece8f70c955464080e434b5324bcdfdcb1b1 (patch) | |
tree | 7fe736c325597b74745ebe2cf828c9e209ebf70d /include/net/dsa.h | |
parent | 0266f79778de0afadd070941aae493c28529d974 (diff) | |
download | talos-op-linux-73a7ece8f70c955464080e434b5324bcdfdcb1b1.tar.gz talos-op-linux-73a7ece8f70c955464080e434b5324bcdfdcb1b1.zip |
net: dsa: comment hot path requirements
The DSA layer uses inline helpers and copy of the tagging functions for
faster access in hot path. Add comments to detail that.
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r-- | include/net/dsa.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 7de1234ba136..18ca0a935c96 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -127,6 +127,8 @@ struct dsa_switch_tree { * protocol to use. */ struct net_device *master_netdev; + + /* Copy of tag_ops->rcv for faster access in hot path */ struct sk_buff * (*rcv)(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, @@ -465,6 +467,7 @@ struct mii_bus *dsa_host_dev_to_mii_bus(struct device *dev); struct net_device *dsa_dev_to_net_device(struct device *dev); +/* Keep inline for faster access in hot path */ static inline bool dsa_uses_tagged_protocol(struct dsa_switch_tree *dst) { return dst->rcv != NULL; |