Skip to content
Commit bd139381 authored by Steven Hsieh's avatar Steven Hsieh Committed by David S. Miller
Browse files

net: bridge: assign path_cost for 2.5G and 5G link speed



As 2.5G, 5G ethernet ports are more common and affordable,
these ports are being used in LAN bridge devices.
STP port_cost() is missing path_cost assignment for these link speeds,
causes highest cost 100 being used.
This result in lower speed port being picked
when there is loop between 5G and 1G ports.

Original path_cost: 10G=2, 1G=4, 100m=19, 10m=100
Adjusted path_cost: 10G=2, 5G=3, 2.5G=4, 1G=5, 100m=19, 10m=100
                    speed greater than 10G = 1

Signed-off-by: default avatarSteven Hsieh <steven.hsieh@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent db7fccc1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment