[U-Boot] [PATCH v3 1/2] net: introduce packet capture support

Ramon Fried rfried.dev at gmail.com
Thu Jul 18 18:14:22 UTC 2019


On Fri, Jul 12, 2019 at 12:18 AM Joe Hershberger <joe.hershberger at ni.com> wrote:
>
> On Sat, Jun 22, 2019 at 1:50 PM Ramon Fried <rfried.dev at gmail.com> wrote:
> >
> > Add support for capturing ethernet packets and storing
> > them in memory in PCAP(2.4) format, later to be analyzed by
> > any PCAP viewer software (IE. Wireshark)
> >
> > This feature greatly assist debugging network issues such
> > as detecting dropped packets, packet corruption etc.
> >
> > Signed-off-by: Ramon Fried <rfried.dev at gmail.com>
> > Reviewed-by: Alex Marginean <alexm.osslist at gmail.com>
> > Tested-by: Alex Marginean <alexm.osslist at gmail.com>
>
> This is a nice feature to have. We need a unit test for it, though.
> Please add it to a sandbox test and exercise it, then have the test
> try to load the resulting file with tshark to ensure a valid format.
> There are potentially other things in the header that is printed that
> can be used for further validation.
Hi Joe,
I fixed all your notes regarding the patches, except the test.
I thought I'll find some net framework to start with, but I didn't find
any tests under u-boot/tests/* that actually transfer a file between the
host and u-boot sandbox.
Did I miss anything ?
I did find something interesting under u-boot/api/api_net.c that can perhaps
be leveraged to something like that.
Do you know how to begin with a test you described above ?
Meanwhile, I posted the updated patches (without the test) so they can
be reviewed by you.

Thanks,
Ramon.
>
> Thanks for this feature.
> -Joe


More information about the U-Boot mailing list