Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typos #1875

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions sourcecode.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@

### sonic-buildimage
- https://github.com/sonic-net/sonic-buildimage
- Main repo that contains SONiC code,links to all sub-repos, build related files, platform/device specific files, etc.,
This repo has the following directories.
- device - It contains files specific to each vendor device. In general, it contains the python scripts for accessing EEPROM, SFP, PSU, LED,etc., specific to the device hardware.
- dockers - This folder contains sub-folders for all dockers running in the SONiC. Each of those sub-folders contains files that explains about the processes that need to run inside that docker. List of dockers and the processes running inside each docker is given at the end of this document.
- files - Contain multiple sub-folders required for building and running SONiC services.
(a) Aboot, (b) apt - few default files related to for "apt-get" ,"apt-*" applications (c) build_templates - Contains the jinja2 template files to generate (as part of "build process") the systemd services files required for starting the various dockers. It also contains the file sonic_debian_extension.j2 is used in "build process"; it copies the required files and installs the required packages in the "/fsroot" which is built ass part of the SONiC image.
- Main repo that contains SONiC code, links to all sub-repos, build related files, platform/device specific files, etc.,
This repo has the following directories:
- device - It contains files specific to each vendor device. In general, it contains the Python scripts for accessing EEPROM, SFP, PSU, LED, etc., specific to the device hardware.
- dockers - This folder contains sub-folders for all dockers running in the SONiC. Each of those sub-folders contains files that explain the processes that need to run inside that docker. The list of dockers and the processes running inside each docker is given at the end of this document.
- files - Contain multiple sub-folders required for building and running SONiC services.
(a) Aboot, (b) apt - few default files related to "apt-get" and "apt-*" applications (c) build_templates - Contains the jinja2 template files to generate (as part of "build process") the systemd services files required for starting the various dockers. It also contains the file sonic_debian_extension.j2 is used in "build process"; it copies the required files and installs the required packages in the "/fsroot" which is built as part of the SONiC image.
(d) dhcp - Contains the config file for dhcp client & exit hook scripts, (e) docker - Contains the "docker" file (related to docker-engine) that is extracted from docker-ce 17.03.0\~ce-0\~debian-stretch to enable 'service docker start' in the build chroot env.
(f) image_config - Contains sub-folders like apt (non debian packages related info), bash (for bashrc), caclmgrd (control plane ACL manager daemon), cron.d (logrotate), ebtables (filter), environment (vtysh,banner), fstrim, hostcfgd (tacacs+ config handler), hostname (service to handle hostname config), interfaces (service to handle interface related config changes), logrotate, ntp (ntp service with conf file j2 file), platform (rc.local file), rsyslog (service for syslog & j2 file),snmp (snmp.yml file), sudoers (sudo users & permissions), systemd (journald.conf file), updategraph (script for getting minigraph and installing it), warmboot-finalizer (script used during warmreboot).
(g) initramfs-tools - Contains files related to ramfs, (h) scripts - contains scripts for arp_update (gratuitous ARP/ND), swss, syncd, etc., (i) sshd - SSH service and keygen script

- installer - contains scripts that are used by onie-mk-demo script that is called as part of build_image.sh
- rules - contains the "config" file where the build options can be modified, contains *.mk makefiles that contains the required marcros for building the image.
- platform - contains sub-folders for all platforms like "barefoot", "broadcom", "cavium", "centec", "marvell", "mellanox", "nephos", "p4", "vs" (virtual switch).
Each of those platform folder contains code specific to the hardware device from each vendors. It includes the required kernel drivers, platform sensors script for fetching data from hardware devices, etc.,
- sonic-slave, sonic-slave-stretch - Contains the main Dockerfile that lists the various debian packages that are required for various features.
Each of those platform folders contains code specific to the hardware device from each vendor. It includes the required kernel drivers, platform sensors script for fetching data from hardware devices, etc.,
- sonic-slave, sonic-slave-stretch - Contains the main Dockerfile that lists the various Debian packages that are required for various features.
- src - contains sub-folders for features like bash, gobgp, hiredis, initramfs-tools, iproute2, isc-dscp, ixgbe, libnl3, libteam,
libyang, lldpd, lm-sensors, mpdecimal, python-click, python3, radvd - Router advertisement for IPv6, redis, smartmontools,
snmpd, socat, sonic-config-engine, sonic-daemon-base, sonic-device-data, sonic-frr (routing software with patches), supervisor,
swig, tacacs, telemetry and thrift.
swig, tacacs, telemetry, and thrift.


