-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bgpd:support of color extended community color-only types #17231
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,7 @@ | |
|
||
/* Low-order octet of the Extended Communities type field for OPAQUE types */ | ||
#define ECOMMUNITY_OPAQUE_SUBTYPE_ENCAP 0x0c | ||
#define ECOMMUNITY_OPAQUE_SUBTYPE_COLOR 0x0b | ||
|
||
/* Extended communities attribute string format. */ | ||
#define ECOMMUNITY_FORMAT_ROUTE_MAP 0 | ||
|
@@ -335,7 +336,7 @@ static inline void encode_node_target(struct in_addr *node_id, | |
* and ignored by the receiver; | ||
* | ||
*/ | ||
static inline void encode_color(uint32_t color_id, struct ecommunity_val *eval) | ||
static inline void encode_color(uint32_t color_id, as_t as, struct ecommunity_val *eval) | ||
{ | ||
/* | ||
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ||
|
@@ -347,7 +348,7 @@ static inline void encode_color(uint32_t color_id, struct ecommunity_val *eval) | |
memset(eval, 0, sizeof(*eval)); | ||
eval->val[0] = ECOMMUNITY_ENCODE_OPAQUE; | ||
eval->val[1] = ECOMMUNITY_COLOR; | ||
eval->val[2] = 0x00; | ||
eval->val[2] = (as << 6) & 0xff; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this NEW encoding defined? Could you point to the right RFC (section)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this sectino:8.8.1. Color-Only BGP Destination Steering There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see any paragraph saying about this encoding, or am I blind? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mybe the description is not very clear, similar to nokia,huawei,arista,cisco Arista: https://arista.my.site.com/AristaCommunity/s/article/SR-TE-Policy-With-Null-Endpoint-Color-Only-IP-Steering-Using-CO-Bits-Modification There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, now I see. This is called CO flags. While this is fine, I find the naming confusing. Why these flags are called |
||
eval->val[3] = 0x00; | ||
eval->val[4] = (color_id >> 24) & 0xff; | ||
eval->val[5] = (color_id >> 16) & 0xff; | ||
|
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 add the references in the comments about this and where they come from to allow people to find the information faster.