[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161029154903.25deb6db@jkicinski-Precision-T1700>
Date: Sat, 29 Oct 2016 15:49:03 +0100
From: Jakub Kicinski <kubakici@...pl>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, davem@...emloft.net, tgraf@...g.ch,
jhs@...atatu.com, roopa@...ulusnetworks.com,
john.fastabend@...il.com, simon.horman@...ronome.com,
ast@...nel.org, daniel@...earbox.net, prem@...efootnetworks.com,
hannes@...essinduktion.org, jbenc@...hat.com, tom@...bertland.com,
mattyk@...lanox.com, idosch@...lanox.com, eladr@...lanox.com,
yotamg@...lanox.com, nogahf@...lanox.com, ogerlitz@...lanox.com,
linville@...driver.com, andy@...yhouse.net, f.fainelli@...il.com,
dsa@...ulusnetworks.com, vivien.didelot@...oirfairelinux.com,
andrew@...n.ch, ivecera@...hat.com,
Maciej Żenczykowski <zenczykowski@...il.com>
Subject: Re: Let's do P4
On Sat, 29 Oct 2016 09:53:28 +0200, Jiri Pirko wrote:
> Hi all.
>
> The network world is divided into 2 general types of hw:
> 1) network ASICs - network specific silicon, containing things like TCAM
> These ASICs are suitable to be programmed by P4.
> 2) network processors - basically a general purpose CPUs
> These processors are suitable to be programmed by eBPF.
>
> I believe that by now, the most people came to a conclusion that it is
> very difficult to handle both types by either P4 or eBPF. And since
> eBPF is part of the kernel, I would like to introduce P4 into kernel
> as well. Here's a plan:
>
> 1) Define P4 intermediate representation
> I cannot imagine loading P4 program (c-like syntax text file) into
> kernel as is. That means that as the first step, we need find some
> intermediate representation. I can imagine someting in a form of AST,
> call it "p4ast". I don't really know how to do this exactly though,
> it's just an idea.
>
> In the end there would be a userspace precompiler for this:
> $ makep4ast example.p4 example.ast
Maybe stating the obvious, but IMHO defining the IR is the hardest part.
eBPF *is* the IR, we can compile C, P4 or even JIT Lua to eBPF. The
AST/IR for switch pipelines should allow for similar flexibility.
Looser coupling would also protect us from changes in spec of the high
level language.
Powered by blists - more mailing lists