Skip to main content
Sign in
Snippets Groups Projects
Commit 1afa24e3 authored by Shubham Sharma's avatar Shubham Sharma
Browse files

Initial documents for qosmngr, with ubus and uci schema files and generated .md

 - Added shaping, policer and classification uci default parameters.
 - Added classification parameter under uci schema and docs
 - Corrected default values for classify parameters
 - Comments disposition, updated missing parameters in classify uci schema
parent b8d160b7
Branches
No related tags found
1 merge request!3Initial documents for qosmngr, with ubus and uci schema files and generated .md
QoS Manager QoS Manager
====
This program implements methods provided by the `qos` object on U-Bus. This is done by calling `libqos` provided by `easy-soc-libs`.
## UCI Config
qosmngr requires a configuration file provide objects over ubus. The configuration file is an uci file `/etc/config/qos`. Sample configuration file is provided below.
````bash
config queue 'q_0_eth1'
option enable '1'
option ifname 'eth1'
option precedence '0'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_1_eth1'
option enable '1'
option ifname 'eth1'
option precedence '1'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_2_eth1'
option enable '1'
option ifname 'eth1'
option precedence '2'
option scheduling 'SP'
option rate '0'
option weight '1'
option burst_size '0'
config queue 'q_3_eth1'
option enable '1'
option ifname 'eth1'
option precedence '3'
option scheduling 'SP'
option rate '0'
option weight '1'
option burst_size '0'
config queue 'q_4_eth1'
option enable '1'
option ifname 'eth1'
option precedence '4'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_5_eth1'
option enable '1'
option ifname 'eth1'
option precedence '5'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_6_eth1'
option enable '1'
option ifname 'eth1'
option precedence '6'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_7_eth1'
option enable '1'
option ifname 'eth1'
option precedence '7'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_0_eth2'
option enable '1'
option ifname 'eth2'
option precedence '0'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_1_eth2'
option enable '1'
option ifname 'eth2'
option precedence '1'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_2_eth2'
option enable '1'
option ifname 'eth2'
option precedence '2'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_3_eth2'
option enable '1'
option ifname 'eth2'
option precedence '3'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_4_eth2'
option enable '1'
option ifname 'eth2'
option precedence '4'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_5_eth2'
option enable '1'
option ifname 'eth2'
option precedence '5'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_6_eth2'
option enable '1'
option ifname 'eth2'
option precedence '6'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_7_eth2'
option enable '1'
option ifname 'eth2'
option precedence '7'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_0_eth3'
option enable '1'
option ifname 'eth3'
option precedence '0'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_1_eth3'
option enable '1'
option ifname 'eth3'
option precedence '1'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_2_eth3'
option enable '1'
option ifname 'eth3'
option precedence '2'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_3_eth3'
option enable '1'
option ifname 'eth3'
option precedence '3'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_4_eth3'
option enable '1'
option ifname 'eth3'
option precedence '4'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_5_eth3'
option enable '1'
option ifname 'eth3'
option precedence '5'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_6_eth3'
option enable '1'
option ifname 'eth3'
option precedence '6'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_7_eth3'
option enable '1'
option ifname 'eth3'
option precedence '7'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_0_eth4'
option enable '1'
option ifname 'eth4'
option precedence '0'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_1_eth4'
option enable '1'
option ifname 'eth4'
option precedence '1'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_2_eth4'
option enable '1'
option ifname 'eth4'
option precedence '2'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_3_eth4'
option enable '1'
option ifname 'eth4'
option precedence '3'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_4_eth4'
option enable '1'
option ifname 'eth4'
option precedence '4'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_5_eth4'
option enable '1'
option ifname 'eth4'
option precedence '5'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_6_eth4'
option enable '1'
option ifname 'eth4'
option precedence '6'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_7_eth4'
option enable '1'
option ifname 'eth4'
option precedence '7'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_0_eth0'
option enable '1'
option ifname 'eth0'
option precedence '0'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_1_eth0'
option enable '1'
option ifname 'eth0'
option precedence '1'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_2_eth0'
option enable '1'
option ifname 'eth0'
option precedence '2'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_3_eth0'
option enable '1'
option ifname 'eth0'
option precedence '3'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_4_eth0'
option enable '1'
option ifname 'eth0'
option precedence '4'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_5_eth0'
option enable '1'
option ifname 'eth0'
option precedence '5'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_6_eth0'
option enable '1'
option ifname 'eth0'
option precedence '6'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config queue 'q_7_eth0'
option enable '1'
option ifname 'eth0'
option precedence '7'
option scheduling 'SP'
option rate '0'
option burst_size '0'
option weight '1'
config classify 'cfg298143'
option enable '1'
option src_vendor_class_id '234be'
option src_user_class_id '234be'
option dst_vendor_class_id '234be'
option dst_user_class_id '234be'
option dst_client_id '34ab'
option src_client_id '34ab'
option vid_check '23'
option traffic_class '3'
option src_port '1'
option dest_port '1'
option src_port_range '-1'
option dest_port_range '-1'
option ifname 'eth0'
option policer 'cfg2b6c73'
option ethertype '0'
option dhcp_type '0'
option proto '1'
option ip_len_min '0'
option ip_len_max '0'
option dest_ip '1.2.3.4'
option src_ip '4.3.2.1'
option pcp_check '1'
option src_mac 'aa:bb:cc:dd:ee:ff'
option dst_mac 'e8:bc:c3:dc:23:f4'
option dscp_filter '1'
option dscp_mark '1'
config shaper
option enable '0'
option burst_size '0'
option rate '0'
option ifname 'eth0'
config policer
option enable '1'
option committed_rate '0'
option committed_burst_size '0'
option excess_burst_size '0'
option peak_rate '0'
option peak_burst_size '0'
option meter_type '0'
option name 'cfg2b6c73'
````
## Ubus API
`ubusd` has to be running all time, as it exposes the qos functionality over ubus. By default,qosmngr registers below namespace with ubus.
````bash
root@iopsys:~# ubus -v list | grep qos
'qos' @e1f3b458
root@iopsys:~#
````
````bash
root@iopsys:~# ubus -v list qos
'qos' @e1f3b458
"queue_stats":{"ifname":"String","qid":"String"}
"reload":{"section":"String"}
root@iopsys:~#
````
````bash
root@iopsys:~#
root@iopsys:~# ubus -S call qos reload
root@iopsys:~#
root@iopsys:~# ubus -S call qos reload '{"section":"classify"}'
root@iopsys:~#
root@iopsys:~# ubus -S call qos reload '{"section":"queues"}'
root@iopsys:~#
root@iopsys:~# ubus -S call qos reload '{"section":"policer"}'
root@iopsys:~#
root@iopsys:~# ubus -S call qos reload '{"section":"shaper"}'
root@iopsys:~#
````
# Function Specification
After ubus starts the qos methods can be invoked to get the queue information
```
root@iopsys:~# ubus call qos queue_stats '{"ifname":"eth0", "qid": 5}'
{
"queues": [
{
"qid": 5,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
}
]
}
```
For all available queue_stats the command can be used without parameters, such as
```
root@iopsys:~# ubus call qos queue_stats
{
"queues": [
{
"qid": 0,
"iface": "eth1",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 1,
"iface": "eth1",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 2,
"iface": "eth1",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 3,
"iface": "eth1",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 4,
"iface": "eth1",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 5,
"iface": "eth1",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 6,
"iface": "eth1",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 7,
"iface": "eth1",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 0,
"iface": "eth2",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 1,
"iface": "eth2",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 2,
"iface": "eth2",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 3,
"iface": "eth2",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 4,
"iface": "eth2",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 5,
"iface": "eth2",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 6,
"iface": "eth2",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 7,
"iface": "eth2",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 0,
"iface": "eth3",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 1,
"iface": "eth3",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 2,
"iface": "eth3",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 3,
"iface": "eth3",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 4,
"iface": "eth3",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 5,
"iface": "eth3",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 6,
"iface": "eth3",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 7,
"iface": "eth3",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 0,
"iface": "eth4",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 1,
"iface": "eth4",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 2,
"iface": "eth4",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 3,
"iface": "eth4",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 4,
"iface": "eth4",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 5,
"iface": "eth4",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 6,
"iface": "eth4",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 7,
"iface": "eth4",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 0,
"iface": "eth0",
"tx_packets": 624,
"tx_bytes": 165216,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 1,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 2,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 3,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 4,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 5,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 6,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 7,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
}
]
}
```
We can call ubus for specific port such as :
```
root@iopsys:~# ubus call qos queue_stats '{"ifname":"eth0"}'
{
"queues": [
{
"qid": 0,
"iface": "eth0",
"tx_packets": 543,
"tx_bytes": 143418,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 1,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 2,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 3,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 4,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 5,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 6,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
},
{
"qid": 7,
"iface": "eth0",
"tx_packets": 0,
"tx_bytes": 0,
"tx_dropped_packets": 0,
"tx_dropped_bytes": 0
}
]
}
```
# qos Schema
```
http://example.com/root.json
```
| Custom Properties | Additional Properties |
| ----------------- | --------------------- |
| Forbidden | Permitted |
# qos
| List of Methods |
| --------------------------- |
| [queue_stats](#queue_stats) | Method | qos (this schema) |
| [reload](#reload) | Method | qos (this schema) |
| `*` | any | Additional | Yes | this schema _allows_ additional properties |
## queue_stats
`queue_stats`
- type: `Method`
### queue_stats Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------ | -------- |
| `input` | object | Optional |
| `output` | object | Optional |
#### input
`input`
- is optional
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------- | ------------ |
| `ifname` | string | **Required** |
| `qid` | integer | Optional |
#### ifname
##### Interface
`ifname`
- is **required**
- type: reference
##### ifname Type
`string`
- minimum length: 1 characters
- maximum length: 16 characters
#### qid
`qid`
- is optional
- type: `integer`
##### qid Type
`integer`
- minimum value: `0`
### Ubus CLI Example
```
ubus call qos queue_stats {"ifname":"irure e","qid":73828543}
```
### JSONRPC Example
```json
{
"jsonrpc": "2.0",
"id": 0,
"method": "call",
"params": ["<SID>", "qos", "queue_stats", { "ifname": "irure e", "qid": 73828543 }]
}
```
#### output
`output`
- is optional
- type: `object`
##### output Type
`object` with following properties:
| Property | Type | Required |
| -------- | ----- | ------------ |
| `queues` | array | **Required** |
#### queues
`queues`
- is **required**
- type: `object[]`
##### queues Type
Array type: `object[]`
All items must be of the type: `object` with following properties:
| Property | Type | Required |
| -------------------- | ------- | ------------ |
| `iface` | string | **Required** |
| `qid` | integer | **Required** |
| `tx_bytes` | integer | **Required** |
| `tx_dropped_bytes` | integer | **Required** |
| `tx_dropped_packets` | integer | **Required** |
| `tx_packets` | integer | **Required** |
#### iface
##### Interface
`iface`
- is **required**
- type: reference
##### iface Type
`string`
- minimum length: 1 characters
- maximum length: 16 characters
#### qid
`qid`
- is **required**
- type: `integer`
##### qid Type
`integer`
- minimum value: `0`
#### tx_bytes
`tx_bytes`
- is **required**
- type: `integer`
##### tx_bytes Type
`integer`
- minimum value: `0`
#### tx_dropped_bytes
`tx_dropped_bytes`
- is **required**
- type: `integer`
##### tx_dropped_bytes Type
`integer`
- minimum value: `0`
#### tx_dropped_packets
`tx_dropped_packets`
- is **required**
- type: `integer`
##### tx_dropped_packets Type
`integer`
- minimum value: `0`
#### tx_packets
`tx_packets`
- is **required**
- type: `integer`
##### tx_packets Type
`integer`
- minimum value: `0`
### Output Example
```json
{
"queues": [
{
"qid": 57381086,
"iface": "magna",
"tx_packets": 90338294,
"tx_bytes": 40910869,
"tx_dropped_packets": 87652250,
"tx_dropped_bytes": 17334988
},
{
"qid": 87546130,
"iface": "eiusm",
"tx_packets": 76154668,
"tx_bytes": 74709969,
"tx_dropped_packets": 17965,
"tx_dropped_bytes": 40734824
},
{
"qid": 34430984,
"iface": "cupidatat ",
"tx_packets": 95305765,
"tx_bytes": 97035384,
"tx_dropped_packets": 40769776,
"tx_dropped_bytes": 44316439
},
{
"qid": 94131182,
"iface": "in ",
"tx_packets": 14061137,
"tx_bytes": 2161147,
"tx_dropped_packets": 4207125,
"tx_dropped_bytes": 5070078
}
]
}
```
## reload
`reload`
- type: `Method`
### reload Type
`object` with following properties:
| Property | Type | Required |
| -------- | ------ | -------- |
| `input` | object | Optional |
| `output` | object | Optional |
#### input
`input`
- is optional
- type: `object`
##### input Type
`object` with following properties:
| Property | Type | Required |
| --------- | ------ | ------------ |
| `section` | string | **Required** |
#### section
`section`
- is **required**
- type: `string`
##### section Type
`string`
- minimum length: 1 characters
- maximum length: 16 characters
### Ubus CLI Example
```
ubus call qos reload {"section":"aliquip repr"}
```
### JSONRPC Example
```json
{ "jsonrpc": "2.0", "id": 0, "method": "call", "params": ["<SID>", "qos", "reload", { "section": "aliquip repr" }] }
```
#### output
`output`
- is optional
- type: `object`
##### output Type
`object` with following properties:
| Property | Type | Required |
| -------- | ---- | -------- |
| None | None | None |
### Output Example
```json
{}
```
This diff is collapsed.
{
"definitions": {
"iface_t": {
"title": "Interface",
"type": "string",
"minLength": 1,
"maxLength": 16
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://example.com/root.json",
"type": "object",
"title": "qos",
"object": "qos",
"properties": {
"reload": {
"type": "object",
"properties": {
"input": {
"type": "object",
"required": [
"section"
],
"properties": {
"section": {
"type": "string",
"minLength": 1,
"maxLength": 16
}
}
},
"output": {
"type": "object",
"required": [],
"properties": {}
}
}
},
"queue_stats": {
"type": "object",
"properties": {
"input": {
"type": "object",
"required": [
"ifname"
],
"properties": {
"ifname": {
"$ref": "#/definitions/iface_t"
},
"qid": {
"type": "integer",
"minimum": 0
}
}
},
"output": {
"type": "object",
"required": [
"queues"
],
"properties": {
"queues": {
"type": "array",
"items": {
"type": "object",
"required": [
"qid",
"iface",
"tx_packets",
"tx_bytes",
"tx_dropped_packets",
"tx_dropped_bytes"
],
"properties": {
"qid": {
"type": "integer",
"minimum": 0
},
"iface": {
"$ref": "#/definitions/iface_t"
},
"tx_packets": {
"type": "integer",
"minimum": 0
},
"tx_bytes": {
"type": "integer",
"minimum": 0
},
"tx_dropped_packets": {
"type": "integer",
"minimum": 0
},
"tx_dropped_bytes": {
"type": "integer",
"minimum": 0
}
}
}
}
}
}
}
}
}
}
{
"qos":
[
{
"section": "classify",
"description": "QoS classification settings",
"multi": "true",
"options": [
{
"name": "enable",
"type": "boolean",
"required": "no",
"default": "false",
"description": "Classificaton criteria, Enables or disables this classifier."
},{
"name": "src_vendor_class_id",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, Used to identify one or more LAN devices, value of the DHCPv4 Vendor Class Identifier (Option 60) as defined in [RFC2132]."
},{
"name": "dest_vendor_class_id",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, Used to identify one or more LAN devices, value of the DHCPv4 Vendor Class Identifier (Option 60) as defined in [RFC2132]."
},{
"name": "src_user_class_id",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, string used to identify one or more LAN devices, value of the DHCP User Class Identifier. The DHCP User Class Identifier is Option 77 (as defined in [RFC3004]) for DHCPv4, or is Option 15 (as defined in [RFC3315]) for DHCPv6."
},{
"name": "dest_user_class_id",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, string used to identify one or more LAN devices, value of the DHCP User Class Identifier. The DHCP User Class Identifier is Option 77 (as defined in [RFC3004]) for DHCPv4, or is Option 15 (as defined in [RFC3315]) for DHCPv6."
},{
"name": "src_client_id",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, string used to identify one or more LAN devices, value of the DHCP Client Identifier. The DHCP Client Identifier is Option 61 (as defined in [RFC2132]) for DHCPv4, or is Option 1 (as defined in [RFC3315]) for DHCPv6."
},{
"name": "dest_client_id",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, string used to identify one or more LAN devices, value of the DHCP Client Identifier. The DHCP Client Identifier is Option 61 (as defined in [RFC2132]) for DHCPv4, or is Option 1 (as defined in [RFC3315]) for DHCPv6."
},{
"name": "vid_check",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classification criteria, Current Ethernet VLAN ID as defined in 802.1Q."
},{
"name": "traffic_class",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classification action, Identifier of the traffic class associated with traffic that falls in this classification."
},{
"name": "src_port",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classificaton criteria, Source port number."
},{
"name": "dest_port",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classificaton criteria, Destination port number."
},{
"name": "src_port_range",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classificaton criteria, Indicates that it is to include the port range from SourcePort through SourcePortRangeMax(inclusive)."
},{
"name": "dst_port_range",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classificaton criteria, Indicates that it is to include the port range from DestPort through DestPortRangeMax(inclusive)."
},{
"name": "ifname",
"type": "string",
"required": "no",
"default": 0,
"description": "Classification criteria, Linux interface name of the port associated with this shaper entry."
},{
"name": "policer",
"type": "string",
"required": "no",
"default": 0,
"description": "Classification criteria, Indicates the Policer entry for traffic that falls in this classification."
},{
"name": "ethertype",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classificaton criteria, Ethertype as indicated in either the Ethernet or SNAP Type header."
},{
"name": "dhcp_type",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classificaton criteria, The DHCP protocol associated with the Classification instance."
},{
"name": "proto",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classificaton criteria, Protocol number."
},{
"name": "src_ip",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, Source IP address."
},{
"name": "dest_ip",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, Destination IP address."
},{
"name": "ip_len_min",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, Minimum IP Packet Length (including header) in bytes."
},{
"name": "ip_len_max",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, Maximum IP Packet Length (including header) in bytes."
},{
"name": "pcp_check",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classificaton criteria, PCP check."
},{
"name": "dscp_filter",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classification criteria, DSCP value in the packet."
},{
"name": "dscp_mark",
"type": "integer",
"required": "no",
"default": 0,
"description": "Classification action, DSCP to mark traffic with that falls into this classification entry."
},{
"name": "src_mac",
"type": "string",
"required": "no",
"default": 0,
"description": "Classificaton criteria, Source MAC address."
},{
"name": "dest_mac",
"type": "string",
"required": "no",
"default": null,
"description": "Classificaton criteria, Destination MAC address."
}
]
},{
"section": "shaper",
"description": "Used to shape the egress traffic associated with the interface specified in ifname.",
"multi": "true",
"options": [
{
"name": "enable",
"type": "boolean",
"required": "no",
"default": "false",
"description": "Enables or disables this shaper."
},{
"name": "burst_size",
"type": "integer",
"required": "no",
"default": 0,
"description": "Burst size in bytes."
},{
"name": "rate",
"type": "integer",
"required": "no",
"default": 0,
"description": "Rate to shape the associated interface connection's egress traffic to."
},{
"name": "ifname",
"type": "string",
"required": "no",
"default": 0,
"description": "Linux interface name of the port associated with this shaper entry."
}
]
},{
"section": "policer",
"description": "QoS policy settings",
"multi": "true",
"options": [
{
"name": "enable",
"type": "boolean",
"required": "no",
"default": "false",
"description": "Enables or disables this policer."
},{
"name": "committed_rate",
"type": "integer",
"required": "no",
"default": 0,
"description": "Committed rate allowed for this policer in bits per second."
},{
"name": "committed_burst_size",
"type": "integer",
"required": "no",
"default": 0,
"description": "Committed Burstsize in bytes."
},{
"name": "excess_burst_size",
"type": "integer",
"required": "no",
"default": 0,
"description": "Excess Burstsize in bytes."
},{
"name": "peak_rate",
"type": "integer",
"required": "no",
"default": 0,
"description": "Peak rate allowed for this Meter in bits per second."
},{
"name": "peak_burst_size",
"type": "integer",
"required": "no",
"default": 0,
"description": "Peak Burstsize in bytes."
},{
"name": "meter_type",
"type": "integer",
"required": "no",
"default": 0,
"description": "The value MUST be a member of the list reported by the PossibleMeterTypes parameter."
},{
"name": "name",
"type": "string",
"required": "no",
"default": "cfg2b6c73",
"description": "Value is used to identify the policer instance, and associate it with a classification entry"
}
]
},
{
"section": "queue",
"description": "QoS queue is associated with a port.",
"multi": true,
"options":
[
{
"name": "enable",
"type": "boolean",
"required": "no",
"default": "false",
"description": "Enables or disables this queue."
},
{
"name": "ifname",
"type": "string",
"required": "no",
"default": null,
"description": "Specifies the port with which the specified queue exist."
},
{
"name": "precedence",
"type": "varies",
"required": "no",
"default": 0,
"description": "Precedence of this queue relative to others. Lower numbers imply greater precedence."
},
{
"name": "scheduling",
"type": "string",
"default": null,
"description": "Scheduling algorithm used for the queue."
},
{
"name": "rate",
"type": "integer",
"default": 0,
"description": "Rate to shape this queue's traffic to."
},
{
"name": "burst_size",
"default": -1,
"description": "Port shaping burst size in bytes. A value of -1 disables the threshold.",
"type": "integer"
},
{
"name": "weight",
"default": 1,
"description": "Specified the weight of the queue in case the WRR algorithm is used.",
"type": "integer"
}
]
}
]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment