Hi, We are trying you integrate FDIO unittest framework into our product.
Basically we have built some custom plugins and integrated those as VPP plugins. We have our build environment where VPP is built including these custom plugins. When we launch VPP inside our cluster it is working fine. But, when we launch VPP in unittest debug container, VPP does not come up saying some of custom node definitions are “unknown”. It seems we are using same “make build xxxx” command syntax before invoking “make test xxxx” in the makefile. Inside the debug container also compilation is through and we can see all the custom-plugin.so files preset in build-root/install-vpp-native/vpp/lib/vpp_plugins/ directory (along with native vpp plugins). But during launch VPP fails. One thing we noticed is, we have code in custom plugins where “node” definition is present in one plugin but which will be referred in another plugin. Ex: The node “AAAAAAAAAAAAAAAAA_handoff” is present in “BBBBBBBBBBBBBBBBBB_plugin.so” file and is being referred in AAAAAAAAAAAAAAAAA_plugin.so. Objdump from BBBBBBBBBBBBBBBBBB_plugin.so: 0000000000020b60 <__vlib_rm_node_registration_AAAAAAAAAAAAAAAAA_handoff_node>: 20b60: 48 8b 0d 29 84 0d 00 mov 0xd8429(%rip),%rcx # f8f90 <vlib_global_main@Base> 20b67: 48 8d 15 92 b6 0d 00 lea 0xdb692(%rip),%rdx # fc200 <AAAAAAAAAAAAAAAAA_handoff_node> 20b6e: 48 8b 41 58 mov 0x58(%rcx),%rax 20b72: 48 39 d0 cmp %rdx,%rax 20b75: 75 0e jne 20b85 <__vlib_rm_node_registration_AAAAAAAAAAAAAAAAA_handoff_node+0x25> 20b77: eb 22 jmp 20b9b <__vlib_rm_node_registration_AAAAAAAAAAAAAAAAA_handoff_node+0x3b> 20b79: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 20b80: 48 39 d0 cmp %rdx,%rax 20b83: 74 0d je 20b92 <__vlib_rm_node_registration_AAAAAAAAAAAAAAAAA_handoff_node+0x32> 20b85: 48 89 c1 mov %rax,%rcx 20b88: 48 8b 40 78 mov 0x78(%rax),%rax 20b8c: 48 85 c0 test %rax,%rax 20b8f: 75 ef jne 20b80 <__vlib_rm_node_registration_AAAAAAAAAAAAAAAAA_handoff_node+0x20> We can see both “BBBBBBBBBBBBBBBBBB_plugin.so” and AAAAAAAAAAAAAAAAA_plugin.so present in below path along with VPP’s native plugins. ../../../../../../fdio/build-root/install-vpp-native/vpp/lib/vpp_plugins [root@cni-builder-15-15-71 vpp_plugins]# ll total 459476 -rwxr-xr-x 1 root root 402808 Aug 10 14:46 abf_plugin.so -rwxr-xr-x 1 root root 20126400 Aug 10 14:47 acl_plugin.so -rwxr-xr-x 1 root root 446328 Aug 10 14:47 adl_plugin.so -rwxr-xr-x 1 root root 384016 Aug 10 14:47 an_1810mwlb_plugin.so -rwxr-xr-x 1 root root 9284184 Aug 10 14:48 custom1_plugin.so -rwxr-xr-x 1 root root 283840 Aug 10 14:47 custom2_plugin.so -rwxr-xr-x 1 root root 9624208 Aug 10 14:48 BBBBBBBBBBBBBBBBBB_plugin.so -rwxr-xr-x 1 root root 2113952 Aug 10 14:48 AAAAAAAAAAAAAAAAA_plugin.so -rwxr-xr-x 1 root root 200376 Aug 10 14:48 arping_plugin.so -rwxr-xr-x 1 root root 12062976 Aug 10 14:49 avf_plugin.so -rwxr-xr-x 1 root root 138568 Aug 10 14:49 builtinurl_plugin.so -rwxr-xr-x 1 root root 611272 Aug 10 14:49 cdp_plugin.so -rwxr-xr-x 1 root root 5853336 Aug 10 14:49 cnat_plugin.so -rwxr-xr-x 1 root root 33638160 Aug 10 14:49 crypto_ipsecmb_plugin.so -rwxr-xr-x 1 root root 380360 Aug 10 14:49 crypto_openssl_plugin.so -rwxr-xr-x 1 root root 1499144 Aug 10 14:49 crypto_sw_scheduler_plugin.so -rwxr-xr-x 1 root root 678344 Aug 10 14:49 ct6_plugin.so -rwxr-xr-x 1 root root 1664360 Aug 10 14:52 det44_plugin.so -rwxr-xr-x 1 root root 3879696 Aug 10 14:49 dhcp_plugin.so -rwxr-xr-x 1 root root 215512 Aug 10 14:49 dispatch_trace_plugin.so -rwxr-xr-x 1 root root 1048096 Aug 10 14:49 dns_plugin.so . . . Also from the logs, we see the path of vpp plugins and vpp test plugins are picked properly when constructing the VPP cmdline at the launch time. Attaching the cmdline argument schema as well as the actual cmd constructed out of it. Schema: ../../../../../../fdio/build-root/install-vpp-native/vpp/bin/vpp', 'unix', '{', 'nodaemon', '', 'full-coredump', 'coredump-size unlimited', 'runtime-dir', '/tmp/vpp-unittest-SanityTestCase-zhfmp1rx', '}', 'api-trace', '{', 'on', '}', 'api-segment', '{', 'prefix', 'vpp-unittest-SanityTestCase-zhfmp1rx', '}', 'cpu', '{', 'main-core', '0', 'corelist-workers', '1', '', '}', 'physmem', '{', 'max-size', '32m', '}', 'statseg', '{', 'socket-name', '/tmp/vpp-unittest-SanityTestCase-zhfmp1rx/stats.sock', '', '}', 'socksvr', '{', 'socket-name', '/tmp/vpp-unittest-SanityTestCase-zhfmp1rx/api.sock', '}', 'node { ', '', '}', 'api-fuzz {', 'off', '}', 'plugins', '{', 'plugin', 'dpdk_plugin.so', '{', 'disable', '}', 'plugin', 'rdma_plugin.so', '{', 'disable', '}', 'plugin', 'lisp_unittest_plugin.so', '{', 'enable', '}', 'plugin', 'unittest_plugin.so', '{', 'enable', '}', '}', 'plugin_path', '../../../../../../fdio /build-root/install-vpp-native/vpp/lib/vpp_plugins../../../../../../fdio/build-root/install-vpp-native/vpp/lib64/vpp_plugins', 'test_plugin_path', '../../../../../../fdio/build-root/install-vpp-native/vpp/lib/vpp_api_test_plugins../../../../../../fdio/build-root/install-vpp-native/vpp/lib64/vpp_api_test_plugins'] Command: ../../../../../../fdio/build-root/install-vpp-native/vpp/bin/vpp unix { nodaemon full-coredump coredump-size unlimited runtime-dir /tmp/vpp-unittest-SanityTestCase-zhfmp1rx } api-trace { on } api-segment { prefix vpp-unittest-SanityTestCase-zhfmp1rx } cpu { main-core 0 corelist-workers 1 } physmem { max-size 32m } statseg { socket-name /tmp/vpp-unittest-SanityTestCase-zhfmp1rx/stats.sock } socksvr { socket-name /tmp/vpp-unittest-SanityTestCase-zhfmp1rx/api.sock } node { } api-fuzz { off } plugins { plugin dpdk_plugin.so { disable } plugin rdma_plugin.so { disable } plugin lisp_unittest_plugin.so { enable } plugin unittest_plugin.so { enable } } plugin_path ../../../../../../fdio/build-root/install-vpp-native/vpp/lib/vpp_plugins../../../../../../fdio/build-root/install-vpp-native/vpp/lib64/vpp_plugins test_plugin_path ../../../../../../fdio/build-root/install-vpp-native/vpp/lib/vpp_api_test_plugins../../../../../../fdio/build-root/install-vpp-native/vpp/lib64/vpp_api_test_plugins The failure log: ../../../../../../fdio/build-root/install-vpp-native/vpp/bin/vpp[10731]: buffer: numa[0] falling back to non-hugepage backed buffer pool () vpp[10731]: vlib_node_main_init: node `AAAAAAAAAAAAAAAAA' refers to unknown node `AAAAAAAAAAAAAAAAA_handoff Please let us know if you find anything going wrong here. Also please let us know if you need any other missing information in order to get more context. Thanks, Ganapati Hegde
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#21792): https://lists.fd.io/g/vpp-dev/message/21792 Mute This Topic: https://lists.fd.io/mt/92953476/21656 Mute #plugin:https://lists.fd.io/g/vpp-dev/mutehashtag/plugin 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] -=-=-=-=-=-=-=-=-=-=-=-