[vpp-dev] unexpected 65535 rx packets on vhost-user interface

2018-03-15 Thread wuxp
hird  run===
vpp# create vhost socket /tmp/a.sock
VirtualEthernet0/0/0
vpp# show int
  Name   Idx   State  Counter  
Count
VirtualEthernet0/0/0  1    down 
local0    0    down 
vpp# set int state VirtualEthernet0/0/0 up
vpp# show int
  Name   Idx   State  Counter  
Count
VirtualEthernet0/0/0  1 up  
local0    0    down 
vpp# show vhost
Virtio vhost-user interfaces
Global:
  coalesce frames 32 time 1e-3
  number of rx virtqueues in interrupt mode: 0
Interface: VirtualEthernet0/0/0 (ifindex 1)
virtio_net_hdr_sz 12
 features mask (0x):
 features (0x150208000):
   VIRTIO_NET_F_MRG_RXBUF (15)
   VIRTIO_NET_F_GUEST_ANNOUNCE (21)
   VIRTIO_F_INDIRECT_DESC (28)
   VHOST_USER_F_PROTOCOL_FEATURES (30)
   VIRTIO_F_VERSION_1 (32)
  protocol features (0x3)
   VHOST_USER_PROTOCOL_F_MQ (0)
   VHOST_USER_PROTOCOL_F_LOG_SHMFD (1)

 socket filename /tmp/a.sock type client errno "Success"

 rx placement:
   thread 0 on vring 1, polling
 tx placement: lock-free
   thread 0 on vring 0

 Memory regions (total 2)
 region fd    guest_phys_addr    memory_size    userspace_addr 
mmap_offset    mmap_addr
 == = == == == 
== ==
  0 10    0x 0x000a 0x7f3e4100 
0x 0x2cc0
  1 11    0x000c 0x1ff4 0x7f3e410c 
0x000c 0x2cec

 Virtqueue 0 (TX)
  qsz 256 last_avail_idx 0 last_used_idx 0
  avail.flags 0 avail.idx 256 used.flags 1 used.idx 0
  kickfd 12 callfd 13 errfd -1

 Virtqueue 1 (RX)
  qsz 256 last_avail_idx 2 last_used_idx 2
  avail.flags 1 avail.idx 2 used.flags 1 used.idx 2
  kickfd 8 callfd 14 errfd -1

vpp#

thanks,
wuxp


Re: [vpp-dev] multiple worker thread failed with vfio

2018-03-11 Thread wuxp
i checked again and it's fixed after 18.04-rc0~374_g51c52c0~b3859
special thanks to Damjan Marion


[vpp-dev] multiple worker thread failed with vfio

2018-03-07 Thread wuxp
P Sched Policy (Priority)  lcore  
Core   Socket State
0  vpp_main    28616   other (0)    1  
0  1 
1  vpp_wk_0    workers 28620   other (0)    2  
1  0 
2  vpp_wk_1    workers 28621   other (0)    3  
1  1 
3  stats   28622   other (0)    0  
0  0 
vpp#
vpp#
vpp# show cpu
Model name:   Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz
Microarchitecture:    Haswell (Haswell E)
Flags:    sse3 ssse3 sse41 sse42 avx avx2 aes invariant_tsc
Base frequency:   2.40 GHz
vpp#
vpp#
vpp# show pci
Address  Sock VID:PID Link Speed   Driver  Product Name 
   Vital Product Data
:02:00.0   0  14e4:165f   5.0 GT/s x1  tg3 Broadcom NetXtreme 
Gigabit Ether
:02:00.1   0  14e4:165f   5.0 GT/s x1  tg3 Broadcom NetXtreme 
Gigabit Ether
:03:00.0   0  14e4:165f   5.0 GT/s x1  tg3 Broadcom NetXtreme 
Gigabit Ether
:03:00.1   0  14e4:165f   5.0 GT/s x1  tg3 Broadcom NetXtreme 
Gigabit Ether
:05:00.0   0  8086:154d   5.0 GT/s x8  ixgbe   X520 10GbE 
Controller 
:05:00.1   0  8086:154d   5.0 GT/s x8  vfio-pci    X520 10GbE 
Controller 
:05:10.0   0  8086:10ed   unknown  ixgbevf  
  
:05:10.2   0  8086:10ed   unknown  ixgbevf  
  
:05:10.4   0  8086:10ed   unknown  ixgbevf  
  
:05:10.6   0  8086:10ed   unknown  ixgbevf  
  
:05:11.0   0  8086:10ed   unknown  ixgbevf  
  
:05:11.2   0  8086:10ed   unknown  ixgbevf  
  
:05:11.4   0  8086:10ed   unknown  ixgbevf  
  
:05:11.6   0  8086:10ed   unknown  ixgbevf  
  
vpp#
vpp#
*-LOG END
*
version tested and work fine: (all fetched from nexus.fd.io)
18.01.1-4~geed6a2b~b56
18.04-rc0~287_gf9a968e~b3764
18.04-rc0~323_g7b18536~b3800
18.04-rc0~325_g2060db8~b3801
18.04-rc0~326_g599a16b~b3803
18.04-rc0~327_g03f942a~b3804
18.04-rc0~328_ge3e2f07~b3805
18.04-rc0~329_gd5ded2d~b3806

version tested and cant work: (all fetched from nexus.fd.io)
18.04-rc0~361_ga36f08c~b3845
18.04-rc0~333_gf313b74~b3810
18.04-rc0~331_geac3b11~b3808

git log --pretty=oneline --abbrev-commit
...
9e09ff39 SCTP: retransmission in INIT/SHUTDOWN phase
eac3b11b vlib: vlib_buffer_free_internal optimizations   
*(~331)*
1ba0fa4b vlib: vfio code rework
d5ded2df vlib: rework PCI INTx support  
*(~329)*
e3e2f071 tls: add stop listen handler
03f942a1 NAT44 - unknown protocols work with forwarding
...

caused by 1ba0fa4b or eac3b11b ?

thanks,
Wuxp