-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add ST route type #308
Conversation
Signed-off-by: Marian Pritsak <[email protected]>
6c767b6
to
a54cbe7
Compare
TODO: generate SAI API |
SAI API will be generated into master branch, pending opencomputeproject/SAI#1590 |
@marian-pritsak , does it match this #309 ? |
Signed-off-by: Marian Pritsak <[email protected]>
Signed-off-by: Marian Pritsak <[email protected]>
Yes it does |
Companion SAI API change opencomputeproject/SAI#1729 |
Signed-off-by: Marian Pritsak <[email protected]>
/* 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; |
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.
Current assumption is to use original's packet dmac.
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.
Yes - it is copying the same value from original header
dash-pipeline/bmv2/dash_outbound.p4
Outdated
meta.encap_data.underlay_dip, | ||
meta.encap_data.underlay_sip, | ||
meta.encap_data.overlay_dmac, | ||
meta.encap_data.service_tunnel_id); |
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.
can we rename to encap_key?
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.
done
Signed-off-by: Marian Pritsak <[email protected]>
@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 <[email protected]>
I have SAI generation moving to annotations in P4 in my backlog |
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; |
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.
Copy DSCP
dash-pipeline/bmv2/dash_conntrack.p4
Outdated
@@ -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(); |
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.
Compilation error - missing parenthesis.
@marian-pritsak , could you please resolve conflict? |
@prsunny fixed the conflicts |
Signed-off-by: Marian Pritsak [email protected]