Re: [vpp-dev] VPP packet capture via DPDK #vpp #dpdk #span #pcap

2020-02-17 Thread Dave Barach via Lists.Fd.Io
Pcap trace support lives in two places these days: ethernet-input, and 
interface_output. Unless something is wrong, it should work on any interface 
type.

See 
https://fd.io/docs/vpp/master/gettingstarted/developers/vnet.html#pcap-rx-tx-and-drop-tracing
 

N-tuple trace classification works as Ben described. It is not free.

FWIW... Dave

-Original Message-
From: vpp-dev@lists.fd.io  On Behalf Of Benoit Ganne 
(bganne) via Lists.Fd.Io
Sent: Monday, February 17, 2020 10:14 AM
To: Chris King ; vpp-dev@lists.fd.io
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] VPP packet capture via DPDK #vpp #dpdk #span #pcap

Hi Chris,

> Does a more recent version of VPP rely on either DPDK 19.08 or DPDK 
> 19.11?

VPP 20.01 has just been released and uses DPDK 19.08.

> Does anyone have ideas on how I could use VPP, but capture packets at 
> the DPDK layer (on Azure)?

I do not think we support that today, however you can always use VPP pcap 
support: 
https://fd.io/docs/vpp/master/gettingstarted/developers/vnet.html#pcap-rx-tx-and-drop-tracing
You can even attach filters to only dump packets from specific flows. I do not 
know how much it will impact your performance though, you'll need to experiment.

Best
ben
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15432): https://lists.fd.io/g/vpp-dev/message/15432
Mute This Topic: https://lists.fd.io/mt/71250451/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Mute #span: https://lists.fd.io/mk?hashtag=span&subid=1480452
Mute #dpdk: https://lists.fd.io/mk?hashtag=dpdk&subid=1480452
Mute #pcap: https://lists.fd.io/mk?hashtag=pcap&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [vpp-dev] VPP packet capture via DPDK #vpp #dpdk #span #pcap

2020-02-17 Thread Benoit Ganne (bganne) via Lists.Fd.Io
Hi Chris,

> Does a more recent version of VPP rely on
> either DPDK 19.08 or DPDK 19.11?

VPP 20.01 has just been released and uses DPDK 19.08.

> Does anyone have ideas on how I could use VPP, but capture packets at the
> DPDK layer (on Azure)?

I do not think we support that today, however you can always use VPP pcap 
support: 
https://fd.io/docs/vpp/master/gettingstarted/developers/vnet.html#pcap-rx-tx-and-drop-tracing
You can even attach filters to only dump packets from specific flows. I do not 
know how much it will impact your performance though, you'll need to experiment.

Best
ben
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15430): https://lists.fd.io/g/vpp-dev/message/15430
Mute This Topic: https://lists.fd.io/mt/71250451/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Mute #span: https://lists.fd.io/mk?hashtag=span&subid=1480452
Mute #dpdk: https://lists.fd.io/mk?hashtag=dpdk&subid=1480452
Mute #pcap: https://lists.fd.io/mk?hashtag=pcap&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[vpp-dev] VPP packet capture via DPDK #vpp #dpdk #span #pcap

2020-02-13 Thread Chris King
Hello,

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)?

Thanks,

Chris
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15393): https://lists.fd.io/g/vpp-dev/message/15393
Mute This Topic: https://lists.fd.io/mt/71250451/21656
Mute #vpp: https://lists.fd.io/mk?hashtag=vpp&subid=1480452
Mute #dpdk: https://lists.fd.io/mk?hashtag=dpdk&subid=1480452
Mute #span: https://lists.fd.io/mk?hashtag=span&subid=1480452
Mute #pcap: https://lists.fd.io/mk?hashtag=pcap&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-