-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for specifying type translations as part of the forwarding configuration. #373
base: main
Are you sure you want to change the base?
Conversation
@smolkaj is this still in play? |
We still want something like this eventually, but we aren't currently actively working on it. |
I think we'd also want to add a semi-static & semi-dynamic mapping. @antoninbas any thoughts on whether it would be more or less preferable to add this as a separate RPC? |
In my mind, it was going to be decoupled from the I am also not clear about how the dynamic mapping would work. Your comment in the Protobuf implies that the switch / server would be responsible for allocating "P4 values", which does not match my current understanding. It's probably something worth discussing at the next WG meeting. I doubt I have the most comprehensive perspective on this. |
Makes sense, I agree.
That's right. This is meant as a convenience. Consider the following use case: table 1 (route lookup): matches on dst IP and sets a "route ID" (some user metadata field) Maybe in our SDN controller, we want to give these routes semantically meaningful names, so we define
Now we can program routes as follows: Table 1:
Table 2:
Internally, the switch will map the route IDs to
Or, it could use
Or it could use any other bijection between strings and
Since the mapping is irrelevant, it would be very convenient if we didn't have to specify it explicitly. |
@smolkaj thanks for the reminder. I think we discussed this before, but I was very much focused on the special case of port translation. When we added the I believe that both cases ("static" and "dynamic") can be supported using a separate RPC. As you pointed out, the only guarantee for the "dynamic" case is that the mapping is a bijection. The underlying values can stay the same or be re-generated when a new With a separate RPC however, there are a few open questions:
With your current proposal, things become easier (the second question does not exist), but static mappings have to be included for each |
RE dynamic mappings: For better or worse, we started using them in SONIC/PINS. I am starting to wonder if that was a mistake, as explaining them to people is rather tricky, and so is reasoning about their correctness. At further thought, I think it might be a mistake to standardize them, and perhaps instead we should stop using them. Either way, perhaps it would be best to not include them for the initial proposal, we could always revisit that later.
I guess we should return a
This is a trickier one. In SONIC/PINS, for ports, we decided that no, this is not legal. But it is not entirely trivial to implement. More precisely, it is illegal if there is an entry using the port for which the mapping is being changed. |
No description provided.