Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-28 Thread Ni, Hongjun
Hey,

I have created a patch to remove vlib_buffer_chain_validate() on July,
https://gerrit.fd.io/r/#/c/7382/ Remove unused call vlib_buffer_chain_validate()
But it is not merged yet.

For router plugin in vppsb, it works well on VPP 17.01, but it lacks 
maintenance since then.

-Hongjun

From: vpp-dev-boun...@lists.fd.io [mailto:vpp-dev-boun...@lists.fd.io] On 
Behalf Of Burt Silverman
Sent: Thursday, September 28, 2017 9:18 PM
To: Paweł Staszewski ; Damjan Marion (damarion) 

Cc: vppsb-...@lists.fd.io; vpp-dev 
Subject: Re: [vpp-dev] Failed to build vpp with vppsb

Hi Pawel,

It looks like that function vlib_buffer_chain_validate was removed from 
vlib/buffer.c prior to v17.01 and was never removed from the buffer_funcs.h 
header file.

Damjan, can we just remove the call in the vppsb router code to 
vlib_buffer_chain_validate(), or is something else needed?

Burt

On Thu, Sep 28, 2017 at 5:49 AM, Paweł Staszewski 
mailto:pstaszew...@itcare.pl>> wrote:

Ok

Compiled :)



But trying some example



vppctl create loopback interface
vppctl set interface state loop0 up
vppctl set interface state TenGigabitEthernet82/0/0 up
vppctl set interface state TenGigabitEthernet82/0/1 up
vppctl set interface ip address loop0 2.2.2.2/32<http://2.2.2.2/32>
vppctl set interface ip address TenGigabitEthernet82/0/0 
10.0.10.2/24<http://10.0.10.2/24>
vppctl set interface ip address TenGigabitEthernet82/0/1 
10.0.20.2/24<http://10.0.20.2/24>

vppctl enable tap-inject

till now have vpp interfaces:

ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group 
default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8<http://127.0.0.1/8> scope host lo
   valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
   valid_lft forever preferred_lft forever
2: enp2s0f0:  mtu 1500 qdisc mq state UP group 
default qlen 1000
link/ether 00:25:90:98:2f:42 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.53/24<http://192.168.2.53/24> brd 192.168.2.255 scope global 
enp2s0f0
   valid_lft forever preferred_lft forever
inet6 fe80::225:90ff:fe98:2f42/64 scope link
   valid_lft forever preferred_lft forever
4: enp4s0:  mtu 1500 qdisc noop state DOWN group default 
qlen 1000
link/ether ec:0d:9a:48:72:12 brd ff:ff:ff:ff:ff:ff
6: enp132s0:  mtu 1500 qdisc noop state DOWN group default 
qlen 1000
link/ether ec:0d:9a:48:71:f6 brd ff:ff:ff:ff:ff:ff
20: vpp0:  mtu 1500 qdisc noop state DOWN group default 
qlen 1000
link/ether 00:25:90:98:2f:43 brd ff:ff:ff:ff:ff:ff
21: vpp1:  mtu 1500 qdisc noop state DOWN group default 
qlen 1000
link/ether ac:1f:6b:2c:18:88 brd ff:ff:ff:ff:ff:ff
22: vpp2:  mtu 1500 qdisc noop state DOWN group default 
qlen 1000
link/ether ac:1f:6b:2c:18:89 brd ff:ff:ff:ff:ff:ff
23: vpp3:  mtu 1500 qdisc noop state DOWN group default 
qlen 1000
link/ether de:ad:00:00:00:00 brd ff:ff:ff:ff:ff:ff



and now when i will set up any of vpp interfaces i have:



Sep 28 11:49:00 ubuntu vpp[6247]: /usr/bin/vpp: symbol lookup error: 
/usr/lib/vpp_plugins/router.so: undefined symbol: vlib_buffer_chain_validate





W dniu 2017-09-28 o 07:12, Burt Silverman pisze:
My bad, again. I commented stuff out and forgot to go back and try to fix this 
file the way I did rtnl.c. This compiles -- not tested

burts@burtvb:~/vppsb/router/router$ git diff .
diff --git a/router/router/tap_inject_tap.c b/router/router/tap_inject_tap.c
index 9650323..a3ec9ff 100644
--- a/router/router/tap_inject_tap.c
+++ b/router/router/tap_inject_tap.c
@@ -30,7 +30,7 @@


 static clib_error_t *
-tap_inject_tap_read (unix_file_t * f)
+tap_inject_tap_read (clib_file_t * f)
 {
   vlib_main_t * vm = vlib_get_main ();
   tap_inject_main_t * im = tap_inject_get_main ();
@@ -52,7 +52,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
   static const int one = 1;
   int fd;
   struct ifreq ifr;
-  unix_file_t template;
+  clib_file_t template;
   u32 tap_fd;
   u8 * name;

@@ -120,7 +120,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
   template.read_function = tap_inject_tap_read;
   template.file_descriptor = tap_fd;

-  unix_file_add (&unix_main, &template);
+  clib_file_add (&file_main, &template);

   tap_inject_insert_tap (sw->sw_if_index, tap_fd, ifr.ifr_ifindex);



On Wed, Sep 27, 2017 at 5:18 PM, Paweł Staszewski 
mailto:pstaszew...@itcare.pl>> wrote:

hmm

another error

 Building router in /git/vpp/build-root/build-vpp_debug-native/router 
make[1]: Entering directory '/git/vpp/build-root/build-vpp_debug-native/router'
  CC   router/tap_inject.lo
  CC   router/tap_inject_netlink.lo
  CC   router/tap_inject_node.lo
  CC   router/tap_inject_tap.lo
/git/vpp/build-data/../router/router/tap_inject_tap.c:33:22: error: unknown 
type name ‘unix_file_t’
 tap_inject_tap_read (unix_file_t * f)
  ^~~
/git/vpp/build-data/../router/router/tap_inject_tap.c: In f

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-28 Thread Paweł Staszewski

After removin this function calling:

  //vlib_buffer_chain_validate (vm, vlib_get_buffer (vm, bi[0]));

Sep 28 16:31:43 ubuntu vnet[7825]: received signal SIGSEGV, PC 
0x7f9e4b5c0d4c, faulting address 0x7fa609f35738

Sep 28 16:31:43 ubuntu vpp[7825]: DPDK physical memory layout:
Sep 28 16:31:43 ubuntu vpp[7825]: Segment 0: phys:0x41680, 
len:268435456, virt:0x7f9d2ec0, socket_id:0, hugepage_sz:2097152, 
nchannel:0, nrank:0
Sep 28 16:31:43 ubuntu vpp[7825]: Segment 1: phys:0x81dc0, 
len:2097152, virt:0x7f9d2e80, socket_id:1, hugepage_sz:2097152, 
nchannel:0, nrank:0
Sep 28 16:31:43 ubuntu vpp[7825]: Segment 2: phys:0x81e00, 
len:266338304, virt:0x7f9ceea0, socket_id:1, hugepage_sz:2097152, 
nchannel:0, nrank:0
Sep 28 16:31:44 ubuntu systemd[1]: vpp.service: Main process exited, 
code=dumped, status=6/ABRT

Sep 28 16:31:44 ubuntu systemd[1]: vpp.service: Unit entered failed state.
Sep 28 16:31:44 ubuntu systemd[1]: vpp.service: Failed with result 
'core-dump'.
Sep 28 16:31:44 ubuntu systemd[1]: vpp.service: Service hold-off time 
over, scheduling restart.



W dniu 2017-09-28 o 15:18, Burt Silverman pisze:

Hi Pawel,

It looks like that function vlib_buffer_chain_validate was removed 
from vlib/buffer.c prior to v17.01 and was never removed from the 
buffer_funcs.h header file.


Damjan, can we just remove the call in the vppsb router code to 
vlib_buffer_chain_validate(), or is something else needed?


Burt

On Thu, Sep 28, 2017 at 5:49 AM, Paweł Staszewski 
mailto:pstaszew...@itcare.pl>> wrote:


Ok

Compiled :)


But trying some example


vppctl create loopback interface
vppctl set interface state loop0 up
vppctl set interface state TenGigabitEthernet82/0/0 up
vppctl set interface state TenGigabitEthernet82/0/1 up
vppctl set interface ip address loop0 2.2.2.2/32 
vppctl set interface ip address TenGigabitEthernet82/0/0
10.0.10.2/24 
vppctl set interface ip address TenGigabitEthernet82/0/1
10.0.20.2/24 

vppctl enable tap-inject

till now have vpp interfaces:

ip a
1: lo:  mtu 65536 qdisc noqueue state
UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8  scope host lo
   valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
   valid_lft forever preferred_lft forever
2: enp2s0f0:  mtu 1500 qdisc mq
state UP group default qlen 1000
    link/ether 00:25:90:98:2f:42 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.53/24  brd
192.168.2.255 scope global enp2s0f0
   valid_lft forever preferred_lft forever
    inet6 fe80::225:90ff:fe98:2f42/64 scope link
   valid_lft forever preferred_lft forever
4: enp4s0:  mtu 1500 qdisc noop state DOWN
group default qlen 1000
    link/ether ec:0d:9a:48:72:12 brd ff:ff:ff:ff:ff:ff
6: enp132s0:  mtu 1500 qdisc noop state DOWN
group default qlen 1000
    link/ether ec:0d:9a:48:71:f6 brd ff:ff:ff:ff:ff:ff
20: vpp0:  mtu 1500 qdisc noop state DOWN
group default qlen 1000
    link/ether 00:25:90:98:2f:43 brd ff:ff:ff:ff:ff:ff
21: vpp1:  mtu 1500 qdisc noop state DOWN
group default qlen 1000
    link/ether ac:1f:6b:2c:18:88 brd ff:ff:ff:ff:ff:ff
22: vpp2:  mtu 1500 qdisc noop state DOWN
group default qlen 1000
    link/ether ac:1f:6b:2c:18:89 brd ff:ff:ff:ff:ff:ff
23: vpp3:  mtu 1500 qdisc noop state DOWN
group default qlen 1000
    link/ether de:ad:00:00:00:00 brd ff:ff:ff:ff:ff:ff


and now when i will set up any of vpp interfaces i have:


Sep 28 11:49:00 ubuntu vpp[6247]: /usr/bin/vpp: symbol lookup
error: /usr/lib/vpp_plugins/router.so: undefined symbol:
vlib_buffer_chain_validate





W dniu 2017-09-28 o 07:12, Burt Silverman pisze:

My bad, again. I commented stuff out and forgot to go back and
try to fix this file the way I did rtnl.c. This compiles -- not
tested

burts@burtvb:~/vppsb/router/router$ git diff .
diff --git a/router/router/tap_inject_tap.c
b/router/router/tap_inject_tap.c
index 9650323..a3ec9ff 100644
--- a/router/router/tap_inject_tap.c
+++ b/router/router/tap_inject_tap.c
@@ -30,7 +30,7 @@
 static clib_error_t *
