[vpp-dev] A method to measure the allocated memory size for IKE SA

2019-08-12 Thread jmpark81
Hi, all

I'd like to measure the allocated memory size for the whole structure of IKE SA 
(ikev2_sa_t).
Because ikev2_sa_t has many other struct types, it is not simple for me to 
measure the memory size.

Is there any method like API or other function calls to measure the memory size 
for IKE SA?

Thanks in advance,
Jaemin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13717): https://lists.fd.io/g/vpp-dev/message/13717
Mute This Topic: https://lists.fd.io/mt/32848977/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] Project Proposal for uDPI

2019-08-12 Thread Ni, Hongjun
Hi Alexey and all,

Alexey and I had a discussion offline.
It seems that we mentioned two different projects except the same project name.

The project Alexey mentioned is “microDPI packet inspection for network 
analytics”.
It is developed based on Machine Learning and Python language, using GPL3.0 
License.
Last activity for this project is 10.04.2017, which is 2 years ago. That is why 
Alexey said it is died.
It supports six specific protocols/applications.

The project we proposed here is “Universal Deep Packet Inspection”.
It is developed based on industry regex matching library, VPP, and C language, 
using Apache 2.0 License.
We plan to support most industry network protocols/applications.

Both have different scopes, features, implementations and Licenses.

Thanks,
Hongjun

From: vpp-dev@lists.fd.io [mailto:vpp-dev@lists.fd.io] On Behalf Of Ni, Hongjun
Sent: Friday, August 9, 2019 10:03 PM
To: Alexey ; t...@lists.fd.io
Cc: vpp-dev@lists.fd.io; Wang, Xiang W ; Hong, Yang A 
; Chang, Harry ; 
gu.ji...@zte.com.cn; Shan Jianghua ; Zhang Yang 
; Li Xingfu ; Wu Shuai 
; Xia Yuying ; Fan Chenggang 
; Gao Feng ; Liu Zhong 
; Zhao Yong ; Chen Haiquan 

Subject: Re: [vpp-dev] Project Proposal for uDPI

Hi Alexey,

Could you give some thoughts on this?

Thanks,
Hongjun

From: vpp-dev@lists.fd.io 
[mailto:vpp-dev@lists.fd.io] On Behalf Of Alexey
Sent: Friday, August 9, 2019 6:54 PM
To: Ni, Hongjun mailto:hongjun...@intel.com>>; 
t...@lists.fd.io
Cc: vpp-dev@lists.fd.io; Wang, Xiang W 
mailto:xiang.w.w...@intel.com>>; Hong, Yang A 
mailto:yang.a.h...@intel.com>>; Chang, Harry 
mailto:harry.ch...@intel.com>>; 
gu.ji...@zte.com.cn; Shan Jianghua 
mailto:shanjia...@chinatelecom.cn>>; Zhang Yang 
mailto:zhangy@chinatelecom.cn>>; Li Xingfu 
mailto:lixin...@huachentel.com>>; Wu Shuai 
mailto:wush...@inspur.com>>; Xia Yuying 
mailto:yuying...@yxlink.com>>; Fan Chenggang 
mailto:fanchengg...@sunyainfo.com>>; Gao Feng 
mailto:davidf...@tencent.com>>; Liu Zhong 
mailto:liuzho...@chinaunicom.cn>>; Zhao Yong 
mailto:zhaoyon...@huawei.com>>; Chen Haiquan 
mailto:o...@yunify.com>>
Subject: Re: [vpp-dev] Project Proposal for uDPI

udpi is died


09.08.2019, 04:11, "Ni, Hongjun" 
mailto:hongjun...@intel.com>>:

Hello FD.io TSCs



Please accept this project proposal for uDPI for consideration.

https://wiki.fd.io/view/Project_Proposals/uDPI



So far, this project has 11 founders and 15 initial committers from

Intel, ZTE, China Telecom, HuachenTel, Inspur, Yxlink, Sunyainfo, Tencent, 
China Unicom, Huawei, QingCloud.



If possible, I would like to present this on TSC meeting.



Thanks,

Hongjun
,

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

