• V
    net: dsa: return per-port upstream port · 07073c79
    Vivien Didelot 提交于
    The current dsa_upstream_port() helper still assumes a unique CPU port
    in the whole switch fabric. This is becoming wrong, as every port in the
    fabric has its dedicated CPU port, thus every port has an upstream port.
    
    Add a port argument to the dsa_upstream_port() helper and fetch its CPU
    port instead of the deprecated unique fabric CPU port. A CPU or unused
    port has no dedicated CPU port, so return itself in this case.
    
    At the same time, change the return value from u8 to unsigned int since
    there is no need to limit the size here.
    Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    07073c79
dsa.h 13.9 KB