-
Notifications
You must be signed in to change notification settings - Fork 480
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 new Next Hop Type and allow Next Hop to be an IPMC Group Member #2041
Merged
tjchadaga
merged 4 commits into
opencomputeproject:master
from
mholankar:manali-next-hop
Aug 5, 2024
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# SAI attributes for disabling L3 rewrites | ||
|
||
# for IP Multicast forwarding | ||
|
||
``` | ||
Author:mholankar@ | ||
``` | ||
|
||
## Overview | ||
|
||
This document discusses requirements and the SAI spec proposal for disabling rewriting fields (SourceMAC, VLAN) as part of IPMC routing. | ||
|
||
## Background | ||
|
||
### SAI pipeline for IPMC forwarding. After Multicast Replication, the egress | ||
|
||
### pipeline is very similar to Unicast Forwarding. The reference pipeline is | ||
|
||
### fromUnicastForwarding. | ||
|
||
- Nexthop sets the egress RIF and NextHopIP | ||
- Neighbor table lookup on NextHopIP to set packet's destination MAC address | ||
- Egress RIF lookup to set packet's source MAC address, VLAN and port. | ||
|
||
## Requirements | ||
|
||
We require knobs for disabling rewrites to following fields as part of Multicast forwarding flows | ||
|
||
``` | ||
● Src MAC disable | ||
● Vlan rewrite disable | ||
``` | ||
|
||
We have scenarios where we need knobs for disabling header field rewrites, for Multicast Replication. | ||
|
||
Case1:For certain flows, the switch does MulticastReplication for a VLAN tagged packet. However, we do not want the VLAN tag to be over-written during replication, we want the replication to retain the VLAN tag. For such a case we would like to disable L3 VLAN rewrite. Please note: that when a disable L3 Vlan rewrite | ||
flag is enabled, it does allow for untagged packets to get replicated. | ||
|
||
Case2: For some scenarios, we may want to rewrite the SRC MAC. Having NextHop based knobs for such rewrites would be very helpful. | ||
|
||
In summary, with SDN based forwarding, Controller treats the L2 fields like any other header field which can be controlled and requires them to be configured flexibility as part of MulticastReplication. | ||
|
||
## Proposal | ||
|
||
Since we require capability to disable the rewrites for certain Multicast flows and not for all flows via/to neighbor, the best option is to have these as part of NextHop object: | ||
|
||
- SAI_NEXT_HOP_ATTR_DISABLE_SRC_MAC_REWRITE | ||
- SAI_NEXT_HOP_ATTR_DISABLE_DST_MAC_REWRITE | ||
- SAI_NEXT_HOP_ATTR_DISABLE_VLAN_REWRITE | ||
|
||
### Example SAI object creation for an IPMCGroup: | ||
|
||
- Create a **SAI_OBJECT_TYPE_IPMC_GROUP** for the multicast group with the following attributes. | ||
- Create a SAI_OBJECT_TYPE_ROUTER_INTERFACE with following attributes: | ||
● SAI_ROUTER_INTERFACE_ATTR_VIRTUAL_ROUTER_ID | ||
● SAI_ROUTER_INTERFACE_ATTR_SRC_MAC_ADDRESS | ||
● SAI_ROUTER_INTERFACE_ATTR_TYPE=SAI_ROUTER_INTERFACE_TYPE_ | ||
|
||
``` | ||
PORT | ||
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. SAI_ROUTER_INTERFACE_ATTR_TYPE=SAI_ROUTER_INTERFACE_TYPE_PORT |
||
``` | ||
|
||
● SAI_ROUTER_INTERFACE_ATTR_PORT_ID | ||
- Create a SAI_OBJECT_TYPE_NEIGHBOR_ENTRY for each neighbor with: | ||
● "ip"=Link local address ● "rif" ● "switch id" | ||
● SAI_NEIGHBOR_ENTRY_ATTR_DST_MAC_ADDRESS(optional) | ||
● SAI_NEIGHBOR_ENTRY_ATTR_NO_HOST_ROUTE=true | ||
- Create SAI_OBJECT_TYPE_NEXT_HOP with: | ||
● SAI_NEXT_HOP_ATTR_TYPE=SAI_NEXT_HOP_TYPE_IPMC | ||
● SAI_NEXT_HOP_ATTR_ROUTER_INTERFACE_ID | ||
● SAI_NEXT_HOP_ATTR_IP="ip"of neighbor | ||
|
||
``` | ||
● SAI_NEXT_HOP_ATTR_DISABLE_SRC_MAC_REWRITE=true | ||
● SAI_NEXT_HOP_ATTR_DISABLE_VLAN_REWRITE=true | ||
``` | ||
|
||
- Create a **SAI_OBJECT_TYPE_IPMC_GROUP_MEMBER** with following attributes: | ||
● SAI_IPMC_GROUP_MEMBER_ATTR_IPMC_GROUP_ID with ipmc_group_oid | ||
● SAI_IPMC_GROUP_MEMBER_ATTR_IPMC_OUTPUT_ID with next_hop_oid |
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
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
Oops, something went wrong.
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.
Pl remove '###' for lines 15 to 19.