View/Reply Online (#13684): https://lists.fd.io/g/vpp-dev/message/13684
Mute This Topic: https://lists.fd.io/mt/32805807/675634
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub 
[devel-net-ne-vleza...@yandex.ru]
-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

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


[vpp-dev] Trouble with tunnel mode IPSec to VPP

2019-08-12 Thread dchons
Hello devs,

I've been trying to establish an IPSec tunnel between libreswan and VPP using 
IKEv2, I'm able to get the tunnel established and packets coming in to VPP 
decrypted, but it looks like outbound packets from VPP are not going through 
IPSec. The VPP trace is shown below where I can see an ICMP packet coming into 
dpdk-input, through ipsec4-if-input, but the response does not seem to go 
through IPSec. I've run out of things to try and could really use some help, 
any suggestions would be hugely appreciated and I would be happy to contribute 
the solution and lessons learned to the wiki / documentation.

The setup is fairly simple:

[ VPP --- TenGigabitEthernet5/0/0 IP: 10.0.0.44]   [ Libreswan 
10.0.0.80 ]

*VPP configuration commands:*
set interface ip address TenGigabitEthernet5/0/0 10.0.0.44/24
set interface state TenGigabitEthernet5/0/0 up
ikev2 profile add pr1
ikev2 profile set pr1 auth shared-key-mic string thisisavppconnection
ikev2 profile set pr1 id local ip4-addr 10.0.0.44
ikev2 profile set pr1 id remote ip4-addr 10.0.0.80
ikev2 profile set pr1 traffic-selector local ip-range 10.0.0.44 - 10.0.0.44 
port-range 0 - 65535 protocol 0
ikev2 profile set pr1 traffic-selector remote ip-range 10.0.0.80 - 10.0.0.80 
port-range 0 - 65535 protocol 0

# The following commands are executed after the IKE negotiation succeeds and 
ipsec0 is available on the VPP CLI:
set interface state ipsec0 up
set interface unnumbered ipsec0 use TenGigabitEthernet5/0/0

*On the libreswan side:*
conn conn1
left=10.0.0.80
right=10.0.0.44
authby=secret
auto=start
phase2=esp
phase2alg=aes192-sha1
ike=aes256-sha1
ikev2=yes
pfs=yes
type=tunnel

*From the log file we can see the tunnel is established:*
Aug 12 16:41:18 LCI-ALIS-MF pluto[297281]: "conn1" #1: initiating v2 parent SA
Aug 12 16:41:18 LCI-ALIS-MF pluto[297281]: "conn1" #1: local IKE proposals for 
conn1 (IKE SA initiator selecting KE): 
1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP2048 
2:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA1;INTEG=HMAC_SHA1_96;DH=MODP1536
Aug 12 16:41:18 LCI-ALIS-MF pluto[297281]: "conn1" #1: STATE_PARENT_I1: sent 
v2I1, expected v2R1
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #1: STATE_PARENT_I1: 
retransmission; will wait 0.5 seconds for response
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #1: local ESP/AH proposals 
for conn1 (IKE SA initiator emitting ESP/AH proposals): 
1:ESP:ENCR=AES_CBC_192;INTEG=HMAC_SHA1_96;DH=NONE;ESN=DISABLED
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #2: STATE_PARENT_I2: sent 
v2I2, expected v2R2 {auth=IKEv2 cipher=aes_256 integ=sha1_96 prf=sha 
group=MODP2048}
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #2: IKEv2 mode peer ID is 
ID_IPV4_ADDR: '10.0.0.44'
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #2: Authenticated using 
authby=secret
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #2: negotiated connection 
[10.0.0.80-10.0.0.80:0-65535 0] -> [10.0.0.44-10.0.0.44:0-65535 0]
Aug 12 16:41:19 LCI-ALIS-MF pluto[297281]: "conn1" #2: STATE_V2_IPSEC_I: IPsec 
SA established tunnel mode {ESP=>0x8ea10d62 <0xa8304143 
xfrm=AES_CBC_192-HMAC_SHA1_96 NATOA=none NATD=none DPD=passive}

*VPP trace:*

Packet 1

00:03:20:698597: dpdk-input
TenGigabitEthernet5/0/0 rx queue 0
buffer 0x9c15e: current data 0, length 166, buffer-pool 0, ref-count 1, 
totlen-nifb 0, trace 0x0
ext-hdr-valid
l4-cksum-computed l4-cksum-correct
PKT MBUF: port 0, nb_segs 1, pkt_len 166
buf_len 2176, data_len 166, ol_flags 0x182, data_off 128, phys_addr 0xb0f05800
packet_type 0x11 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0
rss 0x801ce394 fdir.hi 0x0 fdir.lo 0x801ce394
Packet Offload Flags
PKT_RX_RSS_HASH (0x0002) RX packet with RSS hash result
PKT_RX_IP_CKSUM_GOOD (0x0080) IP cksum of RX pkt. is valid
PKT_RX_L4_CKSUM_GOOD (0x0100) L4 cksum of RX pkt. is valid
Packet Types
RTE_PTYPE_L2_ETHER (0x0001) Ethernet packet
RTE_PTYPE_L3_IPV4 (0x0010) IPv4 packet without extension headers
IP4: f8:f2:1e:62:9a:10 -> a0:36:9f:be:0c:b4
IPSEC_ESP: 10.0.0.80 -> 10.0.0.44
tos 0x00, ttl 64, length 152, checksum 0x9c13
fragment id 0x89a5, flags DONT_FRAGMENT
00:03:20:698599: ethernet-input
frame: flags 0x3, hw-if-index 1, sw-if-index 1
IP4: f8:f2:1e:62:9a:10 -> a0:36:9f:be:0c:b4
00:03:20:698600: ip4-input-no-checksum
IPSEC_ESP: 10.0.0.80 -> 10.0.0.44
tos 0x00, ttl 64, length 152, checksum 0x9c13
fragment id 0x89a5, flags DONT_FRAGMENT
00:03:20:698601: ip4-lookup
fib 0 dpo-idx 5 flow hash: 0x
IPSEC_ESP: 10.0.0.80 -> 10.0.0.44
tos 0x00, ttl 64, length 152, checksum 0x9c13
fragment id 0x89a5, flags DONT_FRAGMENT
00:03:20:698601: ip4-local
IPSEC_ESP: 10.0.0.80 -> 10.0.0.44
tos 0x00, ttl 64, length 152, checksum 0x9c13
fragment id 0x89a5, flags DONT_FRAGMENT
00:03:20:698602: ipsec4-if-input
IPSec: spi 2392919394 seq 39
00:03:20:698602: esp4-decrypt
esp: crypto aes-cbc-192 integrity sha1-96 seq 39
00:03:20:698606: ip4-input-no-checksum
ICMP: 10.0.0.80 -> 10.0.0.44
tos 0x00, ttl 64, length 84, checksum 0x5cb1

Re: [vpp-dev] VPP with DPDK vhost ---- VPP with DPDK virtio

2019-08-12 Thread Sharon Enoch
[Edited Message Follows]

Thanks Steven. Yes I had seen that patch.. Will look into the memif path now.. 
Was trying to get our current dpdk app virtio to vpp vhost user working so went 
down this path..

We were able to get further in our debugging though.. We see that the huge 
pages mapping is getting deleted shown by the /proc/pid/maps..

vpp side in virtio

root@kickseed:~/vppnew/vpp/build-root/build-vpp_debug-native/vpp/bin# cat 
/proc/14838/maps  | grep del
14000-18000 rw-s  00:0e 2118093                          
/memfd:seg_0-0 (deleted)
10-104000 rw-s  00:0e 2118084                        
/memfd:buffers-numa-0 (deleted)
104000-108000 rw-s  00:0e 2118085                        
/memfd:buffers-numa-1 (deleted)
7f788000-7f78c000 rw-s  00:0e 2118095                    
/memfd:seg_4-0 (deleted)
7f997c97f000-7f997e97f000 rw-s  00:05 2118083                    
/memfd:stat_segment_test (deleted)

testpmd side in vhost

root@kickseed:~/vppnew/vpp/build-root/build-vpp_debug-native/vpp/bin# cat 
/proc/14832/maps  | grep dele
14000-18000 rw-s  00:0e 2126915                          
/memfd:seg_0-0 (deleted)
224000-228000 rw-s  00:0e 2126916                        
/memfd:seg_4-0 (deleted)
7fe0-7fe04000 rw-s  00:0e 2118095                    
/memfd:seg_4-0 (deleted)
7fe04000-7fe08000 rw-s  00:0e 2118093                    
/memfd:seg_0-0 (deleted)

where in all the working configurations we see that

vpp vhost side

root@kickseed:~/vppnew/dpdk/build/app# cat /proc/14599/maps  | grep -i huge
7f60c000-7f61 rw-s  00:2a 2106266                    
/dev/hugepages/rtemap_32768
7f61-7f614000 rw-s  00:2a 2107037                    
/dev/hugepages/rtemap_0

root@kickseed:~/vppnew/dpdk/build/app# cat /proc/14599/maps  | grep -i delet
14000-18000 rw-s  00:0e 2118063                          
/memfd:seg_0-0 (deleted)
10-104000 rw-s  00:0e 2118054                        
/memfd:buffers-numa-0 (deleted)
104000-108000 rw-s  00:0e 2118055                        
/memfd:buffers-numa-1 (deleted)
7f7a-7f7a4000 rw-s  00:0e 2118068                    
/memfd:seg_4-0 (deleted)
7f9ae271f000-7f9ae471f000 rw-s  00:05 2118053                    
/memfd:stat_segment_test (deleted)

testpmd virtio side

root@kickseed:~/vppnew/dpdk/build/app# cat /proc/14603/maps | grep -i huge
14000-18000 rw-s  00:2a 2107037                          
/dev/hugepages/rtemap_0
224000-228000 rw-s  00:2a 2106266                        
/dev/hugepages/rtemap_32768
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13714): https://lists.fd.io/g/vpp-dev/message/13714
Mute This Topic: https://lists.fd.io/mt/32843106/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] VPP with DPDK vhost ---- VPP with DPDK virtio

