| [ci] fix test stages timeout issue by adding default config for kernel build (#1168) Signed-off-by: Yijing Yan <yijingyan@microsoft.com> | 7 months ago |
| Add .github/copilot-instructions.md for AI-assisted development (#1147) Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com> Co-authored-by: Rustiqly <rustiqly@users.noreply.github.com> | 8 months ago |
| Adding state table for TAM MOD (#1190) Signed-off-by: prashanth-nexthop <prashanth@nexthop.ai> | 5 months ago |
| unwrap cleanup in types.rs (#1122) why I did it unwrap() and expect function may crash at runtime. For the issues that may happen, we should catch the error and handle it gracefully instead of crashing. This PR focuses unwrap calls in types.rs How I did it Return error if it fails to convert c-type string to rust str. For the case of take-style functions, such as take_cstr, it will continue the operation and free the memory then return the error. This is to avoid memory leak. Ideally, the functions should act atomically. If it fails, it leaves input intact. However, it requires copy memory or scan twice, which is not efficient for some very rare error and the caller needs to free the memory anyway. | 10 months ago |
| Fix trixie compilation and add Trixie to PR pipeline (#1069) Fix a new compilation error on Trixie that popped up. Also, add a build for Trixie to the PR pipeline to prevent future errors. | 1 year ago |
| Fix goext ut for bookworm (#940) Why I did it #937 PR checker is blocked by goext build How I did it Remove go build, and keep go test to run unit test. How to verify it Pass all UT and E2E test cases. | 1 year ago |
| Fix python3 version detection in makefile. (#773) | 3 years ago |
| Adding zmqclient to swig file. (#1159) Signed-off-by: divyagayathri-hcl <divyagayathri.s@hcl.com> Co-authored-by: mint570 <runmingwu@google.com> | 7 months ago |
| Revert "[sonic-db-cli] Add flag to make cli calls to container databases (#1070)" and #1111 (#1123) Due to #1100 To unblock submodule move Revert 2 PRs: cf7c7f6 2025-12-01 | Fix issue where namespace would not be read (#1111) [Connor Roos] 4fea06e 2025-10-07 | [sonic-db-cli] Add flag to make cli calls to container databases (#1070) [Connor Roos] | 11 months ago |
| [EVPN-MH] Add L2 nexthop group table and raw netlink message handling support (#1155) Why I did it This PR adds infrastructure support in sonic-swss-common for EVPN Multi-Homing (EVPN-MH) feature. EVPN-MH requires: A new L2 nexthop group table to manage L2 nexthop groups in APPL_DB Raw netlink message handling capability to process EVPN-MH specific netlink attributes that cannot be fully parsed by libnl's generic object parsing Work item tracking Microsoft ADO (number only): How I did it Added new APPL_DB table: APP_L2_NEXTHOP_GROUP_TABLE_NAME for managing L2 nexthop groups Implemented raw netlink message handler infrastructure in NetDispatcher: Added registerRawMessageHandler() to register callbacks for raw netlink messages Added unregisterRawMessageHandler() to unregister raw message handlers Added onNetlinkMessageRaw() to handle raw netlink messages (as nlmsghdr*) Added onMsgRaw() virtual method in NetMsg class for derived classes to implement raw message processing Added m_rawhandlers map to store raw message handlers Modified message flow: When a netlink message is not handled by the regular (parsed) handlers, it falls back to raw message handlers This allows components to choose between: Parsed netlink messages (existing behavior via onMsg() with nl_object*) Raw netlink messages (new capability via onMsgRaw() with nlmsghdr*) How to verify it Build sonic-swss-common with these changes Verify that existing netlink message handling continues to work (backward compatibility) Test EVPN-MH feature components that register raw message handlers Verify L2_NEXTHOP_GROUP_TABLE can be accessed from APPL_DB Description for the changelog Add support for L2 nexthop group table and raw netlink message handling for EVPN-MH feature Link to config_db schema for YANG module changes N/A - This PR only adds APPL_DB table definition, no CONFIG_DB schema changes | 6 months ago |
| Set up CI with Azure Pipelines (#428) Signed-off-by: Guohan Lu <lguohan@gmail.com> | 5 years ago |
| [PINS] Add Bazel support for external projects (#557) Bazel build support allows swss-common to used in Bazel projects; this doesn’t change/impact the make-based build system Additionally, - Add Bazel test to CI - Update .gitignore Co-authored-by: Robert J. Halstead rhalstea@google.com Co-authored-by: Runming Wu runmingwu@google.com Co-authored-by: PINS Working Group <sonic-pins-subgroup@googlegroups.com> | 4 years ago |
| [Ci] Change the code coverage to exclude the tests folder (#790) | 3 years ago |
| Add .dirstamp and generated sonic-db-cli into .gitignore. (#774) | 3 years ago |
| Remove local googletest submodule and link with system gtest (#245) * Remove local googletest * Link with system gtest * Fix Makefile.am | 7 years ago |
| [NotificationProducer] add pipeline support (#708) Added a pipeline support for *NotificationProducer*. *NotificationProducer* created with *RedisPipeline* will buffer published notifications untill a *flush* is called on *RedisPipeline* or *RedisPipeline*'s command buffer is filled. The motivation for this change is to optimize redis usage when using *ResponsePublisher* from sonic-swss for a lot of entries. | 3 years ago |
| Add c-api/Rust wrappers for ConfigDBConnector and EventPublisher (#1062) This PR adds c-api/Rust wrappers for ConfigDBConnector and EventPublisher, so they will be available for Rust application development. Also add unit tests for c-api and Rust wrappers. | 1 year ago |
| doc: Adding documentations | 10 years ago |
| Update Maintainers (#695) | 4 years ago |
| Fix swss-common binskim errors (#817) Fix swss-common binskim errors. #### Work item tracking Microsoft ADO (number only): 25090081 #### Why I did it binskim scan report error BA3003, BA3004 and BA3011: BA3003: The stack protector was not found. This may be because '--stack-protector-strong' was not used, or because it was explicitly disabled by '-fno-stack-protectors'. BA3004: using debugging dwarf version '{1}'. The dwarf version 5 contains more information and should be used. To enable the debugging version 5 use '-gdwarf-5'. BA3011: The BIND_NOW flag is missing from this binary, so relocation sections will not be marked as read only after the binary is loaded. An attacker can overwrite these to redirect control flow. Ensure you are compiling with the compiler flags '-Wl,-z,now' to address this. #### How I did it Add compiler flag and ld flag according to following document: https://github.com/microsoft/binskim/blob/main/docs/BinSkimRules.md For BA3003, add '-fstack-protector-strong' to configure.ac, which will enable GCC strong stack protect feature. For BA3011, add LD flag '-Wl,-z,now' to every make file, this is because azure pipeline will overwrite global LD flag defined in config.ac for code coverage. For BA3004, add '-gdwarf-5' to makefile.am for debug build generate better debug information. #### How to verify it Pass all UT. Manually verify issue fixed with following steps: 1. clone latest code from https://github.com/microsoft/binskim/tree/main 2. build by run 'BuildAndTest.cmd' command 3. Open this PR build aritfact, download all x86 debs and extract file to local device. 4. Run scan with following command and confirm issue fixed: .\bld\bin\x64_Release\net6.0\BinSkim.exe analyze .\sonic-swss-common\usr\bin\* .\bld\bin\x64_Release\net6.0\BinSkim.exe analyze .\sonic-swss-common\usr\lib\* ### Description for the changelog Fix swss-common binskim errors. | 3 years ago |
| [doc]: Update README.md (#696) * Update sonic-swss-common build URLs * Update Azure URLs to sonic-net * Update CLA information | 4 years ago |
| Microsoft mandatory file (#620) Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> | 4 years ago |
| [PINS] Add Bazel support for external projects (#557) Bazel build support allows swss-common to used in Bazel projects; this doesn’t change/impact the make-based build system Additionally, - Add Bazel test to CI - Update .gitignore Co-authored-by: Robert J. Halstead rhalstea@google.com Co-authored-by: Runming Wu runmingwu@google.com Co-authored-by: PINS Working Group <sonic-pins-subgroup@googlegroups.com> | 4 years ago |
| automake: Setting strictness to foreign for Automake | 10 years ago |
| [ci] Update docker slave image referrence (#1141) * fix sonic slave name Signed-off-by: yijingyan2 <yijingyan@microsoft.com> | 10 months ago |
| Provide build flag to Disable compilation of libyang dependent interfaces (#853) libswsscommon depends on libyang deb. libyang is deprecated in bookworm. This wouldn't be a problem for buildimage because libyang is compiled from source in buildimage. However, this is causing a problem in upgrading one of our app-extensions to bookworm. This app-extension is built separately and not part of buildimage infra. Thus provide a build flag to disable compilation of libyang dependent interfaces such as DecoratorTable etc. Please note, there is no change in the default behavior vkarri@6c5cda5d64fa:/sonic/src/sonic-swss-common$ debuild -b -us -uc -Pnopython2,noyangmod vkarri@6c5cda5d64fa:/sonic/src$ sudo dpkg -i libswsscommon_1.0.0_amd64.deb vkarri@6c5cda5d64fa:/sonic/src$ sudo dpkg -i python3-swsscommon_1.0.0_amd64.deb vkarri@6c5cda5d64fa:/sonic/src$ python3 -c "from swsscommon.swsscommon import DecoratorSubscriberStateTable, DecoratorTable, YangDefaultDecorator" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: cannot import name 'DecoratorSubscriberStateTable' from 'swsscommon.swsscommon' (/usr/lib/python3/dist-packages/swsscommon/swsscommon.py) vkarri@6c5cda5d64fa:/sonic/src$ python3 -c "from swsscommon.swsscommon import DecoratorTable, YangDefaultDecorator" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: cannot import name 'DecoratorTable' from 'swsscommon.swsscommon' (/usr/lib/python3/dist-packages/swsscommon/swsscommon.py) vkarri@6c5cda5d64fa:/sonic/src$ python3 -c "from swsscommon.swsscommon import YangDefaultDecorator" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: cannot import name 'YangDefaultDecorator' from 'swsscommon.swsscommon' (/usr/lib/python3/dist-packages/swsscommon/swsscommon.py) vkarri@6c5cda5d64fa:/sonic/src$ python3 -c "from swsscommon.swsscommon import SubscriberStateTable, ProducerStateTable, Table, DBConnector" <Default Behavior> vkarri@6c5cda5d64fa:/sonic$ make -f slave.mk target/debs/bookworm/python3-swsscommon_1.0.0_amd64.deb-install vkarri@6c5cda5d64fa:/sonic$ python3 -c "from swsscommon.swsscommon import DecoratorSubscriberStateTable, DecoratorTable, YangDefaultDecorator" vkarri@6c5cda5d64fa:/sonic$ Signed-off-by: Vivek Reddy <vkarri@nvidia.com> | 2 years ago |
| [strict yang] Add YANG based cfg_schema.h to schema.h (#1074) Comparing to #1008, change to PYTHON3 for buster build failure. Improve the dynamic debian_version as an argument instead of static bookworm. Why I did it To enable YANG based CFG table generation, the ConfigDB related macro will be generated by YANG model How I did it Add gen_cfg_schema.py script to generate cfg_schema.h which will be included in schema.h Work item tracking Microsoft ADO: 31676863 How to verify it make deb build | 1 year ago |
| add swsscommon python library (#153) * add swsscommon python library | 8 years ago |