Re: [vpp-dev] [EXT] Re: compiling error natively on an am64 box for fd.io_vpp

2017-08-31 Thread Eric Chen
Hi Damjan,

Following your suggestion, I upgrade my Ubuntu to Zesty (17.04),

gcc version 6.3.0 20170406 (Ubuntu/Linaro 6.3.0-12ubuntu2)

the previous issue gone,

however did you meet below issue before:
it happens both when I build dpaa2(over dpdk) and marvell (over marvell-dpdk).
I checked dpdk when build lib, there is no –FPIC option,
So how to fix it?


/usr/bin/ld: 
/home/ericxh/work/git_work/dpdk/build//lib/librte_pmd_ena.a(ena_ethdev.o): 
relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol 
`__stack_chk_guard@@GLIBC_2.17' can not be used when making a shared object; 
recompile with -fPIC
/usr/bin/ld: 
/home/ericxh/work/git_work/dpdk/build//lib/librte_pmd_ena.a(ena_ethdev.o)(.text+0x44):
 unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol 
`__stack_chk_guard@@GLIBC_2.17'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status


Thanks
Eric

From: Damjan Marion [mailto:dmarion.li...@gmail.com]
Sent: 2017年8月27日 3:11
To: Eric Chen 
Cc: Dave Barach ; Sergio Gonzalez Monroy 
; vpp-dev 
Subject: Re: [vpp-dev] [EXT] Re: compiling error natively on an am64 box for 
fd.io_vpp

Hi Eric,

Same code compiles perfectly fine on ARM64 with newer gcc version.

If you are starting new development cycle it makes sense to me that you pick up 
latest ubuntu release,
specially when new hardware is involved instead of trying to chase this kind of 
bugs.

Do you have any strong reason to stay on ubuntu 16.04? Both 17.04 and upcoming 
17.10 are working fine on arm64 and
compiling of VPP works without issues.

Thanks,

Damjan


On 26 Aug 2017, at 15:23, Eric Chen 
> wrote:

Dave,

Thanks for your answer.
I tried below variation, it doesn’t help.

Btw, there is not only one place reporting “error: unable to generate reloads 
for:”,

I will try to checkout the version of 17.01.1,
since with the same native compiler, I succeeded to build fd.io_odp4vpp (which 
is based on fd.io 17.01.1).

will keep you posted.

Thanks
Eric

From: Dave Barach (dbarach) [mailto:dbar...@cisco.com]
Sent: 2017年8月26日 20:08
To: Eric Chen >; Sergio Gonzalez 
Monroy 
>; 
vpp-dev >
Subject: RE: [vpp-dev] [EXT] Re: compiling error natively on an am64 box for 
fd.io_vpp

Just so everyone knows, the function in question is almost too simple for its 
own good:

always_inline uword
vlib_process_suspend_time_is_zero (f64 dt)
{
  return dt < 10e-6;
}

What happens if you try this variation?

always_inline int
vlib_process_suspend_time_is_zero (f64 dt)
{
  if (dt < 10e-6)
 return 1;
  return 0;
}

This does look like a gcc bug, but it may not be hard to work around...

Thanks… Dave

