-
Notifications
You must be signed in to change notification settings - Fork 554
Comparing changes
Open a pull request
base repository: opencomputeproject/SAI
base: master
head repository: opencomputeproject/SAI
compare: v1.11
- 16 commits
- 25 files changed
- 5 contributors
Commits on Nov 1, 2022
-
[Cherry pick][SAI-PTF]Two fix for sai-ptf infra (#1635)
* [SAI-PTF] Add decorator for skipping test on specified error (#1609) * [SAI-PTF] Add decorator for skipping test on specified error Add decorator method in the perl template for skipping test on specified error details: 1. add decorator method in sai_adapter_utils.tt 2. use decorator when set parameters ``skip_error`` 3. add parameters when building from template, like ``perl -Irpc gensairpc.pl --skip_error=-2,-3`` 4. remove the new added parameters, add more doc Test done: make rpc Signed-off-by: richardyu <[email protected]> * Update sai_fdb_test.py remove unnecessary test Signed-off-by: Richard.Yu <[email protected]> Signed-off-by: richardyu <[email protected]> Signed-off-by: Richard.Yu <[email protected]> Co-authored-by: richardyu <[email protected]> * [SAI-PTF] Enhance the function for getting counters in sai_adapter.py (#1626) * [SAI-PTF] Enhance the function for getting counters in sai_adapter.py Resolve issue #1614 For the auto-generated adapter, need to add a parameter for which counter_id/counter_ids we want, in order to compatiable with current code and reduce the modification, we can define a constant parameter as the list of counter_ids, and use this constant as the default. Before ``` def sai_thrift_get_bfd_session_stats(client, bfd_session_oid): counter_ids = [] counter_ids.append(SAI_BFD_SESSION_STAT_IN_PACKETS) counter_ids.append(SAI_BFD_SESSION_STAT_OUT_PACKETS) counter_ids.append(SAI_BFD_SESSION_STAT_DROP_PACKETS) counters = [0] * 3 global status status = SAI_STATUS_SUCCESS ``` After the refactor ``` sai_get_bfd_session_stats_counter_ids = [] sai_get_bfd_session_stats_counter_ids.append(SAI_BFD_SESSION_STAT_IN_PACKETS) sai_get_bfd_session_stats_counter_ids.append(SAI_BFD_SESSION_STAT_OUT_PACKETS) sai_get_bfd_session_stats_counter_ids.append(SAI_BFD_SESSION_STAT_DROP_PACKETS) def sai_thrift_get_bfd_session_stats(client, bfd_session_oid, counter_ids=sai_get_bfd_session_stats_counter_ids): counters = [0] * 3 global status status = SAI_STATUS_SUCCESS ``` Signed-off-by: richardyu-ms <[email protected]> * make some enhancement on the code, add dict which can get the enum name by id Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]> Co-authored-by: richardyu <[email protected]> Signed-off-by: richardyu <[email protected]> Signed-off-by: Richard.Yu <[email protected]> Signed-off-by: richardyu-ms <[email protected]> Co-authored-by: richardyu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c80a284 - Browse repository at this point
Copy the full SHA c80a284View commit details
Commits on Nov 2, 2022
-
[SAI-PTF] Add uninit API support in SAI-PTF and enhance the platform …
…helper (#1636) (#1638) Add uninit API support in SAI-PTF and enhance the platform helper - add interface for SAI-PTF to uninitalize the sai interface - use the uninitalize interface to triger the ASIC data dump > this change picked parts of the change in #1440, but without the warm reboot part. Test Done: Local Docker build for building the saiserver Local testing environment Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8eaa9c5 - Browse repository at this point
Copy the full SHA 8eaa9c5View commit details
Commits on Nov 10, 2022
-
fix a compile issue when build docker-syncd-brcm-dnx-rpc.gz (#1647)
Add dependence for ``experimental`` ``` /usr/include/sai/saiobject.h:40:10: fatal error: saiexperimentalbmtor.h: No such file or directory 40 | #include <saiexperimentalbmtor.h> | ^~~~~~~~~~~~~~~~~~~~~~~~ ``` Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]>Configuration menu - View commit details
-
Copy full SHA for bee5d7c - Browse repository at this point
Copy the full SHA bee5d7cView commit details
Commits on Nov 20, 2022
-
[SAI-PTF]Include sai expermential for generate the rpc headers (#1660) (
#1661) When generate the sai_adapter it depends on the files in sai expermental https://github.com/opencomputeproject/SAI/blob/master/meta/Makefile#L72 ``` CFLAGS += -I../inc -I../experimental $(WARNINGS) ``` In gensairpc https://github.com/opencomputeproject/SAI/blob/master/meta/gensairpc.pl#L132 ``` our $EXPERIMENTAL_DIR = catdir( $sai_dir, 'experimental' ); ``` But when generate the py headers for RPC service, it doesn't include that. In order to make them matched, then add that dependences. Test done: Local compile and checked the headers Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bb50de8 - Browse repository at this point
Copy the full SHA bb50de8View commit details -
[SAI-PTF] add invocation logger (#1651)
* add invocation logger Signed-off-by: richardyu-ms <[email protected]> * reformat code Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]> Co-authored-by: richardyu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 80ebb3f - Browse repository at this point
Copy the full SHA 80ebb3fView commit details -
[SAI-PTF]add conditional import for unit test (#1656)
* [SAI-PTF]add conditional import for unit test Signed-off-by: richardyu-ms <[email protected]> * [SAI-PTF]add conditional import for unit test Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e439a2f - Browse repository at this point
Copy the full SHA e439a2fView commit details
Commits on Dec 4, 2022
-
[SAI-PTF]Fix issue when transfer make parameter GEN_SAIRPC_OPTS (#1675)
Fix issue when transfer make param GEN_SAIRPC_OPTS with space in it when transfer GEN_SAIRPC_OPTS with multi parameters in it and use the space to split it, there is a issue for translate from build system to actual make system. ``` --adapter_logger --skip_error=-2 ``` add quota when transfer the parameter Test Done: Verified in local container Verified in build system Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5cf1ae4 - Browse repository at this point
Copy the full SHA 5cf1ae4View commit details
Commits on Dec 20, 2022
-
[SAI-PTF]Add return value in the SAI-PTF log (#1685)
Why In order to track the SAI-API result and add the return value for each SAI_thrift api. How In sai_adapter, use the invocation_logger, log the return value when sai_thrift API returned Test: Unit test and DUT test Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3d96a1d - Browse repository at this point
Copy the full SHA 3d96a1dView commit details
Commits on Dec 22, 2022
-
[SAI-PTF] API Logger - reformat dict in return value (#1690)
Why Base on some requirement, when logging the return value is a dict, need return the value for each key as a string. For example, returning this. ``` "[{ 'client': <sai_thrift.sai_rpc.Client object at 0x7fd9b46861d0>, 'port_oid': 4294967303, 'hw_lane_list': sai_thrift_object_list_t(count=100, idlist=[1,2,34]) }]" ``` it returned as (see the ' around the value too below) ``` "[{ 'client': '<sai_thrift.sai_rpc.Client object at 0x7fd9b46861d0>', 'port_oid': '4294967303', 'hw_lane_list': 'sai_thrift_object_list_t(count=100, idlist=[1,2,34])' }]" ``` How Convert the dict value to string Test: Unit test and DUT test Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]>Configuration menu - View commit details
-
Copy full SHA for 1390cee - Browse repository at this point
Copy the full SHA 1390ceeView commit details
Commits on Dec 23, 2022
-
[SAI-PTF] API Logger - reformat arg values (#1696)
Why Base on some requirement, when logging the arg values, need return the value for each key as a string. For example, returning this. ``` sai_adapter_invoke func:[sai_thrift_create_route_entry] args: [{'client': <sai_thrift.sai_rpc.Client object at 0x7f9e07154438>, 'route_entry': sai_thrift_route_entry_t(switch_id=None, vr_id=12884901888, destination=sai_thrift_ip_prefix_t(addr_family=1, addr=sai_thrift_ip_addr_t(ip4=None, ip6='0000:0000:0000:0000:0000:0000:0000:0000'), mask=sai_thrift_ip_addr_t(ip4=None, ip6='0000:0000:0000:0000:0000:0000:0000:0000'))), 'packet_action': 0}] ``` Turn into ``` sai_adapter_invoke func:[sai_thrift_create_route_entry] args: [{'client': '<sai_thrift.sai_rpc.Client object at 0x7f9e07154438>', 'route_entry': 'sai_thrift_route_entry_t(switch_id=None, vr_id=12884901888, destination=sai_thrift_ip_prefix_t(addr_family=1, addr=sai_thrift_ip_addr_t(ip4=None, ip6='0000:0000:0000:0000:0000:0000:0000:0000'), mask=sai_thrift_ip_addr_t(ip4=None, ip6='0000:0000:0000:0000:0000:0000:0000:0000')))', 'packet_action': '0'}] ``` How Convert the dict value to string Test: Unit test and DUT test Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]>Configuration menu - View commit details
-
Copy full SHA for aba7612 - Browse repository at this point
Copy the full SHA aba7612View commit details
Commits on Dec 24, 2022
-
[SAI-PTF] Skip test when hit expected error from sai api (#1699)
Why When hit the expected error like SAI_STATUS_NOT_SUPPORTED = -2, then skip the test. related to issue #1610 How Add conditional exeption handler when return from sai api invocation Test: Test on brcm platform on case sainexthop.tunnelVrfTest Signed-off-by: richardyu-ms <[email protected]> Signed-off-by: richardyu-ms <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0fd23d2 - Browse repository at this point
Copy the full SHA 0fd23d2View commit details
Commits on Dec 28, 2022
-
Enable github code scanning to replace LGTM. (#1709)
PR check will be enabled after this PR merged. Signed-off-by: shilongliu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4f11c7e - Browse repository at this point
Copy the full SHA 4f11c7eView commit details
Commits on Feb 7, 2023
-
improve enum values integration check (#1727) (#1737)
it allows to use two different 'experimental' dirs during integration check, one belongs to current repository and another to origin/master Signed-off-by: Anton Parkhomenko <[email protected]> Co-authored-by: aparkhomenko-xsight <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0031470 - Browse repository at this point
Copy the full SHA 0031470View commit details
Commits on Feb 8, 2023
-
[cherry-pick][202211]Enhance the check enum lock script (#1741) (#1742)
* Enhance the check enum lock script Why workaround fix for git --work-tree=temp/ checkout ... after checkout from other branch, data will be left in git then in when running command from sonic-buildimage/rules/sairedis.dep, it will report ``` sonic-buildimage/rules/sairedis.dep ``` How clean up the git env Verify run script * enhance --------- Signed-off-by: richardyu-ms <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7710e24 - Browse repository at this point
Copy the full SHA 7710e24View commit details
Commits on Feb 24, 2023
-
[cherry-pick][1.11][SAI-PTF] Convert generated enum code from ctypesg…
…en into pythoon enum class (#1762) why cherry-pick from #1758 When ctypesgen generated the python code for c++ enum, the python cannot be logged by it enum name, we need to change it to enum class. the code like ```C++ /** * @brief SAI common API type */ typedef enum _sai_common_api_t { SAI_COMMON_API_CREATE = 0, SAI_COMMON_API_REMOVE = 1, SAI_COMMON_API_SET = 2, SAI_COMMON_API_GET = 3, SAI_COMMON_API_BULK_CREATE = 4, SAI_COMMON_API_BULK_REMOVE = 5, SAI_COMMON_API_BULK_SET = 6, SAI_COMMON_API_BULK_GET = 7, SAI_COMMON_API_MAX = 8, } sai_common_api_t; ``` original converted by ctypesgen ``` enum__sai_common_api_t = c_int# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183 sai_common_api_t = enum__sai_common_api_t# /usr/include/sai/saitypes.h: 183 enum__sai_object_type_t = c_int# /usr/include/sai/saitypes.h: 294 ``` new code ``` class sai_common_api(SAIEnum): SAI_COMMON_API_CREATE = 0# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_REMOVE = 1# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_SET = 2# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_GET = 3# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_BULK_CREATE = 4# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_BULK_REMOVE = 5# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_BULK_SET = 6# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_BULK_GET = 7# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_MAX = 8# /usr/include/sai/saitypes.h: 183 SAI_COMMON_API_CREATE = sai_common_api.SAI_COMMON_API_CREATE SAI_COMMON_API_REMOVE = sai_common_api.SAI_COMMON_API_REMOVE SAI_COMMON_API_SET = sai_common_api.SAI_COMMON_API_SET SAI_COMMON_API_GET = sai_common_api.SAI_COMMON_API_GET SAI_COMMON_API_BULK_CREATE = sai_common_api.SAI_COMMON_API_BULK_CREATE SAI_COMMON_API_BULK_REMOVE = sai_common_api.SAI_COMMON_API_BULK_REMOVE SAI_COMMON_API_BULK_SET = sai_common_api.SAI_COMMON_API_BULK_SET SAI_COMMON_API_BULK_GET = sai_common_api.SAI_COMMON_API_BULK_GET SAI_COMMON_API_MAX = sai_common_api.SAI_COMMON_API_MAX ``` how Convert the python code after generated from ctypesgen verify pipeline local testing reformat code refactor code Signed-off-by: richardyu-ms <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e0f45ea - Browse repository at this point
Copy the full SHA e0f45eaView commit details
Commits on May 28, 2024
-
[meta] Ignore SAI_PORT_BREAKOUT_MODE_TYPE_MAX when checking enum (#2019)
Will fix build issue
Configuration menu - View commit details
-
Copy full SHA for dbb18ad - Browse repository at this point
Copy the full SHA dbb18adView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...v1.11