Skip to content

Optimized Forwarding Header#2297

Open
JaiOCP wants to merge 1 commit into
opencomputeproject:masterfrom
JaiOCP:ofh
Open

Optimized Forwarding Header#2297
JaiOCP wants to merge 1 commit into
opencomputeproject:masterfrom
JaiOCP:ofh

Conversation

@JaiOCP

@JaiOCP JaiOCP commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

New PR is opened.
Old one where most of the review comments are there is closed
#2285

Signed-off-by: JaiOCP <jai.kumar@broadcom.com>
Comment thread inc/saihash.h
SAI_NATIVE_HASH_FIELD_RDMA_BTH_DEST_QP = 0x00000023,

/** Native hash field RDMA packet BTH destination queue pair */
SAI_NATIVE_HASH_FIELD_OFH_FLOW_LABEL = 0x00000024,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the comments cut and paste error.

Comment thread inc/saiacl.h
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_TABLE_ATTR_FIELD_ACL_OFH_TYPE = SAI_ACL_TABLE_ATTR_FIELD_START + 0x167,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add match for version field

@BYGX-wcr

Copy link
Copy Markdown
Contributor

It will be good to draw an abstract SAI pipeline to illustrate the forwarding model of OFH in the documentation.

Comment thread inc/saiacl.h
* @default false
*/
SAI_ACL_TABLE_ATTR_FIELD_OFH_COS = SAI_ACL_TABLE_ATTR_FIELD_START + 0x168,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add TTL decrement for action as well as match on TTL

Comment thread inc/saiacl.h
* @brief End of Rule Actions
*/
SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_TAM_OBJECT,
SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_SET_OFH_COS,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SAI_ACL_ACTION_TYPE_SET_ECN = 0x00000017,

Set ECN also supported for normal IP packet.

Comment thread inc/saiswitch.h
/**
* @brief OFH header max size
*
* @type sai_int8_t

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be sai_uint8_t ?

Comment thread inc/sairouterinterface.h
*
* @type bool
* @flags CREATE_AND_SET
* @default true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be false by default?

Comment thread inc/saitypes.h

SAI_OFH_ADDR_FAMILY_AFH,

SAI_OFH_ADDR_FAMILY_UFH,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add doxygen comments

Comment thread inc/saitypes.h

/** @validonly meta->attrvaluetype == SAI_ATTR_VALUE_TYPE_UINT64_RANGE_LIST */
sai_u64_range_list_t u64rangelist;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the corresponding sai_ofh_addr_and_mask_t to SAI_ATTR_VALUE_TYPE_OFH_ADDR_AND_MASK type be added here?

Comment thread inc/saiofh.h
/**
* @brief Set OFH attribute value(s).
*
* @param[in] ofh_id TAM id

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct TAM to OFH

Comment thread inc/saiofhroute.h
* @param[out] object_statuses List of status for every object. Caller needs to
* allocate the buffer
*
* @return #SAI_STATUS_SUCCESS on success when all objects are removed or

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#SAI_STATUS_SUCCESS on success when all objects are set. Similarly for SAI_STATUS_FAILURE.

Comment thread inc/saiofhroute.h
* @param[out] object_statuses List of status for every object. Caller needs to
* allocate the buffer
*
* @return #SAI_STATUS_SUCCESS on success when all objects are removed or

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#SAI_STATUS_SUCCESS on success when all objects are get/retrived. Similarly for SAI_STATUS_FAILURE.

Comment thread inc/saiofhroute.h
} sai_ofh_route_entry_attr_t;

/**
* @brief Unicast route entry

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider to add/change to OFH route entry.

Comment thread inc/saiofh.h
*
* @type sai_uint8_t
* @flags CREATE_AND_SET
* @default 6

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while other *_WIDTH fields are default to '0', This seems to be special.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants