summaryrefslogtreecommitdiffstats
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorVivien Didelot2017-09-29 23:19:18 +0200
committerDavid S. Miller2017-10-01 05:15:07 +0200
commit152402483ed75b167d5628d414e876ffa7a6d4c4 (patch)
tree19cbdba3c8720900a35bddf92da7d75052a9fff4 /include/net/dsa.h
parentnet: dsa: use temporary dsa_device_ops variable (diff)
downloadkernel-qcow2-linux-152402483ed75b167d5628d414e876ffa7a6d4c4.tar.gz
kernel-qcow2-linux-152402483ed75b167d5628d414e876ffa7a6d4c4.tar.xz
kernel-qcow2-linux-152402483ed75b167d5628d414e876ffa7a6d4c4.zip
net: dsa: add tagging ops to port
The DSA tagging protocol operations are specific to each CPU port, thus the dsa_device_ops pointer belongs to the dsa_port structure. >From now on assign a slave's xmit copy from its CPU port tagging operations. This will ease the future support for multiple CPU ports. Also keep the tag_ops at the beginning of the dsa_port structure so that we ensure copies for hot path are 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/net/dsa.h')
-rw-r--r--include/net/dsa.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 8dee216a5a9b..4d1df2f086e8 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -175,6 +175,9 @@ struct dsa_mall_tc_entry {
struct dsa_port {
+ /* CPU port tagging operations used by master or slave devices */
+ const struct dsa_device_ops *tag_ops;
+
struct dsa_switch *ds;
unsigned int index;
const char *name;