2019-08-12 Thread Sharon Enoch
Thanks Steven. Yes I had seen that patch.. Will look into the memif path now.. 
Was trying to get our current dpdk app virtio to vpp vhost user working so went 
down this path..

We were able to get further in our debugging though.. We see that the huge 
pages mapping is getting deleted shown by the /proc/pid/maps..

vpp side in virtio

root@kickseed:~/vppnew/vpp/build-root/build-vpp_debug-native/vpp/bin# cat 
/proc/14838/maps  | grep del
14000-18000 rw-s  00:0e 2118093                          
/memfd:seg_0-0 (deleted)
10-104000 rw-s  00:0e 2118084                        
/memfd:buffers-numa-0 (deleted)
104000-108000 rw-s  00:0e 2118085                        
/memfd:buffers-numa-1 (deleted)
7f788000-7f78c000 rw-s  00:0e 2118095                    
/memfd:seg_4-0 (deleted)
7f997c97f000-7f997e97f000 rw-s  00:05 2118083                    
/memfd:stat_segment_test (deleted)

testpmd side in vhost

root@kickseed:~/vppnew/vpp/build-root/build-vpp_debug-native/vpp/bin# cat 
/proc/14832/maps  | grep dele
14000-18000 rw-s  00:0e 2126915                          
/memfd:seg_0-0 (deleted)
224000-228000 rw-s  00:0e 2126916                        
/memfd:seg_4-0 (deleted)
7fe0-7fe04000 rw-s  00:0e 2118095                    
/memfd:seg_4-0 (deleted)
7fe04000-7fe08000 rw-s  00:0e 2118093                    
/memfd:seg_0-0 (deleted)

