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

Schema.h Changes to support PAC functionality. #871

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

vijaya-ops
Copy link
Contributor

Why I did it

Added below tables to support PAC functionality.

#define APP_PAC_PORT_TABLE_NAME "PAC_PORT_TABLE"
#define CFG_PAC_PORT_CONFIG_TABLE "PAC_PORT_CONFIG_TABLE"
#define CFG_PAC_GLOBAL_CONFIG_TABLE "PAC_GLOBAL_CONFIG_TABLE"
#define CFG_PAC_HOSTAPD_GLOBAL_CONFIG_TABLE "HOSTAPD_GLOBAL_CONFIG_TABLE"
#define STATE_PAC_GLOBAL_OPER_TABLE "PAC_GLOBAL_OPER_TABLE"
#define STATE_PAC_PORT_OPER_TABLE "PAC_PORT_OPER_TABLE"
#define STATE_PAC_AUTHENTICATED_CLIENT_OPER_TABLE "PAC_AUTHENTICATED_CLIENT_OPER_TABLE"
#define STATE_OPER_VLAN_TABLE_NAME "OPER_VLAN"
#define STATE_OPER_VLAN_MEMBER_TABLE_NAME "OPER_VLAN_MEMBER"
#define STATE_OPER_FDB_TABLE_NAME "OPER_FDB"
#define STATE_OPER_PORT_TABLE_NAME "OPER_PORT"

How I did it

How to verify it

@adyeung
Copy link

adyeung commented Aug 7, 2024

@jeff-yin @ridahanif96 pls help review

@vijaya-ops
Copy link
Contributor Author

/azpw run Azure

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure

Copy link

No pipelines are associated with this pull request.

@ridahanif96
Copy link

/azpw run Azure

Copy link

@ridahanif96 ridahanif96 left a comment

Choose a reason for hiding this comment

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

Changes looks good. Please re-push these changes or make a latest push to rerun pipelines to pass swss checkes.

@vijaya-ops
Copy link
Contributor Author

/azpw run Azure

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure

Copy link

No pipelines are associated with this pull request.

@vijaya-ops
Copy link
Contributor Author

I see below error, Which is not related to my changes, Any help on this is highly appreciated.