From: vpp-dev-boun...@lists.fd.io 
[mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of Eric Chen
Sent: Friday, August 25, 2017 11:02 PM
To: Eric Chen >; Sergio Gonzalez 
Monroy 
>; 
vpp-dev >
Subject: Re: [vpp-dev] [EXT] Re: compiling error natively on an am64 box for 
fd.io_vpp

Hi Sergio,

I upgrading to Ubuntu 16.04,

Succedd to Nativly build fd.io_odp4vpp (w / odp-linux),
However when buidl fd.io_vpp (w/ dpdk),  it reported below error,
(almost the same , only difference is over dpdk or odp-linux)

Anyone met before? Seem a bug of gcc.

In file included from 
/home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vlib/error_funcs.h:43:0,
 from 
/home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vlib/vlib.h:70,
 from 
/home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vnet/l2/l2_fib.c:19:
/home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vlib/node_funcs.h: In 
function ‘vlib_process_suspend_time_is_zero’:
/home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vlib/node_funcs.h:442:1: 
error: unable to generate reloads for:
}
^
(insn 11 37 12 2 (set (reg:CCFPE 66 cc)
(compare:CCFPE (reg:DF 79)
(reg:DF 80))) 
/home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vlib/node_funcs.h:441 
395 {*cmpedf}
 (expr_list:REG_DEAD (reg:DF 80)
(expr_list:REG_DEAD (reg:DF 79)
(nil
/home/ericxh/work/git_work/fd.io_vpp/build-data/../src/vlib/node_funcs.h:442:1: 
internal compiler error: in curr_insn_transform, at lra-constraints.c:3509
Please submit a full bug report,
with preprocessed source if appropriate.
See 
>
 for instructions.
Makefile:6111: recipe for target 'vnet/l2/l2_fib.lo' failed
make[4]: *** [vnet/l2/l2_fib.lo] Error 1
make[4]: *** Waiting for unfinished jobs




Re: [vpp-dev] multiple ips for an interface

2017-08-31 Thread Pragash Vijayaragavan
Hi Ole,

Yea, i have my routes on the "show ip6 fib", but still even ping did not
work.

I tried to ping the ips assigned to the local ports on vpp, -> did not work

tried ip4, still did not work.

I could not figure out what "Configuration" i am missing here.



Outputs :

vpp# sh interfaces
  Name   Idx   State  Counter
 Count
FortyGigabitEthernet2/0/0 1 up
FortyGigabitEthernet4/0/0 2 up
local00down

vpp# sh ip fib
ipv4-VRF:0, fib_index 0, flow hash: src dst sport dport proto
0.0.0.0/0
  unicast-ip4-chain
  [@0]: dpo-load-balance: [index:0 buckets:1 uRPF:0 to:[0:0]]
[0] [@0]: dpo-drop ip4
0.0.0.0/32
  unicast-ip4-chain
  [@0]: dpo-load-balance: [index:1 buckets:1 uRPF:1 to:[0:0]]
[0] [@0]: dpo-drop ip4
10.1.1.0/24
  unicast-ip4-chain
  [@0]: dpo-load-balance: [index:8 buckets:1 uRPF:7 to:[0:0]]
[0] [@4]: ipv4-glean: FortyGigabitEthernet2/0/0
10.1.1.1/32
  unicast-ip4-chain
  [@0]: dpo-load-balance: [index:9 buckets:1 uRPF:8 to:[0:0]]
[0] [@2]: dpo-receive: 10.1.1.1 on FortyGigabitEthernet2/0/0
20.1.1.0/24
  unicast-ip4-chain
  [@0]: dpo-load-balance: [index:10 buckets:1 uRPF:9 to:[0:0]]
[0] [@4]: ipv4-glean: FortyGigabitEthernet4/0/0
20.1.1.1/32
  unicast-ip4-chain
  [@0]: dpo-load-balance: [index:11 buckets:1 uRPF:10 to:[0:0]]
[0] [@2]: dpo-receive: 20.1.1.1 on FortyGigabitEthernet4/0/0
224.0.0.0/4
  unicast-ip4-chain
  [@0]: dpo-load-balance: [index:3 buckets:1 uRPF:3 to:[0:0]]
[0] [@0]: dpo-drop ip4
240.0.0.0/4
  unicast-ip4-chain
  [@0]: dpo-load-balance: [index:2 buckets:1 uRPF:2 to:[0:0]]
[0] [@0]: dpo-drop ip4
255.255.255.255/32
  unicast-ip4-chain
  [@0]: dpo-load-balance: [index:4 buckets:1 uRPF:4 to:[0:0]]
[0] [@0]: dpo-drop ip4

vpp# ping 20.1.1.1

Statistics: 300 sent, 0 received, 100% packet loss




Thanks,

Pragash Vijayaragavan
Grad Student at Rochester Institute of Technology
email : pxv3...@rit.edu
ph : 585 764 4662


On Thu, Aug 31, 2017 at 7:44 AM, Ole Troan  wrote:

> Pragash,
>
> > I am just trying to send and receive ip6 traffic through the vpp.
> > I configured the ports with ip6 addresses and send traffic as below. But
> it was not forwarded to the destination port 2.
> >
> >  [  Traffic gen  (dst ip - port 2) ]---[ (port 1) vpp (port
> 2) ]
>
> Right, that has nothing to do with source address selection on VPP.
> You might want to verify that the FIB is set correctly. "show ip6 fib".
>
> Cheers,
> Ole
>
> >
> >
> >
> > Thanks,
> >
> > Pragash Vijayaragavan
> > Grad Student at Rochester Institute of Technology
> > email : pxv3...@rit.edu
> > ph : 585 764 4662
> >
> >
> > On Thu, Aug 31, 2017 at 5:53 AM, Ole Troan  wrote:
> > Pragash,
> >
> > > Is there any cli command for source address selection in the vpp?
> >
> > No. Source address selection only comes into play for locally originated
> packets. VPP itself has only a few of those, and they are somewhat special
> case. Like ND for example.
> >
> > An application could use ip_address_dump/ip_address_details APIs and
> then follow the algorithm in RFC6724/RFC8028. But before we talk about
> solutions, what problem are you trying to solve?
> >
> > Best regards,
> > Ole
> >
> > >
> > > Thanks,
> > >
> > > Pragash Vijayaragavan
> > > Grad Student at Rochester Institute of Technology
> > > email : pxv3...@rit.edu
> > > ph : 585 764 4662
> > >
> > >
> > > On Wed, Aug 30, 2017 at 4:14 AM, Ole Troan 
> wrote:
> > > Pragash,
> > >
> > > > I have a quick question, i am able to assign multiple ips for an
> interface in vpp. Is this correct behavior.
> > >
> > > Yes. Shouldn't it be?
> > > Note that VPP itself doesn't implement source address selection so the
> local application would have to deal with that.
> > >
> > > Best regards,
> > > Ole
> > >
> > >
> > > >
> > > > pragash@revvit:~/VPP$ sudo vppctl sh interfaces address
> > > > FortyGigabitEthernet2/0/0 (up):
> > > >   10.1.1.1/24
> > > >   10.2.1.1/24
> > > >   2001::1/48
> > > >   fe80::3efd:feff:fea6:8ef0/128
> > > >   2001::2/48
> > > >   2003::2/48
> > > >   2004::2/48
> > > > FortyGigabitEthernet4/0/0 (up):
> > > >   2002::1/48
> > > >   fe80::3efd:feff:fea6:8e78/128
> > > >   9001::2/48
> > > > local0 (dn):
> > > >
> > > >
> > > >
> > > > Thanks,
> > > >
> > > > Pragash Vijayaragavan
> > > > Grad Student at Rochester Institute of Technology
> > > > email : pxv3...@rit.edu
> > > > ph : 585 764 4662
> > > >
> > > > ___
> > > > vpp-dev mailing list
> > > > vpp-dev@lists.fd.io
> > > > https://lists.fd.io/mailman/listinfo/vpp-dev
> > >
> > >
> >
> >
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] query on hugepages usage in VPP

2017-08-31 Thread Balaji Kn
Hello,

I am using *v17.07*. I am trying to configure huge page size as 1GB and
reserve 16 huge pages for VPP.
I went through /etc/sysctl.d/80-vpp.conf file and found options only for
huge page of size 2M.

*output of vpp-conf file.*
.# Number of 2MB hugepages desired
vm.nr_hugepages=1024

# Must be greater than or equal to (2 * vm.nr_hugepages).
vm.max_map_count=3096

# All groups allowed to access hugepages
vm.hugetlb_shm_group=0

# Shared Memory Max must be greator or equal to the total size of hugepages.
# For 2MB pages, TotalHugepageSize = vm.nr_hugepages * 2 * 1024 * 1024
# If the existing kernel.shmmax setting  (cat /sys/proc/kernel/shmmax)
# is greater than the calculated TotalHugepageSize then set this parameter
# to current shmmax value.
kernel.shmmax=2147483648

Please can you let me know configurations i need to do so that VPP runs
with 1GB huge pages.

Host OS is supporting 1GB huge pages.

Regards,
Balaji
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] multiple ips for an interface

2017-08-31 Thread Ole Troan
Pragash,

> I am just trying to send and receive ip6 traffic through the vpp.
> I configured the ports with ip6 addresses and send traffic as below. But it 
> was not forwarded to the destination port 2.
> 
>  [  Traffic gen  (dst ip - port 2) ]---[ (port 1) vpp (port 2) ]

Right, that has nothing to do with source address selection on VPP.
You might want to verify that the FIB is set correctly. "show ip6 fib".

Cheers,
Ole

> 
> 
> 
> Thanks,
> 
> Pragash Vijayaragavan
> Grad Student at Rochester Institute of Technology
> email : pxv3...@rit.edu
> ph : 585 764 4662
> 
> 
> On Thu, Aug 31, 2017 at 5:53 AM, Ole Troan  wrote:
> Pragash,
> 
> > Is there any cli command for source address selection in the vpp?
> 
> No. Source address selection only comes into play for locally originated 
> packets. VPP itself has only a few of those, and they are somewhat special 
> case. Like ND for example.
> 
> An application could use ip_address_dump/ip_address_details APIs and then 
> follow the algorithm in RFC6724/RFC8028. But before we talk about solutions, 
> what problem are you trying to solve?
> 
> Best regards,
> Ole
> 
> >
> > Thanks,
> >
> > Pragash Vijayaragavan
> > Grad Student at Rochester Institute of Technology
> > email : pxv3...@rit.edu
> > ph : 585 764 4662
> >
> >
> > On Wed, Aug 30, 2017 at 4:14 AM, Ole Troan  wrote:
> > Pragash,
> >
> > > I have a quick question, i am able to assign multiple ips for an 
> > > interface in vpp. Is this correct behavior.
> >
> > Yes. Shouldn't it be?
> > Note that VPP itself doesn't implement source address selection so the 
> > local application would have to deal with that.
> >
> > Best regards,
> > Ole
> >
> >
> > >
> > > pragash@revvit:~/VPP$ sudo vppctl sh interfaces address
> > > FortyGigabitEthernet2/0/0 (up):
> > >   10.1.1.1/24
> > >   10.2.1.1/24
> > >   2001::1/48
> > >   fe80::3efd:feff:fea6:8ef0/128
> > >   2001::2/48
> > >   2003::2/48
> > >   2004::2/48
> > > FortyGigabitEthernet4/0/0 (up):
> > >   2002::1/48
> > >   fe80::3efd:feff:fea6:8e78/128
> > >   9001::2/48
> > > local0 (dn):
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Pragash Vijayaragavan
> > > Grad Student at Rochester Institute of Technology
> > > email : pxv3...@rit.edu
> > > ph : 585 764 4662
> > >
> > > ___
> > > vpp-dev mailing list
> > > vpp-dev@lists.fd.io
> > > https://lists.fd.io/mailman/listinfo/vpp-dev
> >
> >
> 
> 



signature.asc
Description: Message signed with OpenPGP
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

[vpp-dev] live-migrate

2017-08-31 Thread ????????
Hello, all
I want to ask a question whether live-migrate can work in 
openstack+networking-vpp enabled vpp-agent(replacing q-agt and q-l3)?  thank 
you!!!___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Query for IPSec support on VPP

2017-08-31 Thread Sergio Gonzalez Monroy

On 31/08/2017 09:37, Mukesh Yadav (mukyadav) wrote:


Thanks a lot Sergio for lot of patience and help,



No problem at all. I said before, it is great that someone else goes 
through the docs/wiki to double check everything is working as described.



With you latest comments, I can see dpdk IPSec is happening.
There are some issues, I am getting where post decryption ip4-input is 
not called.
As such I have kept config of IPSec same as was when working with VPP 
core IPSec.


I need to dig further, as such it seems packet is getting dropped in 
*dpdk-esp-decrypt().

*Is there some way to find out some errors related.



There are a few reasons why the packet would be drop in that node, but I 
was expecting the trace to show the drop node for those packets.

What is the output of 'show error' ?

I see you are setting up IPSec as an interface feature, with SPD and 
transport mode SA, I will double check that there are no bugs.


Thanks,
Sergio


**

I am using vpp v17.10 andDPDK 17.05.0

Currently trace is looking like below:
00:01:30:013871: dpdk-input

GigabitEthernet0/8/0 rx queue 0

buffer 0x4d67: current data 14, length 136, free-list 0, clone-count 
0, totlen-nifb 0, trace 0x0


PKT MBUF: port 0, nb_segs 1, pkt_len 150

buf_len 2176, data_len 150, ol_flags 0x0, data_off 128, phys_addr 
0x9cd35a00


packet_type 0x0

IP4: 08:00:27:ba:35:60 -> 08:00:27:67:d4:f0

IPSEC_ESP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 136, checksum 0x9d0f

fragment id 0x44f2, flags DONT_FRAGMENT

00:01:30:013902: ip4-input

IPSEC_ESP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 136, checksum 0x9d0f

fragment id 0x44f2, flags DONT_FRAGMENT

00:01:30:013909: ipsec-input-ip4

esp: sa_id 20 spi 1000 seq 7

00:01:30:013911: *dpdk-esp-decrypt*

esp: crypto aes-cbc-128 integrity sha1-96

Earlier when I was using VPP core IPSec, trace was looking like

00:03:41:528507: dpdk-input

GigabitEthernet0/8/0 rx queue 0

buffer 0x4d19: current data 14, length 136, free-list 0, clone-count 
0, totlen-nifb 0, trace 0x0


PKT MBUF: port 0, nb_segs 1, pkt_len 150

buf_len 2176, data_len 150, ol_flags 0x0, data_off 128, phys_addr 
0x7de34680


packet_type 0x0

IP4: 08:00:27:ba:35:60 -> 08:00:27:67:d4:f0

IPSEC_ESP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 136, checksum 0xc1c0

fragment id 0x2041, flags DONT_FRAGMENT

00:03:41:528548: ip4-input

IPSEC_ESP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 136, checksum 0xc1c0

fragment id 0x2041, flags DONT_FRAGMENT

00:03:41:528556: ipsec-input-ip4

esp: sa_id 20 spi 1000 seq 1

00:03:41:528559*: esp-decrypt***

esp: crypto aes-cbc-128 integrity sha1-96

00:03:41:528648: ip4-input

ICMP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 84, checksum 0x2267

fragment id 0x

ICMP echo_request checksum 0x4201

00:03:41:528649: ip4-lookup

fib 0 dpo-idx 6 flow hash: 0x

ICMP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 84, checksum 0x2267

fragment id 0x

ICMP echo_request checksum 0x4201

00:03:41:528680: ip4-local

ICMP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 84, checksum 0x2267

fragment id 0x

ICMP echo_request checksum 0x4201

00:03:41:528684: ip4-icmp-input

ICMP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 84, checksum 0x2267

fragment id 0x

ICMP echo_request checksum 0x4201

00:03:41:528685: ip4-icmp-echo-request

ICMP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 84, checksum 0x2267

fragment id 0x

ICMP echo_request checksum 0x4201

00:03:41:528686: ip4-load-balance

fib 0 dpo-idx 13 flow hash: 0x

ICMP: 172.28.128.5 -> 172.28.128.4

tos 0x00, ttl 64, length 84, checksum 0xea0f

fragment id 0x3857

ICMP echo_reply checksum 0x4a01

00:03:41:528688: ip4-rewrite

tx_sw_if_index 1 dpo-idx 1 : ipv4 via 172.28.128.4 
GigabitEthernet0/8/0: 080027ba356008002767d4f00800 flow hash: 0x


: 080027ba356008002767d4f00800455438574001ea0fac1c8005ac1c

0020: 80044a0107850001d6be8e59898d01001011

00:03:41:528691: ipsec-output-ip4

spd 1

00:03:41:528697: esp-encrypt

esp: spi 1001 seq 0 crypto aes-cbc-128 integrity sha1-96

My configuration is as below:

sudo ifconfig enp0s8 down

sudo service vpp restart

set int ip address GigabitEthernet0/8/0 172.28.128.5/24

set int state GigabitEthernet0/8/0 up

ipsec sa add 10 spi 1001 esp crypto-alg aes-cbc-128 crypto-key 
4a506a794f574265564551694d653768 integ-alg sha1-96 integ-key 
4339314b55523947594d6d3547666b45764e6a58


ipsec sa add 20 spi 1000 esp crypto-alg aes-cbc-128 crypto-key 
4a506a794f574265564551694d653768 integ-alg sha1-96 integ-key 
4339314b55523947594d6d3547666b45764e6a58


ipsec spd add 1

set interface ipsec spd GigabitEthernet0/8/0 1

ipsec policy add spd 1 priority 100 inbound action bypass protocol 50

ipsec policy add spd 1 priority 100 outbound action bypass protocol 50

ipsec policy add spd 1 priority 10 inbound action protect sa 20 
local-ip-range 

Re: [vpp-dev] Query for IPSec support on VPP

2017-08-31 Thread Mukesh Yadav (mukyadav)
Thanks a lot Sergio for lot of patience and help,

With you latest comments, I can see dpdk IPSec is happening.
There are some issues, I am getting where post decryption ip4-input is not 
called.
As such I have kept config of IPSec same as was when working with VPP core 
IPSec.

I need to dig further, as such it seems packet is getting dropped in 
dpdk-esp-decrypt().
Is there some way to find out some errors related.

I am using vpp v17.10 and DPDK 17.05.0


Currently trace is looking like below:
00:01:30:013871: dpdk-input

  GigabitEthernet0/8/0 rx queue 0

  buffer 0x4d67: current data 14, length 136, free-list 0, clone-count 0, 
totlen-nifb 0, trace 0x0

  PKT MBUF: port 0, nb_segs 1, pkt_len 150

buf_len 2176, data_len 150, ol_flags 0x0, data_off 128, phys_addr 0x9cd35a00

packet_type 0x0

  IP4: 08:00:27:ba:35:60 -> 08:00:27:67:d4:f0

  IPSEC_ESP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 136, checksum 0x9d0f

fragment id 0x44f2, flags DONT_FRAGMENT

00:01:30:013902: ip4-input

  IPSEC_ESP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 136, checksum 0x9d0f

fragment id 0x44f2, flags DONT_FRAGMENT

00:01:30:013909: ipsec-input-ip4

  esp: sa_id 20 spi 1000 seq 7

00:01:30:013911: dpdk-esp-decrypt

  esp: crypto aes-cbc-128 integrity sha1-96





Earlier when I was using VPP core IPSec, trace was looking like



00:03:41:528507: dpdk-input

  GigabitEthernet0/8/0 rx queue 0

  buffer 0x4d19: current data 14, length 136, free-list 0, clone-count 0, 
totlen-nifb 0, trace 0x0

  PKT MBUF: port 0, nb_segs 1, pkt_len 150

buf_len 2176, data_len 150, ol_flags 0x0, data_off 128, phys_addr 0x7de34680

packet_type 0x0

  IP4: 08:00:27:ba:35:60 -> 08:00:27:67:d4:f0

  IPSEC_ESP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 136, checksum 0xc1c0

fragment id 0x2041, flags DONT_FRAGMENT

00:03:41:528548: ip4-input

  IPSEC_ESP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 136, checksum 0xc1c0

fragment id 0x2041, flags DONT_FRAGMENT

00:03:41:528556: ipsec-input-ip4

  esp: sa_id 20 spi 1000 seq 1

00:03:41:528559: esp-decrypt

  esp: crypto aes-cbc-128 integrity sha1-96

00:03:41:528648: ip4-input

  ICMP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 84, checksum 0x2267

fragment id 0x

  ICMP echo_request checksum 0x4201

00:03:41:528649: ip4-lookup

  fib 0 dpo-idx 6 flow hash: 0x

  ICMP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 84, checksum 0x2267

fragment id 0x

  ICMP echo_request checksum 0x4201

00:03:41:528680: ip4-local

ICMP: 172.28.128.4 -> 172.28.128.5

  tos 0x00, ttl 64, length 84, checksum 0x2267

  fragment id 0x

ICMP echo_request checksum 0x4201

00:03:41:528684: ip4-icmp-input

  ICMP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 84, checksum 0x2267

fragment id 0x

  ICMP echo_request checksum 0x4201



00:03:41:528685: ip4-icmp-echo-request

  ICMP: 172.28.128.4 -> 172.28.128.5

tos 0x00, ttl 64, length 84, checksum 0x2267

fragment id 0x

  ICMP echo_request checksum 0x4201

00:03:41:528686: ip4-load-balance

  fib 0 dpo-idx 13 flow hash: 0x

  ICMP: 172.28.128.5 -> 172.28.128.4

tos 0x00, ttl 64, length 84, checksum 0xea0f

fragment id 0x3857

  ICMP echo_reply checksum 0x4a01

00:03:41:528688: ip4-rewrite

  tx_sw_if_index 1 dpo-idx 1 : ipv4 via 172.28.128.4 GigabitEthernet0/8/0: 
080027ba356008002767d4f00800 flow hash: 0x

  : 080027ba356008002767d4f00800455438574001ea0fac1c8005ac1c

  0020: 80044a0107850001d6be8e59898d01001011

00:03:41:528691: ipsec-output-ip4

  spd 1

00:03:41:528697: esp-encrypt

  esp: spi 1001 seq 0 crypto aes-cbc-128 integrity sha1-96









My configuration is as below:

sudo ifconfig enp0s8 down

sudo service vpp restart

set int ip address GigabitEthernet0/8/0 172.28.128.5/24

set int state GigabitEthernet0/8/0 up

ipsec sa add 10 spi 1001 esp crypto-alg aes-cbc-128 crypto-key 
4a506a794f574265564551694d653768 integ-alg sha1-96 integ-key 
4339314b55523947594d6d3547666b45764e6a58

ipsec sa add 20 spi 1000 esp crypto-alg aes-cbc-128 crypto-key 
4a506a794f574265564551694d653768 integ-alg sha1-96 integ-key 
4339314b55523947594d6d3547666b45764e6a58

ipsec spd add 1

set interface ipsec spd GigabitEthernet0/8/0 1

ipsec policy add spd 1 priority 100 inbound action bypass protocol 50

ipsec policy add spd 1 priority 100 outbound action bypass protocol 50

ipsec policy add spd 1 priority 10 inbound action protect sa 20 local-ip-range 
172.28.128.5 - 172.28.128.5  remote-ip-range 172.28.128.4 - 172.28.128.4

ipsec policy add spd 1 priority 10 outbound action protect sa 10 local-ip-range 
172.28.128.5 - 172.28.128.5  remote-ip-range 172.28.128.4 - 172.28.128.4







dpdk {

 socket-mem 1024,1024

 num-mbufs 131072

 dev :00:08.0

 vdev crypto_aesni_mb0

 vdev crypto_aesni_mb1

}






Re: [vpp-dev] About the order of  VLIB_INIT_FUNCTION called between different plugins

2017-08-31 Thread Dave Barach (dbarach)
Actually, that’s not quite right... Here’s a bit of code from 
.../vlib/unix/plugin.c:

  /*
   * Sort the plugins by name. This is important.
   * API traces contain absolute message numbers.
   * Loading plugins in directory (vs. alphabetical) order
   * makes trace replay incredibly fragile.
   */
  vec_sort_with_function (pm->plugin_info, plugin_name_sort_cmp);

You can assume that AAA will start before AAB, etc.

Thanks… Dave

From: wang.hu...@zte.com.cn [mailto:wang.hu...@zte.com.cn]
Sent: Wednesday, August 30, 2017 9:39 PM
To: Damjan Marion (damarion) 
Cc: vpp-dev@lists.fd.io; zhao.qingl...@zte.com.cn; wu.bi...@zte.com.cn; 
gu.ji...@zte.com.cn; dong.ju...@zte.com.cn; Dave Barach (dbarach) 

Subject: 答复: Re: [vpp-dev] About the order of  VLIB_INIT_FUNCTION called 
between different plugins


Thanks you two for the help~ Now we knew that plugins startup maybe has no 
order , due to reading plugins by "readdir" 。

And the function which defined in other plugin.so could not be called in our 
plugin,  so vlib_call_init_function maybe can not works.

We have reconsidered the dependencies between plugins, and ajust that.











王辉 wanghui



IT开发工程师 IT Development Engineer
虚拟化南京四部/无线研究院/无线产品经营部 NIV Nanjing Dept. IV/Wireless Product R&D 
Institute/Wireless Product Operation Division


原始邮件
发件人: >;
收件人:王辉10067165;
抄送人: 
>;赵清凌10066964;吴兵10040069;顾剑10036178;董娟00096251;
 >;
日 期 :2017年08月30日 23:35
主 题 :Re: [vpp-dev] About the order of  VLIB_INIT_FUNCTION called between 
different plugins


Yes, also please note that you can at any time use vlib_get_plugin_symbol(..) 
function to get pointer to symbol in another plugin. If you get NULL then 
another plugin is not loaded.

So something like this should work, assuming that you want to go that way...

static clib_error_t *
bar_init (vlib_main_t * vm)
 {
clib_error_t *error = 0;
if (vlib_get_plugin_symbol (“foo_plugin.so”, “foo_init”) == 0)
{
  clib_warning ( “foo plugin not loaded. bar disabled”);
  bar_main.disabled = 1;
  return 0;
}

if ((error = vlib_call_init_function (vm, foo_init)))
 return error;

  // continue with bar init…
}



> On 30 Aug 2017, at 12:37, Dave Barach (dbarach) 
> > wrote:
>
> Explicit dependencies between plugins is probably not a good idea. There is 
> little to guarantee that both A and B will be loaded.
>
> Please describe the use-case in more detail.
>
> Thanks… Dave
>
> From: vpp-dev-boun...@lists.fd.io 
> [mailto:vpp-dev-boun...@lists.fd.io] On Behalf Of 
> wang.hu...@zte.com.cn
> Sent: Wednesday, August 30, 2017 4:01 AM
> To: vpp-dev@lists.fd.io
> Cc: zhao.qingl...@zte.com.cn; 
> wu.bi...@zte.com.cn; 
> gu.ji...@zte.com.cn; 
> dong.ju...@zte.com.cn
> Subject: [vpp-dev] About the order of  VLIB_INIT_FUNCTION called between 
> different plugins
>
> Hi all:
>
> How to control the order of  VLIB_INIT_FUNCTION (user xxx_init function) 
> called between Different plugins?
>
> It depends on plugin name?or the sequence of loading plugin ?
>
>  or is there any other way to adjust the order?
>
>
>
> Thanks~
>
>
>
>
>
>
>
> 王辉 wanghui
>
>
>
> IT开发工程师 IT Development Engineer
> 虚拟化南京四部/无线研究院/无线产品经营部 NIV Nanjing Dept. IV/Wireless Product R&D 
> Institute/Wireless Product Operation Division
>
>
>
> ___
> vpp-dev mailing list
> vpp-dev@lists.fd.io
> https://lists.fd.io/mailman/listinfo/vpp-dev




___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] Dynamically change number of cores used by VPP?

2017-08-31 Thread Tobias Sundqvist
Hi, thanks, I think that is exactly what I am looking for, I will try the
commands that you mentioned.

BR /Tobias


On 30 August 2017 at 17:54, Damjan Marion (damarion) 
wrote:

>
> On 30 Aug 2017, at 13:59, Tobias Sundqvist 
> wrote:
>
> Hi I guess the silence tells that there are no way of dynamically scale
> the number of cores used by VPP when VPP already has started.
> If anyone has any idea if it is dynamically possible to change the way the
> cores is used just send me an email. Perhaps it could be possible to assign
> a certain core to not poll the interface or something similar, then the
> core would still be in use of VPP but the CPU load would go down.
>
> BR /Tobias
>
> On 24 August 2017 at 10:36, Tobias Sundqvist 
> wrote:
>
>> Hi we are building an application that uses vpp and when I have some
>> questions that concerns multi core usage.
>>
>> In the run that we are doing now we are using 4 cores and we use some
>> DPDK polling of an interface which makes the cpu load go 100% on all cores.
>> We are interested in energy consumption in the application we are creating
>> and would like to be able to scale up and down the cpu usage during runtime.
>>
>> Is it possible to dynamically change the number of cores used by VPP or
>> specify somehow which cores that are used for polling of an certain
>> interface during runtime?
>>
>> During low and high traffic we would like to scale up and down the amount
>> of cores that is used.
>>
>> If the polling is causing the cpu to go to 100% would it help using
>> Turboboost and Speedstep, would it actually lower the frequency when the
>> traffic is low?
>>
>> BR /Tobias
>>
>
>
> I did some work to enable interrupt mode with DPDK devices, but it is a
> bit hacky (it is digging some data form dpdk internal structures)
> so it is not published. Together with adaptive interrupt/polling mode
> which VPP supports it might be solution to your problem.
>
> Please note that you can define today which worker is poling which
> interface, so you can effectively remove all interfaces form  specific core
> ant that core should go to sleep.
> This works on runtime without the need to switch interface off so it can
> also be a way to address your problem.
>
> See “set interface rx-placement / show interface rx-placement” commands
> for details…
>
> Thanks,
>
> Damjan
>
>
>
___
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Re: [vpp-dev] https://gerrit.fd.io/r/#/c/8236/

2017-08-31 Thread Gabriel Ganne
I had not thought of that. Thank you for explaining this.


--

Gabriel Ganne


From: Thomas F Herbert 
Sent: Wednesday, August 30, 2017 9:30:20 PM
To: Gabriel Ganne; Dave Wallace; Burt Silverman
Cc: vpp-dev
Subject: Re: [vpp-dev] https://gerrit.fd.io/r/#/c/8236/



On 08/30/2017 01:57 PM, Gabriel Ganne wrote:
https://gerrit.fd.io/r/#/c/8260/

It adds bc to the dependency list, but also replaces a $(shell $(echo …)) by 
$(shell `echo …`)
They should be the same, but it seems to change the way the Makefile variables 
are interpreted.
The problem I saw was on Fedora and Centos both of which have bc. The problem 
it needs a double $
to escape the "$()" from make because it "thinks" it is a reference to a 
variable.

commit 14afc64629e9b35a2e5c5941232236a78c2ecd75
Author: Thomas F Herbert 
Date:   Wed Aug 30 10:13:51 2017 -0400

Fix shell error.

Change-Id: I06af51eef20c2191199613f951f569ef1727b9c4
Signed-off-by: Thomas F Herbert 


diff --git a/Makefile b/Makefile
index 1548f36..ef92e2f 100644
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,7 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),fedora-25)
RPM_DEPENDS += python-devel
RPM_DEPENDS += python2-virtualenv
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
-else ifeq ($(shell if [ $(echo "$(OS_VERSION_ID) > 25" | bc) -eq 1 ] ; then 
echo "y" ; fi),"y")
+else ifeq ($(shell if [ $$(echo "$(OS_VERSION_ID) > 25" | bc) -eq 1 ] ; then 
echo "y" ; fi),"y")
RPM_DEPENDS += python2-devel
RPM_DEPENDS += python2-virtualenv
RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'