where in all the working configurations we see that

vpp virtio side

root@kickseed:~/vppnew/dpdk/build/app# cat /proc/14599/maps  | grep -i huge
7f60c000-7f61 rw-s  00:2a 2106266                    
/dev/hugepages/rtemap_32768
7f61-7f614000 rw-s  00:2a 2107037                    
/dev/hugepages/rtemap_0

root@kickseed:~/vppnew/dpdk/build/app# cat /proc/14599/maps  | grep -i delet
14000-18000 rw-s  00:0e 2118063                          
/memfd:seg_0-0 (deleted)
10-104000 rw-s  00:0e 2118054                        
/memfd:buffers-numa-0 (deleted)
104000-108000 rw-s  00:0e 2118055                        
/memfd:buffers-numa-1 (deleted)
7f7a-7f7a4000 rw-s  00:0e 2118068                    
/memfd:seg_4-0 (deleted)
7f9ae271f000-7f9ae471f000 rw-s  00:05 2118053                    
/memfd:stat_segment_test (deleted)

testpmd virtio side

root@kickseed:~/vppnew/dpdk/build/app# cat /proc/14603/maps | grep -i huge
14000-18000 rw-s  00:2a 2107037                          
/dev/hugepages/rtemap_0
224000-228000 rw-s  00:2a 2106266                        
/dev/hugepages/rtemap_32768
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#13714): https://lists.fd.io/g/vpp-dev/message/13714
Mute This Topic: https://lists.fd.io/mt/32843106/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] VPP with DPDK vhost ---- VPP with DPDK virtio

2019-08-12 Thread steven luong via Lists.Fd.Io
Using VPP+DPDK virtio to connect with VPP + vhost-user is not actively 
maintained. I got it working couple years ago by committing some changes to the 
DPDK virtio code. Since then, I’ve not been playing with it anymore. Breakage 
is possible. I could spend a whole week on it to get it working again (maybe). 
However, there is no telling when it will break again. Here is my 
recommendation:
If you are using containers, use memif interface.
If you are not using containers, use VPP native virtio to connect to VPP 
vhost-user.

Steven

From:  on behalf of Sharon Enoch 
Date: Monday, August 12, 2019 at 11:32 AM
To: "vpp-dev@lists.fd.io" 
Subject: Re: [vpp-dev] VPP with DPDK vhost  VPP with DPDK virtio

Tried the same with the latest VPP version master which has the DPDK 19.05 
version and still faced the same issue..

VPP +  DPDK vhost mode
DBGvpp# show version
vpp v20.01-rc0~20-g6b53fd516 built by root on kickseed at Tue Aug 13 02:12:38 
JST 2019

