[vpp-dev] Pinging a neighbor generates duplicate echo requests #vpp #vpp-dev
Hi, I have a network that consists of a number of docker containers running on the same host, and vpp (v20.09) is running on one of them. The vpp has two interfaces (created via 'create host-interface'). The problem is that when I ping an interface's neighbor in 'vppctl' with a single echo request (i.e., '#vpp ping 10.100.0.2 repeat 1'), I see ~253 duplicate echo requests being sent. Have you seen this kind of a behavior before? If I issue the same ping command without the vpp up, it works without problem. Any tips or help would be greatly appreciated. Thanks, --Hyong = startup conf = unix { cli-listen /run/vpp/cli.sock log /tmp/vpp.log } socksvr { socket-name /run/vpp/api.sock } logging { default-log-level debug } api-segment { prefix vpp } api-trace { on } = interfaces = vpp# show int Name Idx State MTU (L3/IP4/IP6/MPLS) Counter Count host-eth0 1 up 9000/0/0/0 rx packets 13 rx bytes 1054 tx packets 7 tx bytes 634 drops 13 ip4 5 ip6 6 host-eth2 2 up 9000/0/0/0 rx packets 1027 rx bytes 112418 tx packets 510 tx bytes 55964 drops 21 ip4 1016 ip6 7 local0 0 down 0/0/0/0 = interface addresses = vpp# show int addr host-eth0 (up): L3 10.100.5.2/24 host-eth2 (up): L3 10.100.0.1/24 local0 (dn): == ip neighbors = vpp# show ip neighbors Time IP Flags Ethernet Interface 116.3940 10.100.5.1 D 54:ed:63:8e:b6:5c host-eth0 106.6661 10.100.0.2 D 20:6b:cb:d9:20:33 host-eth2 = vpp routing table = pv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] epoch:0 flags:none locks:[adjacency:1, default-route:1, nat-hi:2, ] 0.0.0.0/0 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:1 buckets:1 uRPF:0 to:[0:0]] [0] [@0]: dpo-drop ip4 0.0.0.0/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:2 buckets:1 uRPF:1 to:[0:0]] [0] [@0]: dpo-drop ip4 10.100.0.0/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:14 buckets:1 uRPF:15 to:[0:0]] [0] [@0]: dpo-drop ip4 10.100.0.0/24 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:13 buckets:1 uRPF:14 to:[1:96]] [0] [@4]: ipv4-glean: host-eth2: mtu:9000 next:2 02feaac7f6c80806 10.100.0.1/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:16 buckets:1 uRPF:19 to:[516:49592]] [0] [@2]: dpo-receive: 10.100.0.1 on host-eth2 10.100.0.2/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:17 buckets:1 uRPF:18 to:[510:48960]] [0] [@5]: ipv4 via 10.100.0.2 host-eth2: mtu:9000 next:3 206bcbd9203302feaac7f6c80800 10.100.0.255/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:15 buckets:1 uRPF:17 to:[0:0]] [0] [@0]: dpo-drop ip4 10.100.5.0/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:10 buckets:1 uRPF:9 to:[0:0]] [0] [@0]: dpo-drop ip4 10.100.5.1/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:18 buckets:1 uRPF:20 to:[5:480]] [0] [@5]: ipv4 via 10.100.5.1 host-eth0: mtu:9000 next:4 54ed638eb65c02fe50d983f90800 10.100.5.0/24 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:9 buckets:1 uRPF:8 to:[1:96]] [0] [@4]: ipv4-glean: host-eth0: mtu:9000 next:1 02fe50d983f90806 10.100.5.2/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:12 buckets:1 uRPF:13 to:[10:960]] [0] [@2]: dpo-receive: 10.100.5.2 on host-eth0 10.100.5.255/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:11 buckets:1 uRPF:11 to:[0:0]] [0] [@0]: dpo-drop ip4 224.0.0.0/4 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:4 buckets:1 uRPF:3 to:[0:0]] [0] [@0]: dpo-drop ip4 240.0.0.0/4 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:3 buckets:1 uRPF:2 to:[0:0]] [0] [@0]: dpo-drop ip4 255.255.255.255/32 unicast-ip4-chain [@0]: dpo-load-balance: [proto:ip4 index:5 buckets:1 uRPF:4 to:[0:0]] [0] [@0]: dpo-drop ip4 == ping 10.100.0.2 = vpp# ping 10.100.0.2 repeat 1 116 bytes from 10.100.0.2: icmp_seq=1 ttl=64 time=5.2880 ms 116 bytes from 10.100.0.2: icmp_seq=1 ttl=64 time=5.4023 ms ... 116 bytes from 10.100.0.2: icmp_seq=1 ttl=64 time=22.2952 ms Statistics: 1 sent, 254 received, -25300% packet loss = trace === --- Start of thread 0 vpp_main --- Packet 1 00:10:35:217051: af-packet-input af_packet: hw_if_index 2 next-index 4 tpacket2_hdr: status 0x2001 len 110 snaplen 110 mac 66 net 80 sec 0x5fea567e nsec 0x17700ce7 vlan 0 vlan_tpid 0 00:10:35:217065: ethernet-input IP4:
Re: [vpp-dev] Pinging a neighbor generates duplicate echo requests #vpp #vpp-dev
Hi, (My apologies for being unable to check in earlier) It turned out this was due to a local network issue, not vpp, which was simply routing the packets it sees on the interface in question. Thanks --Hyong -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18485): https://lists.fd.io/g/vpp-dev/message/18485 Mute This Topic: https://lists.fd.io/mt/79279816/21656 Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Mute #vpp-dev:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-dev Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] vpp_api_test (vat) and acl_plugin newbie questions #vpp #vpp-dev #vat #vapi
Hi, I have a docker container (ubuntu:20.04) with vpp binaries installed from prebuilt packages as described, for example, in: https://wiki.fd.io/view/VPP/Installing_VPP_binaries_from_packages While vpp itself is working fine (as a router), we haven't been able to work with 'acl_plugin.' Using 'vppctl,' I think the acl plugin is loaded (and enabled?): == $ vppctl vpp# show plugins Plugin path is: /usr/lib/x86_64-linux-gnu/vpp_plugins:/usr/lib/vpp_plugins Plugin Version Description ... 16. acl_plugin.so 20.09-release Access Control Lists (ACL) ... == However, I can't get even the most basic command working in 'vpp_api_test' (vat) in that 'acl_plugin_get_version' seems to crash 'vat': == $ vpp_api_test default-socket load_one_plugin:68: Loaded plugin: /usr/lib/x86_64-linux-gnu/vpp_api_test_plugins/builtinurl_test_plugin.so ... load_one_plugin:68: Loaded plugin: /usr/lib/x86_64-linux-gnu/vpp_api_test_plugins/adl_test_plugin.so vl_client_get_first_plugin_msg_id:634: plugin 'oddbuf_cf7089bd' not registered vat_plugin_register: oddbuf plugin not loaded... ... load_one_plugin:68: Loaded plugin: /usr/lib/x86_64-linux-gnu/vpp_api_test_plugins/acl_test_plugin.so ... vat # vat# vat# acl_plugin_get_version $ <--- instead of showing results, vat dies == Any suggestion or help on what may be wrong would be appreciated. A couple of related questions are: - Is it correct that vpp's plugin path is '/usr/lib/x86_64-linux-gnu/vpp_plugins:/usr/lib/vpp_plugins' but vat's loading from '/usr/lib/x86_64-linux-gnu/vpp_api_test_plugins'? when I force 'vat' to use the same plugin path as 'vpp,' it reports many 'undefined symbol' - is ubuntu:20.04 fully supported? Below is my vpp startup config: = unix { cli-listen /run/vpp/cli.sock log /tmp/vpp.log } socksvr { socket-name /run/vpp/api.sock } logging { default-log-level debug } api-segment { prefix vpp } api-trace { on } plugins { plugin dpdk_plugin.so { disable } } == Thanks, --Hyong -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18486): https://lists.fd.io/g/vpp-dev/message/18486 Mute This Topic: https://lists.fd.io/mt/79504208/21656 Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Mute #vpp-dev:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-dev Mute #vat:https://lists.fd.io/g/vpp-dev/mutehashtag/vat Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] Newbie question about Creating and Replacing ACL Rule #vpp-dev #vpp #vapi
Hi all, I'm using the python api to create a ACL rule and apply it to the egress side of an interface. The VPP version = 20.09-release, and the ACL plugin version is 1.4. The rule is to block all the packets addressed to a host's address at port . When the rule is added to the interface, it blocks the said traffic, and when the rule is deleted from the interface, the traffic is allowed. Then I update (or replace) the rule so that it blocks packets addressed to port . I use 'acl_add_replace()' with 'acl_index' set to the 'acl_index' received when creating the rule in the first place. I also check that 'acl_index' is the same as before. However, when I add the updated rule to the same interface, the traffic to port is still getting blocked, and when I remove the updated rule, the traffic to port is allowed. Seeing this, I didn't even try to generate the traffic to at this point. Given I'm new only to VPP but also to ACL, I feel I must be missing something. Any help would be greatly appreciated. Thanks, --Hyong -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18538): https://lists.fd.io/g/vpp-dev/message/18538 Mute This Topic: https://lists.fd.io/mt/79928765/21656 Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi Mute #vpp-dev:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-dev Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] Newbie question about Creating and Replacing ACL Rule #vpp-dev #vpp #vapi
Hi, Thanks for the great info! I'll take a look at the test code and apply to my own testing. Thanks, --Hyong -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18540): https://lists.fd.io/g/vpp-dev/message/18540 Mute This Topic: https://lists.fd.io/mt/79928765/21656 Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi Mute #vpp-dev:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-dev Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] A newbie question: "VPP worker threads" vs "vcl worker threads" #vppcom #hoststack
Hi, Are the VPP worker threads, configured in the 'cpu {' section of 'startup.conf', the same as the "workers" or "worker threads" referred to in the context of host stack / vppcom applications? The answer seems to be no, looking at the implementation of 'vppcom_worker_register()' but wanted to double-check. The background is that I'm looking for ways to run a set of application logic on packets received on an interface but do not want to be on the critical path of the vpp packet processing and am trying to determine if writing a multi-threaded host stack application will do the trick. Thanks, --Hyong -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18800): https://lists.fd.io/g/vpp-dev/message/18800 Mute This Topic: https://lists.fd.io/mt/80888917/21656 Mute #vppcom:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcom Mute #hoststack:https://lists.fd.io/g/vpp-dev/mutehashtag/hoststack Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] Newbie question: best practice for getting data from plugins? #vpp #vppcapi #vapi
Hi, Say we will have Plugin A that needs to: 1. Receive packets at an interface 2. Update some state about received packets 3. Send the updated state to another "function" for further processing 4. Forward received packets to the next node What would be the best practice for the design of Step 3 in vpp? The processing of the updated state data is external to the vpp graph. Can the "function" in Step 3 be another plugin that does not process any packets but wait for the state update, assuming such a plugin is even possible? Or can the function be part of a small builtin application and receive the state data from Plugin A with something like "vl_api_rpc_call_main_thread()"? While I'm a newbie with little experience in vpp dev, it feels there must be a more straightforward approach. Any suggestions or information on where to look would be much appreciated. Thanks, --Hyong -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#18807): https://lists.fd.io/g/vpp-dev/message/18807 Mute This Topic: https://lists.fd.io/mt/80918458/21656 Mute #vppcapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vppcapi Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] Python API fails to connect to vpp #vapi #vpp_papi #vpp
Hi, I have a python script that uses 'vpp_papi' to try to connect to the 'vpp' running on the local host. It's based on my reading of the source code in 'src/vpp-api/python/vpp_papi'. One problem I'm running into is that the client fails to connect to the vpp with the error message: > > > > python3.8: .../src/vpp-api/client/client.c:560: vac_set_error_handler: > Assertion `clib_mem_get_heap ()' failed > > This error occurs as part of 'connect()': > > > > vpp = VPP(self.api_json_files, read_timeout=60) > ret = vpp.connect(app_name) > > > > FWIW, the vpp itself seems to have enough heap space (it's run with 2 workers): > > DBGvpp# show memory main-heap > Thread 0 vpp_main > base 0x7f8d15fd5000, size 1g, locked, unmap-on-destroy, name 'main heap' > page stats: page-size 4K, total 262144, mapped 26485, not-mapped 235659 > numa 0: 24 pages, 96k bytes > numa 1: 26461 pages, 103.36m bytes > total: 1023.99M, used: 99.86M, free: 924.14M, trimmable: 923.55M > > Thread 1 vpp_wk_0 > base 0x7f8d15fd5000, size 1g, locked, unmap-on-destroy, name 'main heap' > page stats: page-size 4K, total 262144, mapped 27253, not-mapped 234891 > numa 0: 24 pages, 96k bytes > numa 1: 27229 pages, 106.36m bytes > total: 1023.99M, used: 102.86M, free: 921.14M, trimmable: 920.55M > > Thread 2 vpp_wk_1 > base 0x7f8d15fd5000, size 1g, locked, unmap-on-destroy, name 'main heap' > page stats: page-size 4K, total 262144, mapped 28021, not-mapped 234123 > numa 0: 24 pages, 96k bytes > numa 1: 27997 pages, 109.36m bytes > total: 1023.99M, used: 105.86M, free: 918.14M, trimmable: 917.55M > On the other hand, the system doesn't seem to have many "huge pages" as shown by 'hugeadm --pool-list': > > > > Size Minimum Current Maximum Default > > > > 2097152 1024 1024 1024 * > > > > 1073741824 0 0 0 > > However, I haven't been able to figure out if the error is related to the above and couldn't get much info on the error from googling for and looking at the `clib_mem_get_heap()` implementation. Any info on the cause of this error and path forward would be greatly appreciated. The vpp is 'stable/2101' and is running on a Ubuntu system (20.04, 5.4.0-26-generic). Thanks, --Hyong -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19937): https://lists.fd.io/g/vpp-dev/message/19937 Mute This Topic: https://lists.fd.io/mt/84779165/21656 Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi Mute #vpp_papi:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp_papi Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [vpp-dev] Python API fails to connect to vpp #vapi #vpp_papi #vpp
Hi Ole, Thanks for the info, and using 'use_socket=True' did solve the issue ('VPPApiClient' was already in use as it was imported as 'VPP' in my code). Out of curiosity, why is the python shared memory transport deprecated? Thanks again, --Hyong -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19942): https://lists.fd.io/g/vpp-dev/message/19942 Mute This Topic: https://lists.fd.io/mt/84779165/21656 Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Mute #vapi:https://lists.fd.io/g/vpp-dev/mutehashtag/vapi Mute #vpp_papi:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp_papi Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] Build Error for "make install-ext-deps" #vpp-dev #dpdk
Hi, I'm trying to build the external packages for 'stable/2106'. The only change I made to the default config files is in 'build/external/packages/dpdk.mk': ``` DPDK_MLX5_PMD ?= y DPDK_MLX5_COMMON_PMD ?= y ``` With the above, 'make install-ext-deps' stops with an error: ... Processing /.../.cache/pip/wheels/d3/04/21/3d4f210890da1dad5a13a9bfbfe038ed3aecb556eee05d7974/meson-0.54.0-py3-none-any.whl ERROR: Could not find a version that satisfies the requirement pyelftools (from versions: none) ERROR: No matching distribution found for pyelftools make[5]: *** [packages/dpdk.mk:203: /.../vpp/vpp/build/external/deb/_build/.dpdk.config.ok] Error 1 make[5]: Leaving directory '/.../vpp/vpp/build/external' make[4]: *** [debian/rules:25: override_dh_install] Error 2 make[4]: Leaving directory '/.../vpp/vpp/build/external/deb' make[3]: *** [debian/rules:17: binary] Error 2 ... The odd thing is that 'pyelftools' is already installed on the system: ... pip3 install pyelftools Requirement already satisfied: pyelftools in /usr/lib/python3/dist-packages (0.26) ... pip install pyelftools Requirement already satisfied: pyelftools in /usr/lib/python3/dist-packages (0.26) ... The system is running "20.04.2 LTS (Focal Fossa)". 'stable/2101' builds successfully with the exactly same changes to 'dpdk.mk' on the same system. Is there anything else I need to change to build 'stable/2106' with the MLX enabled? Thanks, --Hyong -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19967): https://lists.fd.io/g/vpp-dev/message/19967 Mute This Topic: https://lists.fd.io/mt/84850035/21656 Mute #dpdk:https://lists.fd.io/g/vpp-dev/mutehashtag/dpdk Mute #vpp-dev:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-dev Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] Is it possible to configure a plugin to run after acl plugin?
Hi, We have a set of plugins running in the 'device-input' feature arc. We also have a set of ACL rules applied at the inbound side of an interface. It turns out we need to run a plugin so that it only processes the packets after the ACL rules have been applied to the inbound traffic. Is there a way to configure the plugin so that it runs after 'acl_plugin' in the feature arc? I've tried '.runs_after = VNET_FEATURES ("acl_plugin")' as part of the plugin's 'VNET_FEATURE_INIT()' but that didn't work. Thanks, --Hyong -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#22431): https://lists.fd.io/g/vpp-dev/message/22431 Mute This Topic: https://lists.fd.io/mt/96103525/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-