[vpp-dev] Using Packetdrill to test VPP HostStack
Hi I think packetdrill can be used for the development of new feature for VPP HostStack. So I share how to use packetdrill to test VPP HostStack by veth-pair.1. Clone packetdrill form https://github.com/google/packetdrill.git , apply the patch named pd.patch and build it2. The patch named vpp_pd.patch is for vpp which is used to adapte to packetdrill, and building VPP will generate libpd.so . This file is for packetdrill.3. Create veth interfaces on hostip link add name vppvethout type veth peer name vppvethhostip link set dev vppvethout upip link set dev vppvethhost upip addr add 10.10.1.1/24 dev vppvethhost4. Create vpp host- interfacecreate host-interface name vppvethout hw-addr ee:ff:ff:ff:ff:ffset int state host-vppvethout upset int ip address host-vppvethout 10.10.1.2/24show int addrping 10.10.1.15. Run the packetdrill script to test VPP HoststackLD_PRELOAD=$(vpp)/build-root/install-vpp-native/vpp/lib/libvcl_ldpreload.so VCL_CONFIG=./vcl.conf ./packetdrill --local_ip=10.10.1.2 --remote_ip=10.10.1.1 --so_filename=$(vpp)/build-root/install-vpp native/vpp/lib/libpd.so ./close-remote-fin-then-close.pktnote : close-remote-fin-then-close.pkt is a little different from the native file in packetdrill. I hope it is useful for you。RegardsLongfei dailongfei dailong...@corp.netease.com 签名由 网易邮箱大师 定制 pd.patch Description: Binary data vpp_pd.patch Description: Binary data close-remote-fin-then-close.pkt Description: Binary data -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15853): https://lists.fd.io/g/vpp-dev/message/15853 Mute This Topic: https://lists.fd.io/mt/72516405/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] #HostStack some problems show when it be tested by packetdrill
Hi , Recently, I use packetdrill to test vpp hoststack(v20.01) , and I find some problems in vcl:1. When a socket fd is registered with EPOLLIN | EPOLLET using epoll_ctl, if data arrived , and, I don't call read. The next arriving of data would not trigger EPOLLIN, which is different from kernel.2. In the function of writev , if iovcnt is 0. it will be in endless loop. 3. write , send ,sendto , read, recv, recvfrom should set errno EFAULT if buf is NULL. But in the vcl, the errno is EINVAL.4 .In shutdown, the SHUT_RD and SHUT_WR seem don’t work.Regards Longfei. dailongfei dailong...@corp.netease.com 签名由 网易邮箱大师 定制 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15841): https://lists.fd.io/g/vpp-dev/message/15841 Mute This Topic: https://lists.fd.io/mt/72491376/21656 Mute #hoststack: https://lists.fd.io/mk?hashtag=hoststack=1480452 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[vpp-dev] A question about using packetdrill test vpp hoststack
Hi,Recently, I wan to use packetdrill to test vpp hoststack . I connet vpp and kernel-protocol-stack with veth. And local client runs on vpp hoststack , remote is on kernel. local <> vcl <> vpp <-> veth1 <-> veth0 <-> remote.At remote , I just wen to recvive the 2-layer or 3-layer packet, so I use raw sock. However , I meet a problem that raw sock just get the copy of packet that sent by local client , the packet still transfer to the upper layer (4 layer) .And the upper layer will answer the packet , which will influences my test. Since the local client just want to receive the packet that sent by raw sock. local <> vcl <> vpp <-> veth1 <-> veth0 <-> raw sock. | ---X--> upper layer . Do your matter the same problem when testing vpp hoststack ? And do you have good idea about the vpp hoststack test with packetdrill?Regards,Longfei dailongfei dailong...@corp.netease.com 签名由 网易邮箱大师 定制 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15742): https://lists.fd.io/g/vpp-dev/message/15742 Mute This Topic: https://lists.fd.io/mt/71898758/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-