This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/platform/vs
Stephen Sun fafd5327bd [Reclaim buffer] Common infrastructure update for reclaiming buffer ()
- Why I did it
This is to update the common sonic-buildimage infra for reclaiming buffer.

- How I did it
Render zero_profiles.j2 to zero_profiles.json for vendors that support reclaiming buffer
The zero profiles will be referenced in PR [Reclaim buffer] Reclaim unused buffers by applying zero buffer profiles  on Mellanox platforms and there will be test cases to verify the behavior there.
Rendering is done here for passing azure pipeline.
Load zero_profiles.json when the dynamic buffer manager starts
Generate inactive port list to reclaim buffer

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2021-12-01 02:28:46 +00:00
..
docker-gbsyncd-vs [202012][dockers][supervisor] Increase event buffer size for process exit listener; Set all event buffer sizes to 1024 () 2021-04-01 12:52:19 -07:00
docker-sonic-vs [Reclaim buffer] Common infrastructure update for reclaiming buffer () 2021-12-01 02:28:46 +00:00
docker-syncd-vs [202012][dockers][supervisor] Increase event buffer size for process exit listener; Set all event buffer sizes to 1024 () 2021-04-01 12:52:19 -07:00
sonic-version [build]: add branch and release name in sonic_version.yml 2021-08-07 18:04:28 -07:00
tests FRR 7.5 2020-12-29 03:44:49 -08:00
create_vnet.sh [vs]: dynamically create front panel ports in vs docker () 2020-04-30 12:50:59 -07:00
docker-gbsyncd-vs.dep Add gearbox phy device files and a new physyncd docker to support VS gearbox phy feature () 2020-09-25 08:32:44 -07:00
docker-gbsyncd-vs.mk Add gearbox phy device files and a new physyncd docker to support VS gearbox phy feature () 2020-09-25 08:32:44 -07:00
docker-ptf.dep [docker-ptf]: build docker ptf 2021-01-28 09:23:12 -08:00
docker-ptf.mk [docker-ptf]: build docker ptf 2021-01-28 09:23:12 -08:00
docker-sonic-vs.dep [build]: support for DPKG local caching () 2020-03-11 20:04:52 -07:00
docker-sonic-vs.mk [docker-sonic-vs] Install sonic-platform-common package () 2021-02-03 10:37:57 -08:00
docker-syncd-vs.dep [build]: support for DPKG local caching () 2020-03-11 20:04:52 -07:00
docker-syncd-vs.mk [docker-{sonic,syncd}-vs]: upgrade {sonic,syncd}-vs docker to stretch () 2019-05-06 07:19:36 -07:00
gbsyncd-vs.mk Add gearbox phy device files and a new physyncd docker to support VS gearbox phy feature () 2020-09-25 08:32:44 -07:00
kvm-image.dep [build]: support for DPKG local caching () 2020-03-11 20:04:52 -07:00
kvm-image.mk [build]: Move Systemd service start to systemd generator () 2019-07-29 15:52:15 -07:00
libsaithrift-dev.dep [docker-ptf]: build docker ptf 2021-01-28 09:23:12 -08:00
libsaithrift-dev.mk [build]: add _BUILD_ENV to specify env for dpkg-buildpackage 2021-01-28 09:23:36 -08:00
one-image.dep [build]: support for DPKG local caching () 2020-03-11 20:04:52 -07:00
one-image.mk [vsimage]: install systemd generator into one image 2020-04-17 04:51:51 +00:00
onie.dep [build]: support for DPKG local caching () 2020-03-11 20:04:52 -07:00
onie.mk [vs]: build sonic vs kvm image () 2018-11-20 22:32:40 -08:00
platform.conf [vs]: build sonic vs kvm image () 2018-11-20 22:32:40 -08:00
raw-image.dep [vsraw]: build sonic-vs.raw image 2020-04-17 04:51:51 +00:00
raw-image.mk [vsraw]: build sonic-vs.raw image 2020-04-17 04:51:51 +00:00
README.gns3.md [vsimage]: Support for the creation of a GNS3 appliance file () 2019-10-07 07:16:11 -07:00
README.vsdocker.md [vs]: dynamically create front panel ports in vs docker () 2020-04-30 12:50:59 -07:00
README.vsvm.md [baseimage]: support building multi-asic component () 2020-01-26 13:56:42 -08:00
rules.dep [docker-ptf]: build docker ptf 2021-01-28 09:23:12 -08:00
rules.mk [docker-ptf]: build docker ptf 2021-01-28 09:23:12 -08:00
sonic_multiasic.xml Multi-ASIC implementation () 2020-03-31 10:06:19 -07:00
sonic-gns3a.sh [kvmimae]: Update sonic-gns3a.sh () 2020-06-04 13:29:36 -07:00
sonic-version.dep [build]: support for DPKG local caching () 2020-03-11 20:04:52 -07:00
sonic-version.mk [vs]: build sonic vs kvm image () 2018-11-20 22:32:40 -08:00
sonic.xml [vs]: sync changes to disk and add e1000 driver to sonic vm () 2018-11-22 12:09:21 -08:00
syncd-vs.dep [build]: support for DPKG local caching () 2020-03-11 20:04:52 -07:00
syncd-vs.mk [docker-orchagent]: make build depends only on sairedis package () 2020-07-12 18:08:51 +00:00

HOWTO Use Virtual Switch (VM)

  1. Install libvirt, kvm, qemu
sudo apt-get install libvirt-clients qemu-kvm libvirt-bin
  1. Create SONiC VM for single ASIC HWSKU
$ sudo virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # 
virsh # create sonic.xml
Domain sonic created from sonic.xml

virsh # 
  1. Create SONiC VM for multi-ASIC HWSKU Update sonic_multiasic.xml with the external interfaces required for HWSKU.
$ sudo virsh
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh #
virsh # create sonic_multiasic.xml 
Domain sonic created from sonic.xml

virsh #

Once booted up, create a file "asic.conf" with the content:
NUM_ASIC=<Number of asics>
under /usr/share/sonic/device/x86_64-kvm_x86_64-r0/
Also, create a "topology.sh" file which will simulate the internal
asic connectivity of the hardware under
/usr/share/sonic/device/x86_64-kvm_x86_64-r0/<HWSKU>
The HWSKU directory will have the required files like port_config.ini
for each ASIC.

Having done this, a new service "topology.service" will be started
during bootup which will invoke topology.sh script.

3. Access virtual switch:

    1. Connect SONiC VM via console
    ```
    $ telnet 127.0.0.1 7000
    ```
    
    OR

    2. Connect SONiC VM via SSH
        
        1. Connect via console (see 3.1 above)

        2. Request a new DHCP address
        ```
        sudo dhclient -v
        ```
        
        3. Connect via SSH
        ```
        $ ssh -p 3040 admin@127.0.0.1
        ```