Skip to content

Commit 945bed6

Browse files
authored
Update swss-schema.md (sonic-net#625)
1 parent 13df5a9 commit 945bed6

File tree

1 file changed

+52
-9
lines changed

1 file changed

+52
-9
lines changed

doc/swss-schema.md

+52-9
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,25 @@ Schema data is defined in ABNF [RFC5234](https://tools.ietf.org/html/rfc5234) sy
99
## Application DB schema
1010

1111
### PORT_TABLE
12-
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.
12+
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.
1313

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

2528
;QOS Mappings
26-
map_dscp_to_tc = ref_hash_key_reference
27-
map_tc_to_queue = ref_hash_key_reference
29+
map_dscp_to_tc = ref_hash_key_reference
30+
map_tc_to_queue = ref_hash_key_reference
2831

2932
Example:
3033
127.0.0.1:6379> hgetall PORT_TABLE:ETHERNET4
@@ -630,6 +633,33 @@ Equivalent RedisDB entry:
630633

631634
## Configuration DB schema
632635

636+
### PORT_TABLE
637+
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.
638+
639+
;Configuration for layer 2 ports
640+
key = PORT|ifname ; ifname must be unique across PORT,INTF,VLAN,LAG TABLES
641+
admin_status = "down" / "up" ; admin status
642+
lanes = list of lanes ; (need format spec???)
643+
mac = 12HEXDIG ;
644+
alias = 1*64VCHAR ; alias name of the port used by LLDP and SNMP, must be unique
645+
description = 1*64VCHAR ; port description
646+
speed = 1*6DIGIT ; port line speed in Mbps
647+
mtu = 1*4DIGIT ; port MTU
648+
fec = 1*64VCHAR ; port fec mode
649+
autoneg = BIT ; auto-negotiation mode
650+
651+
### MGMT_PORT_TABLE
652+
;Configuration for management port, including at least one key
653+
key = MGMT_PORT|ifname ; ifname must be unique across PORT,INTF,VLAN,LAG TABLES
654+
admin_status = "down" / "up" ; admin status
655+
mac = 12HEXDIG ;
656+
alias = 1*64VCHAR ; alias name of the port used by LLDP and SNMP, must be unique
657+
description = 1*64VCHAR ; port description
658+
speed = 1*6DIGIT ; port line speed in Mbps
659+
mtu = 1*4DIGIT ; port MTU
660+
fec = 1*64VCHAR ; port fec mode
661+
autoneg = BIT ; auto-negotiation mode
662+
633663
### WARM\_RESTART
634664
;Stores system warm start configuration
635665
;Status: work in progress
@@ -669,6 +699,19 @@ Status: ready
669699

670700
## State DB schema
671701

702+
### PORT_TABLE
703+
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.
704+
705+
;State for layer 2 ports
706+
key = PORT_TABLE|ifname ; ifname must be unique across PORT,INTF,VLAN,LAG TABLES
707+
oper_status = "down" / "up" ; oper status
708+
state = "" / "ok" ; port created successfully
709+
710+
### MGMT_PORT_TABLE
711+
;State for management port, including at least one key
712+
key = MGMT_PORT_TABLE|ifname ; ifname must be unique across PORT,INTF,VLAN,LAG TABLES
713+
oper_status = "down" / "up" ; oper status
714+
672715
### WARM\_RESTART\_TABLE
673716
;Stores application and orchdameon warm start status
674717
;Status: work in progress

0 commit comments

Comments
 (0)