Skip to content

Commit e1fafd3

Browse files
Add support for PoE feature
Add target for poesyncd container Add poe_vs hwsku Add build flag to disable PoE feature (enabled by default). Add cleanup of PoE database during config reload. Signed-off-by: Serhiy Boiko <[email protected]> Change-Id: I2f2b8d7ed3285193b1d58b9fc666dcb8bf1bfcd9
1 parent 961cdc0 commit e1fafd3

32 files changed

+803
-1
lines changed

Makefile.work

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ SONIC_BUILD_INSTRUCTION := $(MAKE) \
540540
INCLUDE_DHCP_RELAY=$(INCLUDE_DHCP_RELAY) \
541541
INCLUDE_DHCP_SERVER=$(INCLUDE_DHCP_SERVER) \
542542
INCLUDE_MACSEC=$(INCLUDE_MACSEC) \
543+
INCLUDE_POE=$(INCLUDE_POE) \
543544
INCLUDE_ICCPD=$(INCLUDE_ICCPD) \
544545
SONIC_INCLUDE_RESTAPI=$(INCLUDE_RESTAPI) \
545546
SONIC_INCLUDE_MUX=$(INCLUDE_MUX) \

device/virtual/x86_64-kvm_x86_64-r0/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The format of default_sku is a single line:
1515
| ------ | ------ |
1616
| Force10-S6000 | Dell Force10 S6000|
1717
| brcm_gearbox_vs | Similar to Force10-S6000, but implements a virtual BRCM81724 Gearbox Phy |
18+
| poe_vs | Similar to Force10-S6000, but implements PoE |
1819

1920
## Allowable values for default_preset
2021

@@ -86,3 +87,22 @@ swss docker).
8687

