Skip to content

Change list match to prefix list for IPs#269

Merged
lguohan merged 1 commit intosonic-net:mainfrom
marian-pritsak:prefix_list
Nov 16, 2022
Merged

Change list match to prefix list for IPs#269
lguohan merged 1 commit intosonic-net:mainfrom
marian-pritsak:prefix_list

Conversation

@marian-pritsak
Copy link
Copy Markdown
Collaborator

Signed-off-by: Marian Pritsak marianp@mellanox.com

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
@marian-pritsak
Copy link
Copy Markdown
Collaborator Author

The SAI API change opencomputeproject/SAI#1630

return 'sai_u16_list_t', "u16list"
elif key_size == 32 and ('addr' in key_field or 'ip' in key_header):
return 'sai_ip_address_list_t', "ipaddrlist"
return 'sai_ip_prefix_list_t', "ipprefixlist"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Long-term, you might want to parse the P4Info to get a custom list-type annotation and pass that to this function as the preferred way to generate it, and only use this heuristic approach as a fallback.

Copy link
Copy Markdown
Collaborator

@chrispsommers chrispsommers left a comment

Choose a reason for hiding this comment

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

LGTM but see comment about long-term approach.

@lguohan lguohan merged commit f642775 into sonic-net:main Nov 16, 2022
chrispsommers added a commit that referenced this pull request Nov 22, 2022
* Refactor saichallenger-client to use a [puboished] base image for faster builds. Publish base image only. Build both of these images in bmv2-CI.

* Fix dockerfile tags.

* Build base image before building final image. Fix some comments.

* Replace use of chrissommers dockerhub registry with sonicdash.azurecr.io (some missed items in PR225). (#274)

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Change ACL list match to prefix list for IPs (#269)

The SAI API change opencomputeproject/SAI#1630

Signed-off-by: Marian Pritsak <marianp@mellanox.com>

* Add bmv2 libsai switch & port attributes (#281)

* Fix issue 235 - added more switch and port attributes to bmv2 libsai to satisfy initialization requirements for PTF and Pytest frameworks. Modified PTF tests to use correct base class which exploits these attributes. Removed one "chmod" command in Makefile which caused repeated "make all" to fail (discovered while implementing this fix).

* Restore chmod in makefile from prev. commit, CI breaks.

* Add pytest mark "switch" and add tests for switch and port attributes.

* Fixed spelling of setUp/tearDown. Removed redundant case.

* Changed assertions on switch attributes to check for "not None" instead of explicit values, which will allow for different results on various targets.

* Restored test assertions to !=0

* Changes per review feedback - make dummy object_id creation explicit, remove warnings due to type conversions, print our OIDs in Pytest for easier interpretation.

* Split DASH libsai fixed APIs from utils.cpp into separate file per review feedback. Minor refactoring of templates and code-generator to promote maintainability.

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Merge from main

* Fix DASH ACL implementation and add testcases (#265)

* Fixbug: SAI Server crash on DASH ACL API

1. Fix duplicate SAI ID
2. Wrong search action
3. Double delete entry if SAI write error
4. Wrong format of error message

Signed-off-by: Ze Gan <ganze718@gmail.com>

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Co-authored-by: Marian Pritsak <marianp@mellanox.com>
Co-authored-by: Ze Gan <ganze718@gmail.com>
vijasrin pushed a commit to vijasrin/DASH that referenced this pull request Dec 8, 2022
The SAI API change opencomputeproject/SAI#1630

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
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.

3 participants