Hi Matt. If you look at https://gerrit.fd.io/r/#/c/18693/5/test/vpp_papi_provider.py, the field was set to default to ~0 for the python client. When I made the change, I chose to do it this way to make the api fall more in line with other calls such as l2_interface_efp_filter and sw_interface_rx_placement_dump. ~0 is the sentinel value typically used for "any" or "all" interfaces.
This change was made more backward compatible in: https://gerrit.fd.io/r/#/c/18980/. Paul On Thu, Apr 18, 2019 at 3:22 PM Matthew Smith <mgsm...@netgate.com> wrote: > > Hi, > > It looks like in https://gerrit.fd.io/r/#/c/18693/ the message format and > handler for sw_interface_dump changed in a backwards-incompatible way. It's > not too difficult to correct for, but it seems like any API clients that > used this call might be broken. Some code that I maintain that connects to > the binary API broke, and vpp_api_test looks like it did too. I tested with > a build generated from commit 5a8844b "GRE: API update". > > A field was added to the message named sw_if_index, which causes a single > interface to be dumped. You have to set this to ~0 to receive all > interfaces, which was the default behavior before. Since clients written > against earlier versions of the API didn't have to populate this field, > they are probably passing 0 because the memory was zeroed when it was > allocated. This has the effect of only receiving the details for > sw_if_index 0 ("local0") when a sw_interface_dump message is sent in which > the value of sw_if_index has not been set. > > I have adjusted my code to deal with the change but I don't know how many > other clients of the binary API exist out there that will be broken by > this. Should backwards compatibility be restored? Or just fix vpp_api_test > and move on? > > -Matt > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > > View/Reply Online (#12817): https://lists.fd.io/g/vpp-dev/message/12817 > Mute This Topic: https://lists.fd.io/mt/31234917/1594641 > Group Owner: vpp-dev+ow...@lists.fd.io > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [ > pvi...@vinciconsulting.com] > -=-=-=-=-=-=-=-=-=-=-=- >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#12818): https://lists.fd.io/g/vpp-dev/message/12818 Mute This Topic: https://lists.fd.io/mt/31234917/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-