sonic-net / SONiC

Landing page for Software for Open Networking in the Cloud (SONiC) - https://sonic-net.github.io/SONiC/
2.26k stars 1.13k forks source link

Query: bcmcmd with Broadcom ASIC #395

Open mdivyamohan opened 5 years ago

mdivyamohan commented 5 years ago

Could anyone explain how bcmcmd communicates with ASIC.

From command line, it looks bcmcmd connects to sswsyncd socket; and dsserve (parent of syncd) is listening on this socket.

        # USAGE: bcmcmd [-f <sun_path>] -v <cmd>
          -v                         verbose mode
          -f                         domain socket filename, default /var/run/sswsyncd/sswsyncd.socket
root@syncd:/# netstat -alpn | grep dsserv
unix  2      [ ACC ]     STREAM     LISTENING     267222   20/dsserve          /var/run/sswsyncd/sswsyncd.socket

So is dsserve directly communicating with ASIC? I'm trying to understand whether communication is like: bcmcmd <--> dsserve <--> SDK/ASIC or bcmcmd <--> dsserve <--> syncd <--> SDK/ASIC

lguohan commented 5 years ago

the second one is correct.

mdivyamohan commented 5 years ago

@lguohan Thanks for the response.

Could you please help me understand this flow: bcmcmd <--> dsserve <--> syncd <--> SDK/ASIC. I assume syncd <--> SDK/ASIC means syncd <--> SAI library <--> SDK/ASIC.

Does this mean the ASIC specific SAI library has to support a mechanism to run bcm shell commands? Are there generic SAI APIs for this purpose?

119064273 commented 2 years ago

@qiluo-msft @lguohan could you share dsserve and bcmcmd code ?

melodyforyou commented 10 months ago

@qiluo-msft @lguohan could you share dsserve and bcmcmd code ?

Have you received the source code? Can you share it?