Does BMv2 Support WCMP?

12 views
Skip to first unread message

Ali Sydney

unread,
Aug 12, 2022, 12:18:12 PM8/12/22
to stratum-dev
Hi Stratum folks,
                             I'm experimenting with WCMP(Weighted Cost Multi-Path) on BMv2 and coming across an error but I can't seem to figure out whether it's an ONOS/BMv2 issue. Below are the details:

1. In the p4 pipeline, I've have replaced ecmp_selector with wcmp_selector and this built just fine(See URL in REF for code snippet below section #P4 BMv2 routing table). 

2. However, in ONOS(i.e. in DefaultGroupBucket.java->createSelectGroupBucket()) when I set the weight to 2, I get a "Duplicate Key" error (See URL in REF section # ONOS ERROR)

3. From the ONOS CLI,  it appears that the weight for groups are set to 2, but the rules are all in the "PENDING_ADD_RETRY" state.

REF:

Can you kindly provide feedback?

Thanks!
-Syd

Davide Scano

unread,
Aug 12, 2022, 12:27:43 PM8/12/22
to stratum-dev, asydn...@gmail.com
Hi Syd,

you need to apply the same change in the onos code, e.g.; ecmp_selector with wcmp_selector. The error that you obtain is related to the fact that the flow rule built and sent via ONOS is not consistnet with the P4 pipeline.

Best.
Davide

A Sydney

unread,
Aug 12, 2022, 3:33:31 PM8/12/22
to Davide Scano, stratum-dev
Thanks for following up :)

So I omitted that part, but yes in ONOS, I've replaced ecmp_selector with wcmp_selector in the function used to create the necessary groups. In any case, I verified once more(i.e. that wcmp_selector was specified in ONOS), rerun ONOS and the same error shows up.

-Syd

A Sydney

unread,
Aug 12, 2022, 6:14:16 PM8/12/22
to Davide Scano, stratum-dev
So I investigated a bit and it appears that when groups are polled from the switch, duplicates exist(perhaps because of the implementation of weights on bmv2?). In any case, the highlighted call attempts to merge duplicates and for some reason this fails. I've since replaced this code to remove duplicates and everything works.

Cheers!
-Syd

duplicate_key.png

Reply all
Reply to author
Forward
0 new messages