DBGvpp# show int
  Name   IdxState  MTU (L3/IP4/IP6/MPLS) 
Counter  Count
VhostEthernet01  up  1500/0/0/0
local00 down  0/0/0/0
DBGvpp# show hardware-interfaces
  NameIdx   Link  Hardware
VhostEthernet0 1 up   VhostEthernet0
  Link speed: 10 Gbps
  Ethernet address 56:48:4f:53:54:00
  VhostEthernet
carrier up full duplex mtu 1500
flags: admin-up pmd maybe-multiseg
rx: queues 1 (max 1), desc 1024 (min 0 max 65535 align 1)
tx: queues 1 (max 1), desc 1024 (min 0 max 65535 align 1)
max rx packet len: -1
promiscuous: unicast off all-multicast off
vlan offload: strip off filter off qinq off
rx offload avail:  vlan-strip
rx offload active: none
tx offload avail:  vlan-insert multi-segs
tx offload active: multi-segs
rss avail: none
rss active:none
tx burst function: (nil)
rx burst function: (nil)

local0 0down  local0
  Link speed: unknown
  local




VPP + DPDK VIRTIO
DBGvpp# show int
  Name   IdxState  MTU (L3/IP4/IP6/MPLS) 
Counter  Count
VirtioUser0   1  up  1500/0/0/0 tx packets  
   5
tx bytes
 550
local00 down  0/0/0/0
DBGvpp# show hardware-interfaces
  NameIdx   Link  Hardware
VirtioUser01 up   VirtioUser0
  Link speed: 10 Gbps
  Ethernet address e2:84:b1:74:4d:f2
  Virtio User
carrier up full duplex mtu 1500
flags: admin-up pmd maybe-multiseg
rx: queues 1 (max 1), desc 1024 (min 0 max 65535 align 1)
tx: queues 1 (max 1), desc 1024 (min 0 max 65535 align 1)
max rx packet len: 9728
promiscuous: unicast off all-multicast on
vlan offload: strip off filter off qinq off
rx offload avail:  vlan-strip udp-cksum tcp-cksum tcp-lro jumbo-frame
rx offload active: jumbo-frame
tx offload avail:  vlan-insert udp-cksum tcp-cksum tcp-tso multi-segs
tx offload active: multi-segs
rss avail: none
rss active:none
tx burst function: virtio_xmit_pkts_inorder
rx burst function: virtio_recv_pkts_inorder

tx frames ok   5
tx bytes ok  550
local0 0down  local0
  Link speed: unknown
  local


I noticed the following new logs though in the new version in the show log 
output

The below on the virtio side
DBGvpp# show log
2019/08/13 03:10:43:956 errperfmonNo table for cpuid 306e4
2019/08/13 03:10:43:956 errperfmon  model 3e, stepping 4
2019/08/13 03:10:43:984 warn   dpdk   EAL init args: -c 2 -n 4 
--in-memory --no-pci --log-level 8 --huge-dir /dev/hugepages --vdev 
virtio_user0,path=/opt/sock/sock2.sock --file-prefix vpp --master-lcore 1
2019/08/13 03:10:46:666 notice dpdk   DPDK drivers found 1 ports...
2019/08/13 03:10:46:666 warn   dpdk   unsupported rx offloads requested 
on port 0: scatter
2019/08/13 03:10:46:669 notice dpdk   EAL: Detected 24 lcore(s)
2019/08/13 03:10:46:669 notice dpdk   EAL: Detected 2 NUMA nodes
2019/08/13 03:10:46:669 notice dpdk   EAL: Probing VFIO support...
2019/08/13 03:10:46:669 notice dpdk   EAL: WARNING! Base virtual 
address hint (0xa80001000 != 0x7f7c) not respected!
2019/08/13 03:10:46:669 notice dpdk   EAL:This may cause issues 
with mapping memory into secondary processes
2019/08/13 03:10:46:669 notice dpdk   EAL: WARNING! Base virtual 
address hint (0xc2000 != 0x7f73c000) not respected!
2019/08/13 03:10:46:669 notice dpdk   EAL:This may cause issues 
with mapping memory into secondary processes

Re: [vpp-dev] VPP with DPDK vhost ---- VPP with DPDK virtio

2019-08-12 Thread Sharon Enoch
Tried the same with the latest VPP version master which has the DPDK 19.05 
version and still faced the same issue..

VPP +  DPDK vhost mode
DBGvpp# show version
vpp v20.01-rc0~20-g6b53fd516 built by root on kickseed at Tue Aug 13 02:12:38 
JST 2019

