[P4-dev] P4 support for PCAP

Antonin Bas antonin at barefootnetworks.com
Fri Jul 14 18:17:24 EDT 2017

Hi James,

At this point, I am not sure how you would be able to achieve this. Packet
errors like the ones you mention should result in a bmv2 error log message
(although some errors may not be supported at this stage). We can imagine
in the future supporting a command-line option that will log those
incorrect packets to a special pcap file, but so far you are the only one
that has expressed interest in such a feature. Fee free to open an issue in
the bmv2 repo requesting this feature and tag it as "improvement".



On Fri, Jul 14, 2017 at 12:30 AM, James Bensley <jwbensley at gmail.com> wrote:

> On 11 July 2017 at 00:05, Antonin Bas <antonin at barefootnetworks.com>
> wrote:
> > Hi James,
> >
> > For bmv2, you just have to use the "--pcap" command-line flag. It will
> > generate a pcap file for each interface connected to the bmv2 switch.
> > Regarding the other 2, doesn't the DPDK framework has built-in support
> for
> > this using pdump
> > (http://dpdk.org/doc/guides-16.07/sample_app_ug/pdump.html)?
> >
> > Best,
> >
> > Antonin
> Hi Antonin,
> Many thanks for your reply.
> I am after the ability to parse packets and if for example there is a
> problem (bad checksum, didn't match any of the known headers in the
> parse tree etc.) then save/append that packet to a PCAP file for later
> review to see where the packet has come from on the network
> Is it possible to perhaps create a "dummy" logical interface on an x86
> host, have the P4 program forward only packets received on a physical
> interface that I want to save and review, to that logical interface
> and use the --pcap arg you have mentioned only on that interface?
> Cheers,
> James.
> _______________________________________________
> P4-dev mailing list
> P4-dev at lists.p4.org
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170714/297c286e/attachment-0002.html>

More information about the P4-dev mailing list