## SAI, Switch State Service
Expand All @@ -36,7 +36,7 @@
- When swss container is started, start.sh starts the processes like rsyslogd, orchagent, restore_neighbors, portsyncd, neighsyncd, swssconfig, vrfmgrd, vlanmgrd, intfmgrd, portmgrd, buffermgrd, enable_counters, nbrmgrd, vxlanmgrd & arp_update.

SWWS repository contains the source code for the following.
- cfgmgr - This directory contains the code to build the following processes that run inside swss container. More details about each deamon is available in the [architecture document](https://github.com/sonic-net/SONiC/wiki/Architecture).
- cfgmgr - This directory contains the code to build the following processes that run inside swss container. More details about each daemon are available in the [architecture document](https://github.com/sonic-net/SONiC/wiki/Architecture).
- nbrmgrd - manager for neighbor management - Listens to neighbor-related changes in NEIGH_TABLE in ConfigDB for static ARP/ND configuration and also to trigger proactive ARP (for potential VxLan Server IP address by not specifying MAC) and then uses netlink to program the neighbors in linux kernel. nbrmgrd does not write anything in APP_DB.
- portmgrd - manager for Port management - Listens to port-related changes in ConfigDB and sets the MTU and/or AdminState in kernel using "ip" commands and also pushes the same to APP_DB.
- buffermgrd - manager for buffer management - Reads buffer profile config file and programs it in ConfigDB and then listens (at runtime) for cable length change and speed change in ConfigDB, and sets the same into buffer profile table ConfigDB.
Expand All @@ -46,10 +46,10 @@
- vrfmgrd - manager for VRF - Listens for VRF changes in ConfigDB and programs the same in linux and writes into APP_DB.

- fpmsyncd - this folder contains the code to build the "fpmsynd" process that runs in bgp container. This process runs a TCP server and listens for messages from Zebra for route changes (in the form of netlink messages) and it writes the routes to APP_DB. It also waits for clients to connect to it and then provides the route updates to those clients.
- neighsyncd - this folder contains the code to build the "neighsyncd" process. Listens for ARP/ND specific netlink messages from kernel for dynamically learnt ARP/ND and programs the same into APP_DB.
- portsyncd - this folder contains the code to build the "portsyncd" process. It first reads port list from configDB/ConfigFile and adds them to APP_DB. Once if the port init process is completed, this process receives netlink messages from linux and it programs the same in STATE_DB (state OK means port creation is successful in linux).
- neighsyncd - this folder contains the code to build the "neighsyncd" process. Listens for ARP/ND specific netlink messages from the kernel for dynamically learnt ARP/ND and programs the same into APP_DB.
- portsyncd - this folder contains the code to build the "portsyncd" process. It first reads the port list from configDB/ConfigFile and adds them to APP_DB. Once the port init process is completed, this process receives netlink messages from linux and it programs the same in STATE_DB (state OK means port creation is successful in Linux).
- swssconfig - this folder creates two executables, viz, swssconfig and swssplayer.
- "swssconfig" runs during boot time only. It restores FDB and ARP table during fast reboot. It takes the port config, copp config, IP in IP (tunnel) config and switch (switch table) config from the ConfigDB and loads them into APP_DB.
- "swssconfig" runs during boot time only. It restores FDB and ARP table during the fast reboot. It takes the port config, copp config, IP in IP (tunnel) config and switch (switch table) config from the ConfigDB and loads them into APP_DB.
- "swssplayer" - this records all the programming that happens via the SWSS which can be played back to simulate the sequence of events for debugging or simulating an issue.
- teamsyncd - allows the interaction between “teamd” and south-bound subsystems. It listens for messages from teamd software and writes the output into APP_DB.
- orchagent - The most critical component in the Swss subsystem. Orchagent contains logic to extract all the relevant state injected by *syncd daemons, process and massage this information accordingly, and finally push it towards its south-bound interface. This south-bound interface is yet again another database within the redis-engine (ASIC_DB), so as we can see, Orchagent operates both as a consumer (for example for state coming from APPL_DB), and also as a producer (for state being pushed into ASIC_DB).
Expand All @@ -61,16 +61,16 @@

### Opencomputeproject/SAI
- https://github.com/opencomputeproject/SAI (Switch Abstraction Interface standard headers)
- This repo refers/uses the SAI sub-repo from OCP github that includes the required SAI header files.
- This repo refers/uses the SAI sub-repo from OCP GitHub that includes the required SAI header files.

### sonic-sairedis
- https://github.com/sonic-net/sonic-sairedis
- This repo contains the C++ library code for interfacing to SAI objects in Redis
- The SAI Redis provides a SAI redis service that built on top of redis database.
- It contains two major components
- This repo contains the C++ library code for interfacing with SAI objects in Redis
- The SAI Redis provides a SAI Redis service that is built on top of the Redis database.
- It contains two major components:
- a SAI library that puts SAI objects into the ASIC_DB and
- a syncd process that takes the SAI objects and puts them into the ASIC.
- It also contains the sub-folders "saiplayer" (that records all the actions from orchagent that results in making the SAI API calls to ASIC), "saidump" ( tool to dump the ASIC contents)
- It also contains the sub-folders "saiplayer" (that records all the actions from orchagent that result in making the SAI API calls to ASIC), "saidump" (tool to dump the ASIC contents)
- Note that the SAI library for the specific platform is not part of this repo. The SAI library is built using the sonic-buildimage/platform/<platformname>/*sai.mk (slave.mk includes the platform/<platformname>/rules.mk that in turn includes the *sai.mk that installs the required SAI debians).


Expand All @@ -82,7 +82,7 @@

### sonic-py-swsssdk
- https://github.com/sonic-net/sonic-py-swsssdk
- This repo contains python utility library for SWSS DB access.
- This repo contains Python utility library for SWSS DB access.
- configdb.py - This provides utilities like ConfigDBConnector, db_connect, connect, subscribe, listen, set_entry, mod_entry, get_entry, get_keys, get_table, delete_table, mod_config, get_config, etc.,
- dbconnector.py - It contains utilities like SonicV1Connector, SonicV2Connector, etc.,
- exceptions.py - It contains utilities like SwssQueryError, UnavailableDataError, MissingClientError, etc.,
Expand All @@ -93,44 +93,44 @@

### sonic-quagga
- https://github.com/sonic-net/sonic-quagga/tree/debian/0.99.24.1
- This repo contains code for the Quagga routing software which is a free software that manages various IPv4 and IPv6 routing protocols. Currently Quagga supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, and RIPng as well as very early support for IS-IS.
- This repo contains code for the Quagga routing software which is a free software that manages various IPv4 and IPv6 routing protocols. Currently, Quagga supports BGP4, BGP4+, OSPFv2, OSPFv3, RIPv1, RIPv2, and RIPng as well as very early support for IS-IS.


## Monitoring and management tools

### sonic-mgmt
- https://github.com/sonic-net/sonic-mgmt
- Management and automation code used for build, test and deployment automation
- Management and automation code used for build, test, and deployment automation

### sonic-utilities
- https://github.com/sonic-net/sonic-utilities
- This repository contains the code for Command Line Interfaces for SONiC.
- Folders like "config", "show", "clear" contain the CLI commands
- Folders like "scripts", "sfputil", "psuutil" & "acl_loader" contain the scripts that are used by the CLI commands. These scripts are not supposed to be directly called by user. All these scripts are wrapped under the "config" and "show" commands.
- "connect" folder and "consutil" folder is used for scripts to connec to other SONiC devices and manage them from this device.
- crm folder contains the scripts for CRM configuration and show commands. These commands are not wrapped under "config" and "show" commands. i.e. users can use the "crm" commands directly.
- pfc folder contains script for configuring and showing the PFC parameters for the interface
- pfcwd folder contains the PFC watch dog related configuration and show commands.
- Folders like "config", "show", and "clear" contain the CLI commands
- Folders like "scripts", "sfputil", "psuutil" & "acl_loader" contain the scripts that are used by the CLI commands. These scripts are not supposed to be directly called by the user. All these scripts are wrapped under the "config" and "show" commands.
- "connect" folder and "consutil" folder are used for scripts to connect to other SONiC devices and manage them from this device.
- crm folder contains the scripts for CRM configuration and shows commands. These commands are not wrapped under "config" and "show" commands. i.e. users can use the "crm" commands directly.
- pfc folder contains scripts for configuring and showing the PFC parameters for the interface
- pfcwd folder contains the PFC watchdog-related configuration and shows commands.
- utilities-command folder contains the scripts that are internally used by other scripts.


### sonic-snmpagent
- https://github.com/sonic-net/sonic-snmpagent
- This repo contains the net-snmpd AgentX SNMP subagent implementation for supporting the MIBs like MIB-II, Physical Table MIB, Interfaces MIB, Sensor Table MIB, ipCidrRouteDest table in IP Forwarding Table MIB, dot1qTpFdbPort in Q-BRIDGE-MIB & LLDP MIB.
- The python scripts present in this repo are used as part of the "snmp" docker that runs in SONiC.
- The Python scripts present in this repo are used as part of the "snmp" docker that runs in SONiC.


## Switch hardware drivers

### sonic-linux-kernel
- https://github.com/sonic-net/sonic-linux-kernel
- This repo contains the Kernel patches for various device drivers.
- This downloads the appropriate debian kernel code, applies the patches and builds the custom kernel for SONiC.
- This downloads the appropriate Debian kernel code, applies the patches, and builds the custom kernel for SONiC.


### sonic-platform-common
- https://github.com/sonic-net/sonic-platform-common
- This repo contains code which is to be shared among all platforms for interfacing with platform-specific peripheral hardware.
- This repo contains code that is to be shared among all platforms for interfacing with platform-specific peripheral hardware.
- It contains the APIs for implementing platform-specific functionality in SONiC
- It provides the base class for peripherals like EEPROM, LED, PSU, SFP, chassis, device, fan, module, platform, watchdog, etc., that are used for existing platform code as well as for the new platform API.
- Platform specific code present in sonic-buildimage repo (device folder) uses the classes defined in this sonic-platform-common repository.
Expand All @@ -139,7 +139,7 @@
### sonic-platform-daemons
- https://github.com/sonic-net/sonic-platform-daemons
- This repo contains the daemons for controlling platform-specific functionality in SONiC
- This repo contains python scripts for platform daemons that listens for events from Optics, LED & PSU and writes them in the STATE_DB
- This repo contains Python scripts for platform daemons that listen for events from Optics, LED & PSU and write them in the STATE_DB
- xcvrd - This listens for SFP events and writes the status to STATE_DB.
- ledd - This listens for LED events and writes the status to STATE_DB.
- psud - This listens for PSU events and writes the status to STATE_DB.
Expand All @@ -156,7 +156,7 @@

## Dockers Information

Following are the dockers that are running in SONiC.
The following are the dockers that are running in SONiC:

1) telemetry - Runs processes like telemetry & dialout_client_cli
2) syncd - Runs processes like syncd & dsserve which is used to sync the application data into the ASIC.
Expand All @@ -165,7 +165,7 @@ Following are the dockers that are running in SONiC.
5) radv (router-advertise) - Runs the IPv6 router advertisement process
6) snmp - Runs the SNMP agent daemon
7) swss (orchagent) - Runs the orchagent, portsyncd, neighsyncd, vrfmgrd, vlanmgrd, intfmgrd, portmgrd, buffermgrd, nbrmgrd & vxlanmgrd.
8) pmon (platform-monitor) - Runs the platform daemons xvrd (listens for SFP events) & psud (listens for power supply related events).
8) pmon (platform-monitor) - Runs the platform daemons xvrd (listens for SFP events) & psud (listens for power supply-related events).
9) lldp - Runs the lldp process and lldpmgrd
10) bgp (fpm-frr) - Runs bgpcfgd, zebra, staticd, bgpd & fpmsyncd
11) database - Runs the REDIS server.