8788
The commands "show gearbox interfaces status" and "show gearbox phys status" can be
8889
used to verify the virtual gearbox phy has been created. See https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md#gearbox for details.
90+
91+
## poe_vs
92+
93+
This sku simulates a device with PoE capabilites. To enable, set default_sku to:
94+
95+
96+
```
97+
poe_vs t1
98+
```
99+
100+
To build (same as Force-10-S6000):
101+
102+
```
103+
make init
104+
make configure PLATFORM=vs
105+
make target/sonic-vs.img.gz
106+
```
107+
108+
See https://github.com/sonic-net/sonic-utilities/blob/master/doc/Command-Reference.md#power-over-ethernet for details.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{%- set default_topo = 't1' %}
2+
{%- include 'buffers_config.j2' %}
3+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{%- set default_cable = '300m' %}
2+
3+
{%- macro generate_port_lists(PORT_ALL) %}
4+
{# Generate list of ports #}
5+
{% for port_idx in range(0,32) %}
6+
{% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
7+
{% endfor %}
8+
{%- endmacro %}
9+
10+
{%- macro generate_buffer_pool_and_profiles() %}
11+
"BUFFER_POOL": {
12+
"ingress_lossless_pool": {
13+
"size": "12766208",
14+
"type": "ingress",
15+
"mode": "dynamic"
16+
},
17+
"egress_lossless_pool": {
18+
"size": "12766208",
19+
"type": "egress",
20+
"mode": "static"
21+
},
22+
"egress_lossy_pool": {
23+
"size": "7326924",
24+
"type": "egress",
25+
"mode": "dynamic"
26+
}
27+
},
28+
"BUFFER_PROFILE": {
29+
"ingress_lossy_profile": {
30+
"pool":"ingress_lossless_pool",
31+
"size":"0",
32+
"dynamic_th":"3"
33+
},
34+
"egress_lossless_profile": {
35+
"pool":"egress_lossless_pool",
36+
"size":"0",
37+
"static_th":"12766208"
38+
},
39+
"egress_lossy_profile": {
40+
"pool":"egress_lossy_pool",
41+
"size":"1518",
42+
"dynamic_th":"3"
43+
}
44+
},
45+
{%- endmacro %}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{%- set default_cable = '300m' %}
2+
3+
{%- macro generate_port_lists(PORT_ALL) %}
4+
{# Generate list of ports #}
5+
{% for port_idx in range(0,32) %}
6+
{% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
7+
{% endfor %}
8+
{%- endmacro %}
9+
10+
{%- macro generate_buffer_pool_and_profiles() %}
11+
"BUFFER_POOL": {
12+
"ingress_lossless_pool": {
13+
"size": "12766208",
14+
"type": "ingress",
15+
"mode": "dynamic"
16+
},
17+
"egress_lossless_pool": {
18+
"size": "12766208",
19+
"type": "egress",
20+
"mode": "static"
21+
},
22+
"egress_lossy_pool": {
23+
"size": "7326924",
24+
"type": "egress",
25+
"mode": "dynamic"
26+
}
27+
},
28+
"BUFFER_PROFILE": {
29+
"ingress_lossy_profile": {
30+
"pool":"ingress_lossless_pool",
31+
"size":"0",
32+
"dynamic_th":"3"
33+
},
34+
"egress_lossless_profile": {
35+
"pool":"egress_lossless_pool",
36+
"size":"0",
37+
"static_th":"12766208"
38+
},
39+
"egress_lossy_profile": {
40+
"pool":"egress_lossy_pool",
41+
"size":"1518",
42+
"dynamic_th":"3"
43+
}
44+
},
45+
{%- endmacro %}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{%- set default_cable = '300m' %}
2+
3+
{%- macro generate_port_lists(PORT_ALL) %}
4+
{# Generate list of ports #}
5+
{% for port_idx in range(0,32) %}
6+
{% if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{% endif %}
7+
{% endfor %}
8+
{%- endmacro %}
9+
10+
{%- macro generate_buffer_pool_and_profiles() %}
11+
"BUFFER_POOL": {
12+
"ingress_lossless_pool": {
13+
"size": "12766208",
14+
"type": "ingress",
15+
"mode": "dynamic"
16+
},
17+
"egress_lossless_pool": {
18+
"size": "12766208",
19+
"type": "egress",
20+
"mode": "static"
21+
},
22+
"egress_lossy_pool": {
23+
"size": "7326924",
24+
"type": "egress",
25+
"mode": "dynamic"
26+
}
27+
},
28+
"BUFFER_PROFILE": {
29+
"ingress_lossy_profile": {
30+
"pool":"ingress_lossless_pool",
31+
"size":"0",
32+
"dynamic_th":"3"
33+
},
34+
"egress_lossless_profile": {
35+
"pool":"egress_lossless_pool",
36+
"size":"0",
37+
"static_th":"12766208"
38+
},
39+
"egress_lossy_profile": {
40+
"pool":"egress_lossy_pool",
41+
"size":"1518",
42+
"dynamic_th":"3"
43+
}
44+
},
45+
{%- endmacro %}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"CONTEXTS": [
3+
{
4+
"guid" : 0,
5+
"name" : "sw0",
6+
"dbAsic" : "ASIC_DB",
7+
"dbCounters" : "COUNTERS_DB",
8+
"dbFlex": "FLEX_COUNTER_DB",
9+
"dbState" : "STATE_DB",
10+
"zmq_enable": false,
11+
"zmq_endpoint": "tcp://127.0.0.1:5555",
12+
"zmq_ntf_endpoint": "tcp://127.0.0.1:5556",
13+
"switches": [
14+
{
15+
"index" : 0,
16+
"hwinfo" : ""
17+
}
18+
]
19+
},
20+
{
21+
"guid" : 1,
22+
"name" : "poe1",
23+
"dbAsic" : "POE_ASIC_DB",
24+
"dbCounters" : "POE_COUNTERS_DB",
25+
"dbFlex": "POE_FLEX_COUNTER_DB",
26+
"dbState" : "STATE_DB",
27+
"zmq_enable": false,
28+
"zmq_endpoint": "tcp://127.0.0.1:5575",
29+
"zmq_ntf_endpoint": "tcp://127.0.0.1:5576",
30+
"switches": [
31+
{
32+
"index" : 1,
33+
"hwinfo": ""
34+
}
35+
]
36+
}
37+
]
38+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SAI_VS_SWITCH_TYPE=SAI_VS_SWITCH_TYPE_POE
2+
SAI_VS_SAI_SWITCH_TYPE=SAI_SWITCH_TYPE_POE
3+
SAI_VS_HOSTIF_USE_TAP_DEVICE=false
4+
SAI_VS_USE_BCMSIM_LINK_MON=true
5+
SAI_VS_INTERFACE_LANE_MAP_FILE=/usr/share/sonic/hwsku/lanemap.ini

0 commit comments

Comments
 (0)