On Wed, Sep 6, 2023 at 9:53 AM Nicolson Ken (ニコルソン ケン) <[email protected]> wrote: > > Alternatively, did you consider using testpmd with the vhost pmd instead ? > > I've tried that before, but as far as I can see from net/vhost/rte_eth_host.c > it uses rte_vost_enqueue/dequeue_burst() to basically act as a loopback for > the Guest OS. I use: > > $ sudo dpdk-testpmd -l 0-3 -n 4 --vdev 'net_tap0' --vdev > 'net_vhost1,iface=/tmp/sock0,client=1' -- -i > > But if I feed data in using "tcpreplay -I dtap0 ...", "show port stats all" > shows everything going into the TAP but nothing is forward to vhost.
Well, pinging from a dtap0 netdev in the host to a virtio-net netdev in a guest works me. testpmd> set verbose 3 Change verbose level from 0 to 3 testpmd> start io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support enabled, MP allocation mode: native Logical Core 1 (socket 1) forwards packets on 2 streams: RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01 RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00 port 0/queue 0: received 16 packets src=26:9B:E2:29:7E:C6 - dst=33:33:00:00:00:16 - pool=mb_pool_0 - type=0x86dd - length=90 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT - sw ptype: L2_ETHER L3_IPV6_EXT - l2_len=14 - l3_len=48 - Receive queue=0x0 ol_flags: RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN src=26:9B:E2:29:7E:C6 - dst=33:33:00:00:00:16 - pool=mb_pool_0 - type=0x86dd - length=90 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6_EXT - sw ptype: L2_ETHER L3_IPV6_EXT - l2_len=14 - l3_len=48 - Receive queue=0x0 ol_flags: RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN src=26:9B:E2:29:7E:C6 - dst=33:33:FF:29:7E:C6 - pool=mb_pool_0 - type=0x86dd - length=86 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV6 - sw ptype: L2_ETHER L3_IPV6 - l2_len=14 - l3_len=40 - Receive queue=0x0 ol_flags: RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN Are you seeing the vhost port getting initialised in testpmd output? How are you sure that nothing is forwarded? -- David Marchand