DBGvpp# show int
Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     Counter          
Count
VhostEthernet0                    1      up          1500/0/0/0
local0                            0     down          0/0/0/0
DBGvpp# show hardware-interfaces
Name                Idx   Link  Hardware
VhostEthernet0                     1     up   VhostEthernet0
Link speed: 10 Gbps
Ethernet address 56:48:4f:53:54:00
VhostEthernet
carrier up full duplex mtu 1500
flags: admin-up pmd maybe-multiseg
rx: queues 1 (max 1), desc 1024 (min 0 max 65535 align 1)
tx: queues 1 (max 1), desc 1024 (min 0 max 65535 align 1)
max rx packet len: -1
promiscuous: unicast off all-multicast off
vlan offload: strip off filter off qinq off
rx offload avail:  vlan-strip
rx offload active: none
tx offload avail:  vlan-insert multi-segs
tx offload active: multi-segs
rss avail:         none
rss active:        none
tx burst function: (nil)
rx burst function: (nil)

local0                             0    down  local0
Link speed: unknown
local

VPP + DPDK VIRTIO
DBGvpp# show int
Name               Idx    State  MTU (L3/IP4/IP6/MPLS)     Counter          
Count
VirtioUser0                       1      up          1500/0/0/0     tx packets  
                   5
tx bytes                     550
local0                            0     down          0/0/0/0
DBGvpp# show hardware-interfaces
Name                Idx   Link  Hardware
VirtioUser0                        1     up   VirtioUser0
Link speed: 10 Gbps
Ethernet address e2:84:b1:74:4d:f2
Virtio User
carrier up full duplex mtu 1500
flags: admin-up pmd maybe-multiseg
rx: queues 1 (max 1), desc 1024 (min 0 max 65535 align 1)
tx: queues 1 (max 1), desc 1024 (min 0 max 65535 align 1)
max rx packet len: 9728
promiscuous: unicast off all-multicast on
vlan offload: strip off filter off qinq off
rx offload avail:  vlan-strip udp-cksum tcp-cksum tcp-lro jumbo-frame
rx offload active: jumbo-frame
tx offload avail:  vlan-insert udp-cksum tcp-cksum tcp-tso multi-segs
tx offload active: multi-segs
rss avail:         none
rss active:        none
tx burst function: virtio_xmit_pkts_inorder
rx burst function: virtio_recv_pkts_inorder

tx frames ok                                           5
tx bytes ok                                          550
local0                             0    down  local0
Link speed: unknown
local

I noticed the following new logs though in the new version in the show log 
output

The below on the virtio side
DBGvpp# show log
2019/08/13 03:10:43:956 err        perfmon    No table for cpuid 306e4
2019/08/13 03:10:43:956 err        perfmon      model 3e, stepping 4
2019/08/13 03:10:43:984 warn       dpdk       EAL init args: -c 2 -n 4 
--in-memory --no-pci --log-level 8 --huge-dir /dev/hugepages --vdev 
virtio_user0,path=/opt/sock/sock2.sock --file-prefix vpp --master-lcore 1
2019/08/13 03:10:46:666 notice     dpdk       DPDK drivers found 1 ports...
2019/08/13 03:10:46:666 warn       dpdk       unsupported rx offloads requested 
on port 0: scatter
2019/08/13 03:10:46:669 notice     dpdk       EAL: Detected 24 lcore(s)
2019/08/13 03:10:46:669 notice     dpdk       EAL: Detected 2 NUMA nodes
2019/08/13 03:10:46:669 notice     dpdk       EAL: Probing VFIO support...
2019/08/13 03:10:46:669 notice     dpdk       EAL: WARNING! Base virtual 
address hint (0xa80001000 != 0x7f7c) not respected!
2019/08/13 03:10:46:669 notice     dpdk       EAL:    This may cause issues 
with mapping memory into secondary processes
2019/08/13 03:10:46:669 notice     dpdk       EAL: WARNING! Base virtual 
address hint (0xc2000 != 0x7f73c000) not respected!
2019/08/13 03:10:46:669 notice     dpdk       EAL:    This may cause issues 
with mapping memory into secondary processes
2019/08/13 03:10:46:669 notice     dpdk       EAL: WARNING! Base virtual 
address hint (0xd80003000 != 0x7f6b8000) not respected!
2019/08/13 03:10:46:669 notice     dpdk       EAL:    This may cause issues 
with mapping memory into secondary processes
2019/08/13 03:10:46:669 notice     dpdk       EAL: WARNING! Base virtual 
address hint (0xf4000 != 0x7f634000) not respected!
2019/08/13 03:10:46:669 notice     dpdk       EAL:    This may cause issues 
with mapping memory into secondary processes
2019/08/13 03:10:46:669 notice     dpdk       EAL: WARNING! Base virtual 
address hint (0x1080005000 != 0x7f5b) not respected!
2019/08/13 03:10:46:669 notice     dpdk       EAL:    This may cause issues 
with mapping memory into secondary processes
2019/08/13 03:10:46:669 notice     dpdk       EAL: WARNING! Base virtual 
address hint (0x10c000a000 != 0x7f8475b21000) not respected!
2019/08/13 03:10:46:669 notice     dpdk       EAL:    This may cause issues 
with map

