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

[bufferorch][201911] Handle DEL_COMMAND for BUFFER_PG and BUFFER_QUEUE table #1787

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

stephenxs
Copy link
Collaborator

@stephenxs stephenxs commented Jun 16, 2021

What I did
Handle DEL command for BUFFER_PG and BUFFER_QUEUE table.
Add vs test for BUFFER_PG and BUFFER_QUEUE table handling

Signed-off-by: Stephen Sun stephens@nvidia.com

Why I did it

How I verified it
Manually test.

Details if related

@stephenxs
Copy link
Collaborator Author

LGTM failed due to a compiling error which didn't happen on my local server. Will retry.

[2021-06-16 23:14:21] [build-stdout] make  all-recursive
[2021-06-16 23:14:21] [build-stdout] make[1]: Entering directory '/opt/src'
[2021-06-16 23:14:21] [build-stdout] Making all in fpmsyncd
[2021-06-16 23:14:21] [build-stdout] make[2]: Entering directory '/opt/src/fpmsyncd'
[2021-06-16 23:14:21] [build-stdout] g++ -DHAVE_CONFIG_H -I. -I.. -I .. -I ../warmrestart -I  -g  -std=c++14 -Wall -fPIC -Wno-write-strings -I/usr/include/libnl3 -I/usr/include/swss -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   -fpermissive -MT fpmsyncd-fpmsyncd.o -MD -MP -MF .deps/fpmsyncd-fpmsyncd.Tpo -c -o fpmsyncd-fpmsyncd.o `test -f 'fpmsyncd.cpp' || echo './'`fpmsyncd.cpp
[2021-06-16 23:14:22] [build-stderr] fpmsyncd.cpp:3:10: fatal error: logger.h: No such file or directory
[2021-06-16 23:14:22] [build-stderr]     3 | #include "logger.h"
[2021-06-16 23:14:22] [build-stderr]       |          ^~~~~~~~~~
[2021-06-16 23:14:22] [build-stderr] compilation terminated.
[2021-06-16 23:14:24] [build-stdout] make[2]: Leaving directory '/opt/src/fpmsyncd'
[2021-06-16 23:14:24] [build-stderr] make[2]: *** [Makefile:434: fpmsyncd-fpmsyncd.o] Error 1
[2021-06-16 23:14:24] [build-stderr] make[1]: *** [Makefile:404: all-recursive] Error 1
[2021-06-16 23:14:24] [build-stdout] make[1]: Leaving directory '/opt/src'
[2021-06-16 23:14:24] [build-stderr] make: *** [Makefile:336: all] Error 2
[2021-06-16 23:14:24] [build-stdout] Semmle autobuild: no supported build system detected.

@prsunny
Copy link
Collaborator

prsunny commented Jun 17, 2021

I think this is a known issue with 201911. @abdosi ?

@stephenxs
Copy link
Collaborator Author

I think this is a known issue with 201911. @abdosi ?

Is there a way to overcome this error? @abdosi @prsunny Thanks.

@liat-grozovik
Copy link
Collaborator

I believe these flows should be verified by unit test/VS. can you please add?

@stephenxs
Copy link
Collaborator Author

I believe these flows should be verified by unit test/VS. can you please add?

Ok. Will check it.

@stephenxs
Copy link
Collaborator Author

I believe these flows should be verified by unit test/VS. can you please add?

Ok. Will check it.

VS test added.

@stephenxs stephenxs changed the title [bufferorch] Handle DEL_COMMAND for BUFFER_PG and BUFFER_QUEUE table [bufferorch][201911] Handle DEL_COMMAND for BUFFER_PG and BUFFER_QUEUE table Jun 26, 2021
@liat-grozovik
Copy link
Collaborator

@neethajohn kindly reminder to review this PR

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1787 in repo Azure/sonic-swss

@keboliu
Copy link
Collaborator

keboliu commented Jul 12, 2021

/azpw run

1 similar comment
@stephenxs
Copy link
Collaborator Author

/azpw run

@liat-grozovik
Copy link
Collaborator

@abdosi kindly reminder. This is a bug fix that need to go into 201911

@qiluo-msft
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@neethajohn
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
@neethajohn neethajohn merged commit f77d393 into sonic-net:201911 Oct 26, 2021
neethajohn pushed a commit that referenced this pull request Oct 26, 2021
…1837)

Depends on #1787

What I did
To reclaim reserved buffer.
As the way to do it differs among vendors, the environment ASIC_VENDOR is passed to swss docker and will be loaded when buffermgrd starts. After that, buffermgrd will:

Handle port admin down on Mellanox platform.
Not apply lossless buffer PG to an admin-down port
Remove lossless buffer PG (3-4) from a port when it is shut down.
Readd lossless buffer PG (3-4) to a port when a port is started up.

Why I did it
To support reclaiming reserved buffer when a port is shut down on Mellanox platform.

How I verified it
Regression test and vs test.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs stephenxs deleted the 201911-handle-del branch October 26, 2021 23:46
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
What I did
Let's add swap memory setup support for sonic_installer command so it could run on devices with limited memory resources.

How I did it
Add the following new options to sonic_installer:
* --skip-setup-swap: if present, will skip setup swap memory.
* --swap-mem-size: this will change the swap memory size(the default swap size is 1024 MiB)
* --total-mem-threshold: if the system total memory is less than the value passed to --total-mem-threshold(default 2048 MiB), sonic_installer will setup swap memory.
* --available-mem-threshold: if the system available memory is less than the value passed to --available-mem-threshold(default 1200 MiB), sonic_installer will setup swap memory.
Add class MutuallyExclusiveOption to check the mutually-exclusive relationship between options.
Add class SWAPAllocator to support swap memory setup/remove functionalities.
NOTE: when sonic_installer tries to setup swap, if the system disk free space is less than 4096 MiB, sonic_installer will not setup swap memory.

How to verify it
Run sonic_installer over devices with limited memory
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