Hi,all i got unexpected 65535 packets when reconnect vhost-user interface. how to repeat: step 1: start vpp ,create a vhost (as client) and up, start a vm with previous vhost socket, send a packet (i use arping -c 1), then vpp will got 1 rx packet. it is OK. step2: restart vpp ,create same vhost (as client) and up, vpp got *65535* rx packets.it's should not happen.(no one send any packet from vm),it's looks like the packet in step 1 got repeated 65535 times after reconnect.but the packet is droped in step 1.
i am using stable 18.01.1 release,centos 7.4,qemu-kvm-ev-2.9.0, vpp rpm package fetch from http://nexus.fd.io/ (this is not same as qemu vhost reconnect problem mentioned in mail-lists,vhost reconnect is ok,see show vhost in full log.) FULL LOG: (please skip drop conter,because it should be droped in this simple config) =================First run======= /usr/bin/vpp unix { interactive cli-listen /run/vpp/cli.sock gid 0 } plugins {plugin dpdk_plugin.so {disable}} vpp# create vhost socket /tmp/a.sock VirtualEthernet0/0/0 vpp# set int state VirtualEthernet0/0/0 up vpp# show int Name Idx State Counter Count VirtualEthernet0/0/0 1 up local0 0 down > > then,in another session start qemu connect vhost socket /tmp/a.sock. > #ip link set eth0 up > #ip a add 192.168.3.2/24 dev eth0 > #arping -I eth0 -c 1 192.168.3.3 > ARPING 192.168.3.3 > Timeout > vpp# show int Name Idx State Counter Count VirtualEthernet0/0/0 1 up *rx packets 1* rx bytes 42 drops 1 local0 0 down vpp# quit ^^^^^^^^^^^^ 1 rx packet as expected .but keep vm guest running,and restart vpp. =================Second run======= /usr/bin/vpp unix { interactive cli-listen /run/vpp/cli.sock gid 0 } plugins {plugin dpdk_plugin.so {disable}} vpp# trace add vhost-user-input 10 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 int Name Idx State Counter Count VirtualEthernet0/0/0 1 up *rx packets 65535* rx bytes 2752470 drops 65535 local0 0 down vpp# vpp# show errors Count Node Reason 65535 arp-input Interface is not IP enabled ^^^^^^^^^^^ GOT 65535 packets, vpp# show version vpp v18.01.1-21~gfb5148b~b79 built by root on fe2c693246fb at Wed Mar 14 22:42:25 UTC 2018 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 (0xffffffffffffffff): 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 0x0000000000000000 0x00000000000a0000 0x00007f3e41000000 0x0000000000000000 0x00002aaaacc00000 1 11 0x00000000000c0000 0x000000001ff40000 0x00007f3e410c0000 0x00000000000c0000 0x00002aaaacec0000 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# ^^^^^^^^^^if quit and run vpp third time,it work as expect(dont get any packet) =================Third 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 (0xffffffffffffffff): 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 0x0000000000000000 0x00000000000a0000 0x00007f3e41000000 0x0000000000000000 0x00002aaaacc00000 1 11 0x00000000000c0000 0x000000001ff40000 0x00007f3e410c0000 0x00000000000c0000 0x00002aaaacec0000 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