You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/swss-schema.md
+52-9
Original file line number
Diff line number
Diff line change
@@ -9,22 +9,25 @@ Schema data is defined in ABNF [RFC5234](https://tools.ietf.org/html/rfc5234) sy
9
9
## Application DB schema
10
10
11
11
### 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.
13
13
14
14
;Defines layer 2 ports
15
15
;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
21
19
lanes = list of lanes ; (need format spec???)
22
-
ifname = 1*64VCHAR ; name of the port, must be unique
23
20
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
24
27
25
28
;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
28
31
29
32
Example:
30
33
127.0.0.1:6379> hgetall PORT_TABLE:ETHERNET4
@@ -630,6 +633,33 @@ Equivalent RedisDB entry:
630
633
631
634
## Configuration DB schema
632
635
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
+
633
663
### WARM\_RESTART
634
664
;Stores system warm start configuration
635
665
;Status: work in progress
@@ -669,6 +699,19 @@ Status: ready
669
699
670
700
## State DB schema
671
701
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
+
672
715
### WARM\_RESTART\_TABLE
673
716
;Stores application and orchdameon warm start status
0 commit comments