-tap_inject_tap_read (unix_file_t * f)
+tap_inject_tap_read (clib_file_t * f)
 {
   vlib_main_t * vm = vlib_get_main ();
   tap_inject_main_t * im = tap_inject_get_main ();
@@ -52,7 +52,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
   static const int one = 1;
   int fd;
   struct ifreq ifr;
-  unix_file_t template;
+  clib_file_t template;
   u32 tap_fd;
   u8 * name;
@@ -120,7 +120,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
   template.read_function = tap_inject_tap_read;
   template.file_descriptor = tap_fd;
 

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-28 Thread Burt Silverman
Hi Pawel,

It looks like that function vlib_buffer_chain_validate was removed from
vlib/buffer.c prior to v17.01 and was never removed from the buffer_funcs.h
header file.

Damjan, can we just remove the call in the vppsb router code to
vlib_buffer_chain_validate(), or is something else needed?

Burt

On Thu, Sep 28, 2017 at 5:49 AM, Paweł Staszewski 
wrote:

> Ok
>
> Compiled :)
>
>
> But trying some example
>
>
> vppctl create loopback interface
> vppctl set interface state loop0 up
> vppctl set interface state TenGigabitEthernet82/0/0 up
> vppctl set interface state TenGigabitEthernet82/0/1 up
> vppctl set interface ip address loop0 2.2.2.2/32
> vppctl set interface ip address TenGigabitEthernet82/0/0 10.0.10.2/24
> vppctl set interface ip address TenGigabitEthernet82/0/1 10.0.20.2/24
>
> vppctl enable tap-inject
>
> till now have vpp interfaces:
>
> ip a
> 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group
> default qlen 1
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
>valid_lft forever preferred_lft forever
> inet6 ::1/128 scope host
>valid_lft forever preferred_lft forever
> 2: enp2s0f0:  mtu 1500 qdisc mq state UP
> group default qlen 1000
> link/ether 00:25:90:98:2f:42 brd ff:ff:ff:ff:ff:ff
> inet 192.168.2.53/24 brd 192.168.2.255 scope global enp2s0f0
>valid_lft forever preferred_lft forever
> inet6 fe80::225:90ff:fe98:2f42/64 scope link
>valid_lft forever preferred_lft forever
> 4: enp4s0:  mtu 1500 qdisc noop state DOWN group
> default qlen 1000
> link/ether ec:0d:9a:48:72:12 brd ff:ff:ff:ff:ff:ff
> 6: enp132s0:  mtu 1500 qdisc noop state DOWN group
> default qlen 1000
> link/ether ec:0d:9a:48:71:f6 brd ff:ff:ff:ff:ff:ff
> 20: vpp0:  mtu 1500 qdisc noop state DOWN group
> default qlen 1000
> link/ether 00:25:90:98:2f:43 brd ff:ff:ff:ff:ff:ff
> 21: vpp1:  mtu 1500 qdisc noop state DOWN group
> default qlen 1000
> link/ether ac:1f:6b:2c:18:88 brd ff:ff:ff:ff:ff:ff
> 22: vpp2:  mtu 1500 qdisc noop state DOWN group
> default qlen 1000
> link/ether ac:1f:6b:2c:18:89 brd ff:ff:ff:ff:ff:ff
> 23: vpp3:  mtu 1500 qdisc noop state DOWN group
> default qlen 1000
> link/ether de:ad:00:00:00:00 brd ff:ff:ff:ff:ff:ff
>
>
> and now when i will set up any of vpp interfaces i have:
>
>
> Sep 28 11:49:00 ubuntu vpp[6247]: /usr/bin/vpp: symbol lookup error:
> /usr/lib/vpp_plugins/router.so: undefined symbol:
> vlib_buffer_chain_validate
>
>
>
>
>
> W dniu 2017-09-28 o 07:12, Burt Silverman pisze:
>
> My bad, again. I commented stuff out and forgot to go back and try to fix
> this file the way I did rtnl.c. This compiles -- not tested
>
> burts@burtvb:~/vppsb/router/router$ git diff .
> diff --git a/router/router/tap_inject_tap.c b/router/router/tap_inject_
> tap.c
> index 9650323..a3ec9ff 100644
> --- a/router/router/tap_inject_tap.c
> +++ b/router/router/tap_inject_tap.c
> @@ -30,7 +30,7 @@
>
>
>  static clib_error_t *
> -tap_inject_tap_read (unix_file_t * f)
> +tap_inject_tap_read (clib_file_t * f)
>  {
>vlib_main_t * vm = vlib_get_main ();
>tap_inject_main_t * im = tap_inject_get_main ();
> @@ -52,7 +52,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
>static const int one = 1;
>int fd;
>struct ifreq ifr;
> -  unix_file_t template;
> +  clib_file_t template;
>u32 tap_fd;
>u8 * name;
>
> @@ -120,7 +120,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
>template.read_function = tap_inject_tap_read;
>template.file_descriptor = tap_fd;
>
> -  unix_file_add (&unix_main, &template);
> +  clib_file_add (&file_main, &template);
>
>tap_inject_insert_tap (sw->sw_if_index, tap_fd, ifr.ifr_ifindex);
>
>
>
> On Wed, Sep 27, 2017 at 5:18 PM, Paweł Staszewski 
> wrote:
>
>> hmm
>>
>> another error
>>
>>  Building router in /git/vpp/build-root/build-vpp_debug-native/router
>> 
>> make[1]: Entering directory '/git/vpp/build-root/build-vpp
>> _debug-native/router'
>>   CC   router/tap_inject.lo
>>   CC   router/tap_inject_netlink.lo
>>   CC   router/tap_inject_node.lo
>>   CC   router/tap_inject_tap.lo
>> /git/vpp/build-data/../router/router/tap_inject_tap.c:33:22: error:
>> unknown type name ‘unix_file_t’
>>  tap_inject_tap_read (unix_file_t * f)
>>   ^~~
>> /git/vpp/build-data/../router/router/tap_inject_tap.c: In function
>> ‘tap_inject_tap_connect’:
>> /git/vpp/build-data/../router/router/tap_inject_tap.c:55:3: error:
>> unknown type name ‘unix_file_t’
>>unix_file_t template;
>>^~~
>> /git/vpp/build-data/../router/router/tap_inject_tap.c:120:11: error:
>> request for member ‘read_function’ in something not a structure or union
>>template.read_function = tap_inject_tap_read;
>>^
>> /git/vpp/build-data/../router/router/tap_inject_tap.c:120:28: error:
>> ‘tap_inject_tap_read’ undeclared (first use in this function)
>>template.read_function = tap_inject_tap_read;
>> 

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-28 Thread Paweł Staszewski

Ok

Compiled :)


But trying some example


vppctl create loopback interface
vppctl set interface state loop0 up
vppctl set interface state TenGigabitEthernet82/0/0 up
vppctl set interface state TenGigabitEthernet82/0/1 up
vppctl set interface ip address loop0 2.2.2.2/32
vppctl set interface ip address TenGigabitEthernet82/0/0 10.0.10.2/24
vppctl set interface ip address TenGigabitEthernet82/0/1 10.0.20.2/24

vppctl enable tap-inject

till now have vpp interfaces:

ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN 
group default qlen 1

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
   valid_lft forever preferred_lft forever
2: enp2s0f0:  mtu 1500 qdisc mq state 
UP group default qlen 1000

    link/ether 00:25:90:98:2f:42 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.53/24 brd 192.168.2.255 scope global enp2s0f0
   valid_lft forever preferred_lft forever
    inet6 fe80::225:90ff:fe98:2f42/64 scope link
   valid_lft forever preferred_lft forever
4: enp4s0:  mtu 1500 qdisc noop state DOWN group 
default qlen 1000

    link/ether ec:0d:9a:48:72:12 brd ff:ff:ff:ff:ff:ff
6: enp132s0:  mtu 1500 qdisc noop state DOWN group 
default qlen 1000

    link/ether ec:0d:9a:48:71:f6 brd ff:ff:ff:ff:ff:ff
20: vpp0:  mtu 1500 qdisc noop state DOWN group 
default qlen 1000

    link/ether 00:25:90:98:2f:43 brd ff:ff:ff:ff:ff:ff
21: vpp1:  mtu 1500 qdisc noop state DOWN group 
default qlen 1000

    link/ether ac:1f:6b:2c:18:88 brd ff:ff:ff:ff:ff:ff
22: vpp2:  mtu 1500 qdisc noop state DOWN group 
default qlen 1000

    link/ether ac:1f:6b:2c:18:89 brd ff:ff:ff:ff:ff:ff
23: vpp3:  mtu 1500 qdisc noop state DOWN group 
default qlen 1000

    link/ether de:ad:00:00:00:00 brd ff:ff:ff:ff:ff:ff


and now when i will set up any of vpp interfaces i have:


Sep 28 11:49:00 ubuntu vpp[6247]: /usr/bin/vpp: symbol lookup error: 
/usr/lib/vpp_plugins/router.so: undefined symbol: vlib_buffer_chain_validate






W dniu 2017-09-28 o 07:12, Burt Silverman pisze:
My bad, again. I commented stuff out and forgot to go back and try to 
fix this file the way I did rtnl.c. This compiles -- not tested


burts@burtvb:~/vppsb/router/router$ git diff .
diff --git a/router/router/tap_inject_tap.c 
b/router/router/tap_inject_tap.c

index 9650323..a3ec9ff 100644
--- a/router/router/tap_inject_tap.c
+++ b/router/router/tap_inject_tap.c
@@ -30,7 +30,7 @@
 static clib_error_t *
-tap_inject_tap_read (unix_file_t * f)
+tap_inject_tap_read (clib_file_t * f)
 {
   vlib_main_t * vm = vlib_get_main ();
   tap_inject_main_t * im = tap_inject_get_main ();
@@ -52,7 +52,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
   static const int one = 1;
   int fd;
   struct ifreq ifr;
-  unix_file_t template;
+  clib_file_t template;
   u32 tap_fd;
   u8 * name;
@@ -120,7 +120,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
   template.read_function = tap_inject_tap_read;
   template.file_descriptor = tap_fd;
-  unix_file_add (&unix_main, &template);
+  clib_file_add (&file_main, &template);
   tap_inject_insert_tap (sw->sw_if_index, tap_fd, ifr.ifr_ifindex);


On Wed, Sep 27, 2017 at 5:18 PM, Paweł Staszewski 
mailto:pstaszew...@itcare.pl>> wrote:


hmm

another error

 Building router in
/git/vpp/build-root/build-vpp_debug-native/router 
make[1]: Entering directory
'/git/vpp/build-root/build-vpp_debug-native/router'
  CC   router/tap_inject.lo
  CC   router/tap_inject_netlink.lo
  CC   router/tap_inject_node.lo
  CC router/tap_inject_tap.lo
/git/vpp/build-data/../router/router/tap_inject_tap.c:33:22:
error: unknown type name ‘unix_file_t’
 tap_inject_tap_read (unix_file_t * f)
  ^~~
/git/vpp/build-data/../router/router/tap_inject_tap.c: In function
‘tap_inject_tap_connect’:
/git/vpp/build-data/../router/router/tap_inject_tap.c:55:3: error:
unknown type name ‘unix_file_t’
   unix_file_t template;
   ^~~
/git/vpp/build-data/../router/router/tap_inject_tap.c:120:11:
error: request for member ‘read_function’ in something not a
structure or union
   template.read_function = tap_inject_tap_read;
   ^
/git/vpp/build-data/../router/router/tap_inject_tap.c:120:28:
error: ‘tap_inject_tap_read’ undeclared (first use in this function)
   template.read_function = tap_inject_tap_read;
    ^~~
/git/vpp/build-data/../router/router/tap_inject_tap.c:120:28:
note: each undeclared identifier is reported only once for each
function it appears in
/git/vpp/build-data/../router/router/tap_inject_tap.c:121:11:
error: request for member ‘file_descriptor’ in something not a
structure or union
   template.file_descriptor = tap_fd;
   ^
/git/vpp/build-data/../router/router/tap_inject_tap.c:123:3:

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-27 Thread Burt Silverman
My bad, again. I commented stuff out and forgot to go back and try to fix
this file the way I did rtnl.c. This compiles -- not tested

burts@burtvb:~/vppsb/router/router$ git diff .
diff --git a/router/router/tap_inject_tap.c b/router/router/tap_inject_tap.c
index 9650323..a3ec9ff 100644
--- a/router/router/tap_inject_tap.c
+++ b/router/router/tap_inject_tap.c
@@ -30,7 +30,7 @@


 static clib_error_t *
-tap_inject_tap_read (unix_file_t * f)
+tap_inject_tap_read (clib_file_t * f)
 {
   vlib_main_t * vm = vlib_get_main ();
   tap_inject_main_t * im = tap_inject_get_main ();
@@ -52,7 +52,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
   static const int one = 1;
   int fd;
   struct ifreq ifr;
-  unix_file_t template;
+  clib_file_t template;
   u32 tap_fd;
   u8 * name;

@@ -120,7 +120,7 @@ tap_inject_tap_connect (vnet_hw_interface_t * hw)
   template.read_function = tap_inject_tap_read;
   template.file_descriptor = tap_fd;

-  unix_file_add (&unix_main, &template);
+  clib_file_add (&file_main, &template);

   tap_inject_insert_tap (sw->sw_if_index, tap_fd, ifr.ifr_ifindex);



On Wed, Sep 27, 2017 at 5:18 PM, Paweł Staszewski 
wrote:

> hmm
>
> another error
>
>  Building router in /git/vpp/build-root/build-vpp_debug-native/router
> 
> make[1]: Entering directory '/git/vpp/build-root/build-
> vpp_debug-native/router'
>   CC   router/tap_inject.lo
>   CC   router/tap_inject_netlink.lo
>   CC   router/tap_inject_node.lo
>   CC   router/tap_inject_tap.lo
> /git/vpp/build-data/../router/router/tap_inject_tap.c:33:22: error:
> unknown type name ‘unix_file_t’
>  tap_inject_tap_read (unix_file_t * f)
>   ^~~
> /git/vpp/build-data/../router/router/tap_inject_tap.c: In function
> ‘tap_inject_tap_connect’:
> /git/vpp/build-data/../router/router/tap_inject_tap.c:55:3: error:
> unknown type name ‘unix_file_t’
>unix_file_t template;
>^~~
> /git/vpp/build-data/../router/router/tap_inject_tap.c:120:11: error:
> request for member ‘read_function’ in something not a structure or union
>template.read_function = tap_inject_tap_read;
>^
> /git/vpp/build-data/../router/router/tap_inject_tap.c:120:28: error:
> ‘tap_inject_tap_read’ undeclared (first use in this function)
>template.read_function = tap_inject_tap_read;
> ^~~
> /git/vpp/build-data/../router/router/tap_inject_tap.c:120:28: note: each
> undeclared identifier is reported only once for each function it appears in
> /git/vpp/build-data/../router/router/tap_inject_tap.c:121:11: error:
> request for member ‘file_descriptor’ in something not a structure or union
>template.file_descriptor = tap_fd;
>^
> /git/vpp/build-data/../router/router/tap_inject_tap.c:123:3: error:
> implicit declaration of function ‘unix_file_add’ [-Werror=implicit-function-
> declaration]
>unix_file_add (&unix_main, &template);
>^
> cc1: all warnings being treated as errors
> Makefile:476: recipe for target 'router/tap_inject_tap.lo' failed
> make[1]: *** [router/tap_inject_tap.lo] Error 1
> make[1]: *** Waiting for unfinished jobs
> make[1]: Leaving directory '/git/vpp/build-root/build-
> vpp_debug-native/router'
> Makefile:698: recipe for target 'router-build' failed
> make: *** [router-build] Error 2
>
>
>
> W dniu 2017-09-27 o 23:06, Paweł Staszewski pisze:
>
> After adding this patch other problem:)
>
>  Building netlink in /git/vpp/build-root/build-vpp_debug-native/netlink
> 
> make[1]: Entering directory '/git/vpp/build-root/build-
> vpp_debug-native/netlink'
>   CCLD librtnl.la
>   CC   test/test.lo
> ar: `u' modifier ignored since `D' is the default (see `U')
> /git/vpp/build-data/../netlink/test/test.c: In function
> ‘mapper_ns_add_command_fn’:
> /git/vpp/build-data/../netlink/test/test.c:125:14: error: implicit
> declaration of function ‘ip4_fib_index_from_table_id’
> [-Werror=implicit-function-declaration]
>u32 fib4 = ip4_fib_index_from_table_id(table_id);
>   ^~~
> /git/vpp/build-data/../netlink/test/test.c:126:14: error: implicit
> declaration of function ‘ip6_fib_index_from_table_id’
> [-Werror=implicit-function-declaration]
>u32 fib6 = ip6_fib_index_from_table_id(table_id);
>   ^~~
> cc1: all warnings being treated as errors
> Makefile:520: recipe for target 'test/test.lo' failed
> make[1]: *** [test/test.lo] Error 1
> make[1]: Leaving directory '/git/vpp/build-root/build-
> vpp_debug-native/netlink'
> Makefile:698: recipe for target 'netlink-build' failed
> make: *** [netlink-build] Error 2
>
>
>
> W dniu 2017-09-27 o 20:06, Burt Silverman pisze:
>
> Hi Michael,
>
> I came up with a patch that compiles, but I have not tested it. Hopefully
> it is this simple:
>
> burts@burtvb:~/vppsb/netlink/librtnl$ git diff .
> diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
> index 04f0440..fa31617 100644
> --- 

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-27 Thread Burt Silverman
My bad. I forgot to say that I had eliminated the testrtnl_plugin.la from
the Makefile.am; I assumed it was not needed. I guess that was laziness on
my part.

