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>
This commit is contained in:

committed by
David S. Miller

parent
152402483e
commit
3e41f93b35
@@ -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;
|
||||
|
Reference in New Issue
Block a user