Skip to content

syncd: adding MLNX SAI support#4

Merged
stcheng merged 1 commit intosonic-net:masterfrom
stcheng:mlnx
Apr 13, 2016
Merged

syncd: adding MLNX SAI support#4
stcheng merged 1 commit intosonic-net:masterfrom
stcheng:mlnx

Conversation

@stcheng
Copy link
Copy Markdown
Contributor

@stcheng stcheng commented Apr 12, 2016

Adding MLNX SAI support in syncd.cpp

getResponse = new swss::ProducerTable(db, "GETRESPONSE");

#ifdef MLNXSAI
std::string mlnx_config_file = "/etc/ssw/ACS-MSN2700/sai_2700.xml";
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.

currently this can be hardcoded but at later stage this could be passed from cmdline

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.

Ack

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes. that's what i'm thinking about.
later we either parsing a config file or getting the info from cmd.
I'll also update the configure.ac file later.

@stcheng stcheng merged commit a46543a into sonic-net:master Apr 13, 2016
vasant17 pushed a commit to vasant17/sonic-sairedis that referenced this pull request Mar 26, 2020
JunhongMao added a commit to JunhongMao/sonic-sairedis that referenced this pull request Sep 1, 2023
•	Saidump for DNX-SAI sonic-net/sonic-buildimage#13561

Solution and modification:
To use the redis-db SAVE option to save the snapshot of DB each time and recover later, instead of looping through each entry in the table and saving it.

(1) Updated sonic-buildimage/build_debian.sh, to install Python library rdbtools into the host.
(2) Updated sonic-buildimage/src/sonic-sairedis/saidump/saidump.cpp, add a new option -r, which updates the rdbtools's output-JSON files' format.
(3) Add a new script file: files/scripts/saidump.sh, to do the below steps
  For each ASIC0, such as ASIC0,

  #1. Save the Redis data.
  sudo sonic-db-cli -n asic$1 SAVE > /dev/null

  #2. Move dump files to /var/run/redisX/
  docker exec database$1 sh -c "mv /var/lib/redis/dump.rdb /var/run/redis$1/"

  sonic-net#3. Run rdb command to convert the dump files into JSON files
  sudo python /usr/local/bin/rdb --command json  /var/run/redis$1/dump.rdb | sudo tee /var/run/redis$1/dump.json > /dev/null

  sonic-net#4. Run saidump -r to update the JSON files' format as same as the saidump before. Then we can get the saidump result in standard output.
  docker exec syncd$1 sh -c "saidump -r /var/run/redis$1/dump.json"

  sonic-net#5. clear
  sudo rm -f /var/run/redis$1/dump.rdb
  sudo rm -f /var/run/redis$1/dump.json

(4) Update sonic-buildimage/src/sonic-utilities/scripts/generate_dump, replace saidump with saidump.sh
tshalvi pushed a commit to tshalvi/sonic-sairedis that referenced this pull request Mar 11, 2025
…sonic-net#4)

```<br>* 6188358a - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-sairedis into 202412 (2025-02-08) [Sonic Automation]
* f35e743 - (origin/202411) [nvidia] Skip SAI discovery on ports (sonic-net#1524) (2025-02-07) [mssonicbld]
* bf049ed - Use sonictest pool instead of sonic-common and fix arm64 issue. (sonic-net#1516) (2025-02-05) [mssonicbld]
* ffe371d - [syncd] Support bulk set in INIT_VIEW mode (sonic-net#1517) (2025-02-05) [mssonicbld]<br>```
@AnantKishorSharma AnantKishorSharma mentioned this pull request Jan 9, 2026
Closed
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.

2 participants