Burt

On Wed, Sep 27, 2017 at 5:17 PM, Paweł Staszewski 
wrote:

> ok added
>
> vnet/fib/ip4_fib.h
>
> vnet/fib/ip6_fib.h
>
> to test.c
>
> going next try:)
>
>
>
> W dniu 2017-09-27 o 23:06, Paweł Staszewski pisze:
>
> After adding this patch other problem:)
>
>  Building netlink in /git/vpp/build-root/build-vpp_debug-native/netlink
> 
> make[1]: Entering directory '/git/vpp/build-root/build-
> vpp_debug-native/netlink'
>   CCLD librtnl.la
>   CC   test/test.lo
> ar: `u' modifier ignored since `D' is the default (see `U')
> /git/vpp/build-data/../netlink/test/test.c: In function
> ‘mapper_ns_add_command_fn’:
> /git/vpp/build-data/../netlink/test/test.c:125:14: error: implicit
> declaration of function ‘ip4_fib_index_from_table_id’
> [-Werror=implicit-function-declaration]
>u32 fib4 = ip4_fib_index_from_table_id(table_id);
>   ^~~
> /git/vpp/build-data/../netlink/test/test.c:126:14: error: implicit
> declaration of function ‘ip6_fib_index_from_table_id’
> [-Werror=implicit-function-declaration]
>u32 fib6 = ip6_fib_index_from_table_id(table_id);
>   ^~~
> cc1: all warnings being treated as errors
> Makefile:520: recipe for target 'test/test.lo' failed
> make[1]: *** [test/test.lo] Error 1
> make[1]: Leaving directory '/git/vpp/build-root/build-
> vpp_debug-native/netlink'
> Makefile:698: recipe for target 'netlink-build' failed
> make: *** [netlink-build] Error 2
>
>
>
> W dniu 2017-09-27 o 20:06, Burt Silverman pisze:
>
> Hi Michael,
>
> I came up with a patch that compiles, but I have not tested it. Hopefully
> it is this simple:
>
> burts@burtvb:~/vppsb/netlink/librtnl$ git diff .
> diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
> index 04f0440..fa31617 100644
> --- a/netlink/librtnl/rtnl.c
> +++ b/netlink/librtnl/rtnl.c
> @@ -31,6 +31,7 @@
>
>  #include 
>  #include 
> +#include 
>
>  #undef DBL_MAX
>  #define DBL_MAX 10.0
> @@ -102,7 +103,7 @@ rtnl_cancel_timeout(rtnl_ns_t *ns)
>ns->timeout = DBL_MAX;
>  }
>
> -static clib_error_t *rtnl_read_cb(struct unix_file * f)
> +static clib_error_t *rtnl_read_cb(struct clib_file * f)
>  {
>rtnl_main_t *rm = &rtnl_main;
>vlib_main_t *vm = vlib_get_main();
> @@ -138,7 +139,7 @@ int rtnl_dump_request(rtnl_ns_t *ns, int type, void
> *req, size_t len)
>
>  static void rtnl_socket_close(rtnl_ns_t *ns)
>  {
> -  unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
> +  clib_file_del(&file_main, &file_main.file_pool[ns->unix_index]);
>close(ns->rtnl_socket);
>  }
>
> @@ -259,11 +260,11 @@ static int rtnl_socket_open(rtnl_ns_t *ns)
>  return -3;
>}
>
> -  unix_file_t template = {0};
> +  clib_file_t template = {0};
>template.read_function = rtnl_read_cb;
>template.file_descriptor = ns->rtnl_socket;
>template.private_data = (uword) (ns - rm->streams);
> -  ns->unix_index = unix_file_add (&unix_main, &template);
> +  ns->unix_index = clib_file_add (&file_main, &template);
>return 0;
>  }
>
>
> On Wed, Sep 27, 2017 at 1:41 PM, Michael Borokhovich  > wrote:
>
>> Hi Burt, Pawel,
>>
>> Did you eventually manage to install the router plugin with the latest
>> VPP?
>>
>> Thanks,
>> Michael.
>>
>>
>> On Tue, Sep 19, 2017 at 6:05 PM, Burt Silverman  wrote:
>>
>>> Same problem here. I guess the vlib code was updated but the vppsb has
>>> not caught up.
>>>
>>> Burt
>>>
>>> On Mon, Sep 18, 2017 at 12:56 PM, Paweł Staszewski <
>>> pstaszew...@itcare.pl> wrote:
>>>
 Trying to add netlink from vppsb to the latest vpp git but :


  Building netlink in /git/vpp/build-root/build-vpp_debug-native/netlink
 
 make[1]: Entering directory '/git/vpp/build-root/build-vpp
 _debug-native/netlink'
   CC   librtnl/netns.lo
   CC   librtnl/rtnl.lo
   CC   librtnl/mapper.lo
   CC   test/test.lo
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42: error: ‘struct
 unix_file’ declared inside parameter list will not be visible outside of
 this definition or declaration [-Werror]
  static clib_error_t *rtnl_read_cb(struct unix_file * f)
   ^
 /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
 ‘rtnl_read_cb’:
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33: error:
 dereferencing pointer to incomplete type ‘struct unix_file’
rtnl_ns_t *ns = &rm->streams[f->private_data];
  ^~
 /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
 ‘rtnl_socket_close’:
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3: error: implicit
 declaration of function ‘unix_file_del’ [-Werror=implicit-function-dec
 laration]
unix_file_del(&unix_main, &unix_main.file_p

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-27 Thread Paweł Staszewski

hmm

another error

 Building router in 
/git/vpp/build-root/build-vpp_debug-native/router 
make[1]: Entering directory 
'/git/vpp/build-root/build-vpp_debug-native/router'

  CC   router/tap_inject.lo
  CC   router/tap_inject_netlink.lo
  CC   router/tap_inject_node.lo
  CC   router/tap_inject_tap.lo
/git/vpp/build-data/../router/router/tap_inject_tap.c:33:22: error: 
unknown type name ‘unix_file_t’

 tap_inject_tap_read (unix_file_t * f)
  ^~~
/git/vpp/build-data/../router/router/tap_inject_tap.c: In function 
‘tap_inject_tap_connect’:
/git/vpp/build-data/../router/router/tap_inject_tap.c:55:3: error: 
unknown type name ‘unix_file_t’

   unix_file_t template;
   ^~~
/git/vpp/build-data/../router/router/tap_inject_tap.c:120:11: error: 
request for member ‘read_function’ in something not a structure or union

   template.read_function = tap_inject_tap_read;
   ^
/git/vpp/build-data/../router/router/tap_inject_tap.c:120:28: error: 
‘tap_inject_tap_read’ undeclared (first use in this function)

   template.read_function = tap_inject_tap_read;
    ^~~
/git/vpp/build-data/../router/router/tap_inject_tap.c:120:28: note: each 
undeclared identifier is reported only once for each function it appears in
/git/vpp/build-data/../router/router/tap_inject_tap.c:121:11: error: 
request for member ‘file_descriptor’ in something not a structure or union

   template.file_descriptor = tap_fd;
   ^
/git/vpp/build-data/../router/router/tap_inject_tap.c:123:3: error: 
implicit declaration of function ‘unix_file_add’ 
[-Werror=implicit-function-declaration]

   unix_file_add (&unix_main, &template);
   ^
cc1: all warnings being treated as errors
Makefile:476: recipe for target 'router/tap_inject_tap.lo' failed
make[1]: *** [router/tap_inject_tap.lo] Error 1
make[1]: *** Waiting for unfinished jobs
make[1]: Leaving directory 
'/git/vpp/build-root/build-vpp_debug-native/router'

Makefile:698: recipe for target 'router-build' failed
make: *** [router-build] Error 2



W dniu 2017-09-27 o 23:06, Paweł Staszewski pisze:


After adding this patch other problem:)

 Building netlink in 
/git/vpp/build-root/build-vpp_debug-native/netlink 
make[1]: Entering directory 
'/git/vpp/build-root/build-vpp_debug-native/netlink'

  CCLD librtnl.la
  CC   test/test.lo
ar: `u' modifier ignored since `D' is the default (see `U')
/git/vpp/build-data/../netlink/test/test.c: In function 
‘mapper_ns_add_command_fn’:
/git/vpp/build-data/../netlink/test/test.c:125:14: error: implicit 
declaration of function ‘ip4_fib_index_from_table_id’ 
[-Werror=implicit-function-declaration]

   u32 fib4 = ip4_fib_index_from_table_id(table_id);
  ^~~
/git/vpp/build-data/../netlink/test/test.c:126:14: error: implicit 
declaration of function ‘ip6_fib_index_from_table_id’ 
[-Werror=implicit-function-declaration]

   u32 fib6 = ip6_fib_index_from_table_id(table_id);
  ^~~
cc1: all warnings being treated as errors
Makefile:520: recipe for target 'test/test.lo' failed
make[1]: *** [test/test.lo] Error 1
make[1]: Leaving directory 
'/git/vpp/build-root/build-vpp_debug-native/netlink'

Makefile:698: recipe for target 'netlink-build' failed
make: *** [netlink-build] Error 2



W dniu 2017-09-27 o 20:06, Burt Silverman pisze:

Hi Michael,

I came up with a patch that compiles, but I have not tested it. 
Hopefully it is this simple:


burts@burtvb:~/vppsb/netlink/librtnl$ git diff .
diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
index 04f0440..fa31617 100644
--- a/netlink/librtnl/rtnl.c
+++ b/netlink/librtnl/rtnl.c
@@ -31,6 +31,7 @@
 #include 
 #include 
+#include 
 #undef DBL_MAX
 #define DBL_MAX 10.0
@@ -102,7 +103,7 @@ rtnl_cancel_timeout(rtnl_ns_t *ns)
   ns->timeout = DBL_MAX;
 }
-static clib_error_t *rtnl_read_cb(struct unix_file * f)
+static clib_error_t *rtnl_read_cb(struct clib_file * f)
 {
   rtnl_main_t *rm = &rtnl_main;
   vlib_main_t *vm = vlib_get_main();
@@ -138,7 +139,7 @@ int rtnl_dump_request(rtnl_ns_t *ns, int type, 
void *req, size_t len)

 static void rtnl_socket_close(rtnl_ns_t *ns)
 {
-  unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
+  clib_file_del(&file_main, &file_main.file_pool[ns->unix_index]);
   close(ns->rtnl_socket);
 }
@@ -259,11 +260,11 @@ static int rtnl_socket_open(rtnl_ns_t *ns)
     return -3;
   }
-  unix_file_t template = {0};
+  clib_file_t template = {0};
   template.read_function = rtnl_read_cb;
   template.file_descriptor = ns->rtnl_socket;
   template.private_data = (uword) (ns - rm->streams);
