Hi Longfei, Awesome! Thanks for the pointers!
If you have the time, please add this to a new wiki page under tutorials here [1]. Regards, Florin [1] https://wiki.fd.io/view/VPP/HostStack > On Mar 24, 2020, at 6:08 AM, dailongfei <[email protected]> wrote: > > 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 > <https://github.com/google/packetdrill.git> , apply the patch named pd.patch > and build it > > 2. 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 host > > ip link add name vppvethout type veth peer name vppvethhost > ip link set dev vppvethout up > ip link set dev vppvethhost up > ip addr add 10.10.1.1/24 dev vppvethhost > > 4. Create vpp host- interface > create host-interface name vppvethout hw-addr ee:ff:ff:ff:ff:ff > set int state host-vppvethout up > set int ip address host-vppvethout 10.10.1.2/24 > show int addr > ping 10.10.1.1 > > 5. Run the packetdrill script to test VPP Hoststack > > LD_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.pkt > > note : close-remote-fin-then-close.pkt is a little different from the native > file in packetdrill. > > I hope it is useful for you。 > > Regards > Longfei > > > > > > > > > > dailongfei > > [email protected] > > <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=dailongfei&uid=dailongfei%40corp.netease.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyelogo%2FdefaultAvatar.png&items=%5B%22dailongfei%40corp.netease.com%22%5D&logoUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fqiyeicon%2F209a2912f40f6683af56bb7caff1cb54.png> > 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail81> 定制 > <pd.patch><vpp_pd.patch><close-remote-fin-then-close.pkt>
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#15857): https://lists.fd.io/g/vpp-dev/message/15857 Mute This Topic: https://lists.fd.io/mt/72516405/21656 Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
