Re: Discussion on How PIR JSON Is Currently Utilized in XDP2

Tom Herbert <[email protected]> Mon, 8 Dec 2025 11:18:24 -0800
Newsgroups dev.linux.lists.xdp2
Message-ID <CALx6S34A=Sk6uLc8Zob8UJS+8hFs+EZdzPFDk_+tPkNc4OLCrw@mail.gmail.com>
+felipe

On Sun, Dec 7, 2025 at 11:34=E2=80=AFAM Matheus Freitas Martins
<[email protected]> wrote:
>
> Hello everyone,
>
> I am a Master=E2=80=99s student doing research on programmable networking=
, and
> I=E2=80=99ve been experimenting with XDP2 (pir-dev branch) and the P4C fo=
rk
> (pil branch). I understand that the project is still under active
> development, but I=E2=80=99d like to clarify what is currently possible t=
o do
> with the PIR JSON generated from a P4 program.
>
> After reading  'README . pil . md' in  'xdp2-dev/p4c', I was able to use
> 'p4c-pna-pil' to produce a PIR '.json' file from a P4 (PNA) program.

Cool!

> My questions are:
>
> - Does the PIR JSON currently have any practical use in the XDP2
> toolchain, or is it mainly an intermediate representation for future
> backends?

There is backend compiler support we have not yet released. The intent
is that the PIR will be integrated into compilers as parser IR.
>
> - Is there any existing component, example, or workflow that consumes
> this PIR JSON today?
>
> - If there is a recommended way to experiment with or validate the PIR
> output at the current stage, could you point me to it?

That's pending work.

Thanks,
Tom

>
>
> Best regards,
> Matheus
>