I tested on rhel 7, Ubuntu 16.04, and debian 8.

Best regards,

--
Gabriel Ganne

From: Dave Wallace [mailto:dwallac...@gmail.com]
Sent: mercredi 30 août 2017 16:27
To: Burt Silverman ; Gabriel Ganne 

Cc: Thomas F Herbert ; vpp-dev 

Subject: Re: [vpp-dev] 
https://gerrit.fd.io/r/#/c/8236/

I agree.

@Gabriel, please push a patch which adds bc to DEB_DEPENDS in vpp/Makefile.

Thanks,
-daw-
On 08/30/2017 09:14 AM, Burt Silverman wrote:
To me, it doesn't seem to be a crime to add bc to the dependencies. I guess 
another approach would be to remove the dot in 16dot04 and then just use shell 
arithmetic. The release numbers are always in the same format, 2 digits DOT 2 
digits, so I would think that should work.

Burt

On Wed, Aug 30, 2017 at 3:47 AM, Gabriel Ganne 
> wrote:

Hi,



This probably is be because you don't have bc.

It is not in the dependency list. I'm so used to having it around that I did 
not think to check.

Sorry.



If so, the best thing probably is to revert and not to increase the dependency 
list just to silence a warning.



Regards,



--

Gabriel Ganne


From: Dave Wallace >
Sent: Wednesday, August 30, 2017 6:25:32 AM
To: Thomas F Herbert; Gabriel Ganne
Cc: vpp-dev
Subject: Re: [vpp-dev] 

 
https://gerrit.fd.io/r/#/c/8236/

