Re: [vpp-dev] Unexpected return from python3 api

2021-10-02 Thread Matthew Smith via lists.fd.io
The value of retval from the 2nd reply can be looked up in
src/vnet/api_errno.h:

_(VLAN_ALREADY_EXISTS, -56, "VLAN subif already exists")

The attempt to create a VLAN subif is failing because the one you're trying
to create has already been created.


On Sat, Oct 2, 2021 at 3:23 AM Eyle Brinkhuis 
wrote:

> Hi,
>
> While using a small piece of python code to create a vlan subinterface, we
> get some unexpected returns:
>
> We run:
> vpp.api.create_vlan_subif(sw_if_index=3, vlan_id=101);
>
> The return for this varies, one time it is:
>
> create_vlan_subif_reply(_0=121, context=4, retval=0, sw_if_index=5)
>
> But it is not consistent, we get
> create_vlan_subif_reply(_0=121, context=4, retval=-56,
> sw_if_index=4294967295)
> Back as well, which is of no use to us. Anyone experienced the same?
>
> We run vpp 21.06 (installed from package cloud)
>
> Regards,
>
> Eyle
> 
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20277): https://lists.fd.io/g/vpp-dev/message/20277
Mute This Topic: https://lists.fd.io/mt/86019022/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] Unexpected return from python3 api

2021-10-02 Thread Eyle Brinkhuis
Hi,

While using a small piece of python code to create a vlan subinterface, we get 
some unexpected returns:

We run:
vpp.api.create_vlan_subif(sw_if_index=3, vlan_id=101);

The return for this varies, one time it is:

create_vlan_subif_reply(_0=121, context=4, retval=0, sw_if_index=5)

But it is not consistent, we get 
create_vlan_subif_reply(_0=121, context=4, retval=-56, sw_if_index=4294967295)
Back as well, which is of no use to us. Anyone experienced the same?

We run vpp 21.06 (installed from package cloud)

Regards,

Eyle
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20276): https://lists.fd.io/g/vpp-dev/message/20276
Mute This Topic: https://lists.fd.io/mt/86019022/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-