• Vladimir Oltean's avatar
    net: dsa: allow the DSA master to be seen and changed through rtnetlink · 95f510d0
    Vladimir Oltean authored
    Some DSA switches have multiple CPU ports, which can be used to improve
    CPU termination throughput, but DSA, through dsa_tree_setup_cpu_ports(),
    sets up only the first one, leading to suboptimal use of hardware.
    
    The desire is to not change the default configuration but to permit the
    user to create a dynamic mapping between individual user ports and the
    CPU port that they are served by, configurable through rtnetlink. It is
    also intended to permit load balancing between CPU ports, and in that
    case, the foreseen model is for the DSA master to be a bonding interface
    whose lowers are the physical DSA masters.
    
    To that end, we create a struct rtnl_link_ops for DSA user ports with
    the "dsa" kind. We expose the IFLA_DSA_MASTER link attribute that
    contains the ifindex of the newly desired DSA master.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    95f510d0
dsa.c 13 KB