-  ns->unix_index = unix_file_add (&unix_main, &template);
+  ns->unix_index = clib_file_add (&file_main, &template);
   return 0;
 }

On Wed, Sep 27, 2017 at 1:41 PM, Michael Borokhovich 
mailto:michael...@gmail.com>> wrote:


Hi Burt, Pawel,

Did you eventually manage to instal

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-27 Thread Paweł Staszewski

ok added

vnet/fib/ip4_fib.h

vnet/fib/ip6_fib.h

to test.c

going next try:)



W dniu 2017-09-27 o 23:06, Paweł Staszewski pisze:


After adding this patch other problem:)

 Building netlink in 
/git/vpp/build-root/build-vpp_debug-native/netlink 
make[1]: Entering directory 
'/git/vpp/build-root/build-vpp_debug-native/netlink'

  CCLD librtnl.la
  CC   test/test.lo
ar: `u' modifier ignored since `D' is the default (see `U')
/git/vpp/build-data/../netlink/test/test.c: In function 
‘mapper_ns_add_command_fn’:
/git/vpp/build-data/../netlink/test/test.c:125:14: error: implicit 
declaration of function ‘ip4_fib_index_from_table_id’ 
[-Werror=implicit-function-declaration]

   u32 fib4 = ip4_fib_index_from_table_id(table_id);
  ^~~
/git/vpp/build-data/../netlink/test/test.c:126:14: error: implicit 
declaration of function ‘ip6_fib_index_from_table_id’ 
[-Werror=implicit-function-declaration]

   u32 fib6 = ip6_fib_index_from_table_id(table_id);
  ^~~
cc1: all warnings being treated as errors
Makefile:520: recipe for target 'test/test.lo' failed
make[1]: *** [test/test.lo] Error 1
make[1]: Leaving directory 
'/git/vpp/build-root/build-vpp_debug-native/netlink'

Makefile:698: recipe for target 'netlink-build' failed
make: *** [netlink-build] Error 2



W dniu 2017-09-27 o 20:06, Burt Silverman pisze:

Hi Michael,

I came up with a patch that compiles, but I have not tested it. 
Hopefully it is this simple:


burts@burtvb:~/vppsb/netlink/librtnl$ git diff .
diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
index 04f0440..fa31617 100644
--- a/netlink/librtnl/rtnl.c
+++ b/netlink/librtnl/rtnl.c
@@ -31,6 +31,7 @@
 #include 
 #include 
+#include 
 #undef DBL_MAX
 #define DBL_MAX 10.0
@@ -102,7 +103,7 @@ rtnl_cancel_timeout(rtnl_ns_t *ns)
   ns->timeout = DBL_MAX;
 }
-static clib_error_t *rtnl_read_cb(struct unix_file * f)
+static clib_error_t *rtnl_read_cb(struct clib_file * f)
 {
   rtnl_main_t *rm = &rtnl_main;
   vlib_main_t *vm = vlib_get_main();
@@ -138,7 +139,7 @@ int rtnl_dump_request(rtnl_ns_t *ns, int type, 
void *req, size_t len)

 static void rtnl_socket_close(rtnl_ns_t *ns)
 {
-  unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
+  clib_file_del(&file_main, &file_main.file_pool[ns->unix_index]);
   close(ns->rtnl_socket);
 }
@@ -259,11 +260,11 @@ static int rtnl_socket_open(rtnl_ns_t *ns)
     return -3;
   }
-  unix_file_t template = {0};
+  clib_file_t template = {0};
   template.read_function = rtnl_read_cb;
   template.file_descriptor = ns->rtnl_socket;
   template.private_data = (uword) (ns - rm->streams);
-  ns->unix_index = unix_file_add (&unix_main, &template);
+  ns->unix_index = clib_file_add (&file_main, &template);
   return 0;
 }

On Wed, Sep 27, 2017 at 1:41 PM, Michael Borokhovich 
mailto:michael...@gmail.com>> wrote:


Hi Burt, Pawel,

Did you eventually manage to install the router plugin with the
latest VPP?

Thanks,
Michael.


On Tue, Sep 19, 2017 at 6:05 PM, Burt Silverman mailto:bur...@gmail.com>> wrote:

Same problem here. I guess the vlib code was updated but the
vppsb has not caught up.

Burt

On Mon, Sep 18, 2017 at 12:56 PM, Paweł Staszewski
mailto:pstaszew...@itcare.pl>> wrote:

Trying to add netlink from vppsb to the latest vpp git but :


 Building netlink in
/git/vpp/build-root/build-vpp_debug-native/netlink 
make[1]: Entering directory
'/git/vpp/build-root/build-vpp_debug-native/netlink'
  CC   librtnl/netns.lo
  CC   librtnl/rtnl.lo
  CC   librtnl/mapper.lo
  CC   test/test.lo
/git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42:
error: ‘struct unix_file’ declared inside parameter list
will not be visible outside of this definition or
declaration [-Werror]
 static clib_error_t *rtnl_read_cb(struct unix_file * f)
^
/git/vpp/build-data/../netlink/librtnl/rtnl.c: In
function ‘rtnl_read_cb’:
/git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33:
error: dereferencing pointer to incomplete type ‘struct
unix_file’
   rtnl_ns_t *ns = &rm->streams[f->private_data];
^~
/git/vpp/build-data/../netlink/librtnl/rtnl.c: In
function ‘rtnl_socket_close’:
/git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3:
error: implicit declaration of function ‘unix_file_del’
[-Werror=implicit-function-declaration]
   unix_file_del(&unix_main,
&unix_main.file_pool[ns->unix_index]);
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39:
error: ‘unix_main_t {aka struct }’ has no
member nam

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-27 Thread Paweł Staszewski

After adding this patch other problem:)

 Building netlink in 
/git/vpp/build-root/build-vpp_debug-native/netlink 
make[1]: Entering directory 
'/git/vpp/build-root/build-vpp_debug-native/netlink'

  CCLD librtnl.la
  CC   test/test.lo
ar: `u' modifier ignored since `D' is the default (see `U')
/git/vpp/build-data/../netlink/test/test.c: In function 
‘mapper_ns_add_command_fn’:
/git/vpp/build-data/../netlink/test/test.c:125:14: error: implicit 
declaration of function ‘ip4_fib_index_from_table_id’ 
[-Werror=implicit-function-declaration]

   u32 fib4 = ip4_fib_index_from_table_id(table_id);
  ^~~
/git/vpp/build-data/../netlink/test/test.c:126:14: error: implicit 
declaration of function ‘ip6_fib_index_from_table_id’ 
[-Werror=implicit-function-declaration]

   u32 fib6 = ip6_fib_index_from_table_id(table_id);
  ^~~
cc1: all warnings being treated as errors
Makefile:520: recipe for target 'test/test.lo' failed
make[1]: *** [test/test.lo] Error 1
make[1]: Leaving directory 
'/git/vpp/build-root/build-vpp_debug-native/netlink'

Makefile:698: recipe for target 'netlink-build' failed
make: *** [netlink-build] Error 2



W dniu 2017-09-27 o 20:06, Burt Silverman pisze:

Hi Michael,

I came up with a patch that compiles, but I have not tested it. 
Hopefully it is this simple:


burts@burtvb:~/vppsb/netlink/librtnl$ git diff .
diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
index 04f0440..fa31617 100644
--- a/netlink/librtnl/rtnl.c
+++ b/netlink/librtnl/rtnl.c
@@ -31,6 +31,7 @@
 #include 
 #include 
+#include 
 #undef DBL_MAX
 #define DBL_MAX 10.0
@@ -102,7 +103,7 @@ rtnl_cancel_timeout(rtnl_ns_t *ns)
   ns->timeout = DBL_MAX;
 }
-static clib_error_t *rtnl_read_cb(struct unix_file * f)
+static clib_error_t *rtnl_read_cb(struct clib_file * f)
 {
   rtnl_main_t *rm = &rtnl_main;
   vlib_main_t *vm = vlib_get_main();
@@ -138,7 +139,7 @@ int rtnl_dump_request(rtnl_ns_t *ns, int type, 
void *req, size_t len)

 static void rtnl_socket_close(rtnl_ns_t *ns)
 {
-  unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
+  clib_file_del(&file_main, &file_main.file_pool[ns->unix_index]);
   close(ns->rtnl_socket);
 }
@@ -259,11 +260,11 @@ static int rtnl_socket_open(rtnl_ns_t *ns)
     return -3;
   }
-  unix_file_t template = {0};
+  clib_file_t template = {0};
   template.read_function = rtnl_read_cb;
   template.file_descriptor = ns->rtnl_socket;
   template.private_data = (uword) (ns - rm->streams);
-  ns->unix_index = unix_file_add (&unix_main, &template);
+  ns->unix_index = clib_file_add (&file_main, &template);
   return 0;
 }

On Wed, Sep 27, 2017 at 1:41 PM, Michael Borokhovich 
mailto:michael...@gmail.com>> wrote:


Hi Burt, Pawel,

Did you eventually manage to install the router plugin with the
latest VPP?

Thanks,
Michael.


On Tue, Sep 19, 2017 at 6:05 PM, Burt Silverman mailto:bur...@gmail.com>> wrote:

Same problem here. I guess the vlib code was updated but the
vppsb has not caught up.

Burt

On Mon, Sep 18, 2017 at 12:56 PM, Paweł Staszewski
mailto:pstaszew...@itcare.pl>> wrote:

Trying to add netlink from vppsb to the latest vpp git but :


 Building netlink in
/git/vpp/build-root/build-vpp_debug-native/netlink 
make[1]: Entering directory
'/git/vpp/build-root/build-vpp_debug-native/netlink'
  CC   librtnl/netns.lo
  CC   librtnl/rtnl.lo
  CC   librtnl/mapper.lo
  CC   test/test.lo
/git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42:
error: ‘struct unix_file’ declared inside parameter list
will not be visible outside of this definition or
declaration [-Werror]
 static clib_error_t *rtnl_read_cb(struct unix_file * f)
^
/git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
‘rtnl_read_cb’:
/git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33:
error: dereferencing pointer to incomplete type ‘struct
unix_file’
   rtnl_ns_t *ns = &rm->streams[f->private_data];
   ^~
/git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
‘rtnl_socket_close’:
/git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3:
error: implicit declaration of function ‘unix_file_del’
[-Werror=implicit-function-declaration]
   unix_file_del(&unix_main,
&unix_main.file_pool[ns->unix_index]);
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39:
error: ‘unix_main_t {aka struct }’ has no
member named ‘file_pool’
   unix_file_del(&unix_main,
&unix_main.file_pool[ns->unix_index]);
^
  

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-27 Thread Michael Borokhovich
Thanks a lot, Burt! I will try this.

On Wed, Sep 27, 2017 at 4:04 PM, Burt Silverman  wrote:

> The basic "include-what-you-use" philosophy would say that it is *smart*
> (vs. necessary) to add the #include you added, Michael, but on the other
> hand, I believe vppinfra/file.h is included in vlib/unix/unix.h is included
> in rtnl.c, so I do not understand why you got that compiler error. Oh,
> maybe you tried to build something partial without following the "plan"
> spelled out in vppsb/router/README.md. I mean to say, (one more try,) it
> appears that the README.md in vppsb/router is more reliable than the
> README.md in vppsb/netlink: the reliable README.md will make certain that
> the header files get installed as needed into vpp/build-root/install-vpp-
> native/vpp/include/
>
> Burt
>
> On Wed, Sep 27, 2017 at 2:50 PM, Michael Borokhovich  > wrote:
>
>> Thanks, Burt!
>>
>> I've realized that I also need to add #include  to the
>> rtnl.c
>>
>> However it says: "*fatal error: *vppinfra/file.h: No such file or
>> directory"
>>
>> Do you have any suggestions for this? Otherwise, I will try to figure it
>> out.
>>
>> Michael.
>>
>>
>>
>>
>>
>> On Wed, Sep 27, 2017 at 2:06 PM, Burt Silverman  wrote:
>>
>>> Hi Michael,
>>>
>>> I came up with a patch that compiles, but I have not tested it.
>>> Hopefully it is this simple:
>>>
>>> burts@burtvb:~/vppsb/netlink/librtnl$ git diff .
>>> diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
>>> index 04f0440..fa31617 100644
>>> --- a/netlink/librtnl/rtnl.c
>>> +++ b/netlink/librtnl/rtnl.c
>>> @@ -31,6 +31,7 @@
>>>
>>>  #include 
>>>  #include 
>>> +#include 
>>>
>>>  #undef DBL_MAX
>>>  #define DBL_MAX 10.0
>>> @@ -102,7 +103,7 @@ rtnl_cancel_timeout(rtnl_ns_t *ns)
>>>ns->timeout = DBL_MAX;
>>>  }
>>>
>>> -static clib_error_t *rtnl_read_cb(struct unix_file * f)
>>> +static clib_error_t *rtnl_read_cb(struct clib_file * f)
>>>  {
>>>rtnl_main_t *rm = &rtnl_main;
>>>vlib_main_t *vm = vlib_get_main();
>>> @@ -138,7 +139,7 @@ int rtnl_dump_request(rtnl_ns_t *ns, int type, void
>>> *req, size_t len)
>>>
>>>  static void rtnl_socket_close(rtnl_ns_t *ns)
>>>  {
>>> -  unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>>> +  clib_file_del(&file_main, &file_main.file_pool[ns->unix_index]);
>>>close(ns->rtnl_socket);
>>>  }
>>>
>>> @@ -259,11 +260,11 @@ static int rtnl_socket_open(rtnl_ns_t *ns)
>>>  return -3;
>>>}
>>>
>>> -  unix_file_t template = {0};
>>> +  clib_file_t template = {0};
>>>template.read_function = rtnl_read_cb;
>>>template.file_descriptor = ns->rtnl_socket;
>>>template.private_data = (uword) (ns - rm->streams);
>>> -  ns->unix_index = unix_file_add (&unix_main, &template);
>>> +  ns->unix_index = clib_file_add (&file_main, &template);
>>>return 0;
>>>  }
>>>
>>>
>>> On Wed, Sep 27, 2017 at 1:41 PM, Michael Borokhovich <
>>> michael...@gmail.com> wrote:
>>>
 Hi Burt, Pawel,

 Did you eventually manage to install the router plugin with the latest
 VPP?

 Thanks,
 Michael.


 On Tue, Sep 19, 2017 at 6:05 PM, Burt Silverman 
 wrote:

