[P4-dev] Binding a table to an interface
antonin at barefootnetworks.com
Tue Jan 16 14:05:47 EST 2018
I can think of several possible ways of doing something like this:
1. use if statements in the ingress control and dispatch to the appropriate
control based on the ingress interface. You can also use a table (possibly
with static const entries if you are using P4_16). If you are writing your
own compiler backend, you could possibly optimize this "dispatcher" out and
allocate each sub-control to its own router ingress.
2. you could write a different P4 program for each ingress
3. if you are using P4_16, you could define your own P4 architecture
which would expose each ingress in your router as a separate entity and let
you provide a different control instance for each.
I would say solution 3. is the best one (after all this is why we have the
notion of architecture in P4_16), but it is hard to say without more
On Mon, Jan 15, 2018 at 10:32 PM, Ganesh C S <ch.sa.ganesh at gmail.com> wrote:
> Having a global table with interface identifier looks to be a hack.
> Some routers have separate ingress that can be populated with locally
> relevant logic. I am looking for p4 equivalent of this.
> On Sun, Jan 14, 2018 at 5:21 AM, Hardik Soni <hardik.soni at inria.fr> wrote:
>> put InControl.inputPort as a match field for the tables.
>> *From: *"Ganesh C S" <ch.sa.ganesh at gmail.com>
>> *To: *p4-dev at lists.p4.org
>> *Sent: *Sunday, 14 January, 2018 12:16:06 PM
>> *Subject: *[P4-dev] Binding a table to an interface
>> I am new to P4 and am trying to bind specific match-action tables to
>> interfaces. In my case, a packet received on ingress interface A, it should
>> look at table A. Similarly, ingress interface B should look at table B and
>> so on.
>> Any way of binding the tables to the interfaces ?
>> P4-dev mailing list
>> P4-dev at lists.p4.org
> P4-dev mailing list
> P4-dev at lists.p4.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev