Skip to content
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 fallback ports in replicas for multicast #508

Merged
merged 22 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c296c1f
Support fallback ports in Replicas for multicast
matthewtlam Oct 21, 2024
7f5cb15
Update the P4Runtime-Spec to remove whitespace.
matthewtlam Oct 21, 2024
778c1b7
Remove incorrect text in P4runtime-spec.
matthewtlam Oct 21, 2024
ad81001
Support fallback ports in replicas for multicast
matthewtlam Oct 22, 2024
a8cb97d
Update the P4Runtime-Spec example for multicast
matthewtlam Oct 22, 2024
bea2a23
Update the P4Runtime-Spec for multicast
matthewtlam Oct 22, 2024
120deee
Support port fallback for multicast by adding backup replicas
matthewtlam Oct 22, 2024
32fee8b
Update the P4Runtime-Spec to remove whitespace.
matthewtlam Oct 22, 2024
e5b7680
Update the P4Runtime-Spec.
matthewtlam Oct 23, 2024
a8f9b26
Update the associated go and rust files with the versioning changes.
matthewtlam Oct 23, 2024
18622bd
Support fallback ports as backup replicas for multicast
matthewtlam Oct 24, 2024
72f3375
Fix odd white spacing in p4runtime.proto
matthewtlam Oct 24, 2024
2f52a68
Update P4Runtime Spec to specify cases of when ports go down.
matthewtlam Oct 24, 2024
4e850e2
Update the P4RuntimeSpec to specify packet processing side effects of…
matthewtlam Oct 25, 2024
5641692
Update the P4RuntimeSpec to specify examples of packet processing sid…
matthewtlam Oct 25, 2024
ed685fb
Updated comments and P4Runtime Spec examples.
matthewtlam Oct 28, 2024
1982bfa
Update comment.
matthewtlam Oct 28, 2024
73ea0af
Update P4Runtime-Spec.mdk with backup replicas being optional and pro…
matthewtlam Oct 31, 2024
e8e0191
Update P4Runtime-Spec.mdk
matthewtlam Nov 1, 2024
69cebfb
Update p4runtime.proto
matthewtlam Nov 1, 2024
4f87f5d
Update p4.v1.rs
matthewtlam Nov 1, 2024
dcde77c
Update p4runtime.pb.go
matthewtlam Nov 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 56 additions & 11 deletions docs/v1/P4Runtime-Spec.mdk
Original file line number Diff line number Diff line change
Expand Up @@ -4530,10 +4530,28 @@ entity {
packet_replication_engine_entry {
multicast_group_entry {
multicast_group_id: 1
replicas { port: "\x05" instance: 1 }
replicas { port: "\x0c" instance: 2 }
replicas { port: "\x12" instance: 3 }
replicas { port: "\x18" instance: 4 }
replicas {
port: "\x05"
instance: 1
}
replicas {
port: "\x0c"
instance: 2
backup_replicas { port: "\x0d" instance: 5 }
}
replicas {
port: "\x12"
instance: 3
backup_replicas { port: "\x13" instance: 6 }
backup_replicas { port: "\x14" instance: 7 }
}
replicas {
port: "\x18"
instance: 4
backup_replicas { port: "\x19" instance: 8 }
backup_replicas { port: "\x1a" instance: 9 }
backup_replicas { port: "\x1b" instance: 10 }
}
}
}
}
Expand All @@ -4544,7 +4562,30 @@ four replicas of an ARP packet. These replicas will appear in the egress
pipeline as independent packets with egress port set to PSA device port numbers
corresponding to SDN port numbers 5, 12, 18 and 24. For more discussion on the
translation between SDN ports and PSA device ports, refer to the
[PSA Metadata Translation](#sec-translation-of-port-numbers) section.
[PSA Metadata Translation](#sec-translation-of-port-numbers) section. Each
replica can optionally have a list of backup replicas used as fallback ports
for multicast, where the highest-preference starts with the primary replica
followed by its backup replicas in order. When the highest-preferred port of a
replica or a backup replica goes down, the system uses the next
highest-preferred backup replica whose port is up. Whenever a higher-preferred
port goes back up, the system will use the associated replica or backup replica
as the primary port again. In the case when the primary replica's ports and the
backup replicas' ports are down, nothing is done for recovery until the primary
replica's or backup replicas' ports go back up. When the primary and all the
backups are down for a particular replica, the packet processing side effects
can result in one of the two main expected behaviors that the target is
recommended to implement:

1. No replica is created so none of the side effects from the
after-multicast-replication processing should occur for this replica.

2. The system sends one replica to the primary port, which gets dropped,
but the system will perform any side effects of the
after-multicast-replication processing.

Note that the packet processing side effects include counter updates, meter
updates, and any P4 register array writes in the P4 code after the multicast
replication is done.

The egress packets may be distinguished for further processing in the egress
using the `instance` metadata. Note that a packet may not be both unicast and
Expand All @@ -4562,12 +4603,16 @@ semantics.
`instance` ID is also a `uint32`, and its value may not exceed the maximum
allowed by the target for the `EgressInstance_t` type (0 is allowed), or the
server must return an `INVALID_ARGUMENT` error. The egress port (`port` field)
must be an SDN port and must refer to a singleton port. No two replicas may
have identical values of *both* `port` and `instance`, or the server must
return `INVALID_ARGUMENT`. The `metadata` field is an arbitrary `bytes` value
which is opaque to the target. There is no requirement of where this is
stored, but it must be returned by the server along with the rest of the entry
when the client performs a read on the entry.
must be an SDN port and must refer to a singleton port. A replica cannot have
the same port as any of its backup replicas, or the server must return
`INVALID_ARGUMENT`. All replicas and backup replicas in a particular
multicast group requires uniqueness among all (port, instance)-pairs, or the
server must return `INVALID_ARGUMENT`. The support for back replicas is
optional by the target and if the target does not support backup replicas,
it must return an `UNIMPLEMENTED` error. The `metadata` field is an arbitrary
`bytes` value, which is opaque to the target. There is no requirement of
where this is stored, but it must be returned by the server along with the
rest of the entry when the client performs a read on the entry.
* `MODIFY`: Modify the set of replicas and metadata for a given multicast group
entry, indexed by the given `multicast_group_id`. Same restrictions as
`INSERT` apply here.
Expand Down
Loading
Loading