> Same problem here. I guess the vlib code was updated but the vppsb has
> not caught up.
>
> Burt
>
> On Mon, Sep 18, 2017 at 12:56 PM, Paweł Staszewski <
> pstaszew...@itcare.pl> wrote:
>
>> Trying to add netlink from vppsb to the latest vpp git but :
>>
>>
>>  Building netlink in 
>> /git/vpp/build-root/build-vpp_debug-native/netlink
>> 
>> make[1]: Entering directory '/git/vpp/build-root/build-vpp
>> _debug-native/netlink'
>>   CC   librtnl/netns.lo
>>   CC   librtnl/rtnl.lo
>>   CC   librtnl/mapper.lo
>>   CC   test/test.lo
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42: error: ‘struct
>> unix_file’ declared inside parameter list will not be visible outside of
>> this definition or declaration [-Werror]
>>  static clib_error_t *rtnl_read_cb(struct unix_file * f)
>>   ^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>> ‘rtnl_read_cb’:
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33: error:
>> dereferencing pointer to incomplete type ‘struct unix_file’
>>rtnl_ns_t *ns = &rm->streams[f->private_data];
>>  ^~
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>> ‘rtnl_socket_close’:
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3: error: implicit
>> declaration of function ‘unix_file_del’ [-Werror=implicit-function-dec
>> laration]
>>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39: error:
>> ‘unix_main_t {aka struct }’ has no member named ‘file_pool’
>>unix_file_del(&unix_main, &unix_main.file_pool[

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-27 Thread Burt Silverman
The basic "include-what-you-use" philosophy would say that it is *smart*
(vs. necessary) to add the #include you added, Michael, but on the other
hand, I believe vppinfra/file.h is included in vlib/unix/unix.h is included
in rtnl.c, so I do not understand why you got that compiler error. Oh,
maybe you tried to build something partial without following the "plan"
spelled out in vppsb/router/README.md. I mean to say, (one more try,) it
appears that the README.md in vppsb/router is more reliable than the
README.md in vppsb/netlink: the reliable README.md will make certain that
the header files get installed as needed into
vpp/build-root/install-vpp-native/vpp/include/

Burt

On Wed, Sep 27, 2017 at 2:50 PM, Michael Borokhovich 
wrote:

> Thanks, Burt!
>
> I've realized that I also need to add #include  to the
> rtnl.c
>
> However it says: "*fatal error: *vppinfra/file.h: No such file or
> directory"
>
> Do you have any suggestions for this? Otherwise, I will try to figure it
> out.
>
> Michael.
>
>
>
>
>
> On Wed, Sep 27, 2017 at 2:06 PM, Burt Silverman  wrote:
>
>> Hi Michael,
>>
>> I came up with a patch that compiles, but I have not tested it. Hopefully
>> it is this simple:
>>
>> burts@burtvb:~/vppsb/netlink/librtnl$ git diff .
>> diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
>> index 04f0440..fa31617 100644
>> --- a/netlink/librtnl/rtnl.c
>> +++ b/netlink/librtnl/rtnl.c
>> @@ -31,6 +31,7 @@
>>
>>  #include 
>>  #include 
>> +#include 
>>
>>  #undef DBL_MAX
>>  #define DBL_MAX 10.0
>> @@ -102,7 +103,7 @@ rtnl_cancel_timeout(rtnl_ns_t *ns)
>>ns->timeout = DBL_MAX;
>>  }
>>
>> -static clib_error_t *rtnl_read_cb(struct unix_file * f)
>> +static clib_error_t *rtnl_read_cb(struct clib_file * f)
>>  {
>>rtnl_main_t *rm = &rtnl_main;
>>vlib_main_t *vm = vlib_get_main();
>> @@ -138,7 +139,7 @@ int rtnl_dump_request(rtnl_ns_t *ns, int type, void
>> *req, size_t len)
>>
>>  static void rtnl_socket_close(rtnl_ns_t *ns)
>>  {
>> -  unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>> +  clib_file_del(&file_main, &file_main.file_pool[ns->unix_index]);
>>close(ns->rtnl_socket);
>>  }
>>
>> @@ -259,11 +260,11 @@ static int rtnl_socket_open(rtnl_ns_t *ns)
>>  return -3;
>>}
>>
>> -  unix_file_t template = {0};
>> +  clib_file_t template = {0};
>>template.read_function = rtnl_read_cb;
>>template.file_descriptor = ns->rtnl_socket;
>>template.private_data = (uword) (ns - rm->streams);
>> -  ns->unix_index = unix_file_add (&unix_main, &template);
>> +  ns->unix_index = clib_file_add (&file_main, &template);
>>return 0;
>>  }
>>
>>
>> On Wed, Sep 27, 2017 at 1:41 PM, Michael Borokhovich <
>> michael...@gmail.com> wrote:
>>
>>> Hi Burt, Pawel,
>>>
>>> Did you eventually manage to install the router plugin with the latest
>>> VPP?
>>>
>>> Thanks,
>>> Michael.
>>>
>>>
>>> On Tue, Sep 19, 2017 at 6:05 PM, Burt Silverman 
>>> wrote:
>>>
 Same problem here. I guess the vlib code was updated but the vppsb has
 not caught up.

 Burt

 On Mon, Sep 18, 2017 at 12:56 PM, Paweł Staszewski <
 pstaszew...@itcare.pl> wrote:

> Trying to add netlink from vppsb to the latest vpp git but :
>
>
>  Building netlink in 
> /git/vpp/build-root/build-vpp_debug-native/netlink
> 
> make[1]: Entering directory '/git/vpp/build-root/build-vpp
> _debug-native/netlink'
>   CC   librtnl/netns.lo
>   CC   librtnl/rtnl.lo
>   CC   librtnl/mapper.lo
>   CC   test/test.lo
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42: error: ‘struct
> unix_file’ declared inside parameter list will not be visible outside of
> this definition or declaration [-Werror]
>  static clib_error_t *rtnl_read_cb(struct unix_file * f)
>   ^
> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
> ‘rtnl_read_cb’:
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33: error:
> dereferencing pointer to incomplete type ‘struct unix_file’
>rtnl_ns_t *ns = &rm->streams[f->private_data];
>  ^~
> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
> ‘rtnl_socket_close’:
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3: error: implicit
> declaration of function ‘unix_file_del’ [-Werror=implicit-function-dec
> laration]
>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>^
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39: error:
> ‘unix_main_t {aka struct }’ has no member named ‘file_pool’
>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>^
> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
> ‘rtnl_socket_open’:
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:262:3: error: unknown
> type name ‘unix_

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-27 Thread Michael Borokhovich
Thanks, Burt!

I've realized that I also need to add #include  to the
rtnl.c

However it says: "*fatal error: *vppinfra/file.h: No such file or directory"

Do you have any suggestions for this? Otherwise, I will try to figure it
out.

Michael.





On Wed, Sep 27, 2017 at 2:06 PM, Burt Silverman  wrote:

> Hi Michael,
>
> I came up with a patch that compiles, but I have not tested it. Hopefully
> it is this simple:
>
> burts@burtvb:~/vppsb/netlink/librtnl$ git diff .
> diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
> index 04f0440..fa31617 100644
> --- a/netlink/librtnl/rtnl.c
> +++ b/netlink/librtnl/rtnl.c
> @@ -31,6 +31,7 @@
>
>  #include 
>  #include 
> +#include 
>
>  #undef DBL_MAX
>  #define DBL_MAX 10.0
> @@ -102,7 +103,7 @@ rtnl_cancel_timeout(rtnl_ns_t *ns)
>ns->timeout = DBL_MAX;
>  }
>
> -static clib_error_t *rtnl_read_cb(struct unix_file * f)
> +static clib_error_t *rtnl_read_cb(struct clib_file * f)
>  {
>rtnl_main_t *rm = &rtnl_main;
>vlib_main_t *vm = vlib_get_main();
> @@ -138,7 +139,7 @@ int rtnl_dump_request(rtnl_ns_t *ns, int type, void
> *req, size_t len)
>
>  static void rtnl_socket_close(rtnl_ns_t *ns)
>  {
> -  unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
> +  clib_file_del(&file_main, &file_main.file_pool[ns->unix_index]);
>close(ns->rtnl_socket);
>  }
>
> @@ -259,11 +260,11 @@ static int rtnl_socket_open(rtnl_ns_t *ns)
>  return -3;
>}
>
> -  unix_file_t template = {0};
> +  clib_file_t template = {0};
>template.read_function = rtnl_read_cb;
>template.file_descriptor = ns->rtnl_socket;
>template.private_data = (uword) (ns - rm->streams);
> -  ns->unix_index = unix_file_add (&unix_main, &template);
> +  ns->unix_index = clib_file_add (&file_main, &template);
>return 0;
>  }
>
>
> On Wed, Sep 27, 2017 at 1:41 PM, Michael Borokhovich  > wrote:
>
>> Hi Burt, Pawel,
>>
>> Did you eventually manage to install the router plugin with the latest
>> VPP?
>>
>> Thanks,
>> Michael.
>>
>>
>> On Tue, Sep 19, 2017 at 6:05 PM, Burt Silverman  wrote:
>>
>>> Same problem here. I guess the vlib code was updated but the vppsb has
>>> not caught up.
>>>
>>> Burt
>>>
>>> On Mon, Sep 18, 2017 at 12:56 PM, Paweł Staszewski <
>>> pstaszew...@itcare.pl> wrote:
>>>
 Trying to add netlink from vppsb to the latest vpp git but :


  Building netlink in /git/vpp/build-root/build-vpp_debug-native/netlink
 
 make[1]: Entering directory '/git/vpp/build-root/build-vpp
 _debug-native/netlink'
   CC   librtnl/netns.lo
   CC   librtnl/rtnl.lo
   CC   librtnl/mapper.lo
   CC   test/test.lo
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42: error: ‘struct
 unix_file’ declared inside parameter list will not be visible outside of
 this definition or declaration [-Werror]
  static clib_error_t *rtnl_read_cb(struct unix_file * f)
   ^
 /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
 ‘rtnl_read_cb’:
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33: error:
 dereferencing pointer to incomplete type ‘struct unix_file’
rtnl_ns_t *ns = &rm->streams[f->private_data];
  ^~
 /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
 ‘rtnl_socket_close’:
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3: error: implicit
 declaration of function ‘unix_file_del’ [-Werror=implicit-function-dec
 laration]
unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
^
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39: error:
 ‘unix_main_t {aka struct }’ has no member named ‘file_pool’
unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
^
 /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
 ‘rtnl_socket_open’:
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:262:3: error: unknown
 type name ‘unix_file_t’
unix_file_t template = {0};
^~~
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:263:11: error: request
 for member ‘read_function’ in something not a structure or union
template.read_function = rtnl_read_cb;
^
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:264:11: error: request
 for member ‘file_descriptor’ in something not a structure or union
template.file_descriptor = ns->rtnl_socket;
^
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:265:11: error: request
 for member ‘private_data’ in something not a structure or union
template.private_data = (uword) (ns - rm->streams);
^
 /git/vpp/build-data/../netlink/librtnl/rtnl.c:266:20: error: implicit
 declaration of function ‘unix_file_add’ [-Werror=implicit-function-dec
 laration]
ns->unix_index = unix_file_add (

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-27 Thread Burt Silverman
Hi Michael,

I came up with a patch that compiles, but I have not tested it. Hopefully
it is this simple:

burts@burtvb:~/vppsb/netlink/librtnl$ git diff .
diff --git a/netlink/librtnl/rtnl.c b/netlink/librtnl/rtnl.c
index 04f0440..fa31617 100644
--- a/netlink/librtnl/rtnl.c
+++ b/netlink/librtnl/rtnl.c
@@ -31,6 +31,7 @@

 #include 
 #include 
+#include 

 #undef DBL_MAX
 #define DBL_MAX 10.0
@@ -102,7 +103,7 @@ rtnl_cancel_timeout(rtnl_ns_t *ns)
   ns->timeout = DBL_MAX;
 }

