Skip to content

Commit 744e74f

Browse files
[Nexthop] NH-5010 Platform Support (#24169)
* add device dir for nh-5010 * add sonic-platform-modules-nexthop support for nh-5010 * more nh-5010 device dir changes * remove eeprom utils change * additional nh platform support changes * macsec property and tap changes * Update adm1266 test to use pd-plugin.json from nh-5010 * use nh_powercycle for nh platforms * address review comments * update top level build files * remove spi module from pddf json * follow-up cleanup after resolving merge conflict * empty commit to retrigger checks --------- Co-authored-by: Louis Maliyam <[email protected]>
1 parent 71a368e commit 744e74f

File tree

142 files changed

+36693
-400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+36693
-400
lines changed

device/nexthop/x86_64-nexthop_4010-r0/pddf/pddf-device.json.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@
226226
"device_bdf": "{{cpu_card_fpga_bdf}}",
227227
"dev_attr": {}
228228
},
229+
"dev_attr": {
230+
"pwr_cycle_reg_offset": "0x8",
231+
"pwr_cycle_enable_word": "0xdeadbeef"
232+
},
229233
"i2c": {
230234
"dev_attr": {
231235
"virt_bus": "0x4",
@@ -1381,6 +1385,10 @@
13811385
"device_bdf": "{{switchcard_fpga_bdf}}",
13821386
"dev_attr": {}
13831387
},
1388+
"dev_attr": {
1389+
"pwr_cycle_reg_offset": "0x4",
1390+
"pwr_cycle_enable_word": "0xdeadbeef"
1391+
},
13841392
"i2c": {
13851393
"dev_attr": {
13861394
"virt_bus": "0x13",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{%- set default_topo = 't2' %}
2+
{%- include 'buffers_config.j2' %}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{%- set default_cable = '300m' %}
2+
3+
{%- include 'buffer_ports.j2' %}
4+
5+
{%- set ports2cable = {
6+
'torrouter_server' : '300m',
7+
'leafrouter_torrouter' : '300m',
8+
'spinerouter_leafrouter' : '2000m',
9+
'upperspinerouter_spinerouter' : '50m',
10+
'upperspinerouter_lowerspinerouter' : '50m',
11+
'regionalhub_upperspinerouter': '120000m',
12+
'aznghub_upperspinerouter' : '120000m',
13+
'regionalhub_spinerouter': '120000m',
14+
'aznghub_spinerouter' : '120000m'
15+
}
16+
-%}
17+
18+
{%- macro generate_qos_bypass_port_list(PORT_QOS_BYPASS) %}
19+
{# Generate list of ports #}
20+
{%- for port_idx in range(256, 261, 4) %}
21+
{%- if PORT_QOS_BYPASS.append("Ethernet%d" % (port_idx)) %}{%- endif %}
22+
{%- endfor %}
23+
{%- endmacro %}
24+
25+
{%- macro generate_buffer_pool_and_profiles() %}
26+
"BUFFER_POOL": {
27+
"ingress_lossless_pool": {
28+
"size": "56441610000",
29+
"type": "both",
30+
"mode": "dynamic",
31+
"xoff": "2822080500"
32+
}
33+
},
34+
"BUFFER_PROFILE": {
35+
"ingress_lossy_profile": {
36+
"pool":"ingress_lossless_pool",
37+
"size":"0",
38+
"xon_offset": "0",
39+
"dynamic_th":"0"
40+
},
41+
"egress_lossless_profile": {
42+
"pool":"ingress_lossless_pool",
43+
"size":"0",
44+
"dynamic_th":"-1"
45+
},
46+
"egress_lossy_profile": {
47+
"pool":"ingress_lossless_pool",
48+
"size":"0",
49+
"dynamic_th":"-4"
50+
}
51+
},
52+
{%- endmacro %}
53+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# PG lossless profiles.
2+
# speed cable size xon xoff threshold xon_offset
3+
25000 5m 18796 0 612140 0 3556
4+
25000 40m 18796 0 612140 0 3556
5+
25000 300m 18796 0 612140 0 3556
6+
100000 5m 18796 0 612140 0 3556
7+
100000 40m 18796 0 612140 0 3556
8+
100000 300m 18796 0 612140 0 3556
9+
200000 5m 18796 0 612140 0 3556
10+
200000 40m 18796 0 612140 0 3556
11+
200000 300m 18796 0 612140 0 3556
12+
400000 5m 18796 0 612140 0 3556
13+
400000 40m 18796 0 612140 0 3556
14+
400000 300m 18796 0 612140 0 3556
15+
800000 5m 18796 0 612140 0 3556
16+
800000 40m 18796 0 612140 0 3556
17+
800000 300m 18796 0 612140 0 3556
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{%- macro generate_global_dscp_to_tc_map() %}
2+
{# This is an empty macro since the global DSCP_TO_TC map is not required #}
3+
{%- endmacro %}
4+
5+
{%- macro generate_qos_bypass_port_list(PORT_QOS_BYPASS) %}
6+
{# Generate list of ports #}
7+
{%- for port_idx in range(256, 261, 4) %}
8+
{%- if PORT_QOS_BYPASS.append("Ethernet%d" % (port_idx)) %}{%- endif %}
9+
{%- endfor %}
10+
{%- endmacro %}
11+
12+
{%- include 'qos_config.j2' %}

device/nexthop/x86_64-nexthop_5010-r0/NH-5010-F-O32-C32/agera2.bcm

Lines changed: 801 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{%- macro generate_port_lists(PORT_ALL) %}
2+
{# Generate list of ports #}
3+
{%- for port_idx in range(128, 253, 4) %}
4+
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
5+
{%- endfor %}
6+
{%- endmacro %}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{%- set default_topo = 't2' %}
2+
{%- include 'buffers_config.j2' %}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{%- set default_cable = '300m' %}
2+
3+
{%- include 'buffer_ports.j2' %}
4+
5+
{%- macro generate_qos_bypass_port_list(PORT_QOS_BYPASS) %}
6+
{# Generate list of ports #}
7+
{%- for port_idx in range(256, 261, 4) %}
8+
{%- if PORT_QOS_BYPASS.append("Ethernet%d" % (port_idx)) %}{%- endif %}
9+
{%- endfor %}
10+
{%- endmacro %}
11+
12+
{%- macro generate_buffer_pool_and_profiles() %}
13+
"BUFFER_POOL": {
14+
"ingress_pool": {
15+
"size": "56441610000",
16+
"type": "both",
17+
"mode": "dynamic"
18+
}
19+
},
20+
"BUFFER_PROFILE": {
21+
"ingress_lossy_profile": {
22+
"pool":"ingress_pool",
23+
"size":"0",
24+
"dynamic_th":"3"
25+
},
26+
"egress_lossy_profile": {
27+
"pool":"ingress_pool",
28+
"size":"0",
29+
"dynamic_th":"3"
30+
}
31+
},
32+
{%- endmacro %}
33+
34+
{%- macro generate_pg_profils(port_names_active) %}
35+
"BUFFER_PG": {
36+
{% for port in port_names_active.split(',') %}
37+
"{{ port }}|0-7": {
38+
"profile" : "ingress_lossy_profile"
39+
}{% if not loop.last %},{% endif %}
40+
{% endfor %}
41+
},
42+
{%- endmacro %}
43+
44+
{% macro generate_queue_buffers(port_names_active) %}
45+
"BUFFER_QUEUE": {
46+
{% for port in port_names_active.split(',') %}
47+
"{{ port }}|0-7": {
48+
"profile" : "egress_lossy_profile"
49+
}{% if not loop.last %},{% endif %}
50+
{% endfor %}
51+
}
52+
{% endmacro %}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
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": "phy",
23+
"dbAsic": "GB_ASIC_DB",
24+
"dbCounters": "GB_COUNTERS_DB",
25+
"dbFlex": "GB_FLEX_COUNTER_DB",
26+
"dbState": "STATE_DB",
27+
"zmq_enable": false,
28+
"zmq_endpoint": "tcp://127.0.0.1:5565",
29+
"zmq_ntf_endpoint": "tcp://127.0.0.1:5566",
30+
"switches": [
31+
{
32+
"index": 9,
33+
"hwinfo": "9"
34+
},
35+
{
36+
"index": 8,
37+
"hwinfo": "8"
38+
},
39+
{
40+
"index": 10,
41+
"hwinfo": "10"
42+
},
43+
{
44+
"index": 11,
45+
"hwinfo": "11"
46+
},
47+
{
48+
"index": 12,
49+
"hwinfo": "12"
50+
},
51+
{
52+
"index": 13,
53+
"hwinfo": "13"
54+
},
55+
{
56+
"index": 14,
57+
"hwinfo": "14"
58+
},
59+
{
60+
"index": 15,
61+
"hwinfo": "15"
62+
},
63+
{
64+
"index": 0,
65+
"hwinfo": "0"
66+
},
67+
{
68+
"index": 1,
69+
"hwinfo": "1"
70+
},
71+
{
72+
"index": 2,
73+
"hwinfo": "2"
74+
},
75+
{
76+
"index": 3,
77+
"hwinfo": "3"
78+
},
79+
{
80+
"index": 4,
81+
"hwinfo": "4"
82+
},
83+
{
84+
"index": 5,
85+
"hwinfo": "5"
86+
},
87+
{
88+
"index": 6,
89+
"hwinfo": "6"
90+
},
91+
{
92+
"index": 7,
93+
"hwinfo": "7"
94+
}
95+
]
96+
}
97+
]
98+
}

0 commit comments

Comments
 (0)