[vpp-dev] VPP with DPDK vhost ---- VPP with DPDK virtio

2019-08-12 Thread sharone
We were trying to get the following configuration working, but for some reason 
the packets are not flowing through when VPP + DPDK VIRTIO comes into play..

We read in one of the earlier topics that the same worked in VPP 17.07 
https://www.mail-archive.com/vpp-dev@lists.fd.io/msg03649.html  but faced some 
compilation errors when compiling that version of vpp now..

Not sure if we are missing something in our config which may be very trivial..  
We would please like some help on the same..

At the end of the day we want to have DPDK app in vhost mode to communicate 
with a VPP + DPDK virtio mode

*DPDK app VHOST <> VPP with DPDK virtio*

*We are using the compiled VPP 19.01 with dpdk version 18.11. Hugepages 
configured to 1GB*

The following configurations work

*1)  Testpmd 18.11 <-> Testpmd 18..1 ( Working )*

We are able to use run 2 instances of testpmd app with the following parameters 
and see packets flowing through.

./testpmd -l 0-1 -n 4 --socket-mem 1024,1024 
--vdev='eth_vhost0,iface=/opt/sock/sock2.sock' --no-pci --in-memory 
--huge-dir=/dev/hugepages --log-level=8 -- -i

./testpmd -l 3-4 -n 4 --socket-mem 1024,1024 
--vdev='virtio_user0,path=/opt/sock/sock2.sock' --no-pci --no-shconf 
--huge-dir=/dev/hugepages --log-level=8 -- -i

The memory registrations takes place fine and ports are up

VHOST_CONFIG: new vhost user connection is 17
VHOST_CONFIG: new device, handle is 0
VHOST_CONFIG: read message VHOST_USER_SET_OWNER
VHOST_CONFIG: read message VHOST_USER_GET_FEATURES
VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:0 file:18
VHOST_CONFIG: read message VHOST_USER_SET_VRING_CALL
VHOST_CONFIG: vring call idx:1 file:19
VHOST_CONFIG: read message VHOST_USER_SET_FEATURES
VHOST_CONFIG: read message VHOST_USER_SET_MEM_TABLE
VHOST_CONFIG: guest memory region 0, size: 0x4000
guest physical addr: 0x14000
guest virtual  addr: 0x14000
host  virtual  addr: 0x7f154000
mmap addr : 0x7f154000
mmap size : 0x4000
mmap align: 0x4000
mmap off  : 0x0
VHOST_CONFIG: guest memory region 1, size: 0x4000
guest physical addr: 0x224000
guest virtual  addr: 0x224000
host  virtual  addr: 0x7f15
mmap addr : 0x7f15
mmap size : 0x4000
mmap align: 0x4000
mmap off  : 0x0
VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM
VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR
VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK
VHOST_CONFIG: vring kick idx:0 file:22
VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM
VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR
VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK
VHOST_CONFIG: vring kick idx:1 file:23
VHOST_CONFIG: virtio is now ready for processing.

Port 0: link state change event
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 1 to qp idx: 0

Port 0: queue state event
VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
VHOST_CONFIG: set queue enable: 1 to qp idx: 1

Port 0: queue state event

We started one testpmd in txonly and the other testpmd in rxonly and initiated 
the packet forwarding

set fwd rxonly; start

set fwd txonly; start

testpmd> show port stats all
 NIC statistics for port 0  
RX-packets: 0          RX-missed: 0          RX-bytes:  0
RX-errors: 0
RX-nombuf:  0
*TX-packets: 41075968   TX-errors: 0          TX-bytes:  2628861952*

Throughput (since last show)
Rx-pps:            0
Tx-pps:       346731


testpmd> show port stats all
 NIC statistics for port 0  
*RX-packets: 132805312  RX-missed: 0          RX-bytes:  2628861952*
RX-errors: 0
RX-nombuf:  0
TX-packets: 0          TX-errors: 0          TX-bytes:  0

Throughput (since last show)
Rx-pps:       185663
Tx-pps:            0


*2) VPP + DPDK vhost <-> testpmd virtio  : ( Working )*

In the vpp config file we have the following in the dpdk section and everything 
else as default