-static clib_error_t *rtnl_read_cb(struct unix_file * f)
+static clib_error_t *rtnl_read_cb(struct clib_file * f)
 {
   rtnl_main_t *rm = &rtnl_main;
   vlib_main_t *vm = vlib_get_main();
@@ -138,7 +139,7 @@ int rtnl_dump_request(rtnl_ns_t *ns, int type, void
*req, size_t len)

 static void rtnl_socket_close(rtnl_ns_t *ns)
 {
-  unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
+  clib_file_del(&file_main, &file_main.file_pool[ns->unix_index]);
   close(ns->rtnl_socket);
 }

@@ -259,11 +260,11 @@ static int rtnl_socket_open(rtnl_ns_t *ns)
 return -3;
   }

-  unix_file_t template = {0};
+  clib_file_t template = {0};
   template.read_function = rtnl_read_cb;
   template.file_descriptor = ns->rtnl_socket;
   template.private_data = (uword) (ns - rm->streams);
-  ns->unix_index = unix_file_add (&unix_main, &template);
+  ns->unix_index = clib_file_add (&file_main, &template);
   return 0;
 }


On Wed, Sep 27, 2017 at 1:41 PM, Michael Borokhovich 
wrote:

> Hi Burt, Pawel,
>
> Did you eventually manage to install the router plugin with the latest VPP?
>
> Thanks,
> Michael.
>
>
> On Tue, Sep 19, 2017 at 6:05 PM, Burt Silverman  wrote:
>
>> Same problem here. I guess the vlib code was updated but the vppsb has
>> not caught up.
>>
>> Burt
>>
>> On Mon, Sep 18, 2017 at 12:56 PM, Paweł Staszewski > > wrote:
>>
>>> Trying to add netlink from vppsb to the latest vpp git but :
>>>
>>>
>>>  Building netlink in /git/vpp/build-root/build-vpp_debug-native/netlink
>>> 
>>> make[1]: Entering directory '/git/vpp/build-root/build-vpp
>>> _debug-native/netlink'
>>>   CC   librtnl/netns.lo
>>>   CC   librtnl/rtnl.lo
>>>   CC   librtnl/mapper.lo
>>>   CC   test/test.lo
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42: error: ‘struct
>>> unix_file’ declared inside parameter list will not be visible outside of
>>> this definition or declaration [-Werror]
>>>  static clib_error_t *rtnl_read_cb(struct unix_file * f)
>>>   ^
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>>> ‘rtnl_read_cb’:
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33: error:
>>> dereferencing pointer to incomplete type ‘struct unix_file’
>>>rtnl_ns_t *ns = &rm->streams[f->private_data];
>>>  ^~
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>>> ‘rtnl_socket_close’:
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3: error: implicit
>>> declaration of function ‘unix_file_del’ [-Werror=implicit-function-dec
>>> laration]
>>>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>>>^
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39: error:
>>> ‘unix_main_t {aka struct }’ has no member named ‘file_pool’
>>>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>>>^
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>>> ‘rtnl_socket_open’:
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:262:3: error: unknown
>>> type name ‘unix_file_t’
>>>unix_file_t template = {0};
>>>^~~
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:263:11: error: request
>>> for member ‘read_function’ in something not a structure or union
>>>template.read_function = rtnl_read_cb;
>>>^
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:264:11: error: request
>>> for member ‘file_descriptor’ in something not a structure or union
>>>template.file_descriptor = ns->rtnl_socket;
>>>^
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:265:11: error: request
>>> for member ‘private_data’ in something not a structure or union
>>>template.private_data = (uword) (ns - rm->streams);
>>>^
>>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:266:20: error: implicit
>>> declaration of function ‘unix_file_add’ [-Werror=implicit-function-dec
>>> laration]
>>>ns->unix_index = unix_file_add (&unix_main, &template);
>>> ^
>>> cc1: all warnings being treated as errors
>>> Makefile:520: recipe for target 'librtnl/rtnl.lo' failed
>>> make[1]: *** [librtnl/rtnl.lo] Error 1
>>> make[1]: *** Waiting for unfinished jobs
>>> /git/vpp/build-data/../netlink/test/test.c: In function
>>> ‘mapper_ns_add_command_fn’:
>>> /git/vpp/build-data/../netlink/test/test.c:125:14: error: implicit
>>> declaration of function ‘ip4_fib_index_from_table_id’
>>> [-Werror=implicit-f

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-27 Thread Michael Borokhovich
Hi Burt, Pawel,

Did you eventually manage to install the router plugin with the latest VPP?

Thanks,
Michael.


On Tue, Sep 19, 2017 at 6:05 PM, Burt Silverman  wrote:

> Same problem here. I guess the vlib code was updated but the vppsb has not
> caught up.
>
> Burt
>
> On Mon, Sep 18, 2017 at 12:56 PM, Paweł Staszewski 
> wrote:
>
>> Trying to add netlink from vppsb to the latest vpp git but :
>>
>>
>>  Building netlink in /git/vpp/build-root/build-vpp_debug-native/netlink
>> 
>> make[1]: Entering directory '/git/vpp/build-root/build-vpp
>> _debug-native/netlink'
>>   CC   librtnl/netns.lo
>>   CC   librtnl/rtnl.lo
>>   CC   librtnl/mapper.lo
>>   CC   test/test.lo
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42: error: ‘struct
>> unix_file’ declared inside parameter list will not be visible outside of
>> this definition or declaration [-Werror]
>>  static clib_error_t *rtnl_read_cb(struct unix_file * f)
>>   ^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>> ‘rtnl_read_cb’:
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33: error:
>> dereferencing pointer to incomplete type ‘struct unix_file’
>>rtnl_ns_t *ns = &rm->streams[f->private_data];
>>  ^~
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>> ‘rtnl_socket_close’:
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3: error: implicit
>> declaration of function ‘unix_file_del’ [-Werror=implicit-function-dec
>> laration]
>>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39: error:
>> ‘unix_main_t {aka struct }’ has no member named ‘file_pool’
>>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>> ‘rtnl_socket_open’:
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:262:3: error: unknown type
>> name ‘unix_file_t’
>>unix_file_t template = {0};
>>^~~
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:263:11: error: request for
>> member ‘read_function’ in something not a structure or union
>>template.read_function = rtnl_read_cb;
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:264:11: error: request for
>> member ‘file_descriptor’ in something not a structure or union
>>template.file_descriptor = ns->rtnl_socket;
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:265:11: error: request for
>> member ‘private_data’ in something not a structure or union
>>template.private_data = (uword) (ns - rm->streams);
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:266:20: error: implicit
>> declaration of function ‘unix_file_add’ [-Werror=implicit-function-dec
>> laration]
>>ns->unix_index = unix_file_add (&unix_main, &template);
>> ^
>> cc1: all warnings being treated as errors
>> Makefile:520: recipe for target 'librtnl/rtnl.lo' failed
>> make[1]: *** [librtnl/rtnl.lo] Error 1
>> make[1]: *** Waiting for unfinished jobs
>> /git/vpp/build-data/../netlink/test/test.c: In function
>> ‘mapper_ns_add_command_fn’:
>> /git/vpp/build-data/../netlink/test/test.c:125:14: error: implicit
>> declaration of function ‘ip4_fib_index_from_table_id’
>> [-Werror=implicit-function-declaration]
>>u32 fib4 = ip4_fib_index_from_table_id(table_id);
>>   ^~~
>> /git/vpp/build-data/../netlink/test/test.c:126:14: error: implicit
>> declaration of function ‘ip6_fib_index_from_table_id’
>> [-Werror=implicit-function-declaration]
>>u32 fib6 = ip6_fib_index_from_table_id(table_id);
>>   ^~~
>> cc1: all warnings being treated as errors
>> Makefile:520: recipe for target 'test/test.lo' failed
>> make[1]: *** [test/test.lo] Error 1
>> make[1]: Leaving directory '/git/vpp/build-root/build-vpp
>> _debug-native/netlink'
>> Makefile:698: recipe for target 'netlink-build' failed
>> make: *** [netlink-build] Error 2
>>
>>
>>
>>
>>
>> W dniu 2017-09-17 o 16:27, Paweł Staszewski pisze:
>>
>> Also latest vpp from git without including vppsb
>>>
>>> Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Service hold-off time
>>> over, scheduling restart.
>>> Sep 17 16:28:02 ubuntu systemd[1]: Stopped vector packet processing
>>> engine.
>>> Sep 17 16:28:02 ubuntu systemd[1]: Starting vector packet processing
>>> engine...
>>> Sep 17 16:28:02 ubuntu systemd[1]: Started vector packet processing
>>> engine.
>>> Sep 17 16:28:02 ubuntu vpp[1557]: vlib_plugin_early_init:356: plugin
>>> path /usr/lib/vpp_plugins
>>> Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:184: Loaded plugin:
>>> acl_plugin.so (Access Control Lists)
>>> Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:142:
>>> /usr/lib/vpp_plugins/dpdk_plugin.so: undefined symbol:
>>> aes_gcm_enc_128_sse

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-20 Thread Burt Silverman
Adding vppsb mailing list.

Burt

On Tue, Sep 19, 2017 at 6:05 PM, Burt Silverman  wrote:

> Same problem here. I guess the vlib code was updated but the vppsb has not
> caught up.
>
> Burt
>
> On Mon, Sep 18, 2017 at 12:56 PM, Paweł Staszewski 
> wrote:
>
>> Trying to add netlink from vppsb to the latest vpp git but :
>>
>>
>>  Building netlink in /git/vpp/build-root/build-vpp_debug-native/netlink
>> 
>> make[1]: Entering directory '/git/vpp/build-root/build-vpp
>> _debug-native/netlink'
>>   CC   librtnl/netns.lo
>>   CC   librtnl/rtnl.lo
>>   CC   librtnl/mapper.lo
>>   CC   test/test.lo
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42: error: ‘struct
>> unix_file’ declared inside parameter list will not be visible outside of
>> this definition or declaration [-Werror]
>>  static clib_error_t *rtnl_read_cb(struct unix_file * f)
>>   ^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>> ‘rtnl_read_cb’:
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33: error:
>> dereferencing pointer to incomplete type ‘struct unix_file’
>>rtnl_ns_t *ns = &rm->streams[f->private_data];
>>  ^~
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>> ‘rtnl_socket_close’:
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3: error: implicit
>> declaration of function ‘unix_file_del’ [-Werror=implicit-function-dec
>> laration]
>>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39: error:
>> ‘unix_main_t {aka struct }’ has no member named ‘file_pool’
>>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
>> ‘rtnl_socket_open’:
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:262:3: error: unknown type
>> name ‘unix_file_t’
>>unix_file_t template = {0};
>>^~~
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:263:11: error: request for
>> member ‘read_function’ in something not a structure or union
>>template.read_function = rtnl_read_cb;
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:264:11: error: request for
>> member ‘file_descriptor’ in something not a structure or union
>>template.file_descriptor = ns->rtnl_socket;
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:265:11: error: request for
>> member ‘private_data’ in something not a structure or union
>>template.private_data = (uword) (ns - rm->streams);
>>^
>> /git/vpp/build-data/../netlink/librtnl/rtnl.c:266:20: error: implicit
>> declaration of function ‘unix_file_add’ [-Werror=implicit-function-dec
>> laration]
>>ns->unix_index = unix_file_add (&unix_main, &template);
>> ^
>> cc1: all warnings being treated as errors
>> Makefile:520: recipe for target 'librtnl/rtnl.lo' failed
>> make[1]: *** [librtnl/rtnl.lo] Error 1
>> make[1]: *** Waiting for unfinished jobs
>> /git/vpp/build-data/../netlink/test/test.c: In function
>> ‘mapper_ns_add_command_fn’:
>> /git/vpp/build-data/../netlink/test/test.c:125:14: error: implicit
>> declaration of function ‘ip4_fib_index_from_table_id’
>> [-Werror=implicit-function-declaration]
>>u32 fib4 = ip4_fib_index_from_table_id(table_id);
>>   ^~~
>> /git/vpp/build-data/../netlink/test/test.c:126:14: error: implicit
>> declaration of function ‘ip6_fib_index_from_table_id’
>> [-Werror=implicit-function-declaration]
>>u32 fib6 = ip6_fib_index_from_table_id(table_id);
>>   ^~~
>> cc1: all warnings being treated as errors
>> Makefile:520: recipe for target 'test/test.lo' failed
>> make[1]: *** [test/test.lo] Error 1
>> make[1]: Leaving directory '/git/vpp/build-root/build-vpp
>> _debug-native/netlink'
>> Makefile:698: recipe for target 'netlink-build' failed
>> make: *** [netlink-build] Error 2
>>
>>
>>
>>
>>
>> W dniu 2017-09-17 o 16:27, Paweł Staszewski pisze:
>>
>> Also latest vpp from git without including vppsb
>>>
>>> Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Service hold-off time
>>> over, scheduling restart.
>>> Sep 17 16:28:02 ubuntu systemd[1]: Stopped vector packet processing
>>> engine.
>>> Sep 17 16:28:02 ubuntu systemd[1]: Starting vector packet processing
>>> engine...
>>> Sep 17 16:28:02 ubuntu systemd[1]: Started vector packet processing
>>> engine.
>>> Sep 17 16:28:02 ubuntu vpp[1557]: vlib_plugin_early_init:356: plugin
>>> path /usr/lib/vpp_plugins
>>> Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:184: Loaded plugin:
>>> acl_plugin.so (Access Control Lists)
>>> Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:142:
>>> /usr/lib/vpp_plugins/dpdk_plugin.so: undefined symbol:
>>> aes_gcm_enc_128_sse
>>> Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:143: Failed to load
>>> p

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-19 Thread Burt Silverman
Same problem here. I guess the vlib code was updated but the vppsb has not
caught up.

Burt

On Mon, Sep 18, 2017 at 12:56 PM, Paweł Staszewski 
wrote:

> Trying to add netlink from vppsb to the latest vpp git but :
>
>
>  Building netlink in /git/vpp/build-root/build-vpp_debug-native/netlink
> 
> make[1]: Entering directory '/git/vpp/build-root/build-vpp
> _debug-native/netlink'
>   CC   librtnl/netns.lo
>   CC   librtnl/rtnl.lo
>   CC   librtnl/mapper.lo
>   CC   test/test.lo
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42: error: ‘struct
> unix_file’ declared inside parameter list will not be visible outside of
> this definition or declaration [-Werror]
>  static clib_error_t *rtnl_read_cb(struct unix_file * f)
>   ^
> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function ‘rtnl_read_cb’:
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33: error:
> dereferencing pointer to incomplete type ‘struct unix_file’
>rtnl_ns_t *ns = &rm->streams[f->private_data];
>  ^~
> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
> ‘rtnl_socket_close’:
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3: error: implicit
> declaration of function ‘unix_file_del’ [-Werror=implicit-function-dec
> laration]
>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>^
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39: error: ‘unix_main_t
> {aka struct }’ has no member named ‘file_pool’
>unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
>^
> /git/vpp/build-data/../netlink/librtnl/rtnl.c: In function
> ‘rtnl_socket_open’:
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:262:3: error: unknown type
> name ‘unix_file_t’
>unix_file_t template = {0};
>^~~
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:263:11: error: request for
> member ‘read_function’ in something not a structure or union
>template.read_function = rtnl_read_cb;
>^
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:264:11: error: request for
> member ‘file_descriptor’ in something not a structure or union
>template.file_descriptor = ns->rtnl_socket;
>^
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:265:11: error: request for
> member ‘private_data’ in something not a structure or union
>template.private_data = (uword) (ns - rm->streams);
>^
> /git/vpp/build-data/../netlink/librtnl/rtnl.c:266:20: error: implicit
> declaration of function ‘unix_file_add’ [-Werror=implicit-function-dec
> laration]
>ns->unix_index = unix_file_add (&unix_main, &template);
> ^
> cc1: all warnings being treated as errors
> Makefile:520: recipe for target 'librtnl/rtnl.lo' failed
> make[1]: *** [librtnl/rtnl.lo] Error 1
> make[1]: *** Waiting for unfinished jobs
> /git/vpp/build-data/../netlink/test/test.c: In function
> ‘mapper_ns_add_command_fn’:
> /git/vpp/build-data/../netlink/test/test.c:125:14: error: implicit
> declaration of function ‘ip4_fib_index_from_table_id’
> [-Werror=implicit-function-declaration]
>u32 fib4 = ip4_fib_index_from_table_id(table_id);
>   ^~~
> /git/vpp/build-data/../netlink/test/test.c:126:14: error: implicit
> declaration of function ‘ip6_fib_index_from_table_id’
> [-Werror=implicit-function-declaration]
>u32 fib6 = ip6_fib_index_from_table_id(table_id);
>   ^~~
> cc1: all warnings being treated as errors
> Makefile:520: recipe for target 'test/test.lo' failed
> make[1]: *** [test/test.lo] Error 1
> make[1]: Leaving directory '/git/vpp/build-root/build-vpp
> _debug-native/netlink'
> Makefile:698: recipe for target 'netlink-build' failed
> make: *** [netlink-build] Error 2
>
>
>
>
>
> W dniu 2017-09-17 o 16:27, Paweł Staszewski pisze:
>
> Also latest vpp from git without including vppsb
>>
>> Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Service hold-off time
>> over, scheduling restart.
>> Sep 17 16:28:02 ubuntu systemd[1]: Stopped vector packet processing
>> engine.
>> Sep 17 16:28:02 ubuntu systemd[1]: Starting vector packet processing
>> engine...
>> Sep 17 16:28:02 ubuntu systemd[1]: Started vector packet processing
>> engine.
>> Sep 17 16:28:02 ubuntu vpp[1557]: vlib_plugin_early_init:356: plugin path
>> /usr/lib/vpp_plugins
>> Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:184: Loaded plugin:
>> acl_plugin.so (Access Control Lists)
>> Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:142:
>> /usr/lib/vpp_plugins/dpdk_plugin.so: undefined symbol:
>> aes_gcm_enc_128_sse
>> Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:143: Failed to load
>> plugin 'dpdk_plugin.so'
>> Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Main process exited,
>> code=dumped, status=6/ABRT
>> Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Unit entered failed state.
>> Sep 1

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-18 Thread Paweł Staszewski

same for the router plugin

 Building router in 
/git/vpp/build-root/build-vpp_debug-native/router 
make[1]: Entering directory 
'/git/vpp/build-root/build-vpp_debug-native/router'

  CC   router/tap_inject.lo
  CC   router/tap_inject_netlink.lo
  CC   router/tap_inject_node.lo
  CC   router/tap_inject_tap.lo
/git/vpp/build-data/../router/router/tap_inject_tap.c:33:22: error: 
unknown type name ‘unix_file_t’

 tap_inject_tap_read (unix_file_t * f)
  ^~~
/git/vpp/build-data/../router/router/tap_inject_tap.c: In function 
‘tap_inject_tap_connect’:
/git/vpp/build-data/../router/router/tap_inject_tap.c:55:3: error: 
unknown type name ‘unix_file_t’

   unix_file_t template;
   ^~~
/git/vpp/build-data/../router/router/tap_inject_tap.c:120:11: error: 
request for member ‘read_function’ in something not a structure or union

   template.read_function = tap_inject_tap_read;
   ^
/git/vpp/build-data/../router/router/tap_inject_tap.c:120:28: error: 
‘tap_inject_tap_read’ undeclared (first use in this function)

   template.read_function = tap_inject_tap_read;
    ^~~
/git/vpp/build-data/../router/router/tap_inject_tap.c:120:28: note: each 
undeclared identifier is reported only once for each function it appears in
/git/vpp/build-data/../router/router/tap_inject_tap.c:121:11: error: 
request for member ‘file_descriptor’ in something not a structure or union

   template.file_descriptor = tap_fd;
   ^
/git/vpp/build-data/../router/router/tap_inject_tap.c:123:3: error: 
implicit declaration of function ‘unix_file_add’ 
[-Werror=implicit-function-declaration]

   unix_file_add (&unix_main, &template);
   ^
cc1: all warnings being treated as errors
Makefile:476: recipe for target 'router/tap_inject_tap.lo' failed
make[1]: *** [router/tap_inject_tap.lo] Error 1
make[1]: *** Waiting for unfinished jobs
/git/vpp/build-data/../router/router/tap_inject_netlink.c:19:27: fatal 
error: librtnl/netns.h: No such file or directory

 #include 
   ^
compilation terminated.
Makefile:476: recipe for target 'router/tap_inject_netlink.lo' failed
make[1]: *** [router/tap_inject_netlink.lo] Error 1
make[1]: Leaving directory 
'/git/vpp/build-root/build-vpp_debug-native/router'

Makefile:698: recipe for target 'router-build' failed
make: *** [router-build] Error 2


W dniu 2017-09-18 o 18:56, Paweł Staszewski pisze:

Trying to add netlink from vppsb to the latest vpp git but :


 Building netlink in 
/git/vpp/build-root/build-vpp_debug-native/netlink 
make[1]: Entering directory 
'/git/vpp/build-root/build-vpp_debug-native/netlink'

  CC   librtnl/netns.lo
  CC   librtnl/rtnl.lo
  CC   librtnl/mapper.lo
  CC   test/test.lo
/git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42: error: ‘struct 
unix_file’ declared inside parameter list will not be visible outside 
of this definition or declaration [-Werror]

 static clib_error_t *rtnl_read_cb(struct unix_file * f)
  ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c: In function 
‘rtnl_read_cb’:
/git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33: error: 
dereferencing pointer to incomplete type ‘struct unix_file’

   rtnl_ns_t *ns = &rm->streams[f->private_data];
 ^~
/git/vpp/build-data/../netlink/librtnl/rtnl.c: In function 
‘rtnl_socket_close’:
/git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3: error: implicit 
declaration of function ‘unix_file_del’ 
[-Werror=implicit-function-declaration]

   unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39: error: 
‘unix_main_t {aka struct }’ has no member named ‘file_pool’

   unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c: In function 
‘rtnl_socket_open’:
/git/vpp/build-data/../netlink/librtnl/rtnl.c:262:3: error: unknown 
type name ‘unix_file_t’

   unix_file_t template = {0};
   ^~~
/git/vpp/build-data/../netlink/librtnl/rtnl.c:263:11: error: request 
for member ‘read_function’ in something not a structure or union

   template.read_function = rtnl_read_cb;
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c:264:11: error: request 
for member ‘file_descriptor’ in something not a structure or union

   template.file_descriptor = ns->rtnl_socket;
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c:265:11: error: request 
for member ‘private_data’ in something not a structure or union

   template.private_data = (uword) (ns - rm->streams);
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c:266:20: error: implicit 
declaration of function ‘unix_file_add’ 
[-Werror=implicit-function-declaration]

   ns->unix_index = unix_file_add (&unix_main, &template);
    ^

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-18 Thread Paweł Staszewski

Trying to add netlink from vppsb to the latest vpp git but :


 Building netlink in 
/git/vpp/build-root/build-vpp_debug-native/netlink 
make[1]: Entering directory 
'/git/vpp/build-root/build-vpp_debug-native/netlink'

  CC   librtnl/netns.lo
  CC   librtnl/rtnl.lo
  CC   librtnl/mapper.lo
  CC   test/test.lo
/git/vpp/build-data/../netlink/librtnl/rtnl.c:105:42: error: ‘struct 
unix_file’ declared inside parameter list will not be visible outside of 
this definition or declaration [-Werror]

 static clib_error_t *rtnl_read_cb(struct unix_file * f)
  ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c: In function ‘rtnl_read_cb’:
/git/vpp/build-data/../netlink/librtnl/rtnl.c:109:33: error: 
dereferencing pointer to incomplete type ‘struct unix_file’

   rtnl_ns_t *ns = &rm->streams[f->private_data];
 ^~
/git/vpp/build-data/../netlink/librtnl/rtnl.c: In function 
‘rtnl_socket_close’:
/git/vpp/build-data/../netlink/librtnl/rtnl.c:141:3: error: implicit 
declaration of function ‘unix_file_del’ 
[-Werror=implicit-function-declaration]

   unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c:141:39: error: 
‘unix_main_t {aka struct }’ has no member named ‘file_pool’

   unix_file_del(&unix_main, &unix_main.file_pool[ns->unix_index]);
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c: In function 
‘rtnl_socket_open’:
/git/vpp/build-data/../netlink/librtnl/rtnl.c:262:3: error: unknown type 
name ‘unix_file_t’

   unix_file_t template = {0};
   ^~~
/git/vpp/build-data/../netlink/librtnl/rtnl.c:263:11: error: request for 
member ‘read_function’ in something not a structure or union

   template.read_function = rtnl_read_cb;
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c:264:11: error: request for 
member ‘file_descriptor’ in something not a structure or union

   template.file_descriptor = ns->rtnl_socket;
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c:265:11: error: request for 
member ‘private_data’ in something not a structure or union

   template.private_data = (uword) (ns - rm->streams);
   ^
/git/vpp/build-data/../netlink/librtnl/rtnl.c:266:20: error: implicit 
declaration of function ‘unix_file_add’ 
[-Werror=implicit-function-declaration]

   ns->unix_index = unix_file_add (&unix_main, &template);
    ^
cc1: all warnings being treated as errors
Makefile:520: recipe for target 'librtnl/rtnl.lo' failed
make[1]: *** [librtnl/rtnl.lo] Error 1
make[1]: *** Waiting for unfinished jobs
/git/vpp/build-data/../netlink/test/test.c: In function 
‘mapper_ns_add_command_fn’:
/git/vpp/build-data/../netlink/test/test.c:125:14: error: implicit 
declaration of function ‘ip4_fib_index_from_table_id’ 
[-Werror=implicit-function-declaration]

   u32 fib4 = ip4_fib_index_from_table_id(table_id);
  ^~~
/git/vpp/build-data/../netlink/test/test.c:126:14: error: implicit 
declaration of function ‘ip6_fib_index_from_table_id’ 
[-Werror=implicit-function-declaration]

   u32 fib6 = ip6_fib_index_from_table_id(table_id);
  ^~~
cc1: all warnings being treated as errors
Makefile:520: recipe for target 'test/test.lo' failed
make[1]: *** [test/test.lo] Error 1
make[1]: Leaving directory 
'/git/vpp/build-root/build-vpp_debug-native/netlink'

Makefile:698: recipe for target 'netlink-build' failed
make: *** [netlink-build] Error 2





W dniu 2017-09-17 o 16:27, Paweł Staszewski pisze:

Also latest vpp from git without including vppsb

Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Service hold-off time 
over, scheduling restart.
Sep 17 16:28:02 ubuntu systemd[1]: Stopped vector packet processing 
engine.
Sep 17 16:28:02 ubuntu systemd[1]: Starting vector packet processing 
engine...
Sep 17 16:28:02 ubuntu systemd[1]: Started vector packet processing 
engine.
Sep 17 16:28:02 ubuntu vpp[1557]: vlib_plugin_early_init:356: plugin 
path /usr/lib/vpp_plugins
Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:184: Loaded plugin: 
acl_plugin.so (Access Control Lists)
Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:142: 
/usr/lib/vpp_plugins/dpdk_plugin.so: undefined symbol: 
aes_gcm_enc_128_sse
Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:143: Failed to load 
plugin 'dpdk_plugin.so'
Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Main process exited, 
code=dumped, status=6/ABRT
Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Unit entered failed 
state.
Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Failed with result 
'core-dump'.
Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Service hold-off time 
over, scheduling restart.
Sep 17 16:28:02 ubuntu systemd[1]: Stopped vector packet processing 
engine.
Sep 17 16:28:02 ubuntu systemd[1]: Starting vector packet processing 
engine...
Sep 17 16

Re: [vpp-dev] Failed to build vpp with vppsb

2017-09-17 Thread Paweł Staszewski

Also latest vpp from git without including vppsb

Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Service hold-off time 
over, scheduling restart.

Sep 17 16:28:02 ubuntu systemd[1]: Stopped vector packet processing engine.
Sep 17 16:28:02 ubuntu systemd[1]: Starting vector packet processing 
engine...

Sep 17 16:28:02 ubuntu systemd[1]: Started vector packet processing engine.
Sep 17 16:28:02 ubuntu vpp[1557]: vlib_plugin_early_init:356: plugin 
path /usr/lib/vpp_plugins
Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:184: Loaded plugin: 
acl_plugin.so (Access Control Lists)
Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:142: 
/usr/lib/vpp_plugins/dpdk_plugin.so: undefined symbol: aes_gcm_enc_128_sse
Sep 17 16:28:02 ubuntu vpp[1557]: load_one_plugin:143: Failed to load 
plugin 'dpdk_plugin.so'
Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Main process exited, 
code=dumped, status=6/ABRT

Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Unit entered failed state.
Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Failed with result 
'core-dump'.
Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Service hold-off time 
over, scheduling restart.

Sep 17 16:28:02 ubuntu systemd[1]: Stopped vector packet processing engine.
Sep 17 16:28:02 ubuntu systemd[1]: Starting vector packet processing 
engine...

Sep 17 16:28:02 ubuntu systemd[1]: Started vector packet processing engine.
Sep 17 16:28:02 ubuntu vpp[1597]: vlib_plugin_early_init:356: plugin 
path /usr/lib/vpp_plugins
Sep 17 16:28:02 ubuntu vpp[1597]: load_one_plugin:184: Loaded plugin: 
acl_plugin.so (Access Control Lists)
Sep 17 16:28:02 ubuntu vpp[1597]: load_one_plugin:142: 
/usr/lib/vpp_plugins/dpdk_plugin.so: undefined symbol: aes_gcm_enc_128_sse
Sep 17 16:28:02 ubuntu vpp[1597]: load_one_plugin:143: Failed to load 
plugin 'dpdk_plugin.so'
Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Main process exited, 
code=dumped, status=6/ABRT

Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Unit entered failed state.
Sep 17 16:28:02 ubuntu systemd[1]: vpp.service: Failed with result 
'core-dump'.
Sep 17 16:28:03 ubuntu systemd[1]: vpp.service: Service hold-off time 
over, scheduling restart.

Sep 17 16:28:03 ubuntu systemd[1]: Stopped vector packet processing engine.
Sep 17 16:28:03 ubuntu systemd[1]: vpp.service: Start request repeated 
too quickly.
Sep 17 16:28:03 ubuntu systemd[1]: Failed to start vector packet 
processing engine.

Sep 17 16:28:03 ubuntu systemd[1]: vpp.service: Unit entered failed state.
Sep 17 16:28:03 ubuntu systemd[1]: vpp.service: Failed with result 
'start-limit-hit'.




W dniu 2017-09-17 o 15:51, Paweł Staszewski pisze:

Hi just get the latest git:

cd /

git clonehttps://gerrit.fd.io/r/vpp

git clonehttps://gerrit.fd.io/r/vppsb


$ cd /vpp
$ ln -sf /vppsb/netlink
$ ln -sf /vppsb/router
$ ln -sf ../../netlink/netlink.mk build-data/packages/
$ ln -sf ../../router/router.mk build-data/packages/

$ cd build-root
$ ./bootstrap.sh
$ make V=0 PLATFORM=vpp TAG=vpp_debug router-install

And:

make V=0 PLATFORM=vpp TAG=vpp_debug router-install
 Arch for platform 'vpp' is native 
 Finding source for router 
 Makefile fragment found in /vpp/build-data/packages/router.mk 
 Source found in /vpp/router 
 Configuring router: nothing to do 
 Building router in /vpp/build-root/build-vpp_debug-native/router 

make[1]: Entering directory 
'/vpp/build-root/build-vpp_debug-native/router'

  CC   router/tap_inject.lo
  CC   router/tap_inject_netlink.lo
  CC   router/tap_inject_node.lo
/vpp/build-data/../router/router/tap_inject_node.c:34:1: error: 
unknown type name ‘dpo_type_t’

 dpo_type_t tap_inject_dpo_type;
 ^~
/vpp/build-data/../router/router/tap_inject_node.c:323:22: error: 
unknown type name ‘dpo_id_t’

 tap_inject_dpo_lock (dpo_id_t * dpo)
  ^~~~
/vpp/build-data/../router/router/tap_inject_node.c:331:24: error: 
unknown type name ‘dpo_id_t’

 tap_inject_dpo_unlock (dpo_id_t * dpo)
    ^~~~
/vpp/build-data/../router/router/tap_inject_node.c:341:14: error: 
unknown type name ‘dpo_vft_t’

 const static dpo_vft_t tap_inject_vft = {
  ^
/vpp/build-data/../router/router/tap_inject_node.c:342:3: error: field 
name not in record or union initializer

   .dv_lock = tap_inject_dpo_lock,
   ^
/vpp/build-data/../router/router/tap_inject_node.c:342:3: note: (near 
initialization for ‘tap_inject_vft’)
/vpp/build-data/../router/router/tap_inject_node.c:342:14: error: 
‘tap_inject_dpo_lock’ undeclared here (not in a function)

   .dv_lock = tap_inject_dpo_lock,
  ^~~
/vpp/build-data/../router/router/tap_inject_node.c:343:3: error: field 
name not in record or union initializer

   .dv_unlock = tap_inject_dpo_unlock,
   ^
/vpp/build-data/../router/router/tap_inject_node.c:343:3: note: (near 
initialization for ‘tap_inject_vft’)
/vpp/build-data/../router/router/tap_inject_node.c:343:16: error: 
‘tap_

[vpp-dev] Failed to build vpp with vppsb

2017-09-17 Thread Paweł Staszewski

Hi just get the latest git:

cd /

git clonehttps://gerrit.fd.io/r/vpp

git clonehttps://gerrit.fd.io/r/vppsb


$ cd /vpp
$ ln -sf /vppsb/netlink
$ ln -sf /vppsb/router
$ ln -sf ../../netlink/netlink.mk build-data/packages/
$ ln -sf ../../router/router.mk build-data/packages/

$ cd build-root
$ ./bootstrap.sh
$ make V=0 PLATFORM=vpp TAG=vpp_debug router-install

And:

make V=0 PLATFORM=vpp TAG=vpp_debug router-install
 Arch for platform 'vpp' is native 
 Finding source for router 
 Makefile fragment found in /vpp/build-data/packages/router.mk 
 Source found in /vpp/router 
 Configuring router: nothing to do 
 Building router in /vpp/build-root/build-vpp_debug-native/router 
make[1]: Entering directory '/vpp/build-root/build-vpp_debug-native/router'
  CC   router/tap_inject.lo
  CC   router/tap_inject_netlink.lo
  CC   router/tap_inject_node.lo
/vpp/build-data/../router/router/tap_inject_node.c:34:1: error: unknown 
type name ‘dpo_type_t’

 dpo_type_t tap_inject_dpo_type;
 ^~
/vpp/build-data/../router/router/tap_inject_node.c:323:22: error: 
unknown type name ‘dpo_id_t’

 tap_inject_dpo_lock (dpo_id_t * dpo)
  ^~~~
/vpp/build-data/../router/router/tap_inject_node.c:331:24: error: 
unknown type name ‘dpo_id_t’

 tap_inject_dpo_unlock (dpo_id_t * dpo)
    ^~~~
/vpp/build-data/../router/router/tap_inject_node.c:341:14: error: 
unknown type name ‘dpo_vft_t’

 const static dpo_vft_t tap_inject_vft = {
  ^
/vpp/build-data/../router/router/tap_inject_node.c:342:3: error: field 
name not in record or union initializer

   .dv_lock = tap_inject_dpo_lock,
   ^
/vpp/build-data/../router/router/tap_inject_node.c:342:3: note: (near 
initialization for ‘tap_inject_vft’)
/vpp/build-data/../router/router/tap_inject_node.c:342:14: error: 
‘tap_inject_dpo_lock’ undeclared here (not in a function)

   .dv_lock = tap_inject_dpo_lock,
  ^~~
/vpp/build-data/../router/router/tap_inject_node.c:343:3: error: field 
name not in record or union initializer

   .dv_unlock = tap_inject_dpo_unlock,
   ^
/vpp/build-data/../router/router/tap_inject_node.c:343:3: note: (near 
initialization for ‘tap_inject_vft’)
/vpp/build-data/../router/router/tap_inject_node.c:343:16: error: 
‘tap_inject_dpo_unlock’ undeclared here (not in a function)

   .dv_unlock = tap_inject_dpo_unlock,
    ^
/vpp/build-data/../router/router/tap_inject_node.c:343:16: error: excess 
elements in scalar initializer [-Werror]
/vpp/build-data/../router/router/tap_inject_node.c:343:16: note: (near 
initialization for ‘tap_inject_vft’)
/vpp/build-data/../router/router/tap_inject_node.c:344:3: error: field 
name not in record or union initializer

   .dv_format = format_tap_inject_dpo,
   ^
/vpp/build-data/../router/router/tap_inject_node.c:344:3: note: (near 
initialization for ‘tap_inject_vft’)
/vpp/build-data/../router/router/tap_inject_node.c:344:16: error: excess 
elements in scalar initializer [-Werror]

   .dv_format = format_tap_inject_dpo,
    ^
/vpp/build-data/../router/router/tap_inject_node.c:344:16: note: (near 
initialization for ‘tap_inject_vft’)
/vpp/build-data/../router/router/tap_inject_node.c:352:50: error: 
‘DPO_PROTO_NUM’ undeclared here (not in a function)

 const static char *const *const tap_inject_nodes[DPO_PROTO_NUM] = {
  ^
/vpp/build-data/../router/router/tap_inject_node.c:353:4: error: 
‘DPO_PROTO_IP6’ undeclared here (not in a function)

   [DPO_PROTO_IP6] = tap_inject_tx_nodes,
    ^
/vpp/build-data/../router/router/tap_inject_node.c:353:4: error: array 
index in initializer not of integer type
/vpp/build-data/../router/router/tap_inject_node.c:353:4: note: (near 
initialization for ‘tap_inject_nodes’)
/vpp/build-data/../router/router/tap_inject_node.c: In function 
‘tap_inject_init’:
/vpp/build-data/../router/router/tap_inject_node.c:365:25: error: 
implicit declaration of function ‘dpo_register_new_type’ 
[-Werror=implicit-function-declaration]
   tap_inject_dpo_type = dpo_register_new_type (&tap_inject_vft, 
tap_inject_nodes);

 ^
At top level:
/vpp/build-data/../router/router/tap_inject_node.c:352:33: error: 
‘tap_inject_nodes’ defined but not used [-Werror=unused-variable]

 const static char *const *const tap_inject_nodes[DPO_PROTO_NUM] = {
 ^~~~
cc1: all warnings being treated as errors
Makefile:476: recipe for target 'router/tap_inject_node.lo' failed
make[1]: *** [router/tap_inject_node.lo] Error 1
make[1]: *** Waiting for unfinished jobs
/vpp/build-data/../router/router/tap_inject.c:24:26: fatal error: 
vnet/fib/fib.h: No such file or directory

 #include 
  ^
compilation terminated.
Makefile:476: recipe for target 'router/ta