“show plugin” will tell you which plugins are loaded. Note that the .so files must be located in the same directory with all of the other plugins. Find “dpdk_plugin.so”, etc.
D. From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Majumdar, Kausik Sent: Friday, February 28, 2020 3:53 PM To: Balaji Venkatraman (balajiv) <bala...@cisco.com>; vpp-dev <vpp-dev@lists.fd.io> Cc: vppsb-...@lists.fd.io; Majumdar, Kausik <kausik.majum...@commscope.com> Subject: Re: [vpp-dev] VPP with FRR Bring-up - not able to enable tap-inject Hi folks, I have made some code changes in VPPSB (the code changes are attached here), with these changes I have re-compiled. I was able to successfully compiled vpp with the netlink and router plugins. I have verified the router plugin contains the correct symbols to enable tap-inject interface. But still can’t enable tap-inject in VPP. I have stopped and started the VPP service. I am guessing that VPP is not loading these two plugins. I would appreciate if you have any workaround or suggestion to load VPP with the router and netlink plugins. [root@localhost install-vpp-native]# ls netlink/lib64/ librtnl.a librtnl.so librtnl.so.0.0.0 testrtnl_plugin.la testrtnl_plugin.so.0 librtnl.la librtnl.so.0 testrtnl_plugin.a testrtnl_plugin.so testrtnl_plugin.so.0.0.0 [root@localhost install-vpp-native]# ls router/ include lib64 [root@localhost install-vpp-native]# ls router/lib64/ router.a router.la router.so router.so.0 router.so.0.0.0 [root@localhost install-vpp-native]# 36: 0000000000000000 0 FILE LOCAL DEFAULT ABS tap_inject.c 37: 0000000000002565 36 FUNC LOCAL DEFAULT 11 tap_inject_is_enabled 38: 0000000000002589 36 FUNC LOCAL DEFAULT 11 tap_inject_is_config_enabled 39: 00000000000025ad 36 FUNC LOCAL DEFAULT 11 tap_inject_is_config_disabled 40: 00000000002106a0 88 OBJECT LOCAL DEFAULT 25 tap_inject_main 41: 00000000000033ba 70 FUNC LOCAL DEFAULT 11 tap_inject_disable 43: 0000000000003400 579 FUNC LOCAL DEFAULT 11 tap_inject_enable 44: 0000000000003643 771 FUNC LOCAL DEFAULT 11 tap_inject_iface_isr 45: 0000000000210220 120 OBJECT LOCAL DEFAULT 23 tap_inject_iface_isr_node 46: 0000000000003946 103 FUNC LOCAL DEFAULT 11 __vlib_add_node_registration_tap_inject_iface_isr_node 47: 00000000000039ad 195 FUNC LOCAL DEFAULT 11 __vlib_rm_node_registration_tap_inject_iface_isr_node 48: 0000000000003a70 2018 FUNC LOCAL DEFAULT 11 tap_inject_interface_add_del 49: 0000000000004252 69 FUNC LOCAL DEFAULT 11 __vnet_interface_function_init_hw_interface_add_del_tap_inject_interface_add_del 51: 0000000000004297 155 FUNC LOCAL DEFAULT 11 __vnet_interface_function_deinit_hw_interface_add_del_tap_inject_interface_add_del 52: 0000000000004332 1412 FUNC LOCAL DEFAULT 11 tap_inject_enable_disable_all_interfaces 54: 00000000000048b6 182 FUNC LOCAL DEFAULT 11 tap_inject_cli 56: 00000000002102a0 104 OBJECT LOCAL DEFAULT 23 tap_inject_enable_cmd 57: 000000000000496c 111 FUNC LOCAL DEFAULT 11 __vlib_cli_command_registration_tap_inject_enable_cmd 58: 00000000000049db 200 FUNC LOCAL DEFAULT 11 __vlib_cli_command_unregistration_tap_inject_enable_cmd 59: 0000000000210320 104 OBJECT LOCAL DEFAULT 23 tap_inject_disable_cmd 60: 0000000000004aa3 111 FUNC LOCAL DEFAULT 11 __vlib_cli_command_registration_tap_inject_disable_cmd 61: 0000000000004b12 200 FUNC LOCAL DEFAULT 11 __vlib_cli_command_unregistration_tap_inject_disable_cmd 62: 0000000000004bda 1026 FUNC LOCAL DEFAULT 11 show_tap_inject 63: 00000000002103a0 104 OBJECT LOCAL DEFAULT 23 show_tap_inject_cmd 64: 0000000000004fdc 111 FUNC LOCAL DEFAULT 11 __vlib_cli_command_registration_show_tap_inject_cmd 65: 000000000000504b 200 FUNC LOCAL DEFAULT 11 __vlib_cli_command_unregistration_show_tap_inject_cmd 66: 0000000000005113 404 FUNC LOCAL DEFAULT 11 tap_inject_config 68: 00000000000052a7 107 FUNC LOCAL DEFAULT 11 __vlib_add_config_function_tap_inject_config 69: 0000000000005312 195 FUNC LOCAL DEFAULT 11 __vlib_rm_config_function_tap_inject_config 70: 0000000000000000 0 FILE LOCAL DEFAULT ABS tap_inject_netlink.c 78: 0000000000000000 0 FILE LOCAL DEFAULT ABS tap_inject_node.c [root@localhost build-root]# systemctl status vpp ● vpp.service - Vector Packet Processing Process Loaded: loaded (/usr/lib/systemd/system/vpp.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2020-02-27 19:33:26 PST; 16h ago Process: 16266 ExecStartPre=/sbin/modprobe uio_pci_generic (code=exited, status=0/SUCCESS) Process: 16264 ExecStartPre=/bin/rm -f /dev/shm/db /dev/shm/global_vm /dev/shm/vpe-api (code=exited, status=0/SUCCESS) Main PID: 16270 (vpp_main) Tasks: 2 CGroup: /system.slice/vpp.service └─16270 /usr/bin/vpp -c /etc/vpp/startup.conf Feb 27 19:33:31 localhost.localdomain vnet[16270]: dpdk_ipsec_process:1014: not enough DPDK crypto resources, default to OpenSSL Feb 27 19:34:00 localhost.localdomain vnet[16270]: enable: unknown input `tap-inject Feb 27 19:34:26 localhost.localdomain vnet[16270]: enable: unknown input ` Feb 27 19:34:45 localhost.localdomain vnet[16270]: enable: unknown input `tap-inject Feb 27 19:36:19 localhost.localdomain vnet[16270]: enable: unknown input `tap-inject Feb 27 19:37:00 localhost.localdomain vnet[16270]: unknown input `vppctl create loopback interfa... Feb 27 19:37:19 localhost.localdomain vnet[16270]: show: unknown input ` Feb 27 19:38:02 localhost.localdomain vnet[16270]: enable: unknown input `tap-inject Feb 27 19:40:32 localhost.localdomain vnet[16270]: unknown input `exit Feb 28 11:33:46 localhost.localdomain vnet[16270]: unknown input `a c [root@localhost build-root]# vppctl _______ _ _ _____ ___ __/ __/ _ \ (_)__ | | / / _ \/ _ \ _/ _// // / / / _ \ | |/ / ___/ ___/ /_/ /____(_)_/\___/ |___/_/ /_/ vpp# enable ? enable ip6 interface enable ip6 interface <interface> vpp# [root@localhost build-root]# ls /usr/lib/vpp_plugins/ abf_plugin.so dhcp_plugin.so ikev2_plugin.so mactime_plugin.so ping_plugin.so srv6mobile_plugin.so acl_plugin.so dns_plugin.so ila_plugin.so map_plugin.so pppoe_plugin.so stn_plugin.so avf_plugin.so dpdk_plugin.so ioam_plugin.so mdata_plugin.so quic_plugin.so svs_plugin.so builtinurl_plugin.so flowprobe_plugin.so ixge_plugin.so memif_plugin.so rdma_plugin.so tlsmbedtls_plugin.so cdp_plugin.so gbp_plugin.so l2e_plugin.so nat_plugin.so router.so tlsopenssl_plugin.so crypto_ia32_plugin.so gtpu_plugin.so l3xc_plugin.so nsh_plugin.so sctp_plugin.so tlspicotls_plugin.so crypto_ipsecmb_plugin.so hs_apps_plugin.so lacp_plugin.so nsim_plugin.so srv6ad_plugin.so unittest_plugin.so crypto_openssl_plugin.so http_static_plugin.so lb_plugin.so oddbuf_plugin.so srv6am_plugin.so vmxnet3_plugin.so ct6_plugin.so igmp_plugin.so librtnl.so perfmon_plugin.so srv6as_plugin.so [root@localhost build-root]# Thanks, Kausik From: Majumdar, Kausik <kausik.majum...@commscope.com<mailto:kausik.majum...@commscope.com>> Sent: Wednesday, February 26, 2020 5:05 PM To: Balaji Venkatraman (balajiv) <bala...@cisco.com<mailto:bala...@cisco.com>>; vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Cc: vppsb-...@lists.fd.io<mailto:vppsb-...@lists.fd.io>; Majumdar, Kausik <kausik.majum...@commscope.com<mailto:kausik.majum...@commscope.com>> Subject: RE: [vpp-dev] VPP with FRR Bring-up - Netlink and Router Plugin build failures Hi Balaji, Thanks for replying. Yes, I have that wiki and followed that, may be it is out dated. I have mentioned that in a different thread on yesterday (attached here). I have tried to build from different release versions, initially with v18.10 as mentioned in the wiki. Currently, I am v20.01. These plugins doesn’t build properly. Few issues – 1. I didn’t find ‘bootstrap.sh’ file under build-root dir as mentioned in the wiki. 2. $ cd build-root/ 3. $ ./bootstrap.sh 2. The VPP vnet/ip dir doesn’t contain ip6_neighbor.h, but it is included in tap_inject_netlink.c /root/vpp/src/vnet/ip [root@localhost ip]# ls ip6* ip6_error.h ip6_forward.h ip6_hop_by_hop.h ip6_input.h ip6_ll_table.c ip6_ll_types.h ip6_punt_drop.c ip6_format.c ip6.h ip6_hop_by_hop_packet.h ip6_link.c ip6_ll_table.h ip6_packet.h ip6_to_ip4.h ip6_forward.c ip6_hop_by_hop.c ip6_input.c ip6_link.h ip6_ll_types.c ip6_pg.c /root/vpp/build-data/../router/router/tap_inject_netlink.c:19:34: fatal error: vnet/ip/ip6_neighbor.h: No such file or directory #include <vnet/ip/ip6_neighbor.h> 1. The netlink build issue was discussed in the thread, but not sure what was the resolution of it. https://lists.fd.io/g/vpp-dev/topic/vppsb_netlink_build_failing/27825040?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,27825040 Thanks, Kausik From: Balaji Venkatraman (balajiv) <bala...@cisco.com<mailto:bala...@cisco.com>> Sent: Wednesday, February 26, 2020 4:48 PM To: Majumdar, Kausik <kausik.majum...@commscope.com<mailto:kausik.majum...@commscope.com>>; vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Cc: vppsb-...@lists.fd.io<mailto:vppsb-...@lists.fd.io> Subject: Re: [vpp-dev] VPP with FRR Bring-up - Netlink and Router Plugin build failures Message received from external source. Exercise caution when opening attachments, clicking links, or exchanging information. [Sorry hit the ‘send’ by mistake..] Did you try that solution? Thanks! -- Regards, Balaji. From: "Balaji Venkatraman (balajiv)" <bala...@cisco.com<mailto:bala...@cisco.com>> Date: Wednesday, February 26, 2020 at 4:46 PM To: "Majumdar, Kausik" <kausik.majum...@commscope.com<mailto:kausik.majum...@commscope.com>>, vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Cc: "vppsb-...@lists.fd.io<mailto:vppsb-...@lists.fd.io>" <vppsb-...@lists.fd.io<mailto:vppsb-...@lists.fd.io>> Subject: Re: [vpp-dev] VPP with FRR Bring-up - Netlink and Router Plugin build failures Hi Kausik, I see a project that incorporated FRR with VPP. x https://github.com/FRRouting/frr/wiki/Alternate-forwarding-planes:-VPP<https://secure-web.cisco.com/179klKjrSOUoQKvSSCS88PuAak9DHzPCSanc6aZ9q2dl_Iy9WW2xz_a54r2gXqYESVIenYoanK6etSd_WEd7f8mwgRzULDHmdqKToOJrgbbJziwr8cFPq2ZT2TrDLLnuPQHA7s264o3dgrnbw58u0Y6q9Bp3fl1TqOTVPgtoRvfk5gjPq5N0_oCyhD2WGZjvz-97hrPtpXKJMeKj0dHbbNGSHEpUam3EKnv5y2t5TzlV5mtCi9m9IcFBPxXws7UmYlTdC9mSLb_cy49ON4opImoPj8PVtaqGNCe4cWC9crOmIVuwd327tTfmyMS9enTn2Sug0bLIqjAVm59togUNZBA/https%3A%2F%2Fgithub.com%2FFRRouting%2Ffrr%2Fwiki%2FAlternate-forwarding-planes%3A-VPP> -- Regards, Balaji. From: <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> on behalf of "Majumdar, Kausik" <kausik.majum...@commscope.com<mailto:kausik.majum...@commscope.com>> Date: Wednesday, February 26, 2020 at 4:31 PM To: vpp-dev <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> Cc: "vppsb-...@lists.fd.io<mailto:vppsb-...@lists.fd.io>" <vppsb-...@lists.fd.io<mailto:vppsb-...@lists.fd.io>>, "Majumdar, Kausik" <kausik.majum...@commscope.com<mailto:kausik.majum...@commscope.com>> Subject: [vpp-dev] VPP with FRR Bring-up - Netlink and Router Plugin build failures Hi folks, I wanted to start a new thread on the discussion related to VPP with FRR bring up and get this working together for VPP as a Data plane with FRR as a Control /Routing plane. Please chime in if you have already got VPP and FRR working together or can help on the current issues. I am currently facing issues to build VPP plugins for netlink and router. 1. Netlink build error - I looked into the previous discussion on netlink compilation issues, I didn’t find proper resolution for it. I made simple hack in the codebase and with that I was able to build netlink lib. I am sure folks have gone through this issue, so would like to know if any fix or patch is available. [root@localhost build-root]# make V=0 PLATFORM=vpp TAG=vpp_debug netlink-install router-install @@@@ Building netlink in /root/vpp/build-root/build-vpp_debug-native/netlink @@@@ make[1]: Entering directory `/root/vpp/build-root/build-vpp_debug-native/netlink' CC librtnl/netns.lo CC librtnl/rtnl.lo /root/vpp/build-data/../netlink/librtnl/rtnl.c: In function 'rtnl_socket_open': /root/vpp/build-data/../netlink/librtnl/rtnl.c:269:39: error: 'RTNLGRP_MPLS_ROUTE' undeclared (first use in this function) grpmask(RTNLGRP_NOTIFY) | grpmask(RTNLGRP_MPLS_ROUTE), ^ /root/vpp/build-data/../netlink/librtnl/rtnl.c:269:39: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [librtnl/rtnl.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... /root/vpp/build-data/../netlink/librtnl/netns.c:69:5: error: 'RTA_VIA' undeclared here (not in a function) _(RTA_VIA, via, 1) \ ^ /root/vpp/build-data/../netlink/librtnl/netns.c:82:13: note: in definition of macro '_' .type = t, .unique = u, \ ^ /root/vpp/build-data/../netlink/librtnl/netns.c:86:3: note: in expansion of macro 'ns_foreach_rta' ns_foreach_rta ^ make[1]: *** [librtnl/netns.lo] Error 1 make[1]: Leaving directory `/root/vpp/build-root/build-vpp_debug-native/netlink' make: *** [netlink-build] Error 2 I have applied the following diff change in my local codebase and netlink compiled fine. diff --git a/netlink/librtnl/netns.c b/netlink/librtnl/netns.c index 1b40227..8ecf02b 100644 --- a/netlink/librtnl/netns.c +++ b/netlink/librtnl/netns.c @@ -66,7 +66,6 @@ u8 *format_ns_link (u8 *s, va_list *args) #define ns_foreach_rta \ _(RTA_DST, dst, 1) \ _(RTA_SRC, src, 1) \ - _(RTA_VIA, via, 1) \ _(RTA_GATEWAY, gateway, 1) \ _(RTA_IIF, iif, 1) \ _(RTA_OIF, oif, 1) \ diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c index a849dc6..9879e14 100644 --- a/netlink/librtnl/rtnl.c +++ b/netlink/librtnl/rtnl.c @@ -266,7 +266,7 @@ static int rtnl_socket_open(rtnl_ns_t *ns) .nl_groups = grpmask(RTNLGRP_LINK)| grpmask(RTNLGRP_IPV6_IFADDR) | grpmask(RTNLGRP_IPV4_IFADDR) | grpmask(RTNLGRP_IPV4_ROUTE) | grpmask(RTNLGRP_IPV6_ROUTE) | grpmask(RTNLGRP_NEIGH) | - grpmask(RTNLGRP_NOTIFY) | grpmask(RTNLGRP_MPLS_ROUTE), + grpmask(RTNLGRP_NOTIFY), }; if (bind(ns->rtnl_socket, (struct sockaddr*) &addr, sizeof(addr))) { [root@localhost vpp]# ls /root/vpp/build-root/install-vpp_debug-native/netlink/lib64 librtnl.a librtnl.so librtnl.so.0.0.0 testrtnl_plugin.la testrtnl_plugin.so.0 librtnl.la librtnl.so.0 testrtnl_plugin.a testrtnl_plugin.so testrtnl_plugin.so.0.0.0 1. router build error – Is there any fix available for the tap_inject_netlink.c failure? [root@localhost build-root]# make V=0 PLATFORM=vpp TAG=vpp_debug netlink-install router-install @@@@ Arch for platform 'vpp' is native @@@@ @@@@ Building router in /root/vpp/build-root/build-vpp_debug-native/router @@@@ make[1]: Entering directory `/root/vpp/build-root/build-vpp_debug-native/router' CC router/tap_inject_netlink.lo CC router/tap_inject_node.lo /root/vpp/build-data/../router/router/tap_inject_netlink.c:19:34: fatal error: vnet/ip/ip6_neighbor.h: No such file or directory #include <vnet/ip/ip6_neighbor.h> ^ compilation terminated. /root/vpp/build-data/../router/router/tap_inject_node.c: In function 'tap_rx': /root/vpp/build-data/../router/router/tap_inject_node.c:182:29: error: 'VLIB_BUFFER_DATA_SIZE' undeclared (first use in this function) #define MTU_BUFFERS ((MTU + VLIB_BUFFER_DATA_SIZE - 1) / VLIB_BUFFER_DATA_SIZE) ^ /root/vpp/build-data/../router/router/tap_inject_node.c:190:20: note: in expansion of macro 'MTU_BUFFERS' struct iovec iov[MTU_BUFFERS]; ^ /root/vpp/build-data/../router/router/tap_inject_node.c:182:29: note: each undeclared identifier is reported only once for each function it appears in #define MTU_BUFFERS ((MTU + VLIB_BUFFER_DATA_SIZE - 1) / VLIB_BUFFER_DATA_SIZE) ^ /root/vpp/build-data/../router/router/tap_inject_node.c:190:20: note: in expansion of macro 'MTU_BUFFERS' struct iovec iov[MTU_BUFFERS]; ^ /root/vpp/build-data/../router/router/tap_inject_node.c:206:7: warning: implicit declaration of function 'vlib_buffer_alloc_from_free_list' [-Wimplicit-function-declaration] len = vlib_buffer_alloc_from_free_list (vm, ^ /root/vpp/build-data/../router/router/tap_inject_node.c:208:21: error: 'VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX' undeclared (first use in this function) VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX); ^ /root/vpp/build-data/../router/router/tap_inject_node.c:191:7: warning: unused variable 'bi' [-Wunused-variable] u32 bi[MTU_BUFFERS]; ^ /root/vpp/build-data/../router/router/tap_inject_node.c:190:16: warning: unused variable 'iov' [-Wunused-variable] struct iovec iov[MTU_BUFFERS]; ^ make[1]: *** [router/tap_inject_node.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [router/tap_inject_netlink.lo] Error 1 make[1]: Leaving directory `/root/vpp/build-root/build-vpp_debug-native/router' make: *** [router-build] Error 2 Thanks, Kausik
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15628): https://lists.fd.io/g/vpp-dev/message/15628 Mute This Topic: https://lists.fd.io/mt/71616880/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-