Re: xdp2 nix refactor - fixed!
dave seddon <[email protected]> Wed, 11 Feb 2026 09:45:44 -0800
| Newsgroups | dev.linux.lists.xdp2 |
|---|---|
| Message-ID | <CANypexQmEqjMcn29m8jjFkTVB8+kLB4rxW8AJxHshvVRAZppVw@mail.gmail.com> |
Woot woot! I finally got the simple_parser working after updating the
xdp2 API and a few other changes
To debug this I added some "asserts" into the C++ code. I wasn't
really sure the "best" way to do this, so I used the boost assert
stuff, given xdp2 already uses boost libraries. Please let me know if
that sounds like a bad idea. :)
I'm also thinking I'll extract the embedded Python from the .cpp fils,
so that we can independently test the python, rather than getting the
python evaluation at compile time. Should have zero functionality
impact.
[XDP2-GCC] [das@l:~/Downloads/xdp2/samples/parser/simple_parser]$
./parser_notmpl ../../../data/pcaps/tcp_ipv6.pcap
IPv6: ::1:51648->::1:631
TCP timestamps value: 1887522685, echo 0
Hash d3f87531
IPv6: ::1:631->::1:51648
TCP timestamps value: 1887522685, echo 1887522685
Hash ca63a2de
IPv6: ::1:51648->::1:631
TCP timestamps value: 1887522685, echo 1887522685
Hash d3f87531
IPv6: ::1:51648->::1:631
TCP timestamps value: 1887522685, echo 1887522685
Hash d3f87531
IPv6: ::1:631->::1:51648
TCP timestamps value: 1887522685, echo 1887522685
Hash ca63a2de
IPv6: ::1:631->::1:51648
TCP timestamps value: 1887522688, echo 1887522685
Hash ca63a2de
IPv6: ::1:51650->::1:631
TCP timestamps value: 1887523538, echo 0
Hash 512a939c
IPv6: ::1:631->::1:51650
TCP timestamps value: 1887523538, echo 1887523538
Hash b857973f
IPv6: ::1:51650->::1:631
TCP timestamps value: 1887523538, echo 1887523538
Hash 512a939c
IPv6: ::1:51650->::1:631
TCP timestamps value: 1887523538, echo 1887523538
Hash 512a939c
IPv6: ::1:631->::1:51650
TCP timestamps value: 1887523538, echo 1887523538
Hash b857973f
IPv6: ::1:631->::1:51650
TCP timestamps value: 1887523541, echo 1887523538
Hash b857973f
[XDP2-GCC] [das@l:~/Downloads/xdp2/samples/parser/simple_parser]$
./parser_notmpl -O ../../../data/pcaps/tcp_ipv6.pcap
IPv6: ::1:51648->::1:631
TCP timestamps value: 1887522685, echo 0
Hash d3f87531
IPv6: ::1:631->::1:51648
TCP timestamps value: 1887522685, echo 1887522685
Hash ca63a2de
IPv6: ::1:51648->::1:631
TCP timestamps value: 1887522685, echo 1887522685
Hash d3f87531
IPv6: ::1:51648->::1:631
TCP timestamps value: 1887522685, echo 1887522685
Hash d3f87531
IPv6: ::1:631->::1:51648
TCP timestamps value: 1887522685, echo 1887522685
Hash ca63a2de
IPv6: ::1:631->::1:51648
TCP timestamps value: 1887522688, echo 1887522685
Hash ca63a2de
IPv6: ::1:51650->::1:631
TCP timestamps value: 1887523538, echo 0
Hash 512a939c
IPv6: ::1:631->::1:51650
TCP timestamps value: 1887523538, echo 1887523538
Hash b857973f
IPv6: ::1:51650->::1:631
TCP timestamps value: 1887523538, echo 1887523538
Hash 512a939c
IPv6: ::1:51650->::1:631
TCP timestamps value: 1887523538, echo 1887523538
Hash 512a939c
IPv6: ::1:631->::1:51650
TCP timestamps value: 1887523538, echo 1887523538
Hash b857973f
IPv6: ::1:631->::1:51650
TCP timestamps value: 1887523541, echo 1887523538
Hash b857973f
[XDP2-GCC] [das@l:~/Downloads/xdp2/samples/parser/simple_parser]$
On Tue, Feb 10, 2026 at 8:56=E2=80=AFAM dave seddon <[email protected]=
om> wrote:
>
> Sorry. I need to update the pull request.
>
> I was trying to update the simple_parser to the new API, and I've
> discovered during testing that the Nix isn't quite working as
> expected.
>
> I'll add testing, so it's easy to verify everything.
>
> On Mon, Feb 9, 2026 at 12:04=E2=80=AFPM dave seddon <dave.seddon.ca@gmail=
.com> wrote:
> >
> > G'day,
> >
> > I hope you are doing well.
> >
> > Yay! I finally fixed the segfault!
> >
> > I also refactored the nix, so it should be much easier to understand.
> >
> > https://github.com/xdp2-dev/xdp2/pull/12
> >
> > --
> > Regards,
> > Dave Seddon
> > +1 415 857 5102
>
>
>
> --
> Regards,
> Dave Seddon
> +1 415 857 5102
--=20
Regards,
Dave Seddon
+1 415 857 5102