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 (#15576): https://lists.fd.io/g/vpp-dev/message/15576 Mute This Topic: https://lists.fd.io/mt/71577693/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-