News for hackers. Stuff that matters.
Re:P4: open-source programming language for high-performance... by shanemhansen on Tuesday June 14, 2016 @05:23PM (#11905434)
I took a quick look at github, didn't see an option to compile to iptables. That would be an interesting use case for me.
Re:P4: open-source programming language for high-performance... by readams on Tuesday June 14, 2016 @05:29PM (#11905466)
One of the key advantages of p4 is that you don't have to use iptables. Instead p4 would compile down to a binary packet processor in either machine language, something like eBPF, or directly onto a hardware coprocessor on your NIC.

Compiling to iptables would be incredibly slow and miss the advantages. Plus, p4 is more general than iptables so many p4 programs could not be expressed as iptables.

Re:P4: open-source programming language for high-performance... by birdier on Tuesday June 14, 2016 @08:03PM (#11906356)
A possibility for it's use is directly in a application then.

For very high performance packet generation and processing the Linux kernel is sub-par because it's extremely complex and general purpose. There is just too much going on.

example:

https://blog.cloudflare.com/kernel-bypass/

Re:P4: open-source programming language for high-performance... by readams on Wednesday June 15, 2016 @01:41PM (#11910760)
There is work going on upstream to allow bypassing the entire network stack in the kernel using eBPF. Kernel bypass techniques though have been the gold standard in performance for quite a while, but they don't work well for container networking, so kernel networking is starting to become more relevant to people who care about performance.
Re:P4: open-source programming language for high-performance... by Demeisen on Tuesday June 14, 2016 @08:45PM (#11906492)
Maybe compile to nftables bytecode instead?
Re:P4: open-source programming language for high-performance... by signa11 on Wednesday June 15, 2016 @01:03AM (#11907251)
> ... didn't see an option to compile to iptables.

did you mean bpf ?