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

Update swss-schema.md #625

Merged
merged 3 commits into from
Sep 20, 2018
Merged
Changes from 2 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
58 changes: 53 additions & 5 deletions doc/swss-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,26 @@ Schema data is defined in ABNF [RFC5234](https://tools.ietf.org/html/rfc5234) sy
## Application DB schema

### PORT_TABLE
Stores information for physical switch ports managed by the switch chip. device_names are defined in [port_config.ini](../portsyncd/port_config.ini). Ports to the CPU (ie: management port) and logical ports (loopback) are not declared in the PORT_TABLE. See INTF_TABLE.
Stores information for physical switch ports managed by the switch chip. Ports to the CPU (ie: management port) and logical ports (loopback) are not declared in the PORT_TABLE. See INTF_TABLE.
qiluo-msft marked this conversation as resolved.
Show resolved Hide resolved

;Defines layer 2 ports
;In SONiC, Data is loaded from configuration file by portsyncd
;Status: Mandatory
port_table_key = PORT_TABLE:ifname ; ifname must be unique across PORT,INTF,VLAN,LAG TABLES
device_name = 1*64VCHAR ; must be unique across PORT,INTF,VLAN,LAG TABLES and must map to PORT_TABLE.name
admin_status = BIT ; is the port enabled (1) or disabled (0)
oper_status = BIT ; physical status up (1) or down (0) of the link attached to this port
lanes = list of lanes ; (need format spec???)
ifname = 1*64VCHAR ; name of the port, must be unique
mac = 12HEXDIG ;
alias = 1*64VCHAR ; alias name of the port used by LLDP and SNMP, must be unique
description = 1*64VCHAR ; port description
speed = 1*6DIGIT ; port line speed in Mbps
mtu = 1*4DIGIT ; port MTU
fec = 1*64VCHAR ; port fec mode
autoneg = BIT ; auto-negotiation mode

;QOS Mappings
map_dscp_to_tc = ref_hash_key_reference
map_tc_to_queue = ref_hash_key_reference
map_dscp_to_tc = ref_hash_key_reference
map_tc_to_queue = ref_hash_key_reference

Example:
127.0.0.1:6379> hgetall PORT_TABLE:ETHERNET4
Expand Down Expand Up @@ -630,6 +634,35 @@ Equivalent RedisDB entry:

## Configuration DB schema

### PORT_TABLE
Stores information for physical switch ports managed by the switch chip. Ports to the CPU (ie: management port) and logical ports (loopback) are not declared in the PORT_TABLE. See MGMT_PORT.

;Configuration for layer 2 ports
port_table_key = PORT|ifname ; ifname must be unique across PORT,INTF,VLAN,LAG TABLES
admin_status = BIT ; is the port enabled (1) or disabled (0)
qiluo-msft marked this conversation as resolved.
Show resolved Hide resolved
lanes = list of lanes ; (need format spec???)
ifname = 1*64VCHAR ; name of the port, must be unique
qiluo-msft marked this conversation as resolved.
Show resolved Hide resolved
mac = 12HEXDIG ;
alias = 1*64VCHAR ; alias name of the port used by LLDP and SNMP, must be unique
description = 1*64VCHAR ; port description
speed = 1*6DIGIT ; port line speed in Mbps
mtu = 1*4DIGIT ; port MTU
fec = 1*64VCHAR ; port fec mode
autoneg = BIT ; auto-negotiation mode

### MGMT_PORT_TABLE
;Configuration for management port, including at least one key
port_table_key = MGMT_PORT|ifname ; ifname must be unique across PORT,INTF,VLAN,LAG TABLES
admin_status = BIT ; is the port enabled (1) or disabled (0)
ifname = 1*64VCHAR ; name of the port, must be unique, eg. eth0
mac = 12HEXDIG ;
alias = 1*64VCHAR ; alias name of the port used by LLDP and SNMP, must be unique
description = 1*64VCHAR ; port description
speed = 1*6DIGIT ; port line speed in Mbps
mtu = 1*4DIGIT ; port MTU
fec = 1*64VCHAR ; port fec mode
autoneg = BIT ; auto-negotiation mode
qiluo-msft marked this conversation as resolved.
Show resolved Hide resolved

### WARM\_RESTART
;Stores system warm start configuration
;Status: work in progress
Expand Down Expand Up @@ -669,6 +702,21 @@ Status: ready

## State DB schema

### PORT_TABLE
Stores information for physical switch ports managed by the switch chip. Ports to the CPU (ie: management port) and logical ports (loopback) are not declared in the PORT_TABLE. See MGMT_PORT.

;State for layer 2 ports
port_table_key = PORT_TABLE|ifname ; ifname must be unique across PORT,INTF,VLAN,LAG TABLES
oper_status = BIT ; physical status up (1) or down (0) of the link attached to this port
qiluo-msft marked this conversation as resolved.
Show resolved Hide resolved
state = BIT ; netlink ready
qiluo-msft marked this conversation as resolved.
Show resolved Hide resolved
ifname = 1*64VCHAR ; name of the port, must be unique
qiluo-msft marked this conversation as resolved.
Show resolved Hide resolved

### MGMT_PORT_TABLE
;State for management port, including at least one key
port_table_key = MGMT_PORT_TABLE|ifname ; ifname must be unique across PORT,INTF,VLAN,LAG TABLES
oper_status = BIT ; physical status up (1) or down (0) of the link attached to this port
ifname = 1*64VCHAR ; name of the port, must be unique, eg. eth0

qiluo-msft marked this conversation as resolved.
Show resolved Hide resolved
### WARM\_RESTART\_TABLE
;Stores application and orchdameon warm start status
;Status: work in progress
Expand Down