no-pci
log-level 8
socket-mem 1024,1024
huge-dir /dev/hugepages
vdev eth_vhost0,iface=/opt/sock/sock2.sock

When VPP starts, we see the following DPDK EAL arguments

./vpp[31572]: dpdk: EAL init args: -l 3-4 -n 4 --socket-mem 1024,1024 
--in-memory --no-pci --log-level 8 --huge-dir /dev/hugepages --vdev 
eth_vhost0,iface=/opt/sock/sock2.sock --file-prefix vpp

root@kickseed:/root/dpdk-18.11/build/app# ./testpmd -l 0-1 -n 4 --socket-mem 
1024,1024 --vdev='virtio_user0,path=/opt/sock/sock2.sock' --no-pci --no-shconf 
--huge-dir=/dev/hugepages --log-level=8 -- -i

DBGvpp#vppctl show log

2019/ 8/13 01:08:46:341 notice     dpdk       VHOST_CONFIG: new vhost user 
connection is 29
2019/ 8/13 01:08:46:341 notice     dpdk       VHOST_CON

Re: [vpp-dev] VPP Cross compilation (x86_64 -> aarch64)

2019-08-12 Thread Juraj Linkeš
With some help from Dave, I was able to make the cross compilation work: 
https://gerrit.fd.io/r/#/c/vpp/+/21035/

I changed a bit how the PLATFORM variable is used. I don't know how it was 
supposed to work in the past, but it seems broken to me with the current cmake 
system, so I adapted it to be more suitable to the current environment.

I also disabled the basic_system package installation, because it seemed like 
legacy code that was supplanted by make install-dep.

Let me know if any of these is off the mark. Or anything else in the patch :)

Juraj

From: Juraj Linkeš
Sent: Friday, August 2, 2019 5:05 PM
To: vpp-dev@lists.fd.io
Subject: VPP Cross compilation (x86_64 -> aarch64)

Hi VPP Devs,

I'm trying to understand how to implement support for cross compilation for 
aarch64. I've put together some changes that are finally cross compiling DPDK 
(https://gerrit.fd.io/r/#/c/vpp/+/21035/), but the compilation is failing when 
it doesn't find openssl headers:
In file included from 
/home/jlinkes/vpp/build-root/build-aarch64-aarch64/external/dpdk-19.05/drivers/crypto/qat/qat_sym.c:5:0:
/usr/include/openssl/evp.h:13:11: fatal error: openssl/opensslconf.h: No such 
file or directory
# include 
   ^~~
compilation terminated.

I've added locally cross compiled numalib to cflags and ldflags just to see how 
far I'd go with compilation. It seems that I'll need to do the same for not 
only openssl, but also the other dpdk dependencies (if I understand it 
correctly, I'll need at least ipseb-mb nasm) and possibly VPP dependencies.

I've seen some e-mails suggesting that I should produce my own 
platforms/.mk file, but not much about any other steps. I also see 
the CROSS_TOOLS var in build-root/Makefile (and the corresponding 
$(PLATFORM)_cross_tools), but I wasn't able to figure out how to use those - is 
that something I should look into? What are the actual dependencies that *need* 
to be cross compiled before attempting to cross compile vpp/dpdk? I'd like to 
understand a bit more about this before I attempt to possibly fit a circle into 
a square-shaped hole.

The goal here is to build VPP and DPDK (I didn't see an option in the root 
Makefile that would build just VPP without DPDK, but we want to support both) 
for generic armv8 linux target.

I'd appreciate it if someone looked at my WIP patch and told me what I'm doing 
wrong and what's missing.

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

View/Reply Online (#13710): https://lists.fd.io/g/vpp-dev/message/13710
Mute This Topic: https://lists.fd.io/mt/32691486/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] #vapi #vpp #vppcapi

2019-08-12 Thread Dave Barach via Lists.Fd.Io
Start vpp. Run vpp_api_test. Type help.

From: vpp-dev@lists.fd.io  On Behalf Of 
prashan...@gmail.com
Sent: Monday, August 12, 2019 12:37 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] #vapi #vpp #vppcapi

Have written a test plugin on vpp and trying to write a program on Linux 
control plane to control this, referring vpp document created .api files and 
api.c file for my plugin back-end handlers for enable disable.

Is there any test program for writing control plane application, found info 
about vpp_api_test however not getting info how to execute/run it?


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

View/Reply Online (#13709): https://lists.fd.io/g/vpp-dev/message/13709
Mute This Topic: https://lists.fd.io/mt/32837576/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Mute #vppcapi: https://lists.fd.io/mk?hashtag=vppcapi&subid=1480452
Mute #vapi: https://lists.fd.io/mk?hashtag=vapi&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-