]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: mrp: Add br_mrp_unique_ifindex function
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Thu, 21 May 2020 23:19:05 +0000 (23:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 May 2020 23:17:15 +0000 (16:17 -0700)
commit4d4065ed824e173ad51e4d86dc802d871151e709
tree74030ab0a9bb5b3da26d958f7f18adf32ec2cad8
parentf96e7f7212951590ddc832f2eef7bbb24ad32c1b
bridge: mrp: Add br_mrp_unique_ifindex function

It is not allow to have the same net bridge port part of multiple MRP
rings. Therefore add a check if the port is used already in a different
MRP. In that case return failure.

Fixes: 0c138d14d158 ("bridge: mrp: Connect MRP API with the switchdev API")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_mrp.c