Hoi Petr,

Thanks for the repro. I've matched the same program using Python API, no
errors:

vpp = VPPApiClient(apifiles=jsonfiles, server_address='/run/vpp/api.sock')

vpp.connect("test-client")


r = vpp.api.show_version()

print(f'VPP version is {r.version}')


total=0

for i in range(1000):

    r = vpp.api.lcp_itf_pair_get()

    if not isinstance(r, tuple) or r[0].retval != 0:

        print(f"{i}: API Error")

        continue

    total += len(r[1])

    if len(r[1]) == 6:

        print("OK")

    else:

        print(f"{i} has {len(r[1])} entries")

print(f"Total: runs {i+1} lcps {total}")



Running that:

pim@hippo:~/src/vppcfg$ ~/tickle.py  | grep -v OK

VPP version is 22.06-rc0~320-g8f60318ac

Total: runs 1000 lcps 6000

Running your program, besides being noisy, also passes.

pim@hippo:~$ ./govppLcpDumpTest | grep -c 'OK'

1000

Tested with linux-cp at HEAD and my own lcpng. Unfortunately I'm off on a
trip in a few minutes, so I won't be able to help you further, but at least
on my machine, your Go program and my Python script both work after a few
100 runs, with 0 failures. I've tested singlethreaded (no cpu {} stanza),
1-worker and 15-worker scenarios. My test startup.conf attached.

Conclusion: API looks good to me.

groet,
Pim

On Sat, Apr 16, 2022 at 12:17 AM Petr Boltík <petr.bol...@gmail.com> wrote:

> OT: sorry, I did not send this email to vpp-dev, the second attempt. Copy
> below
>
> EDIT: api message is LcpItfPairGet.
>
>
> Hi Pim,
>
> govpp (go) is used for API communication. I have just discovered a way how
> to reproduce an issue in my home environment. Test utility can be hound at
> github (also with precompiled binary ... I know, I know ... ).
>
> https://github.com/petrbol/govppApiLcpTest/tree/master
>
> vppctl create loopback interface instance 101
>> vppctl create loopback interface instance 102
>> vppctl create loopback interface instance 103
>> vppctl create loopback interface instance 104
>> vppctl create loopback interface instance 105
>>
>> vppctl lcp create loop100 host-if loop100
>> vppctl lcp create loop101 host-if loop101
>> vppctl lcp create loop102 host-if loop102
>> vppctl lcp create loop103 host-if loop103
>> vppctl lcp create loop104 host-if loop104
>> vppctl lcp create loop105 host-if loop105
>>
>> How to reproduce:
>
> 1. systemctl restart myVppService
> 2. add commands upper
> 3. ./govppLcpDumpTest (a few pass, the test will be failed)
>
> Now, the interesting thinks ...
> 4. vppctl show interface
> 5.  ./govppLcpDumpTest (test will PASS for 100% for me)
>
> Regards
> Petr
>
> pá 15. 4. 2022 v 22:40 odesílatel Pim van Pelt <p...@ipng.nl> napsal:
>
>> Hoi Petr,
>>
>> I do not observe this with linux-cp or lcpng on Python API, after
>> doing O(10k) lcp_itf_pair_get() calls. There was a message on this
>> mailinglist about lcp_itf_pair_add_del() giving unexpected error codes even
>> though the create/delete was successful. What you say dumpLcpPairList,
>> which language are you referring to?
>> Can you provide a minimal repro ?
>>
>> groet,
>> Pim
>>
>> On Fri, Apr 15, 2022 at 9:50 PM Petr Boltík <petr.bol...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> only report issue with API linux-cp plugin.
>>>
>>> Api reply to the "dumpLcpPairList" message is not consistent (Sometimes
>>> return not full lcp pair list. Debug command "vppctl show lcp" works
>>> correctly. Tested environment: 3x dpdk lan, 2x vlan, 1x loopback (6 lcp
>>> pair). 5-10% of reply list dump requests return not a complete list.)
>>>
>>> vpp v22.06-rc0~378-g6120441f9
>>> apu4D4
>>>
>>> Regards
>>> Petr B.
>>>
>>>
>>> 
>>>
>>>
>>
>> --
>> Pim van Pelt <p...@ipng.nl>
>> PBVP1-RIPE - http://www.ipng.nl/
>>
>

-- 
Pim van Pelt <p...@ipng.nl>
PBVP1-RIPE - http://www.ipng.nl/

Attachment: startup.conf
Description: Binary data

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21270): https://lists.fd.io/g/vpp-dev/message/21270
Mute This Topic: https://lists.fd.io/mt/90494063/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