Re: [vpp-dev] VPP with FRR Bring-up - Netlink and Router Plugin build failures

2020-02-26 Thread Majumdar, Kausik

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.hip6_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.hip6_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 



  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) 
Sent: Wednesday, February 26, 2020 4:48 PM
To: Majumdar, Kausik ; vpp-dev 

Cc: 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)" 
mailto:bala...@cisco.com>>
Date: Wednesday, February 26, 2020 at 4:46 PM
To: "Majumdar, Kausik" 
mailto:kausik.majum...@commscope.com>>, vpp-dev 
mailto:vpp-dev@lists.fd.io>>
Cc: "vppsb-...@lists.fd.io<mailto: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: mailto:vpp-dev@lists.fd.io>> on behalf of "Majumdar, 
Kausik" mailto:kausik.majum...@commscope.com>>
Date: Wednesday, February 26, 2020 at 4:31 PM
To: vpp-dev mailto:vpp-dev@lists.fd.io>>
Cc: "vppsb-...@lists.fd.io<mailto:vppsb-...@lists.fd.io>" 
mailto:vppsb-...@lists.fd.io>>, "Majumdar, Kausik" 
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

Re: [vpp-dev] VPP with FRR Bring-up - Netlink and Router Plugin build failures

2020-02-26 Thread Balaji Venkatraman via Lists.Fd.Io
[Sorry hit the ‘send’ by mistake..]

Did you try that solution?

Thanks!
--
Regards,
Balaji.


From: "Balaji Venkatraman (balajiv)" 
Date: Wednesday, February 26, 2020 at 4:46 PM
To: "Majumdar, Kausik" , vpp-dev 

Cc: "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




--
Regards,
Balaji.


From:  on behalf of "Majumdar, Kausik" 

Date: Wednesday, February 26, 2020 at 4:31 PM
To: vpp-dev 
Cc: "vppsb-...@lists.fd.io" , "Majumdar, Kausik" 

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*) , sizeof(addr))) {


[root@localhost vpp]# ls 
/root/vpp/build-root/install-vpp_debug-native/netlink/lib64
librtnl.a   librtnl.solibrtnl.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 erro

Re: [vpp-dev] VPP with FRR Bring-up - Netlink and Router Plugin build failures

2020-02-26 Thread Balaji Venkatraman via Lists.Fd.Io
Hi Kausik,
I see a project that incorporated FRR with VPP.

x https://github.com/FRRouting/frr/wiki/Alternate-forwarding-planes:-VPP




--
Regards,
Balaji.


From:  on behalf of "Majumdar, Kausik" 

Date: Wednesday, February 26, 2020 at 4:31 PM
To: vpp-dev 
Cc: "vppsb-...@lists.fd.io" , "Majumdar, Kausik" 

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*) , sizeof(addr))) {


[root@localhost vpp]# ls 
/root/vpp/build-root/install-vpp_debug-native/netlink/lib64
librtnl.a   librtnl.solibrtnl.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 
  ^
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 

[vpp-dev] VPP with FRR Bring-up - Netlink and Router Plugin build failures

2020-02-26 Thread Majumdar, Kausik

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*) , sizeof(addr))) {


[root@localhost vpp]# ls 
/root/vpp/build-root/install-vpp_debug-native/netlink/lib64
librtnl.a   librtnl.solibrtnl.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 
  ^
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 +