Tom,

What OS are you running?

Thanks,
-daw-
On 08/29/2017 07:58 PM, Thomas F Herbert wrote:

This patch creates may have fixed one problem with Ubuntu 

Re: [vpp-dev] Query for IPSec support on VPP

2017-08-31 Thread Sergio Gonzalez Monroy

Hi Mukesh,

On 30/08/2017 17:41, Mukesh Yadav (mukyadav) wrote:

HI Sergio,

I haven’t done any extra config besides mentioned in two scenario.

1.

dpdk {
 socket-mem 1024,1024
 num-mbufs 131072
 dev :00:08.0
}
/usr/bin/vpp[3844]: dpdk_ipsec_process:239: not enough Cryptodevs, default to 
OpenSSL IPsec

2.
dpdk {
 socket-mem 1024,1024
 num-mbufs 131072
 dev :00:08.0
vdev cryptodev_aesni_mb_pmd,socket_id=1
 vdev cryptodev_aesni_mb_pmd,socket_id=1
}


I reckon it could be another missed bit in the documentation regarding 
the configuration. If Using DPDK 17.08 you might have to do something 
like the following instead:

dpdk {
socket-mem 1024,1024
num-mbufs 131072
dev :00:08.0
vdev crypto_aesni_mb0
vdev crypto_aesni_mb1
}

