-
Notifications
You must be signed in to change notification settings - Fork 78
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
add text to support sending cloned packet to multicast group #665
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -674,17 +674,19 @@ follow. | |
|
||
if (ostd.clone) { | ||
if (ostd.clone_session_id value is supported) { | ||
cos = class_of_service configured for ostd.clone_session_id in PRE | ||
ep = egress_port configured for ostd.clone_session_id in PRE | ||
cos = class_of_service configured for ostd.clone_session_id in PRE | ||
set((egress_port[0], instance[0]), .., (egress_port[n], instance[n])) = | ||
set of egress_port and instance pair in the | ||
configured sessions for ostd.clone_session_id in PRE | ||
trunc = truncate configured for ostd.clone_session in PRE | ||
plen = packet_length_bytes configured for ostd.clone_session in PRE | ||
if (cos value is not supported) { | ||
cos = 0; | ||
// Recommmended to log error about unsupported cos value. | ||
} | ||
if (platform_port_valid(ep)) { | ||
create a clone of the packet and send it to the packet | ||
buffer with the egress_port ep and | ||
for each pair of (egress_port, instance), create a clone of the packet | ||
and send it to the packet buffer with the egress_port, instance and | ||
class_of_service cos, after which it will start | ||
egress processing. It will contain at most the | ||
first plen bytes of the packet as received at the | ||
|
@@ -761,7 +763,7 @@ the number of distinct class of service values that a PSA device | |
supports. | ||
|
||
|
||
### Multicast replication | ||
### Multicast replication {#sec-multicast} | ||
|
||
The control plane may configure each `multicast_group` in the PRE to | ||
create the desired copies of packets sent to that group. Each group | ||
|
@@ -896,8 +898,9 @@ packet contents and metadata when a packet begins egress processing. | |
+--------------+-------------+---------------+--------------+-----+ | ||
| `packet_path` | Same value as received by EgressParser above. |||| | ||
+--------------+-------------+---------------+--------------+-----+ | ||
| `instance` | From PacketReplicationEngine configuration for NM packets. |||| | ||
| | 0 for all other kinds of packets. |||| | ||
| `instance` | 0 | from PRE | 0 for cloned packets that are not multicast replicated. || | ||
| | | configuration | value from PRE configuration of multicast group || | ||
| | | of multicast group | for cloned packets that are multicast replicated || | ||
+--------------+-------------+---------------+--------------+-----+ | ||
| `egress_timestamp` | Time that packet began processing in EgressParser. Filled in |||| | ||
| | independently for each copy of a multicast-replicated packet. |||| | ||
|
@@ -1018,9 +1021,11 @@ the contents of several metadata fields in the struct | |
if (ostd.clone) { | ||
if (ostd.clone_session_id value is supported) { | ||
cos = class_of_service configured for ostd.clone_session_id in PRE | ||
ep = egress_port configured for ostd.clone_session_id in PRE | ||
trunc = truncate configured for ostd.clone_session in PRE | ||
plen = packet_length_bytes configured for ostd.clone_session in PRE | ||
set((egress_port[0], instance[0]), .., (egress_port[n], instance[n])) = | ||
set of egress_port and instance pair in the | ||
configured sessions for ostd.clone_session_id in PRE | ||
trunc = truncate configured for ostd.clone_session_id in PRE | ||
plen = packet_length_bytes configured for ostd.clone_session_id in PRE | ||
if (cos value is not supported) { | ||
cos = 0; | ||
// Recommmended to log error about unsupported cos | ||
|
@@ -1149,17 +1154,25 @@ values that should be associated with packets cloned using that | |
session. | ||
|
||
``` | ||
PortId_t egress_port; | ||
/// Each clone session may configure one or more pairs of (egress_port, instance). | ||
PortId_t egress_port; /// egress_port in a pair of (egress_port, instance) | ||
EgressInstance_t instance; /// instance in a pair of (egress_port, instance) | ||
|
||
/// Each clone session may configure at most one of each following values. | ||
ClassOfService_t class_of_service; | ||
bool truncate; | ||
PacketLength_t packet_length_bytes; /// only used if truncate is true | ||
``` | ||
|
||
The `egress_port` may be any port that can be used for normal unicast | ||
packets, i.e. any normal port, `PSA_PORT_CPU`, or `PSA_PORT_RECIRCULATE`. For | ||
the latter two values, the cloned packet will be sent to the CPU, or | ||
recirculated at the end of egress processing, as a normal unicast | ||
packet would at the end of egress processing. | ||
packets, i.e. any normal port, `PSA_PORT_CPU`, or | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have we not defined 'normal port' before? If not, maybe we should, and then we can use it throughout. |
||
`PSA_PORT_RECIRCULATE`. For the latter two values, the cloned packet | ||
will be sent to the CPU, or recirculated at the end of egress | ||
processing, as a normal unicast packet would at the end of egress | ||
processing. | ||
|
||
The `instance` is configured by the control plane in PRE to identify | ||
different copies of the multicasted packet. | ||
|
||
Truncation of cloned packets is supported as an optimization to | ||
reduce the bandwidth required to send the beginning of packets. This | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I follow the text in the CI2E column. Maybe prepend a 'value from PRE configuration ...'