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

[DASH] Update dash headers to most recent #1834

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kcudnik
Copy link
Collaborator

@kcudnik kcudnik commented Aug 1, 2023

Updates DASH experimental headers to headers generated from https://github.com/sonic-net/DASH repo on origin/main

Copied generated headers from DASH project after building code with commit b322bc6 (sonic-net/DASH@b322bc6)

Updates DASH experimental headers to headers generated from
https://github.com/sonic-net/DASH repo on origin/main
@kcudnik kcudnik requested a review from lguohan August 1, 2023 18:16
@kcudnik
Copy link
Collaborator Author

kcudnik commented Aug 1, 2023

@marian-pritsak, @Pterosaur, @chrispsommers please review

@chrispsommers
Copy link
Contributor

@reshmaintel Could you or your team review? Thanks.

Copy link
Contributor

@chrispsommers chrispsommers left a comment

Choose a reason for hiding this comment

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

Changes seem OK, but it would be helpful to include in the PR description from which commit of DASH, these correspond to. If my understanding is correct, these are hand-copied from generated .h files in DASH repo. There is no way to automatically link back to the code commit. Thanks!

@kcudnik
Copy link
Collaborator Author

kcudnik commented Aug 1, 2023

Changes seem OK, but it would be helpful to include in the PR description from which commit of DASH, these correspond to. If my understanding is correct, these are hand-copied from generated .h files in DASH repo. There is no way to automatically link back to the code commit. Thanks!

yes, those are hand copied from generated files, i discussed this with Guohan, that we should treat DASH repo like a ground truth for DASH api

what description do you have in mind?

@chrispsommers
Copy link
Contributor

It could be as simple as "Copied generated headers from DASH project after building code with commit XYZ."

Comment on lines -122 to +183
* @brief List matched key sip
* @brief Optional matched key sip
*
* @type sai_ip_prefix_list_t
* @type sai_ip_address_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
*/
SAI_DASH_ACL_RULE_ATTR_SIP,

/**
* @brief List matched key protocol
* @brief Optional matched key protocol
*
* @type sai_u8_list_t
* @type sai_uint8_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
*/
SAI_DASH_ACL_RULE_ATTR_PROTOCOL,

/**
* @brief Range_list matched key src_port
* @brief Optional matched key src_port
*
* @type sai_u16_range_list_t
* @type sai_uint16_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
* @isvlan false
*/
SAI_DASH_ACL_RULE_ATTR_SRC_PORT,

/**
* @brief Range_list matched key dst_port
* @brief Optional matched key dst_port
*
* @type sai_u16_range_list_t
* @type sai_uint16_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
* @isvlan false
Copy link
Contributor

@Pterosaur Pterosaur Aug 2, 2023

Choose a reason for hiding this comment

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

To the DASH ACL SAI, it's not directly generated from P4 code, you need to unmark the line: https://github.com/sonic-net/DASH/blob/b322bc6e3e4625de9418fdc1615ee7144ca76ecb/dash-pipeline/bmv2/dash_acl.p4#L16 for generating them
Here is a different point between SAI and default P4 of BMv2.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

why this needs to be unmarked ?

Copy link
Contributor

Choose a reason for hiding this comment

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

In our design for DASH project, here should be a list, like u16_range_list, u8_list, and ip_prefix_list. But the current implementation of BMv2 doesn't support the list type. Most of the APIs are developed on BMv2 as the prototype. So, if we want to run P4 code on BMv2, this comment should be marked, if we want to generate SAI headers, this comment should be unmarked.

Comment on lines +116 to +148
* @type sai_uint32_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
*/
SAI_DASH_ACL_RULE_ATTR_DST_TAG,

/**
* @brief Ternary matched mask dst_tag
*
* @type sai_uint32_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
*/
SAI_DASH_ACL_RULE_ATTR_DST_TAG_MASK,

/**
* @brief Ternary matched key src_tag
*
* @type sai_uint32_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
*/
SAI_DASH_ACL_RULE_ATTR_SRC_TAG,

/**
* @brief Ternary matched mask src_tag
*
* @type sai_uint32_t
* @flags MANDATORY_ON_CREATE | CREATE_ONLY
*/
SAI_DASH_ACL_RULE_ATTR_SRC_TAG_MASK,

/**
* @brief Optional matched key dip
*
* @type sai_ip_address_t
Copy link
Contributor

Choose a reason for hiding this comment

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

I have submitted a PR (#1829) for the TAG feature, this design is reviewed by @marian-pritsak

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

is that different from auto generated ?

Copy link
Contributor

Choose a reason for hiding this comment

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

The TAG feature is still being discussed, so we don't have a final conclusion for it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

does it matter at this stage? since it's still experimental, does anyone use it at all at that point? it could be updated to keep headers in sync, and changed then at any point

@kcudnik
Copy link
Collaborator Author

kcudnik commented Aug 8, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kcudnik
Copy link
Collaborator Author

kcudnik commented Aug 8, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

3 participants