Re: [vpp-dev] tuntap interface in VPP

2019-11-25 Thread Dave Barach via Lists.Fd.Io
Try something like this:

create tap host-if-name lstack host-ip4-addr 192.168.2.2/24 host-ip4-gw 
192.168.2.1
set int ip address tap0  # vpp 
interface in L3 mode
   or
set int l2 bridge tap0 1 # vpp interface in L2 mode.

I use the latter setup in production on my vpp home gateway.

HTH... Dave

From: vpp-dev@lists.fd.io  On Behalf Of vyshakh krishnan
Sent: Monday, November 25, 2019 1:29 PM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] tuntap interface in VPP

Hi,

Our requirement was to redirect the telnet packets to host OS from VPP so that 
the kernel stack can reply to the telnet packet. And found that tuntap 
interface in VPP is perfect for this.

I was able create tuntap interface using:

vpp# tap connect newtap
tapcli-0
vpp# show in
inacl  interface
vpp# show interface
  Name   IdxState  MTU (L3/IP4/IP6/MPLS) 
Counter  Count
local00 down  0/0/0/0
memif0/0  1  up  9000/0/0/0 rx packets  
 161
rx bytes
9096
tx packets  
 499
tx bytes
   31437
drops   
 945
tx-error
 785
tapcli-0  2 down 9000/0/0/0 drops   
   8

which created the following in host:

newtap: flags=4163  mtu 1500
inet6 fe80::cc6c:feff:feed:ff11  prefixlen 64  scopeid 0x20
ether ce:6c:fe:ed:ff:11  txqueuelen 1000  (Ethernet)
RX packets 0  bytes 0 (0.0 B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 7  bytes 586 (586.0 B)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Can anyone please help me with the following questions:

1. How will we assign an IP to this host interface (newtap). Is there a way to 
do this from VPP (set int ip addr tapcli-0 
192.168.3.1/24  --> assigns IP only to VPP interface.)

2. How will host OS reply to the packets? Routing entries are known only to 
VPP. is there a way to export these to host OS networking stack from VPP?

Thanks
Vyshakh

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14691): https://lists.fd.io/g/vpp-dev/message/14691
Mute This Topic: https://lists.fd.io/mt/61945630/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] tuntap interface in VPP

2019-11-25 Thread vyshakh krishnan
Hi,

Our requirement was to redirect the telnet packets to host OS from VPP so
that the kernel stack can reply to the telnet packet. And found that tuntap
interface in VPP is perfect for this.

I was able create tuntap interface using:

vpp# tap connect newtap
tapcli-0
vpp# show in
inacl  interface
vpp# show interface
  Name   IdxState  MTU (L3/IP4/IP6/MPLS)
Counter  Count
local00 down  0/0/0/0
memif0/0  1  up  9000/0/0/0 rx
packets   161
rx
bytes9096
tx
packets   499
tx
bytes   31437
drops
 945

tx-error 785
tapcli-0  2 down 9000/0/0/0 drops
   8

which created the following in host:

newtap: flags=4163  mtu 1500
inet6 fe80::cc6c:feff:feed:ff11  prefixlen 64  scopeid 0x20
ether ce:6c:fe:ed:ff:11  txqueuelen 1000  (Ethernet)
RX packets 0  bytes 0 (0.0 B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 7  bytes 586 (586.0 B)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Can anyone please help me with the following questions:

1. How will we assign an IP to this host interface (newtap). Is there a way
to do this from VPP (set int ip addr tapcli-0 192.168.3.1/24  --> assigns
IP only to VPP interface.)

2. How will host OS reply to the packets? Routing entries are known only to
VPP. is there a way to export these to host OS networking stack from VPP?

Thanks
Vyshakh
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14690): https://lists.fd.io/g/vpp-dev/message/14690
Mute This Topic: https://lists.fd.io/mt/61945630/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] vpp19.08 ipsec vpp_papi

2019-11-25 Thread Vratko Polak -X (vrpolak - PANTHEON TECHNOLOGIES at Cisco) via Lists.Fd.Io
> This situation does not happen when I use CLI like this

I think the difference is that CLI is restricted,
it can only accept printable characters on input.
Therefore it assumes it gets "hexlified" value,
and applies "unhexlify" on its input.

Contrary to that, PAPI (hopefully) can handle
arbitrary u8 arrays, so it does not unhexlify.

> local_crypto_key = "2b7e151628aed2a6abf7158809cf4f3d",

You can try to use the unhexlified (binary) string:
  local_crypto_key = 
b"\x2b\x7e\x15\x16\x28\xae\xd2\xa6\xab\xf7\x15\x88\x09\xcf\x4f\x3d",

Vratko.

From: vpp-dev@lists.fd.io  On Behalf Of Paul Vinciguerra
Sent: Sunday, November 24, 2019 4:31 PM
To: Terry 
Cc: vpp-dev 
Subject: Re: [vpp-dev] vpp19.08 ipsec vpp_papi

That output is not random.  It is the hex of your string.
2b7e -> 32 62 37 65

On Sun, Nov 24, 2019 at 8:06 AM Terry 
mailto:zenghao...@163.com>> wrote:
Dear VPP experts,

I'm trying to configure ipsec with python API in vpp19.08.
My configurations are as follows:

reply = vpp.api.ipsec_tunnel_if_add_del(is_add = 1,
local_ip = "192.168.1.1",
remote_ip = "192.168.2.2",
local_spi = 1031,
remote_spi = 1030,
crypto_alg = 7,
local_crypto_key_len = 16,
local_crypto_key = "2b7e151628aed2a6abf7158809cf4f3d",
remote_crypto_key_len = 16,
remote_crypto_key = "2b7e151628aed2a6abf7158809cf4f3d",
integ_alg = 2,
local_integ_key_len = 16,
local_integ_key = "4339314b55523947594d6d3547666b45",
remote_integ_key_len = 16,
remote_integ_key = "4339314b55523947594d6d3547666b45",
renumber = 1,
show_instance = 1)
But the output SA information is as follows:
vpp# show ipsec sa 0
[0] sa 2147483648 (0x8000) spi 1030 (0x0406) protocol:esp flags:[tunnel 
inbound aead ]
   locks 1
   salt 0x0
   seq 0 seq-hi 0
   last-seq 0 last-seq-hi 0 window 

   crypto alg aes-gcm-128 key 32623765313531363238616564326136
   integrity alg sha1-96 key 3439333134623535353233393437
   packets 0 bytes 0
   table-ID 0 tunnel src 192.168.2.2 dst 192.168.1.1

The crypto_key I configured is '2b7e151628aed2a6abf7158809cf4f3d', but the 
output key is '32623765313531363238616564326136'.
The output crypto key looks like a random number.
This situation does not happen when I use CLI like this:
'create ipsec tunnel local-ip 192.168.1.1 remote-ip 192.168.2.2 local-spi 1031 
remote-spi 1030 local-crypto-key 2b7e151628aed2a6abf7158809cf4f3d 
remote-crypto-key 2b7e151628aed2a6abf7158809cf4f3d crypto-alg aes-gcm-128'

Could you please give me some help?

Best regards,
Arvin




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14676): https://lists.fd.io/g/vpp-dev/message/14676
Mute This Topic: https://lists.fd.io/mt/61874477/1594641
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  
[pvi...@vinciconsulting.com]
-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14689): https://lists.fd.io/g/vpp-dev/message/14689
Mute This Topic: https://lists.fd.io/mt/61874477/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Multi-Worker VPP Performance Issue

2019-11-25 Thread Satya Murthy
Hi,

We are facing a strange problem when we moved from single worker to multi 
worker VPP.

Our application plugin registers for a specific udp port and gets the packets 
from udp_local node.

In Single Worker VPP:

We see that our app-plugin-node is receiving frames of bigger vector size ( 
most of the times 256 ), which is resulting is good performance figures.

