Skip to content

Commit

Permalink
[cbf] Added initial CBF support (#2)
Browse files Browse the repository at this point in the history
* Added CbfOrch to handle DSCP_TO_FC and EXP_TO_FC tables
* Added UT for the new CbfOrch

Signed-off-by: Alexandru Banu <Alexandru.Banu@metaswitch.com>
  • Loading branch information
abanu-ms authored and TACappleman committed Oct 8, 2021
1 parent 78bece7 commit c12392b
Show file tree
Hide file tree
Showing 19 changed files with 3,031 additions and 664 deletions.
240 changes: 121 additions & 119 deletions doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,57 @@
Table of Contents
=================

* [Introduction](#introduction)
* [Configuration](#configuration)
* [<strong>Config Load and Save</strong>](#config-load-and-save)
* [Incremental Configuration](#incremental-configuration)
* [<strong>Redis and Json Schema</strong>](#redis-and-json-schema)
* [ACL and Mirroring](#acl-and-mirroring)
* [BGP Sessions](#bgp-sessions)
* [BUFFER_PG](#buffer_pg)
* [Buffer pool](#buffer-pool)
* [Buffer profile](#buffer-profile)
* [Buffer queue](#buffer-queue)
* [Cable length](#cable-length)
* [COPP_TABLE](#copp_table)
* [CRM](#crm)
* [Data Plane L3 Interfaces](#data-plane-l3-interfaces)
* [DEFAULT_LOSSLESS_BUFFER_PARAMETER](#DEFAULT_LOSSLESS_BUFFER_PARAMETER)
* [Device Metadata](#device-metadata)
* [Device neighbor metada](#device-neighbor-metada)
* [DSCP_TO_TC_MAP](#dscp_to_tc_map)
* [FLEX_COUNTER_TABLE](#flex_counter_table)
* [L2 Neighbors](#l2-neighbors)
* [Loopback Interface](#loopback-interface)
* [LOSSLESS_TRAFFIC_PATTERN](#LOSSLESS_TRAFFIC_PATTERN)
* [Management Interface](#management-interface)
* [Management port](#management-port)
* [Management VRF](#management-vrf)
* [MAP_PFC_PRIORITY_TO_QUEUE](#map_pfc_priority_to_queue)
* [NTP Global Configuration](#ntp-global-configuration)
* [NTP and SYSLOG servers](#ntp-and-syslog-servers)
* [Port](#port)
* [Port Channel](#port-channel)
* [Portchannel member](#portchannel-member)
* [Scheduler](#scheduler)
* [Port QoS Map](#port-qos-map)
* [Queue](#queue)
* [Tacplus Server](#tacplus-server)
* [TC to Priority group map](#tc-to-priority-group-map)
* [TC to Queue map](#tc-to-queue-map)
* [Versions](#versions)
* [VLAN](#vlan)
* [VLAN_MEMBER](#vlan_member)
* [Virtual router](#virtual-router)
* [WRED_PROFILE](#wred_profile)
* [For Developers](#for-developers)
* [Introduction](#introduction)
* [Configuration](#configuration)
* [<strong>Config Load and Save</strong>](#config-load-and-save)
* [Incremental Configuration](#incremental-configuration)
* [<strong>Redis and Json Schema</strong>](#redis-and-json-schema)
* [ACL and Mirroring](#acl-and-mirroring)
* [BGP Sessions](#bgp-sessions)
* [BUFFER_PG](#buffer_pg)
* [Buffer pool](#buffer-pool)
* [Buffer profile](#buffer-profile)
* [Buffer queue](#buffer-queue)
* [Cable length](#cable-length)
* [COPP_TABLE](#copp_table)
* [CRM](#crm)
* [Data Plane L3 Interfaces](#data-plane-l3-interfaces)
* [DEFAULT_LOSSLESS_BUFFER_PARAMETER](#DEFAULT_LOSSLESS_BUFFER_PARAMETER)
* [Device Metadata](#device-metadata)
* [Device neighbor metada](#device-neighbor-metada)
* [DSCP_TO_TC_MAP](#dscp_to_tc_map)
* [FLEX_COUNTER_TABLE](#flex_counter_table)
* [L2 Neighbors](#l2-neighbors)
* [Loopback Interface](#loopback-interface)
* [LOSSLESS_TRAFFIC_PATTERN](#LOSSLESS_TRAFFIC_PATTERN)
* [Management Interface](#management-interface)
* [Management port](#management-port)
* [Management VRF](#management-vrf)
* [MAP_PFC_PRIORITY_TO_QUEUE](#map_pfc_priority_to_queue)
* [NTP Global Configuration](#ntp-global-configuration)
* [NTP and SYSLOG servers](#ntp-and-syslog-servers)
* [Port](#port)
* [Port Channel](#port-channel)
* [Portchannel member](#portchannel-member)
* [Scheduler](#scheduler)
* [Port QoS Map](#port-qos-map)
* [Queue](#queue)
* [Tacplus Server](#tacplus-server)
* [TC to Priority group map](#tc-to-priority-group-map)
* [TC to Queue map](#tc-to-queue-map)
* [Versions](#versions)
* [VLAN](#vlan)
* [VLAN_MEMBER](#vlan_member)
* [Virtual router](#virtual-router)
* [WRED_PROFILE](#wred_profile)
* [For Developers](#for-developers)
* [Generating Application Config by Jinja2 Template](#generating-application-config-by-jinja2-template)
* [Incremental Configuration by Subscribing to ConfigDB](#incremental-configuration-by-subscribing-to-configdb)



# Introduction
This document lists the configuration commands schema applied in the SONiC eco system. All these commands find relevance in collecting system information, analysis and even for trouble shooting. All the commands are categorized under relevant topics with corresponding examples.
# Introduction
This document lists the configuration commands schema applied in the SONiC eco system. All these commands find relevance in collecting system information, analysis and even for trouble shooting. All the commands are categorized under relevant topics with corresponding examples.

# Configuration

Expand Down Expand Up @@ -91,7 +91,7 @@ However, this feature is not implemented by all applications yet. By Sep
is BGP (docker-fpm-quagga). For other applications, a manual restart is
required after configuration changes in ConfigDB.

# **Redis and Json Schema**
# **Redis and Json Schema**

ConfigDB uses a table-object schema that is similar with
[AppDB](https://github.com/Azure/sonic-swss/blob/4c56d23b9ff4940bdf576cf7c9e5aa77adcbbdcc/doc/swss-schema.md),
Expand Down Expand Up @@ -127,21 +127,21 @@ redis and json, correspondingly:
```
"BGP_NEIGHBOR": {
"10.0.0.57": {
"rrclient": "0",
"name": "ARISTA01T1",
"local_addr": "10.0.0.56",
"nhopself": "0",
"holdtime": "10",
"asn": "64600",
"rrclient": "0",
"name": "ARISTA01T1",
"local_addr": "10.0.0.56",
"nhopself": "0",
"holdtime": "10",
"asn": "64600",
"keepalive": "3"
},
},
"10.0.0.59": {
"rrclient": "0",
"name": "ARISTA02T1",
"local_addr": "10.0.0.58",
"nhopself": "0",
"holdtime": "10",
"asn": "64600",
"rrclient": "0",
"name": "ARISTA02T1",
"local_addr": "10.0.0.58",
"nhopself": "0",
"holdtime": "10",
"asn": "64600",
"keepalive": "3"
},
}
Expand Down Expand Up @@ -307,17 +307,17 @@ group name and IP ranges in **BGP_PEER_RANGE** table.
"asn": 64009,
"name": "ARISTA09T0"
},
"10.0.0.63": {
"rrclient": "0",
"name": "ARISTA04T1",
"local_addr": "10.0.0.62",
"nhopself": "0",
"holdtime": "10",
"asn": "64600",
"rrclient": "0",
"name": "ARISTA04T1",
"local_addr": "10.0.0.62",
"nhopself": "0",
"holdtime": "10",
"asn": "64600",
"keepalive": "3"
}
"BGP_PEER_RANGE": {
"BGPSLBPassive": {
"name": "BGPSLBPassive",
Expand Down Expand Up @@ -501,7 +501,7 @@ This kind of profiles will be handled by buffer manager and won't be applied to
}
}
}
```


Expand Down Expand Up @@ -542,7 +542,7 @@ This kind of profiles will be handled by buffer manager and won't be applied to
"queue": "0",
"red_action": "drop"
},
"trap.group.arp": {
"cbs": "600",
"cir": "600",
Expand All @@ -554,21 +554,21 @@ This kind of profiles will be handled by buffer manager and won't be applied to
"trap_ids": "arp_req,arp_resp,neigh_discovery",
"trap_priority": "4"
},
"trap.group.lldp.dhcp.udld": {
"queue": "4",
"trap_action": "trap",
"trap_ids": "lldp,dhcp,udld",
"trap_priority": "4"
},
"trap.group.bgp.lacp": {
"queue": "4",
"trap_action": "trap",
"trap_ids": "bgp,bgpv6,lacp",
"trap_priority": "4"
},
"trap.group.ip2me": {
"cbs": "600",
"cir": "600",
Expand Down Expand Up @@ -637,7 +637,7 @@ attributes.
"Ethernet8|10.0.0.4/31": {}
...
},
"PORTCHANNEL_INTERFACE": {
"PortChannel01|10.0.0.56/31": {},
"PortChannel01|FC00::71/126": {},
Expand Down Expand Up @@ -882,7 +882,7 @@ instead of data network.
}
}
}
```


Expand Down Expand Up @@ -943,12 +943,12 @@ This option **has no effect** if the mgmt vrf is not enabled.

***NTP Source Port***

This option sets the port which ntp will choose to send time update requests from by.
This option sets the port which ntp will choose to send time update requests from by.

NOTE: If a Loopback interface is defined on the switch ntp will choose this by default, so this setting
is **required** if the switch has a Loopback interface and the ntp peer does not have defined routes
for that address.

```
{
"NTP": {
Expand Down Expand Up @@ -1066,9 +1066,9 @@ name as object key and member list as attribute.
```
{
"PORTCHANNEL_MEMBER": {
"PortChannel0001|Ethernet50": {},
"PortChannel0002|Ethernet52": {},
"PortChannel0003|Ethernet54": {},
"PortChannel0001|Ethernet50": {},
"PortChannel0002|Ethernet52": {},
"PortChannel0003|Ethernet54": {},
"PortChannel0004|Ethernet56": {}
}
}
Expand Down Expand Up @@ -1104,28 +1104,30 @@ name as object key and member list as attribute.
{
"PORT_QOS_MAP": {
"Ethernet50,Ethernet52,Ethernet54,Ethernet56": {
"tc_to_pg_map": "AZURE",
"tc_to_queue_map": "AZURE",
"pfc_enable": "3,4",
"pfc_to_queue_map": "AZURE",
"tc_to_pg_map": "AZURE",
"tc_to_queue_map": "AZURE",
"pfc_enable": "3,4",
"pfc_to_queue_map": "AZURE",
"dscp_to_tc_map": "AZURE",
"dscp_to_fc_map": "AZURE",
"exp_to_fc_map": "AZURE",
"scheduler": "scheduler.port"
}
}
}
}
```

### Queue
```
{
"QUEUE": {
"Ethernet56|4": {
"wred_profile": "AZURE_LOSSLESS",
"wred_profile": "AZURE_LOSSLESS",
"scheduler": "scheduler.1"
},
},
"Ethernet56|5": {
"scheduler": "scheduler.0"
},
},
"Ethernet56|6": {
"scheduler": "scheduler.0"
}
Expand All @@ -1140,11 +1142,11 @@ name as object key and member list as attribute.
{
"TACPLUS_SERVER": {
"10.0.0.8": {
"priority": "1",
"priority": "1",
"tcp_port": "49"
},
},
"10.0.0.9": {
"priority": "1",
"priority": "1",
"tcp_port": "49"
}
}
Expand All @@ -1158,17 +1160,17 @@ name as object key and member list as attribute.
{
"TC_TO_PRIORITY_GROUP_MAP": {
"AZURE": {
"1": "1",
"0": "0",
"3": "3",
"2": "2",
"5": "5",
"4": "4",
"7": "7",
"1": "1",
"0": "0",
"3": "3",
"2": "2",
"5": "5",
"4": "4",
"7": "7",
"6": "6"
}
}
}
}
```

### TC to Queue map
Expand All @@ -1177,17 +1179,17 @@ name as object key and member list as attribute.
{
"TC_TO_QUEUE_MAP": {
"AZURE": {
"1": "1",
"0": "0",
"3": "3",
"2": "2",
"5": "5",
"4": "4",
"7": "7",
"1": "1",
"0": "0",
"3": "3",
"2": "2",
"5": "5",
"4": "4",
"7": "7",
"6": "6"
}
}
}
}
```

### Versions
Expand Down Expand Up @@ -1304,18 +1306,18 @@ The packet action could be:
{
"WRED_PROFILE": {
"AZURE_LOSSLESS": {
"red_max_threshold": "2097152",
"wred_green_enable": "true",
"ecn": "ecn_all",
"green_min_threshold": "1048576",
"red_min_threshold": "1048576",
"wred_yellow_enable": "true",
"yellow_min_threshold": "1048576",
"green_max_threshold": "2097152",
"green_drop_probability": "5",
"yellow_max_threshold": "2097152",
"wred_red_enable": "true",
"yellow_drop_probability": "5",
"red_max_threshold": "2097152",
"wred_green_enable": "true",
"ecn": "ecn_all",
"green_min_threshold": "1048576",
"red_min_threshold": "1048576",
"wred_yellow_enable": "true",
"yellow_min_threshold": "1048576",
"green_max_threshold": "2097152",
"green_drop_probability": "5",
"yellow_max_threshold": "2097152",
"wred_red_enable": "true",
"yellow_drop_probability": "5",
"red_drop_probability": "5"
}
}
Expand Down
Loading

0 comments on commit c12392b

Please sign in to comment.