p4lang / behavioral-model

The reference P4 software switch
Apache License 2.0
538 stars 328 forks source link

Does multicast replication preserve local metadata in v1model/simple switch? #1206

Closed smolkaj closed 6 months ago

smolkaj commented 1 year ago

Empirically speaking, the answer is yes, on BMv2. However I don't see this documented anywhere currently. Maybe @jafingerhut would know?

@zhenk14 for visibility.

jafingerhut commented 1 year ago

As far as I know, multicast and unicast are equivalent in the v1model implementation for metadata that is preserved from ingress to egress.

Note: In case you have not heard me say it before, unless the P4_14 specification says something explicitly (and on many such detailed questions like this, it is often silent on the topic), I consider the behavioral-model implementation of v1model to be the effective definition of the v1model architecture. Yes, occasionally we have changed things in this implementation because it seems wrong, but not many such things have been changed since behavioral-model was written.

smolkaj commented 1 year ago

Treating unicast & multicast uniformly makes sense.

Treating BMv2 as the definition also makes sense at this point, given that the P4_14 spec is very incomplete. A search for "multicast" in the spec surfaces nearly no information at all.

jafingerhut commented 1 year ago

If you have any suggested PR for this documentation file that would help clarify the BMv2 v1model behavior here, I'd be happy to review it: https://github.com/p4lang/behavioral-model/blob/main/docs/simple_switch.md

smolkaj commented 1 year ago

Will send a PR after https://github.com/p4lang/behavioral-model/pull/1204/files goes in to avoid merge conflicts.

jafingerhut commented 1 year ago

Sorry for the long delay. I just approved and merged PR #1204

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days

smolkaj commented 7 months ago

Reminder to myself: need to send a PR to clarify this.