In Multi Worker VPP: ( 2 workers )
==
Though we have two workers here, we are receiving udp packets from one worker 
only ( based on our rx-placement ).
With this model, we thought our performance would be atleast equal to the 
single worker mode, but we are seeing degraded performance.
In this mode, we see that, our app-plugin-node is receiving frames with vector 
size as 1 ( most of the times ), due to which, we are seeing degraded 
performance figures, we believe.
We checked the underlying udp-local node, and observed that, it is always 
receiving frames of vector sizes 256 and 99.99% of these frames belong to our 
plugin related udp port. Hence, they all are sent to our app-plugin-node. But 
these packets are received by our node with vector size as 1, in each frame, 
which is causing an issue.

We are using exact same test tool to pump the traffic in both single and multi 
thread VPP models.

Is there anything that we need to do to avoid vector sizes as 1 in this case ?
Also, any reason why this behavior is seen only when we have multi workers, 
even though the other worker is not really tampering with any of the packets 
that we are dealing here.

Any inputs on this would really help us.

--
Thanks & Regards,
Murthy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14688): https://lists.fd.io/g/vpp-dev/message/14688
Mute This Topic: https://lists.fd.io/mt/61942008/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] Coverity run FAILED as of 2019-11-25 14:00:16 UTC

2019-11-25 Thread Noreply Jenkins
Coverity run failed today.

Current number of outstanding issues are 2
Newly detected: 0
Eliminated: 0
More details can be found at  
https://scan.coverity.com/projects/fd-io-vpp/view_defects
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14687): https://lists.fd.io/g/vpp-dev/message/14687
Mute This Topic: https://lists.fd.io/mt/61940446/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] Support needed for ARM64 64k pagesize

2019-11-25 Thread Lijian Zhang
Hi Lei,
We didn’t try running VPP on Arm64 with 16K or 64K page size before.
From the error message and the below code, it’s probably because p->stack is 
not aligned to 64K boundary. It aligns to 4K by default.
Could you try “#define PAGE_SIZE_MULTIPLE 0x1”?

   614 #ifdef CLIB_UNIX
   615   /* Pad to a multiple of the page size so we can mprotect process 
stacks */
   616 #define PAGE_SIZE_MULTIPLE 0x1000
   617 #define ALIGN_ON_MULTIPLE_PAGE_BOUNDARY_FOR_MPROTECT  __attribute__ 
((aligned (PAGE_SIZE_MULTIPLE)))
   618 #else
   619 #define ALIGN_ON_MULTIPLE_PAGE_BOUNDARY_FOR_MPROTECT
   620 #endif

Thanks.
From: vpp-dev@lists.fd.io  On Behalf Of Lei Zhang via 
Lists.Fd.Io
Sent: 2019年11月22日 13:39
To: vpp-dev@lists.fd.io
Cc: vpp-dev@lists.fd.io
Subject: [vpp-dev] Support needed for ARM64 64k pagesize

  Hi,

Anyone knows if VPP can support ARM64 64K pagesize?
   Or anyone has experiences on below issue?

   Thank you!

Here is the kernel config.
# CONFIG_ARM64_4K_PAGES is not set
# CONFIG_ARM64_16K_PAGES is not set
CONFIG_ARM64_64K_PAGES=y

VPP reports a lot of errors when it starts up on ARM64 64k pagesize 
enviroment.

load_one_plugin:189: Loaded plugin: stn_plugin.so (VPP Steals the NIC for 
Container integration)
load_one_plugin:189: Loaded plugin: svs_plugin.so (Source VRF Select)
load_one_plugin:189: Loaded plugin: tlsopenssl_plugin.so (openssl based TLS 
Engine)
load_one_plugin:117: Plugin disabled (default): unittest_plugin.so
load_one_plugin:189: Loaded plugin: vmxnet3_plugin.so (VMWare Vmxnet3 Device 
Plugin)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)
register_node:476: process stack: Invalid argument (errno 22)

 The source code of the error is at mprotect(). It seems that VPP memeory 
management may not support 64K pagesize.
#ifdef CLIB_UNIX
/*
 * Disallow writes to the bottom page of the stack, to
 * catch stack overflows.
 */
if (mprotect (p->stack, page_size, PROT_READ) < 0)
  clib_unix_warning ("process stack");
#endif
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14686): https://lists.fd.io/g/vpp-dev/message/14686
Mute This Topic: https://lists.fd.io/mt/61493265/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-