-
Notifications
You must be signed in to change notification settings - Fork 476
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
Hostif trap type for Subnet routes #2066
Hostif trap type for Subnet routes #2066
Conversation
017697a
to
86b4247
Compare
Fixes opencomputeproject#2037 Signed-off-by: rck-innovium <[email protected]>
86b4247
to
fb7cb9a
Compare
@JaiOCP, @marian-pritsak - could you please help sign off on this? |
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.
Lets discuss in community meeting to close on this.
Hi Ravi,
My question is why do we need yet another workflow via IP2ME for neighbor
miss?
Is this because of certain hw constraints? I am missing the rationale of
the proposal.
Regards,
-Jai
…On Thu, Sep 19, 2024 at 10:08 PM Ravi [Marvell] ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In inc/saihostif.h
<#2066 (comment)>
:
> @@ -343,6 +343,13 @@ typedef enum _sai_hostif_trap_type_t
*/
SAI_HOSTIF_TRAP_TYPE_ISIS = 0x00002014,
+ /**
+ * @brief Packets matching subnet routes with NH pointing to router interface
+ * i.e., no neighbor entry route is present
+ * (default packet action is trap)
+ */
+ SAI_HOSTIF_TRAP_TYPE_NEIGHBOR_MISS = 0x00002015,
+
@JaiOCP <https://github.com/JaiOCP>
SAI_HOSTIF_TRAP_TYPE_NEIGHBOR_MISS is analogous to
SAI_HOSTIF_TRAP_TYPE_IP2ME.
The only difference is that SAI_HOSTIF_TRAP_TYPE_IP2ME applies to packets
hitting the IP2ME routes, and SAI_HOSTIF_TRAP_TYPE_NEIGHBOR_MISS applies to
packets hitting the subnet route (i.e. no neighbor/ARP entry is present).
Today, a NOS following SAI (say SONiC) installs IP2ME routes with NH as
CPU port. They do not set SAI_ROUTE_ENTRY_ATTR_USER_TRAP_ID. So, packets
hitting any IP2ME route go to the CPU based on the configuration for the
SAI_HOSTIF_TRAP_TYPE_IP2ME. [Say Workflow#1]
If the NOS wants each IP2ME route to be processed differently, then they
can use the workflow you mentioned above, i.e., use
SAI_ROUTE_ENTRY_ATTR_USER_TRAP_ID. [Say Workflow#2]
In essence, there are two workflows a NOS can follow. SAI currently
supports Workflow#2 for all route based traps, and the SAI support for
workflow#1 is available only for IP2ME but not neighbor-miss. This proposal
is adding the missing piece for neigbor-miss packets.
—
Reply to this email directly, view it on GitHub
<#2066 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKCSHLOKXI6LV6BM7BWRKGLZXOUT7AVCNFSM6AAAAABMO2EKI6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMJXGI3TKOBWG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.
|
This is not a h/w limitation. It is the definition as per the SAI model. When an IP address and subnet, say 10.1.1.1/24 is on a RIF, the following set of routes are created as per SAI:
Note: Both the routes are created with SAI_PACKET_ACTION_FORWARD and not SAI_PACKET_ACTION_TRAP. Both these routes can achieve the functionality by changing the packet action to Trap and use UDTs; but the standard SAI definition is to use SAI_PACKET_ACTION_FORWARD and the NH will point to CPU and RIF for route 1 and 2 respectively. Please refer : https://github.com/opencomputeproject/SAI/blob/f23185d5baf25ef27afb2d5823559d4d3e9c7022/inc/sairoute.h#L78: "Directly reachable routes are the IP subnets that are |
I think a default makes sense, in case the user has SAI_NULL_OBJECT_ID as the trap id in the route. Otherwise the user is forced to apply per-route, and this also puts a stress on the implementation. It's possible that some implementations may not support a per-route assignment of trap id for neighbor miss. In general I think this is a good idea and we already support this kind of configuration as an extension for some users. |
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.
Please see my comments requesting providing a workflow for NOS based on capability query to support two methods for neighbor miss so that given SAI adapter can be used per either of the implementations.
@prsunny for viz |
Fixes opencomputeproject#2037 Signed-off-by: rck-innovium <[email protected]>
Fixes #2037
When an IP address and subnet, say 10.1.1.1/24 is on a RIF, the following set of routes are created as per SAI:
Note: Both the routes are created with SAI_PACKET_ACTION_FORWARD.