Making all in orchagent
make[3]: Entering directory '/__w/1/s/orchagent'
make[4]: Entering directory '/__w/1/s/orchagent'
g++ -DHAVE_CONFIG_H -I. -I.. -I ../lib -I .. -I ../warmrestart -I switch -I flex_counter -I debug_counter -I port -I pbh -I nhg -g -DNDEBUG -std=c++14 -Wall -fPIC -Wno-write-strings -I/usr/include/swss -I/usr/include/libnl3 -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/__w/1/s=. -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-main.o test -f 'main.cpp' || echo './'main.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I ../lib -I .. -I ../warmrestart -I switch -I flex_counter -I debug_counter -I port -I pbh -I nhg -g -DNDEBUG -std=c++14 -Wall -fPIC -Wno-write-strings -I/usr/include/swss -I/usr/include/libnl3 -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/__w/1/s=. -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-gearboxutils.o test -f '../lib/gearboxutils.cpp' || echo './'../lib/gearboxutils.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I ../lib -I .. -I ../warmrestart -I switch -I flex_counter -I debug_counter -I port -I pbh -I nhg -g -DNDEBUG -std=c++14 -Wall -fPIC -Wno-write-strings -I/usr/include/swss -I/usr/include/libnl3 -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/__w/1/s=. -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-subintf.o test -f '../lib/subintf.cpp' || echo './'../lib/subintf.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I ../lib -I .. -I ../warmrestart -I switch -I flex_counter -I debug_counter -I port -I pbh -I nhg -g -DNDEBUG -std=c++14 -Wall -fPIC -Wno-write-strings -I/usr/include/swss -I/usr/include/libnl3 -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/__w/1/s=. -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-recorder.o test -f '../lib/recorder.cpp' || echo './'../lib/recorder.cpp
g++ -DHAVE_CONFIG_H -I. -I.. -I ../lib -I .. -I ../warmrestart -I switch -I flex_counter -I debug_counter -I port -I pbh -I nhg -g -DNDEBUG -std=c++14 -Wall -fPIC -Wno-write-strings -I/usr/include/swss -I/usr/include/libnl3 -Werror -Wno-reorder -Wcast-align -Wcast-qual -Wconversion -Wdisabled-optimization -Wextra -Wfloat-equal -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winvalid-pch -Wlong-long -Wmissing-field-initializers -Wmissing-format-attribute -Wno-aggregate-return -Wno-padded -Wno-switch-enum -Wno-unused-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch -Wswitch-default -Wunreachable-code -Wunused -Wvariadic-macros -Wno-switch-default -Wno-long-long -Wno-redundant-decls -I /usr/include/sai -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/__w/1/s=. -fstack-protector-strong -Wformat -Werror=format-security -c -o orchagent-orchdaemon.o test -f 'orchdaemon.cpp' || echo './'orchdaemon.cpp
orchdaemon.cpp: In member function 'virtual bool OrchDaemon::init()':
orchdaemon.cpp:122:73: error: 'CFG_SUPPRESS_ASIC_SDK_HEALTH_EVENT_NAME' was not declared in this scope
122 | TableConnector conf_suppress_asic_sdk_health_categories(m_configDb, CFG_SUPPRESS_ASIC_SDK_HEALTH_EVENT_NAME);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[4]: *** [Makefile:987: orchagent-orchdaemon.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/__w/1/s/orchagent'

@vijaya-ops
Copy link
Contributor Author

/azpw run Azure

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure

Copy link

No pipelines are associated with this pull request.

@vijaya-ops
Copy link
Contributor Author

/azpw run Azure

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure

Copy link

No pipelines are associated with this pull request.

@vijaya-ops
Copy link
Contributor Author

/azpw run Azure

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure

Copy link

No pipelines are associated with this pull request.

@vijaya-ops
Copy link
Contributor Author

/azpw run Azure

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure

Copy link

No pipelines are associated with this pull request.

@vijaya-ops
Copy link
Contributor Author

/azpw run Azure.sonic-swss-common

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss-common

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vijaya-ops
Copy link
Contributor Author

The below test is failing and I see it is failing for all the PRs in this repo.

image

@vijaya-ops
Copy link
Contributor Author

/azpw run Azure.sonic-swss-common

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss-common

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

#define STATE_PAC_PORT_OPER_TABLE "PAC_PORT_OPER_TABLE"
#define STATE_PAC_AUTHENTICATED_CLIENT_OPER_TABLE "PAC_AUTHENTICATED_CLIENT_OPER_TABLE"
#define STATE_OPER_VLAN_TABLE_NAME "OPER_VLAN"
#define STATE_OPER_VLAN_MEMBER_TABLE_NAME "OPER_VLAN_MEMBER"

Choose a reason for hiding this comment

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

Wouldn't it be better to name it STATE_PAC_OPER_VLAN_TABLE_NAME? to allow for easier identification. same of actual name, something like PAC_OPER_VLAN

Copy link
Contributor Author

@vijaya-ops vijaya-ops Oct 1, 2024

Choose a reason for hiding this comment

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

#define STATE_OPER_VLAN_TABLE_NAME "OPER_VLAN"
#define STATE_OPER_VLAN_MEMBER_TABLE_NAME "OPER_VLAN_MEMBER"

The purpose of these two tables is to create VLANs and VLAN memberships dynamically. As of now the PAC is only one, which is creating dynamic VLAN memberships. But in future any other component can use these tables and create the dynamic VLANs and dynamic membership functionality. Hence the PAC key word is not present , for these tables.

Choose a reason for hiding this comment

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

Thank you for your response, good to know

@vijaya-ops
Copy link
Contributor Author

I am observing below error , which is not related to my changes. Any help is appreciated.

image

@adyeung
Copy link

adyeung commented Oct 1, 2024

To all sonic-swss-common repo maintainer @qiluo-msft @liuh-80 @msosyak @marian-pritsak @mint570, code PR has been approved by PENS WG members, please help merge. The feature is targeted for 202411

@@ -465,6 +467,11 @@ namespace swss {

#define CFG_SUPPRESS_ASIC_SDK_HEALTH_EVENT_NAME "SUPPRESS_ASIC_SDK_HEALTH_EVENT"

#define CFG_PAC_PORT_CONFIG_TABLE "PAC_PORT_CONFIG_TABLE"
Copy link
Contributor

Choose a reason for hiding this comment

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

"PAC_PORT_CONFIG_TABLE"

Could you make them vertically aligned, like nearby lines?

@qiluo-msft qiluo-msft merged commit 352234a into sonic-net:master Oct 11, 2024
17 checks passed
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.

7 participants