Live data from Hacker News

P4: a high-level language for programming protocol-independent packet processors

p4.org

1–10 of 21 posts

Re: P4: a high-level language for programming protocol-independent packet processors

#4
post #3

This looks really cool. Has anyone here done anything with it?

It is cool. Checkout Barefoot Networks, as far as I know they're the only that are. https://www.barefootnetworks.com/media/white_papers/Barefoot...

Re: P4: a high-level language for programming protocol-independent packet processors

#6
P4 has been really interesting for a while. Barefoot networks is where the author of the paper went, and they've been working on an ASIC for some time.

People are also building compilers for P4 that are targeting other runtimes like BPF. Recently, there's been an effort to run a subset of BPF on hardware (NPF?).

Re: P4: a high-level language for programming protocol-independent packet processors

#7
post #3

This looks really cool. Has anyone here done anything with it?

In a way, P4 is still in very early stage. As others pointed out, Barefoot Networks is proposing their Tofino chip.

To get a taste of what is P4 like, you can get started with the Behavioural Model [1], which you can imagine as some sort of emulator over x86. My understanding is that it is also being reworked in C++ [2].

Finally, there's a module coming up for OpenVSwitch.

[1] https://github.com/p4lang/p4factory

[2] https://github.com/p4lang/behavioral-model

Re: P4: a high-level language for programming protocol-independent packet processors

#8
post #3

This looks really cool. Has anyone here done anything with it?

It's pretty cool. I built a lexer/parser for the p4 language in Lua, with the intention of then building a "runtime" for it out of the Snabb networking toolkit (amusingly, I also finished most of a p4 lexer/parser in Elixir before switching to Lua).

I don't think be able to build a full p4 implementation with Snabb running as a substrate (although it's been 6 months since I last worked on it, and am blanking at the moment why not), but I think it could get pretty close. But it will be a ton of work if I get around to it, plus I don't have much experience doing networking programming at this low of a level. I got a bit distracted with work and other obligations, but I hope to pick it back up soon, particularly if p4 is finally starting to get some well-deserved attention.

p4 is an awesome idea, and solves a lot of the problems OpenFlow was running into with having to constantly update the spec for new network protocols. With p4, that's just a software update, not a protocol update. It has some other neat features as well, but unfortunately it doesn't seem as though p4 has yet caught on like OpenFlow did, even though it has many of the same people behind it as OpenFlow.

Some of the cool things that people have done with p4:

https://2016p4workshop.sched.org/info

Re: P4: a high-level language for programming protocol-independent packet processors

#9
post #3

This looks really cool. Has anyone here done anything with it?

It's pretty cool. I built a lexer/parser for the p4 language in Lua, with the intention of then building a "runtime" for it out of the Snabb networking toolkit (amusingly, I also finished most of a p4 lexer/parser in Elixir before switching to Lua). I don't think be able to build a full p4 implementation with Snabb running as a substrate (although it's been 6 months since I last worked on it, and am blanking at the m…

I'm hesitant to pick up another network protocol after OpenFlow. Lots of vendors claimed to support it, but only a handful took an honest shot at a decent implementation.

Re: P4: a high-level language for programming protocol-independent packet processors

#10
post #3

This looks really cool. Has anyone here done anything with it?

It's pretty cool. I built a lexer/parser for the p4 language in Lua, with the intention of then building a "runtime" for it out of the Snabb networking toolkit (amusingly, I also finished most of a p4 lexer/parser in Elixir before switching to Lua). I don't think be able to build a full p4 implementation with Snabb running as a substrate (although it's been 6 months since I last worked on it, and am blanking at the m…

Cool stuff! Any reason why you switched to Lua from Elixir and any links to github with the code?
Post reply on HN