I currently have VPP 19.08.1 running on Azure.
I would like to be able to specify a virtual device - in this case, net_pcap0, when starting VPP. I would then like to be able to configure a VPP SPAN port to mirror the traffic from one or more interfaces to my PCAP virtual device. Under the hood, my hope is that this will allow DPDK to be able to capture the traffic coming in on the PCAP virtual device and write the captured traffic to a PCAP file on disk. I am aware there is native PCAP functionality in VPP, but I'm wondering if it's possible to rely on DPDK for this under the hood. Please let me know if this is not recommended and/or not currently possible for any reason.
I have 2 VPP-owned interfaces both using the vdev_netvsc PMD (aka failsafe) drivers; namely, FailsafeEthernet2 and FailsafeEthernet4.
Here are the 2 main problems I've encountered so far:
1) VPP 19.08.1 uses DPDK 19.05 and it seems that DPDK 19.05 has issues starting devices using the net_pcap driver (even when compiled with the CONFIG_RTE_LIBRTE_PMD_PCAP option set to 'y'). When I try to start DPDK's testpmd application using a --vdev=net_pcap0,tx_pcap=/tmp/cap.pcap parameter I always get the following error:
Fail: nb_rxq(1) is greater than max_rx_queues(0)
EAL: Error - exiting with code: 1
Cause: FAIL from init_fwd_streams()
This issue goes away when running DPDK 19.11 so I think it has been resolved at the DPDK level. Does a more recent version of VPP rely on either DPDK 19.08 or DPDK 19.11?
2) The other problem I am experiencing is the inability to specify non-PCI (virtual, I guess) devices in VPP's DPDK config section. VPP seems to expect that each device refers to a PCI device. For example "dev 0002:00:02.0". I don't know I would create a device using the PCAP PMD (net_pcap0) driver that VPP could refer to and use in the VPP/DPDK config.
Does anyone have ideas on how I could use VPP, but capture packets at the DPDK layer (on Azure)?