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

Update database defintions for PINs / P4Runtime #536

Merged
merged 6 commits into from
Oct 21, 2021

Conversation

donNewtonAlpha
Copy link
Contributor

  • 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

* 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
@donNewtonAlpha donNewtonAlpha changed the title swss-common: Update database defintions for PINs / P4Runtime Update database defintions for PINs / P4Runtime Oct 11, 2021
@bocon13
Copy link
Contributor

bocon13 commented Oct 11, 2021

cc: @mint570

@@ -86,6 +86,11 @@
"id" : 13,
"separator": "|",
"instance" : "redis_chassis"
},
"APPL_STATE_DB" : {
"id" : 63,
Copy link
Contributor

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

Copy link
Contributor Author

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/table.cpp Outdated Show resolved Hide resolved
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 ":"
Copy link
Contributor

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"
Copy link
Contributor

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"
Copy link
Contributor

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

PINS Working Group added 2 commits October 12, 2021 12:50
*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
Comment on lines +48 to +55
#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"
Copy link
Contributor

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>
@bocon13
Copy link
Contributor

bocon13 commented Oct 19, 2021

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 }
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{ APPL_STATE_DB, TABLE_NAME_SEPARATOR_VBAR }
{ APPL_STATE_DB, TABLE_NAME_SEPARATOR_VBAR }

@prsunny
Copy link
Contributor

prsunny commented Oct 21, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit 4f5da5a into sonic-net:master Oct 21, 2021
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.

4 participants