Hoi,

I don't know much about the context of your problem, Petr, but I can
confirm that -71 is "invalid interface" (see src/vnet/error.h) and the
large number there is -1. The call also fails in Python, but there too, is
also creates the LCP before failing to return properly to the client.

r = vpp.api.show_version()

print('VPP version is %s' % r.version)


r = vpp.api.create_loopback()

print(r)


sw_if_index = r.sw_if_index

host_if_name = "loop%d" % sw_if_index

t=0 ## LCP_API_ITF_HOST_TAP

n="dataplane"

r = vpp.api.lcp_itf_pair_add_del_v2(is_add=True, sw_if_index=sw_if_index,
host_if_name=host_if_name, host_if_type=t, namespace=n)

print(r)

Gives an output of:

VPP version is 22.06-rc0~268-g4859d8d8e

create_loopback_reply(_0=754, context=2, retval=0, sw_if_index=5)

Traceback (most recent call last):

  File "./v3.py", line 33, in <module>

    r = vpp.api.lcp_itf_pair_add_del_v2(is_add=True,
sw_if_index=sw_if_index, host_if_name=host_if_name, host_if_type=t,
namespace=n)

  File "/usr/lib/python3/dist-packages/vpp_papi/vpp_papi.py", line 121, in
__call__

    return self._func(**kwargs)

  File "/usr/lib/python3/dist-packages/vpp_papi/vpp_papi.py", line 495, in f

    return self._call_vpp(i, msg, multipart, **kwargs)

  File "/usr/lib/python3/dist-packages/vpp_papi/vpp_papi.py", line 757, in
_call_vpp

    raise VPPIOError(2, 'VPP API client: read failed')

vpp_papi.vpp_papi.VPPIOError: [Errno 2] VPP API client: read failed

While at the same time creating the loop and the LCP just fine:

DBGvpp# show lcp

lcp default netns dataplane

lcp lcp-auto-subint on

lcp lcp-sync on

itf-pair: [0] loop0 tap5 loop5 233 type tap netns dataplane

This is definitely a bug in linux-cp plugin. There's a few other issues
that I think we should take a look at (the gerrit you mentioned). I don't
know when though - @Ole Troan <otr...@employees.org> had some comments on
the auto-endianness; possibly here some insights as well ? The message (and
code) looks fine to me, but obviously it isn't :)

groet,
Pim

On Fri, Mar 25, 2022 at 11:27 AM Petr Boltík <petr.bol...@gmail.com> wrote:

> ad 2) some news   ....
> introduction:
> -  lcp_itf_pair_get reply multiple messages
> - lcp_itf_pair_details
> - lcp_itf_pair_get_reply (allways reply: &{Retval:0 Cursor:*4294967295*})
>
> reply lcp_itf_pair_add_del_v2_reply return invalid channel (a can rewrite
> at the govpp and decode message)
>  LCP add del reply: &{Retval:*-71* HostSwIfIndex:*4294967295*}
>
> So I will continue to search why Cursor and HostSwIfIndex have the same
> value and why retval in -71. If someone has any idea, please let me know.
> Thanks
>
> Regards
> Petr Boltik
>
> st 23. 3. 2022 v 11:10 odesílatel Petr Boltík via lists.fd.io
> <petr.boltik=gmail....@lists.fd.io> napsal:
>
>> Hi, I have just found 2 issues with lcp plugin in the current MASTER
>> branch 22.06
>>
>> 1. List lcp pair report invalid num, fix
>> https://gerrit.fd.io/r/c/vpp/+/35479 (thanks to Pim). Can be merged to
>> the master?
>> 2. lcp_itf_pair_add_del (lcp_itf_pair_add_del_v2) lcp pair is created
>> succesfully. Api reply message failed.
>> ERRO[0000] Channel ID not known, ignoring the message.   channel=128
>> msg_id=325
>>
>> I'm sorry. I would like to help, but I don't understand C code enough
>> :( (I continue to study)
>>
>> Regards
>> Petr B.
>>
>>
>>
>>
> 
>
>

-- 
Pim van Pelt <p...@ipng.nl>
PBVP1-RIPE - http://www.ipng.nl/
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21115): https://lists.fd.io/g/vpp-dev/message/21115
Mute This Topic: https://lists.fd.io/mt/89972222/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to