diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-09-29 17:19:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-01 04:15:07 +0100 |
commit | 3e41f93b358a8800194b87995ad076fc50919719 (patch) | |
tree | e52fda006ba52faba0bed468dbc275799b1d30cb /include | |
parent | 152402483ed75b167d5628d414e876ffa7a6d4c4 (diff) | |
download | linux-stable-3e41f93b358a8800194b87995ad076fc50919719.tar.gz linux-stable-3e41f93b358a8800194b87995ad076fc50919719.tar.bz2 linux-stable-3e41f93b358a8800194b87995ad076fc50919719.zip |
net: dsa: prepare master receive hot path
In preparation to make DSA master devices point to their corresponding
CPU port instead of the whole tree, add copies of dst and rcv in the
dsa_port structure so that we keep fast access in the receive hot path.
Also keep the copies at the beginning of the dsa_port structure in order
to ensure they are available in cacheline 1.
Signed-off-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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 4d1df2f086e8..6bda01fa5747 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -178,6 +178,11 @@ struct dsa_port { /* CPU port tagging operations used by master or slave devices */ const struct dsa_device_ops *tag_ops; + /* Copies for faster access in master receive hot path */ + struct dsa_switch_tree *dst; + struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev, + struct packet_type *pt); + struct dsa_switch *ds; unsigned int index; const char *name; |