diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-06-13 22:27:21 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-13 22:35:03 +0200 |
commit | a29342e739115211615acc33616e547b2d3e0663 (patch) | |
tree | 6502be7ffce35898757e7b7cfac6c4fd87852a0f /net/dsa/legacy.c | |
parent | net: dsa: Relocate master ethtool operations (diff) | |
download | linux-a29342e739115211615acc33616e547b2d3e0663.tar.xz linux-a29342e739115211615acc33616e547b2d3e0663.zip |
net: dsa: Associate slave network device with CPU port
In preparation for supporting multiple CPU ports with DSA, have the
dsa_port structure know which CPU it is associated with. This will be
important in order to make sure the correct CPU is used for transmission
of the frames. If not for functional reasons, for performance (e.g: load
balancing) and forwarding decisions.
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/legacy.c')
-rw-r--r-- | net/dsa/legacy.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c index 5d4f6ffa3424..e60906125375 100644 --- a/net/dsa/legacy.c +++ b/net/dsa/legacy.c @@ -129,6 +129,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, struct device *parent) ds->dsa_port_mask |= 1 << i; } else { ds->enabled_port_mask |= 1 << i; + ds->ports[i].cpu_dp = dst->cpu_dp; } valid_name_found = true; } |