Hey
I was reading through P416 and P4Runtime specifications and was trying to understand the modification of tables - the look-up tables and not the table objects defined in the p4 program - and wanted to know/understand the design logic behind the following specifications: -
Hi Christian,
It is true that the language does not allow a P4 program to modify a table entry (in other words, the action data passed to an action as parameters).
As to why this is the case, I was not there when the decision was made, but I could imagine it was due to the fact that, especially in switches that operate with very large volumes of packets, implementing such a feature would be very challenging.
In work done in the context of the Portable NIC Architecture we have concluded that this could be a desirable feature in NICs, but the community has agreed that before deciding to modify the language specification we need to make sure that the feature is useful and that we know what is the best way to support it in the language.
Hence, we have defined the possibility of modifying table entries from the dataplane as experimental:
https://github.com/p4lang/p4-spec/pull/1239
This way we can see whether target vendors and developers will embrace it and, if so, whether the proposed changes to the language will prove suitable.
Best,
---
Mario
From: p4-di...@lists.p4.org <p4-di...@lists.p4.org> On Behalf Of Stavan Christian
Sent: Sunday, May 21, 2023 10:24 AM
To: p4-discuss <p4-di...@lists.p4.org>
Subject: [P4-discuss] P4 16 Language design - why tables are not allowed to be updated from Data plane
Hey
I was reading through P416 and P4Runtime specifications and was trying to understand the modification of tables - the look-up tables and not the table objects defined in the p4 program - and wanted to know/understand the design logic behind the following specifications: -
1. In the sections 6.4.1 of P4Runtime API (P4~16~ Language Specification) and 14.2.1.4 of P416 specs (P4~16~ Language Specification), it simply mentions that table modifications can be done by Control Plane. It does not explicitly state anywhere that table updates are not possible by P4 prrograms installed on the target or via Dataplane. Is it true that table updates are only allowed via Control plane? If yes then please consider the following question as well: -
2. Why are table modifications - add, delete, modification of table entries - only allowed through Control Plane? Why aren’t table updates possible via code logic in p4 programs via the Data plane? (For example, if packet processing metadata indicates increase or decrease in traffic on some link, then updating packet forwarding rules directly by calling necessary APIs from the packet processing pipeline.)
--
You received this message because you are subscribed to the Google Groups "p4-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to p4-discuss+...@lists.p4.org.
To view this discussion on the web visit https://groups.google.com/a/lists.p4.org/d/msgid/p4-discuss/ce29f637-8451-46f5-9030-db579ec6282dn%40lists.p4.org.
To view this discussion on the web visit https://groups.google.com/a/lists.p4.org/d/msgid/p4-discuss/039701d98bfb%2400682e20%2401388a60%24%40baldi.info.
To view this discussion on the web visit https://groups.google.com/a/lists.p4.org/d/msgid/p4-discuss/78092f93-d974-4be0-b703-f3ed8ab935efn%40lists.p4.org.