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

Add ST route type #308

Merged
merged 16 commits into from Apr 12, 2023
Merged

Add ST route type #308

merged 16 commits into from Apr 12, 2023

Conversation

marian-pritsak
Copy link
Collaborator

Signed-off-by: Marian Pritsak marianp@mellanox.com

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
@marian-pritsak
Copy link
Collaborator Author

TODO: generate SAI API

@marian-pritsak
Copy link
Collaborator Author

SAI API will be generated into master branch, pending opencomputeproject/SAI#1590

@lguohan
Copy link
Contributor

lguohan commented Jan 11, 2023

@marian-pritsak , does it match this #309 ?

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 23, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
@marian-pritsak
Copy link
Collaborator Author

@marian-pritsak , does it match this #309 ?

Yes it does

@marian-pritsak
Copy link
Collaborator Author

marian-pritsak commented Jan 31, 2023

Companion SAI API change opencomputeproject/SAI#1729

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
/* encapsulation will be done in apply block based on encap_type */
meta.encap_data.underlay_dip = underlay_dip == 0 ? meta.encap_data.original_overlay_dip : (IPv4Address)underlay_dip;
meta.encap_data.underlay_sip = underlay_sip == 0 ? meta.encap_data.original_overlay_sip : (IPv4Address)underlay_sip;
meta.encap_data.overlay_dmac = hdr.ethernet.dst_addr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Current assumption is to use original's packet dmac.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes - it is copying the same value from original header

meta.encap_data.underlay_dip,
meta.encap_data.underlay_sip,
meta.encap_data.overlay_dmac,
meta.encap_data.service_tunnel_id);
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we rename to encap_key?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
@chrispsommers
Copy link
Collaborator

@marian-pritsak with 2c2531b it seems like we're going further down the path to complex special-case code in sai_api_gen.py. Is there anyway to use P4Info in the codegen to handle the enums, and therefore take a step in that direction?

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
@marian-pritsak
Copy link
Collaborator Author

@marian-pritsak with 2c2531b it seems like we're going further down the path to complex special-case code in sai_api_gen.py. Is there anyway to use P4Info in the codegen to handle the enums, and therefore take a step in that direction?

I have SAI generation moving to annotations in P4 in my backlog
Enum itself will have to be in sai_api_gen because it's a straightforward data structure layout, but the parameters of enum type are more complex and will be done with annotations.

in IPv6Address st_dst,
in IPv6Address st_dst_mask,
in IPv6Address st_src,
in IPv6Address st_src_mask) {
hdr.ipv6.setValid();
hdr.ipv6.version = 6;
hdr.ipv6.traffic_class = 0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy DSCP

@@ -46,12 +49,16 @@ control ConntrackIn(inout headers_t hdr,
}
restart_expire_timer(); // reset expiration timer for entry
meta.conntrack_data.allow_in = true;
meta.encap_data.original_overly_sip = original_overly_sip.read(get_rule_prio();
meta.encap_data.original_overly_dip = original_overly_dip.read(get_rule_prio();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Compilation error - missing parenthesis.

@prsunny
Copy link
Collaborator

prsunny commented Apr 12, 2023

@marian-pritsak , could you please resolve conflict?

@marian-pritsak
Copy link
Collaborator Author

@prsunny fixed the conflicts

@prsunny prsunny merged commit f7edeb1 into sonic-net:main Apr 12, 2023
3 checks passed
@budgrise budgrise mentioned this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔬Scoping
Development

Successfully merging this pull request may close these issues.

None yet

5 participants