You should set the startup.conf to suit your needs depending on the 
numbers of cores to use, the socket (numa node) you are running VPP on, etc.
That is just to say that you are probably fine with default VPP values 
for socket-mem and num-mbufs.


Thanks,
Sergio


CRYPTODEV: [crypto_aesni_mb] cryptodev_aesni_mb_create() line 704: failed to 
create cryptodev vdev
CRYPTODEV: [crypto_aesni_mb] cryptodev_aesni_mb_create() line 746: driver 
cryptodev_aesni_mb_pmd: cryptodev_aesni_create failed
EAL: failed to initialize cryptodev_aesni_mb_pmd device


I am not aware of significance of various paramters mentioned above. Just 
trying from reading DPDK documentation.
Will be helpful if you can point me some sample config for DPDK IPSec or any 
link which shall have these pointers.

Thanks
Mukesh

On 30/08/17, 9:14 PM, "Sergio Gonzalez Monroy" 
 wrote:

 I was just reproducing your steps.
 
 Check that you have created a 'vdev crypto_aeasni_mb0' in

 /etc/vpp/startup.conf inside the 'dpdk' section.
 
 Then to check if you have support, you can run:

 vppctl show crypto device mapping verbose
 
 Thanks,

 Sergio
 
 On 30/08/2017 13:07, Mukesh Yadav (mukyadav) wrote:

 >
 > HI Sergio,
 >
 > I am using VPP version 17.10
 >
 > vpp# show ver
 >
 > vpp v17.10-rc0~103-g42e6b09 built by vagrant on localhost at Sun Aug
 > 27 22:06:20 PDT 2017
 >
 > I am cloned vpp on my mac machine using below command
 >
 > git clone https://gerrit.fd.io/r/vpp
 >
 > Then I have ran vagrant up/vagrant ssh
 >
 > Referred:
 > 
https://wiki.fd.io/view/VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code
 >
 > On vagrant ssh, I have started vpp service.
 >
 > Note: I have ran scenario mentioned on below links properly.
 >
 > https://wiki.fd.io/view/VPP/IPSec_and_IKEv2
 >
 > Only issue is coming when trying to use DPDK.
 >
 > Once/twice I have ran below as well after vagrant ssh. But haven’t
 > made any code changes in VPP Source.
 >
 > cd /vpp
 >
 > make wipe-release
 >
 > make install-dep
 >
 > make build-release (or make build)
 >
 > make pkg-deb
 >
 > sudo dpkg -i /vpp/build-root/*.deb
 >
 > sudo service vpp start
 >
 > Thanks
 >
 > Mukesh
 >
 > *From: *Sergio Gonzalez Monroy 
 > *Date: *Wednesday, 30 August 2017 at 4:18 PM
 > *To: *Mukesh Yadav , "vpp-dev@lists.fd.io"
 > 
 > *Subject: *Re: [vpp-dev] Query for IPSec support on VPP
 >
 > Which VPP are you using?
 >
 > If you are using/installing VPP package (rpm/deb), then it is likely
 > that you do not have DPDK SW crypto support.
 >
 > As a summary, if you want DPDK SW crypto support:
 > - VPP package: 17.07.1 (AFAIK not released yet) or newer.
 > - From source:
 > - 17.04 or 17.07: need to build VPP with DPDK SW crypto support
 >  make build-release vpp_uses_dpdk_cryptodev_sw=yes
 > - 17.07.1 or newer:  DPDK SW crypto support built by default
 >  make build-release
 >
 > Thanks,
 > Sergio
 >
 > On 30/08/2017 10:57, Mukesh Yadav (mukyadav) wrote:
 >
 > Thanks Sergio.
 >
 > I tried below combinations of dpdk config.
 >
 > dpdk {
 >
 >   socket-mem 1024,1024
 >
 >   num-mbufs 131072
 >
 >   dev :00:08.0
 >
 > #   enable-cryptodev
 >
 > #   vdev cryptodev_aesni_mb_pmd,socket_id=1
 >
 > #   vdev cryptodev_aesni_mb_pmd,socket_id=1
 >
 > }
 >
 > I get below error:
 >
 > /usr/bin/vpp[3844]: dpdk_ipsec_process:239: not enough Cryptodevs,
 > default to OpenSSL IPsec
 >
 > dpdk {
 >
 >   socket-mem 1024,1024
 >
 >   num-mbufs 131072
 >
 >   dev :00:08.0
 >
 > #