bridge: mrp: Set the priority of MRP instance
Each MRP instance has a priority, a lower value means a higher priority. The priority of MRP instance is stored in MRP_Test frame in this way all the MRP nodes in the ring can see other nodes priority. Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
7e89ed8ab3
commit
4b3a61b030
@@ -147,7 +147,7 @@ static struct sk_buff *br_mrp_alloc_test_skb(struct br_mrp *mrp,
|
||||
br_mrp_skb_tlv(skb, BR_MRP_TLV_HEADER_RING_TEST, sizeof(*hdr));
|
||||
hdr = skb_put(skb, sizeof(*hdr));
|
||||
|
||||
hdr->prio = cpu_to_be16(MRP_DEFAULT_PRIO);
|
||||
hdr->prio = cpu_to_be16(mrp->prio);
|
||||
ether_addr_copy(hdr->sa, p->br->dev->dev_addr);
|
||||
hdr->port_role = cpu_to_be16(port_role);
|
||||
hdr->state = cpu_to_be16(mrp->ring_state);
|
||||
@@ -290,6 +290,7 @@ int br_mrp_add(struct net_bridge *br, struct br_mrp_instance *instance)
|
||||
return -ENOMEM;
|
||||
|
||||
mrp->ring_id = instance->ring_id;
|
||||
mrp->prio = instance->prio;
|
||||
|
||||
p = br_mrp_get_port(br, instance->p_ifindex);
|
||||
spin_lock_bh(&br->lock);
|
||||
|
Reference in New Issue
Block a user