-
Notifications
You must be signed in to change notification settings - Fork 275
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
Update database defintions for PINs / P4Runtime #536
Conversation
* Added APPL STATE DB for response path * Added table schema for P4RT routing, WCMP, and ACL Submission containing materials of a third party: Copyright Google LLC; Licensed under Apache 2.0 Co-authored-by: Jay Hu <jiarenhu@google.com> Co-authored-by: Yilan Ji <yilanji@google.com> Co-authored-by: Runming Wu <runmingwu@google.com> Co-authored-by: Akarsh Gupta <akarshgupta@google.com> Co-authored-by: Manali Kumar <manalikumar@google.com> Signed-off-by: Don Newton don@opennetworking.org
cc: @mint570 |
common/database_config.json
Outdated
@@ -86,6 +86,11 @@ | |||
"id" : 13, | |||
"separator": "|", | |||
"instance" : "redis_chassis" | |||
}, | |||
"APPL_STATE_DB" : { | |||
"id" : 63, |
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.
Why random number? Suggest 14
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.
Why random number? Suggest 14
Updated to 14, originally we just wanted it out of the way to prevent clashing with ongoing work in Azure.
common/schema.h
Outdated
@@ -43,6 +44,17 @@ namespace swss { | |||
#define APP_NEXTHOP_GROUP_TABLE_NAME "NEXTHOP_GROUP_TABLE" | |||
#define APP_CLASS_BASED_NEXT_HOP_GROUP_TABLE_NAME "CLASS_BASED_NEXT_HOP_GROUP_TABLE" | |||
|
|||
#define APP_P4RT_TABLE_NAME "P4RT" | |||
#define APP_P4RT_TABLE_NAME_SEPARATOR ":" |
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.
This should not be defined here
common/schema.h
Outdated
@@ -43,6 +44,17 @@ namespace swss { | |||
#define APP_NEXTHOP_GROUP_TABLE_NAME "NEXTHOP_GROUP_TABLE" | |||
#define APP_CLASS_BASED_NEXT_HOP_GROUP_TABLE_NAME "CLASS_BASED_NEXT_HOP_GROUP_TABLE" | |||
|
|||
#define APP_P4RT_TABLE_NAME "P4RT" |
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.
Use existing convention (_TABLE)
common/schema.h
Outdated
#define APP_P4RT_WCMP_GROUP_TABLE_NAME "FIXED_WCMP_GROUP_TABLE" | ||
#define APP_P4RT_IPV4_TABLE_NAME "FIXED_IPV4_TABLE" | ||
#define APP_P4RT_IPV6_TABLE_NAME "FIXED_IPV6_TABLE" | ||
#define APP_P4RT_ACL_TABLE_DEFINITION_NAME "DEFINITION" |
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 rename to follow existing convention
*Updating db const values to align with convention Signed-off-by: Don Newton don@opennetworking.org
*fix P4rt table references Signed of by Don Newton don@opennetworking.org
#define APP_P4RT_ROUTER_INTERFACE_TABLE_NAME "P4RT_ROUTER_INTERFACE_TABLE" | ||
#define APP_P4RT_NEIGHBOR_TABLE_NAME "P4RT_NEIGHBOR_TABLE" | ||
#define APP_P4RT_NEXTHOP_TABLE_NAME "P4RT_NEXTHOP_TABLE" | ||
#define APP_P4RT_WCMP_GROUP_TABLE_NAME "P4RT_WCMP_GROUP_TABLE" | ||
#define APP_P4RT_IPV4_TABLE_NAME "P4RT_IPV4_TABLE" | ||
#define APP_P4RT_IPV6_TABLE_NAME "P4RT_IPV6_TABLE" | ||
#define APP_P4RT_ACL_TABLE_DEFINITION_NAME "P4RT_ACL_TABLE_DEFINITION" | ||
#define APP_P4RT_MIRROR_SESSION_TABLE_NAME "P4RT_MIRROR_SESSION_TABLE" |
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.
Every table will be prefixed with "P4RT_TABLE:" so this will create:
P4RT_TABLE:P4RT_ROUTER_INTERFACE_TABLE
which I think is needlessly verbose.
I would prefer the old enum.
Signed-of-by: Don Newton <don@opennetworking.org>
Signed-off-by: Don Newton <don@opennetworking.org>
Signed-off-by Don Newton<don@opennetworking.org>
retest this please |
@@ -28,7 +28,8 @@ const TableNameSeparatorMap TableBase::tableNameSeparatorMap = { | |||
{ CONFIG_DB, TABLE_NAME_SEPARATOR_VBAR }, | |||
{ PFC_WD_DB, TABLE_NAME_SEPARATOR_COLON }, | |||
{ FLEX_COUNTER_DB, TABLE_NAME_SEPARATOR_COLON }, | |||
{ STATE_DB, TABLE_NAME_SEPARATOR_VBAR } | |||
{ STATE_DB, TABLE_NAME_SEPARATOR_VBAR }, | |||
{ APPL_STATE_DB, TABLE_NAME_SEPARATOR_VBAR } |
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.
{ APPL_STATE_DB, TABLE_NAME_SEPARATOR_VBAR } | |
{ APPL_STATE_DB, TABLE_NAME_SEPARATOR_VBAR } |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Submission containing materials of a third party:
Copyright Google LLC; Licensed under Apache 2.0
Co-authored-by: Jay Hu jiarenhu@google.com
Co-authored-by: Yilan Ji yilanji@google.com
Co-authored-by: Runming Wu runmingwu@google.com
Co-authored-by: Akarsh Gupta akarshgupta@google.com
Co-authored-by: Manali Kumar manalikumar@google.com
Signed-off-by: Don Newton don@opennetworking.org