BMv2 paths are flapping when using WCMP

Skip to first unread message


Sep 30, 2022, 5:32:05 PM9/30/22
to stratum-dev
Hi Stratum Dev folks,
                                      I'm experimenting with WCMP on BMv2 virtual VMs and I've updated the P4 pipeline and ONOS code such that ecmp_selector is replaced with wcmp_selector. In any case, I observed the following behavior:

1. I've got two paths from switch1 to switch2 as shown in the URL below and I'm sending a single UDP stream of traffic from host1 to host2(I used pastebin to ensure the topology is formatted correctly):

2. At switch1, initially weights for both path1 and path2 are 1. I start the UDP stream and traffic is diverted to path1.

3. While traffic continues on the single stream, at switch1 I set the weight for path2 to 2 and the weight for path1 is 1. Traffic is diverted to path2. While the single stream continues, I then set the weight for path1 to 2 and set the weight for path2 to 1, and traffic now is diverted to path1. 

I expected that once a single flow takes a particular path initially, all subsequent packets of this flow would take this same path regardless of whether the weights change/not. Subsequent flows would be subjected to the updated values for weights. So if I started a second stream, I would expect it would have a higher probability of using the path with the higher weight. Can you kindly provide feedback?


A Sydney

Oct 5, 2022, 12:17:45 PM10/5/22
to stratum-dev
So I tried changing weights on a blackbox switch and it does appear that once you change the weight of a given route, traffic is diverted to the route with the higher weight.  How would we go about changing this behavior on bmv2 such that the weight only applies to new flows?


You received this message because you are subscribed to the Google Groups "stratum-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages