
P4: a high-level language for programming protocol-independent packet processors - afics
http://p4.org/?hn
======
sargun
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?).

------
tthayer
I thought 'perforce' when I saw the headline. Perforce is something I'm stuck
with at my current job, unfortunately.

~~~
peterclary
Agreed. P4 is synonymous for Perforce. Did the project authors not do a
cursory google first?

As for "unfortunately", what don't you like about it, apart from it not being
what you're used to from elsewhere? I've used Visual Sourcesafe, Perforce and
git, and Perforce seems like a perfectly decent source control system.

However, I won't deny that it would be nice to be able to manage multiple
revisions locally so that I can explore different approaches and easily
backtrack without having to commit to the central server.

~~~
tthayer
The company I work at has Perforce tied to a homegrown code review tool that
really makes it painful to use and in reality that's my main gripe with having
to use it.

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

~~~
eric_bullington
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](https://2016p4workshop.sched.org/info)

~~~
superbaconman
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.

~~~
eric_bullington
Just to be clear, p4 isn't actually a network protocol. It's a programming
language, a DSL for programming network protocols. Small but significant
difference between the two. But you're correct that it will require native
support among router/switch vendors to be worth using.

Actually, p4 is aimed a solving a lot of the problems with OpenFlow that led
to the situation you describe: incomplete support by vendors of all the
different versions of OpenFlow. That's because each individual network
protocol supported had to be written into the OpenFlow spec, thus the
proliferation of versions. Whereas with p4, the vendors basically just provide
a hardware runtime for the p4 language, and you install whichever protocols
you wish to support (or write it yourself, if it's custom or new). It also has
the potential to work very well with a scaled-down version of OpenFlow.

I'm not an SDN expert and am probably not doing justice to p4 with my
description above, but it is important to realize this isn't just another
network protocol. It would be like describing the Python or JS as just another
program (the interpreter), and not as a program capable of running other
programs.

~~~
superbaconman
Yes, thanks for the corrections you are absolutely correct.

------
solidsnack9000
Does this support IPTables as a target?

------
the_duke
I'd love to write my IPTables config like that!

------
sigcode
mininet, which this project uses, appears to be written only for linux?

is this project linux only?

~~~
slrz
To be fair, I can't think of another OS that directly supports the things
Mininet wants to do. To make it work on other platforms, they'd first have to
implement those from scratch there.

Does FreeBSD nowadays provide some form of network isolation like it is
available with Linux network namespaces? Nothing relevant shows up in the
likely places, so I don't think it does.

~~~
pyvpx
there are vnet jails that behave similarly.

------
drivingmenuts
totally off the subject: when I saw that logo, this was all I could think of:

[http://bignum.sourceforge.net/primebear.html](http://bignum.sourceforge.net/primebear.html)

