[201911] [Innovium] Add new platforms and config updates (#7545)
Update Innovium configs + Add new platforms supporting Innovium chips
This commit is contained in:
parent
57e5077032
commit
fbd4e452c7
1
device/cameo/x86_64-cameo_esc600_128q-r0/default_sku
Normal file
1
device/cameo/x86_64-cameo_esc600_128q-r0/default_sku
Normal file
@ -0,0 +1 @@
|
||||
esc600-128q t1
|
@ -0,0 +1,137 @@
|
||||
{# Default values which will be used if no actual configura available #}
|
||||
{% set default_cable = '40m' %}
|
||||
|
||||
{# Port configuration to cable length look-up table #}
|
||||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
|
||||
{# Roles described in the minigraph #}
|
||||
{% set ports2cable = {
|
||||
'torrouter_server' : '5m',
|
||||
'leafrouter_torrouter' : '40m',
|
||||
'spinerouter_leafrouter' : '300m'
|
||||
}
|
||||
%}
|
||||
|
||||
{%- macro cable_length(port_name) %}
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
{%- set roles2 = neighbor_role + '_' + switch_role %}
|
||||
{%- set roles1 = roles1 | lower %}
|
||||
{%- set roles2 = roles2 | lower %}
|
||||
{%- if roles1 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
|
||||
{%- elif roles2 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else %}
|
||||
{%- if switch_role.lower() == 'torrouter' %}
|
||||
{%- for local_port in VLAN_MEMBER %}
|
||||
{%- if local_port[1] == port_name %}
|
||||
{%- set roles3 = switch_role + '_' + 'server' %}
|
||||
{%- set roles3 = roles3 | lower %}
|
||||
{%- if roles3 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- if DEVICE_METADATA is defined %}
|
||||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"CABLE_LENGTH": {
|
||||
"AZURE": {
|
||||
{% for port in PORT %}
|
||||
{% set cable = cable_length(port) -%}
|
||||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "47218432",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "17708800"
|
||||
},
|
||||
"lossy_pool": {
|
||||
"size": "18874368",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"xoff":"38816",
|
||||
"size":"1518",
|
||||
"dynamic_th":"1",
|
||||
"xon_offset":"13440"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"BUFFER_POOL": {
|
||||
"lossy_pool": {
|
||||
"size": "56985600",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|0-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
{# Default values which will be used if no actual configura available #}
|
||||
{% set default_cable = '40m' %}
|
||||
|
||||
{# Port configuration to cable length look-up table #}
|
||||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
|
||||
{# Roles described in the minigraph #}
|
||||
{% set ports2cable = {
|
||||
'torrouter_server' : '5m',
|
||||
'leafrouter_torrouter' : '40m',
|
||||
'spinerouter_leafrouter' : '300m'
|
||||
}
|
||||
%}
|
||||
|
||||
{%- macro cable_length(port_name) %}
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
{%- set roles2 = neighbor_role + '_' + switch_role %}
|
||||
{%- set roles1 = roles1 | lower %}
|
||||
{%- set roles2 = roles2 | lower %}
|
||||
{%- if roles1 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
|
||||
{%- elif roles2 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else %}
|
||||
{%- if switch_role.lower() == 'torrouter' %}
|
||||
{%- for local_port in VLAN_MEMBER %}
|
||||
{%- if local_port[1] == port_name %}
|
||||
{%- set roles3 = switch_role + '_' + 'server' %}
|
||||
{%- set roles3 = roles3 | lower %}
|
||||
{%- if roles3 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- if DEVICE_METADATA is defined %}
|
||||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"CABLE_LENGTH": {
|
||||
"AZURE": {
|
||||
{% for port in PORT %}
|
||||
{% set cable = cable_length(port) -%}
|
||||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "47218432",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "17708800"
|
||||
},
|
||||
"lossy_pool": {
|
||||
"size": "18874368",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"xoff":"38816",
|
||||
"size":"1518",
|
||||
"dynamic_th":"1",
|
||||
"xon_offset":"13440"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,59 @@
|
||||
sku: innovium.77700_A
|
||||
|
||||
device_id: 0x1b58
|
||||
|
||||
# Hardware constraint information
|
||||
hardware:
|
||||
num_ibs: 6
|
||||
|
||||
ports_per_ib: 32, 32, 32, 32, 20, 20
|
||||
recirc_port_num: 32, 32, 32, 32, 32, 32
|
||||
cpu_port_num: 33
|
||||
cpu_port_ib: 0
|
||||
mgmt_port_num: 33
|
||||
mgmt_port_ibs: 1,2
|
||||
|
||||
pics_per_ib: 6, 7, 6, 5, 5, 5
|
||||
pic_ports_per_pic: 8
|
||||
max_serdes_speed: 50
|
||||
|
||||
num_shared_pics: 2
|
||||
|
||||
isg [0-4]:
|
||||
ib: 0
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [5-9]:
|
||||
ib: 5
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [10-14]:
|
||||
ib: 1
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [16-20]:
|
||||
ib: 3
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [21-25]:
|
||||
ib: 4
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [26-30]:
|
||||
ib: 2
|
||||
pic_id: [0-4]
|
||||
|
||||
isg 15:
|
||||
mode: 8:0
|
||||
ib: 1
|
||||
pic_id: 5
|
||||
|
||||
isg 31:
|
||||
mode: 8:0
|
||||
ib: 0
|
||||
pic_id: 5
|
||||
|
||||
isg 32:
|
||||
mode: 1:1
|
||||
ib: 1, 2
|
||||
pic_id: 6
|
@ -0,0 +1,59 @@
|
||||
sku: innovium.77700_B
|
||||
|
||||
device_id: 0x1b58
|
||||
|
||||
# Hardware constraint information
|
||||
hardware:
|
||||
num_ibs: 6
|
||||
|
||||
ports_per_ib: 32, 32, 32, 32, 20, 20
|
||||
recirc_port_num: 32, 32, 32, 32, 32, 32
|
||||
cpu_port_num: 33
|
||||
cpu_port_ib: 0
|
||||
mgmt_port_num: 33
|
||||
mgmt_port_ibs: 1,2
|
||||
|
||||
pics_per_ib: 6, 7, 7, 6, 5, 5
|
||||
pic_ports_per_pic: 8
|
||||
max_serdes_speed: 50
|
||||
|
||||
num_shared_pics: 2
|
||||
|
||||
isg [0-4]:
|
||||
ib: 0
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [5-9]:
|
||||
ib: 5
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [10-14]:
|
||||
ib: 1
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [16-20]:
|
||||
ib: 3
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [21-25]:
|
||||
ib: 4
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [26-30]:
|
||||
ib: 2
|
||||
pic_id: [0-4]
|
||||
|
||||
isg 15:
|
||||
mode: 4:4
|
||||
ib: 1, 3
|
||||
pic_id: 5
|
||||
|
||||
isg 31:
|
||||
mode: 4:4
|
||||
ib: 0, 2
|
||||
pic_id: 5
|
||||
|
||||
isg 32:
|
||||
mode: 1:1
|
||||
ib: 1, 2
|
||||
pic_id: 6
|
@ -0,0 +1,9 @@
|
||||
IFCS_INIT_FILE : "/usr/share/sonic/hwsku/config_128x100G_Cameo-esc600-128q.yaml"
|
||||
IFCS_SKU_FILE : "/usr/share/sonic/hwsku/innovium.77700_B"
|
||||
IFCS_INNO_CLI_PORT : "9999"
|
||||
IFCS_TARGET : "device"
|
||||
INNOVIUM_DIR : "/innovium"
|
||||
PYTHONPATH : "$INNOVIUM_DIR:$INNOVIUM_DIR/cmds:$INNOVIUM_DIR/scripts:$INNOVIUM_DIR/test/:$INNOVIUM_DIR/test/utils:$INNOVIUM_DIR/utils:$INNOVIUM_DIR/pyctypes"
|
||||
IVM_SAI_DATAPATH_CONFIG_FILE: "/usr/share/sonic/hwsku/ivm.sai.datapath.config.yaml"
|
||||
NRZ_PORTS_SIG_DETECT_MODE_TL7 : "1"
|
||||
IVM_SAI_PARAM_A0008: "32"
|
@ -0,0 +1,9 @@
|
||||
ISAI_PARAM_P0_0_LS : "4608 4608 4608 4608 2880 2880"
|
||||
ISAI_PARAM_P0_1_LS : "2226 1946 1946 1890 1218 1218"
|
||||
ISAI_PARAM_P0_1_ALS : "434 154 154 98 98 98"
|
||||
ISAI_PARAM_P1_0_LS : "1536 1536 1536 1536 960 960"
|
||||
ISAI_PARAM_P1_0_LL : "3072 3072 3072 3072 1920 1920"
|
||||
ISAI_PARAM_P1_1_LS : "1778 1498 1498 1442 938 938"
|
||||
ISAI_PARAM_P1_1_LL : "2478 2478 2478 2478 2478 2478"
|
||||
ISAI_PARAM_P1_1_ALS : "434 154 154 98 98 98"
|
||||
ISAI_PARAM_P1_1_ALL : "126 126 126 126 126 126"
|
@ -0,0 +1,18 @@
|
||||
# PG lossless profiles.
|
||||
# speed cable size xon xoff threshold xon_offset
|
||||
25000 5m 1518 0 15680 1 13440
|
||||
50000 5m 1518 0 21248 1 13440
|
||||
100000 5m 1518 0 34624 1 13440
|
||||
400000 5m 1518 0 117536 1 13440
|
||||
25000 40m 1518 0 16928 1 13440
|
||||
50000 40m 1518 0 23392 1 13440
|
||||
100000 40m 1518 0 38816 1 13440
|
||||
400000 40m 1518 0 135520 1 13440
|
||||
25000 100m 1518 0 18848 1 13440
|
||||
50000 100m 1518 0 27264 1 13440
|
||||
100000 100m 1518 0 46496 1 13440
|
||||
400000 100m 1518 0 166688 1 13440
|
||||
25000 300m 1518 0 25184 1 13440
|
||||
50000 300m 1518 0 40128 1 13440
|
||||
100000 300m 1518 0 72384 1 13440
|
||||
400000 300m 1518 0 268640 1 13440
|
@ -0,0 +1,129 @@
|
||||
# name lanes alias speed index mtu fec
|
||||
Ethernet0 57,58 Eth1-1 100000 0 9126 rs
|
||||
Ethernet2 59,60 Eth1-2 100000 1 9126 rs
|
||||
Ethernet4 61,62 Eth1-3 100000 2 9126 rs
|
||||
Ethernet6 63,64 Eth1-4 100000 3 9126 rs
|
||||
Ethernet8 49,50 Eth1-5 100000 4 9126 rs
|
||||
Ethernet10 51,52 Eth1-6 100000 5 9126 rs
|
||||
Ethernet12 53,54 Eth1-7 100000 6 9126 rs
|
||||
Ethernet14 55,56 Eth1-8 100000 7 9126 rs
|
||||
Ethernet16 41,42 Eth1-9 100000 8 9126 rs
|
||||
Ethernet18 43,44 Eth1-10 100000 9 9126 rs
|
||||
Ethernet20 45,46 Eth1-11 100000 10 9126 rs
|
||||
Ethernet22 47,48 Eth1-12 100000 11 9126 rs
|
||||
Ethernet24 33,34 Eth1-13 100000 12 9126 rs
|
||||
Ethernet26 35,36 Eth1-14 100000 13 9126 rs
|
||||
Ethernet28 37,38 Eth1-15 100000 14 9126 rs
|
||||
Ethernet30 39,40 Eth1-16 100000 15 9126 rs
|
||||
Ethernet32 25,26 Eth2-1 100000 16 9126 rs
|
||||
Ethernet34 27,28 Eth2-2 100000 17 9126 rs
|
||||
Ethernet36 29,30 Eth2-3 100000 18 9126 rs
|
||||
Ethernet38 31,32 Eth2-4 100000 19 9126 rs
|
||||
Ethernet40 17,18 Eth2-5 100000 20 9126 rs
|
||||
Ethernet42 19,20 Eth2-6 100000 21 9126 rs
|
||||
Ethernet44 21,22 Eth2-7 100000 22 9126 rs
|
||||
Ethernet46 23,24 Eth2-8 100000 23 9126 rs
|
||||
Ethernet48 9,10 Eth2-9 100000 24 9126 rs
|
||||
Ethernet50 11,12 Eth2-10 100000 25 9126 rs
|
||||
Ethernet52 13,14 Eth2-11 100000 26 9126 rs
|
||||
Ethernet54 15,16 Eth2-12 100000 27 9126 rs
|
||||
Ethernet56 1,2 Eth2-13 100000 28 9126 rs
|
||||
Ethernet58 3,4 Eth2-14 100000 29 9126 rs
|
||||
Ethernet60 5,6 Eth2-15 100000 30 9126 rs
|
||||
Ethernet62 7,8 Eth2-16 100000 31 9126 rs
|
||||
Ethernet64 249,250 Eth3-1 100000 32 9126 rs
|
||||
Ethernet66 251,252 Eth3-2 100000 33 9126 rs
|
||||
Ethernet68 253,254 Eth3-3 100000 34 9126 rs
|
||||
Ethernet70 255,256 Eth3-4 100000 35 9126 rs
|
||||
Ethernet72 241,242 Eth3-5 100000 36 9126 rs
|
||||
Ethernet74 243,244 Eth3-6 100000 37 9126 rs
|
||||
Ethernet76 245,246 Eth3-7 100000 38 9126 rs
|
||||
Ethernet78 247,248 Eth3-8 100000 39 9126 rs
|
||||
Ethernet80 233,234 Eth3-9 100000 40 9126 rs
|
||||
Ethernet82 235,236 Eth3-10 100000 41 9126 rs
|
||||
Ethernet84 237,238 Eth3-11 100000 42 9126 rs
|
||||
Ethernet86 239,240 Eth3-12 100000 43 9126 rs
|
||||
Ethernet88 225,226 Eth3-13 100000 44 9126 rs
|
||||
Ethernet90 227,228 Eth3-14 100000 45 9126 rs
|
||||
Ethernet92 229,230 Eth3-15 100000 46 9126 rs
|
||||
Ethernet94 231,232 Eth3-16 100000 47 9126 rs
|
||||
Ethernet96 217,218 Eth4-1 100000 48 9126 rs
|
||||
Ethernet98 219,220 Eth4-2 100000 49 9126 rs
|
||||
Ethernet100 221,222 Eth4-3 100000 50 9126 rs
|
||||
Ethernet102 223,224 Eth4-4 100000 51 9126 rs
|
||||
Ethernet104 209,210 Eth4-5 100000 52 9126 rs
|
||||
Ethernet106 211,212 Eth4-6 100000 53 9126 rs
|
||||
Ethernet108 213,214 Eth4-7 100000 54 9126 rs
|
||||
Ethernet110 215,216 Eth4-8 100000 55 9126 rs
|
||||
Ethernet112 201,202 Eth4-9 100000 56 9126 rs
|
||||
Ethernet114 203,204 Eth4-10 100000 57 9126 rs
|
||||
Ethernet116 205,206 Eth4-11 100000 58 9126 rs
|
||||
Ethernet118 207,208 Eth4-12 100000 59 9126 rs
|
||||
Ethernet120 193,194 Eth4-13 100000 60 9126 rs
|
||||
Ethernet122 195,196 Eth4-14 100000 61 9126 rs
|
||||
Ethernet124 197,198 Eth4-15 100000 62 9126 rs
|
||||
Ethernet126 199,200 Eth4-16 100000 63 9126 rs
|
||||
Ethernet128 185,186 Eth5-1 100000 64 9126 rs
|
||||
Ethernet130 187,188 Eth5-2 100000 65 9126 rs
|
||||
Ethernet132 189,190 Eth5-3 100000 66 9126 rs
|
||||
Ethernet134 191,192 Eth5-4 100000 67 9126 rs
|
||||
Ethernet136 177,178 Eth5-5 100000 68 9126 rs
|
||||
Ethernet138 179,180 Eth5-6 100000 69 9126 rs
|
||||
Ethernet140 181,182 Eth5-7 100000 70 9126 rs
|
||||
Ethernet142 183,184 Eth5-8 100000 71 9126 rs
|
||||
Ethernet144 169,170 Eth5-9 100000 72 9126 rs
|
||||
Ethernet146 171,172 Eth5-10 100000 73 9126 rs
|
||||
Ethernet148 173,174 Eth5-11 100000 74 9126 rs
|
||||
Ethernet150 175,176 Eth5-12 100000 75 9126 rs
|
||||
Ethernet152 161,162 Eth5-13 100000 76 9126 rs
|
||||
Ethernet154 163,164 Eth5-14 100000 77 9126 rs
|
||||
Ethernet156 165,166 Eth5-15 100000 78 9126 rs
|
||||
Ethernet158 167,168 Eth5-16 100000 79 9126 rs
|
||||
Ethernet160 153,154 Eth6-1 100000 80 9126 rs
|
||||
Ethernet162 155,156 Eth6-2 100000 81 9126 rs
|
||||
Ethernet164 157,158 Eth6-3 100000 82 9126 rs
|
||||
Ethernet166 159,160 Eth6-4 100000 83 9126 rs
|
||||
Ethernet168 145,146 Eth6-5 100000 84 9126 rs
|
||||
Ethernet170 147,148 Eth6-6 100000 85 9126 rs
|
||||
Ethernet172 149,150 Eth6-7 100000 86 9126 rs
|
||||
Ethernet174 151,152 Eth6-8 100000 87 9126 rs
|
||||
Ethernet176 137,138 Eth6-9 100000 88 9126 rs
|
||||
Ethernet178 139,140 Eth6-10 100000 89 9126 rs
|
||||
Ethernet180 141,142 Eth6-11 100000 90 9126 rs
|
||||
Ethernet182 143,144 Eth6-12 100000 91 9126 rs
|
||||
Ethernet184 129,130 Eth6-13 100000 92 9126 rs
|
||||
Ethernet186 131,132 Eth6-14 100000 93 9126 rs
|
||||
Ethernet188 133,134 Eth6-15 100000 94 9126 rs
|
||||
Ethernet190 135,136 Eth6-16 100000 95 9126 rs
|
||||
Ethernet192 121,122 Eth7-1 100000 96 9126 rs
|
||||
Ethernet194 123,124 Eth7-2 100000 97 9126 rs
|
||||
Ethernet196 125,126 Eth7-3 100000 98 9126 rs
|
||||
Ethernet198 127,128 Eth7-4 100000 99 9126 rs
|
||||
Ethernet200 113,114 Eth7-5 100000 100 9126 rs
|
||||
Ethernet202 115,116 Eth7-6 100000 101 9126 rs
|
||||
Ethernet204 117,118 Eth7-7 100000 102 9126 rs
|
||||
Ethernet206 119,120 Eth7-8 100000 103 9126 rs
|
||||
Ethernet208 105,106 Eth7-9 100000 104 9126 rs
|
||||
Ethernet210 107,108 Eth7-10 100000 105 9126 rs
|
||||
Ethernet212 109,110 Eth7-11 100000 106 9126 rs
|
||||
Ethernet214 111,112 Eth7-12 100000 107 9126 rs
|
||||
Ethernet216 97,98 Eth7-13 100000 108 9126 rs
|
||||
Ethernet218 99,100 Eth7-14 100000 109 9126 rs
|
||||
Ethernet220 101,102 Eth7-15 100000 110 9126 rs
|
||||
Ethernet222 103,104 Eth7-16 100000 111 9126 rs
|
||||
Ethernet224 89,90 Eth8-1 100000 112 9126 rs
|
||||
Ethernet226 91,92 Eth8-2 100000 113 9126 rs
|
||||
Ethernet228 93,94 Eth8-3 100000 114 9126 rs
|
||||
Ethernet230 95,96 Eth8-4 100000 115 9126 rs
|
||||
Ethernet232 81,82 Eth8-5 100000 116 9126 rs
|
||||
Ethernet234 83,84 Eth8-6 100000 117 9126 rs
|
||||
Ethernet236 85,86 Eth8-7 100000 118 9126 rs
|
||||
Ethernet238 87,88 Eth8-8 100000 119 9126 rs
|
||||
Ethernet240 73,74 Eth8-9 100000 120 9126 rs
|
||||
Ethernet242 75,76 Eth8-10 100000 121 9126 rs
|
||||
Ethernet244 77,78 Eth8-11 100000 122 9126 rs
|
||||
Ethernet246 79,80 Eth8-12 100000 123 9126 rs
|
||||
Ethernet248 65,66 Eth8-13 100000 124 9126 rs
|
||||
Ethernet250 67,68 Eth8-14 100000 125 9126 rs
|
||||
Ethernet252 69,70 Eth8-15 100000 126 9126 rs
|
||||
Ethernet254 71,72 Eth8-16 100000 127 9126 rs
|
114
device/cameo/x86_64-cameo_esc600_128q-r0/esc600-128q/qos.json.j2
Normal file
114
device/cameo/x86_64-cameo_esc600_128q-r0/esc600-128q/qos.json.j2
Normal file
@ -0,0 +1,114 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSLESS" : {
|
||||
"red_min_threshold":"50000"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"0",
|
||||
"4":"0",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"0",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]"
|
||||
}
|
||||
},
|
||||
"SCHEDULER": {
|
||||
"scheduler.7": {
|
||||
"type": "STRICT"
|
||||
}
|
||||
},
|
||||
"QUEUE": {
|
||||
"{{ port_names }}|7": {
|
||||
"scheduler": "[SCHEDULER|scheduler.7]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSLESS" : {
|
||||
"red_min_threshold":"50000"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/ivm.sai.config.yaml
|
3
device/cameo/x86_64-cameo_esc600_128q-r0/installer.conf
Normal file
3
device/cameo/x86_64-cameo_esc600_128q-r0/installer.conf
Normal file
@ -0,0 +1,3 @@
|
||||
CONSOLE_PORT=0x3f8
|
||||
CONSOLE_DEV=0
|
||||
CONSOLE_SPEED=115200
|
18
device/cameo/x86_64-cameo_esc600_128q-r0/platform_reboot
Executable file
18
device/cameo/x86_64-cameo_esc600_128q-r0/platform_reboot
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
mr_reboot() {
|
||||
|
||||
#echo "mr_reboot"
|
||||
sudo rmmod x86-64-cameo-esc600-128q
|
||||
sudo i2cset -y 0 0x30 0xa1 0
|
||||
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ] || [ $@ = "-f" ] || [ $@ = "--force" ] || [ $@ = "reboot" ]; then
|
||||
mr_reboot
|
||||
elif [ $@ = "-p" ] ; then
|
||||
# echo "sudo halt"
|
||||
sudo halt
|
||||
else
|
||||
echo "unsupported option"
|
||||
fi
|
12
device/cameo/x86_64-cameo_esc600_128q-r0/plugins/eeprom.py
Executable file
12
device/cameo/x86_64-cameo_esc600_128q-r0/plugins/eeprom.py
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
from sonic_eeprom import eeprom_tlvinfo
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
||||
_TLV_INFO_MAX_LEN = 256
|
||||
def __init__(self, name, path, cpld_root, ro):
|
||||
self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom"
|
||||
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
102
device/cameo/x86_64-cameo_esc600_128q-r0/plugins/psuutil.py
Executable file
102
device/cameo/x86_64-cameo_esc600_128q-r0/plugins/psuutil.py
Executable file
@ -0,0 +1,102 @@
|
||||
#
|
||||
# psuutil.py
|
||||
# Platform-specific PSU status interface for SONiC
|
||||
#
|
||||
|
||||
|
||||
import os.path
|
||||
|
||||
try:
|
||||
from sonic_psu.psu_base import PsuBase
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
attr_path = '/sys/class/hwmon/hwmon2/device/'
|
||||
|
||||
class PsuUtil(PsuBase):
|
||||
"""Platform-specific PSUutil class"""
|
||||
|
||||
SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-10/10-0050",
|
||||
"/sys/bus/i2c/devices/i2c-9/9-0050"]
|
||||
|
||||
def __init__(self):
|
||||
PsuBase.__init__(self)
|
||||
|
||||
|
||||
# Get sysfs attribute
|
||||
def get_attr_value(self, path):
|
||||
|
||||
retval = 'ERR'
|
||||
if (not os.path.isfile(path)):
|
||||
return retval
|
||||
|
||||
try:
|
||||
with open(path, 'r') as fd:
|
||||
retval = fd.read()
|
||||
except Exception as error:
|
||||
logging.error("Unable to open ", path, " file !")
|
||||
|
||||
retval = retval.rstrip('\r\n')
|
||||
return retval
|
||||
|
||||
def get_num_psus(self):
|
||||
"""
|
||||
Retrieves the number of PSUs available on the device
|
||||
:return: An integer, the number of PSUs available on the device
|
||||
"""
|
||||
MAX_PSUS = 4
|
||||
return MAX_PSUS
|
||||
|
||||
def get_psu_status(self, index):
|
||||
"""
|
||||
Retrieves the oprational status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is operating properly, False if PSU is\
|
||||
faulty
|
||||
"""
|
||||
status = 0
|
||||
attr_file = 'psu_status'
|
||||
status_path = attr_path+'/ESC600_PSU/' + attr_file
|
||||
try:
|
||||
reg_file = open(status_path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text_lines = reg_file.read()
|
||||
|
||||
search_str = "PSU {} is power good".format(index)
|
||||
|
||||
if search_str in text_lines:
|
||||
status = 1
|
||||
|
||||
reg_file.close()
|
||||
|
||||
return status
|
||||
|
||||
def get_psu_presence(self, index):
|
||||
"""
|
||||
Retrieves the presence status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is plugged, False if not
|
||||
"""
|
||||
status = 0
|
||||
attr_file ='psu_present'
|
||||
presence_path = attr_path+'ESC600_PSU/' + attr_file
|
||||
try:
|
||||
reg_file = open(presence_path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text_lines = reg_file.read()
|
||||
|
||||
search_str = "PSU {} is present".format(index)
|
||||
|
||||
if search_str in text_lines:
|
||||
status = 1
|
||||
|
||||
reg_file.close()
|
||||
|
||||
return status
|
||||
|
232
device/cameo/x86_64-cameo_esc600_128q-r0/plugins/sfputil.py
Executable file
232
device/cameo/x86_64-cameo_esc600_128q-r0/plugins/sfputil.py
Executable file
@ -0,0 +1,232 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
import os
|
||||
import time
|
||||
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
attr_path = '/sys/class/hwmon/hwmon2/device/'
|
||||
qsfp_sysfile_path = '/sys/bus/i2c/devices/{}-0032/'
|
||||
i2c_bus_base = 0
|
||||
|
||||
class SfpUtil(SfpUtilBase):
|
||||
"""Platform specific SfpUtill class"""
|
||||
|
||||
_port_start = 0
|
||||
_port_end = 127
|
||||
_port_in_block = 128
|
||||
_port_to_eeprom_mapping = {}
|
||||
_global_port_pres_dict = {}
|
||||
_port_position_mapping = []
|
||||
|
||||
def __init__(self):
|
||||
self.create_port_position_mapping()
|
||||
eeprom_path = "/sys/bus/i2c/devices/{0}-0050/eeprom"
|
||||
for x in range(self._port_start, self._port_end + 1):
|
||||
port_eeprom_path = eeprom_path.format(self._port_position_mapping[x][2])
|
||||
self._port_to_eeprom_mapping[x] = port_eeprom_path
|
||||
|
||||
self.init_global_port_presence()
|
||||
SfpUtilBase.__init__(self)
|
||||
|
||||
def get_attr_value(self,attr_path):
|
||||
retval = 'ERR'
|
||||
try:
|
||||
with open(attr_path, 'r') as fd:
|
||||
retval = fd.read()
|
||||
except Exception as error:
|
||||
print("Unable to open ", attr_path, " file !")
|
||||
return retval
|
||||
|
||||
retval = retval.rstrip('\r\n')
|
||||
fd.close()
|
||||
return retval
|
||||
|
||||
def bmc_is_exist(self):
|
||||
value = ''
|
||||
bmc_filePath = '/sys/class/hwmon/hwmon2/device/ESC600_SYS/bmc_present'
|
||||
if os.path.exists(bmc_filePath):
|
||||
value = self.get_attr_value(bmc_filePath)
|
||||
if value.find('not') < 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
return False
|
||||
|
||||
def get_inserted_slots(self):
|
||||
""" return list of inserted slots """
|
||||
path = attr_path+'ESC600_Module/module_insert'
|
||||
try:
|
||||
reg_file = open(path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
text_lines = reg_file.readlines()
|
||||
reg_file.close()
|
||||
|
||||
slots = []
|
||||
for line in text_lines:
|
||||
if "is present" in line:
|
||||
slots.append(int(filter(str.isdigit, line)))
|
||||
|
||||
return slots
|
||||
|
||||
def create_port_position_mapping(self):
|
||||
inserted_slots = []
|
||||
ports_in_slots = [0]*8
|
||||
# record inserted slots
|
||||
inserted_slots = self.get_inserted_slots()
|
||||
|
||||
# record the numbers of port on each slot
|
||||
for slot in inserted_slots:
|
||||
path = qsfp_sysfile_path.format(slot+i2c_bus_base) + 'portnum'
|
||||
ports_in_slots[slot-1] = int(self.get_attr_value(path))
|
||||
|
||||
# mapping
|
||||
nport = 0
|
||||
if self.bmc_is_exist():
|
||||
PATH_71_BUS_BASE = 9
|
||||
else:
|
||||
PATH_71_BUS_BASE = 33
|
||||
|
||||
sfp_bus = PATH_71_BUS_BASE
|
||||
for i in range(0,8):
|
||||
for x in range(0,ports_in_slots[i]):
|
||||
self._port_position_mapping.append((i, x+1, sfp_bus+x))
|
||||
nport = nport + 1
|
||||
|
||||
if ports_in_slots[i] == 4:
|
||||
sfp_bus = sfp_bus + 8
|
||||
elif ports_in_slots[i] == 16:
|
||||
sfp_bus = sfp_bus + 16
|
||||
|
||||
self._port_end = nport-1
|
||||
|
||||
|
||||
def reset(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
pos = self._port_position_mapping[port_num]
|
||||
path = qsfp_sysfile_path.format(pos[0]+i2c_bus_base+1)+'QSFP_reset_{}'.format(pos[1])
|
||||
try:
|
||||
reg_file = open(path, 'w')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
#toggle reset
|
||||
#reg_file.seek(0)
|
||||
reg_file.write(str(port_num+1))
|
||||
#time.sleep(1)
|
||||
#reg_file.seek(0)
|
||||
#reg_file.write('0')
|
||||
reg_file.close()
|
||||
return True
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
pos = self._port_position_mapping[port_num]
|
||||
path = qsfp_sysfile_path.format(pos[0]+i2c_bus_base+1)+'QSFP_low_power_{}'.format(pos[1])
|
||||
|
||||
try:
|
||||
reg_file = open(path, 'w')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
# the gpio pin is ACTIVE_HIGH
|
||||
if lpmode is True:
|
||||
val = "1"
|
||||
else:
|
||||
val = "0"
|
||||
|
||||
# write value to gpio
|
||||
reg_file.seek(0)
|
||||
reg_file.write(val)
|
||||
reg_file.close()
|
||||
|
||||
return True
|
||||
|
||||
def get_low_power_mode(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
pos = self._port_position_mapping[port_num]
|
||||
path = qsfp_sysfile_path.format(pos[0]+i2c_bus_base+1)+'QSFP_low_power_{}'.format(pos[1])
|
||||
|
||||
res = self.get_attr_value(path)
|
||||
if res == 'ERR':
|
||||
return False
|
||||
|
||||
if int(res) == 1:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_presence(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
pos = self._port_position_mapping[port_num]
|
||||
path = qsfp_sysfile_path.format(pos[0]+i2c_bus_base+1)+'QSFP_present_{}'.format(pos[1])
|
||||
res = self.get_attr_value(path)
|
||||
if res == 'ERR':
|
||||
return False
|
||||
|
||||
if int(res) == 1:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def init_global_port_presence(self):
|
||||
for port_num in range(self.port_start, (self.port_end + 1)):
|
||||
presence = self.get_presence(port_num)
|
||||
if(presence):
|
||||
self._global_port_pres_dict[port_num] = '1'
|
||||
else:
|
||||
self._global_port_pres_dict[port_num] = '0'
|
||||
|
||||
def get_transceiver_change_event(self, timeout=0):
|
||||
port_dict = {}
|
||||
while True:
|
||||
for port_num in range(self.port_start, (self.port_end + 1)):
|
||||
presence = self.get_presence(port_num)
|
||||
if(presence and self._global_port_pres_dict[port_num] == '0'):
|
||||
self._global_port_pres_dict[port_num] = '1'
|
||||
port_dict[port_num] = '1'
|
||||
elif(not presence and
|
||||
self._global_port_pres_dict[port_num] == '1'):
|
||||
self._global_port_pres_dict[port_num] = '0'
|
||||
port_dict[port_num] = '0'
|
||||
|
||||
if(len(port_dict) > 0):
|
||||
return True, port_dict
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
@property
|
||||
def port_start(self):
|
||||
return self._port_start
|
||||
|
||||
@property
|
||||
def port_end(self):
|
||||
return self._port_end
|
||||
|
||||
@property
|
||||
def qsfp_ports(self):
|
||||
return range(0, self._port_in_block + 1)
|
||||
|
||||
@property
|
||||
def port_to_eeprom_mapping(self):
|
||||
return self._port_to_eeprom_mapping
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"skip_ledd": true,
|
||||
"skip_thermalctld": true
|
||||
}
|
22
device/cameo/x86_64-cameo_esc600_128q-r0/sensors.conf
Normal file
22
device/cameo/x86_64-cameo_esc600_128q-r0/sensors.conf
Normal file
@ -0,0 +1,22 @@
|
||||
bus "i2c-43" "i2c-0-mux (chan_id 2)"
|
||||
chip "g781-i2c-43-4c"
|
||||
label temp1 "local temp sensor"
|
||||
label temp2 "Sensor on left bottom PCB"
|
||||
|
||||
bus "i2c-44" "i2c-0-mux (chan_id 3)"
|
||||
chip "g781-i2c-44-4c"
|
||||
label temp1 "local temp sensor"
|
||||
label temp2 "Sensor on rear bottom PCB"
|
||||
|
||||
bus "i2c-42" "i2c-0-mux (chan_id 1)"
|
||||
chip "g781-i2c-42-4c"
|
||||
label temp1 "local temp sensor"
|
||||
label temp2 "Sensor on rear center PCB"
|
||||
|
||||
bus "i2c-41" "i2c-0-mux (chan_id 0)"
|
||||
chip "nct7511-i2c-*-2e"
|
||||
label temp1 "local temp sensor"
|
||||
label temp2 "Sensor on right bottom PCB"
|
||||
ignore fan1
|
||||
|
||||
|
1
device/cameo/x86_64-cameo_esc600_128q-r0/topo.conf
Normal file
1
device/cameo/x86_64-cameo_esc600_128q-r0/topo.conf
Normal file
@ -0,0 +1 @@
|
||||
t1
|
1
device/cameo/x86_64-cameo_esc601_32q-r0/default_sku
Executable file
1
device/cameo/x86_64-cameo_esc601_32q-r0/default_sku
Executable file
@ -0,0 +1 @@
|
||||
esc601-32q t1
|
@ -0,0 +1,137 @@
|
||||
{# Default values which will be used if no actual configura available #}
|
||||
{% set default_cable = '40m' %}
|
||||
|
||||
{# Port configuration to cable length look-up table #}
|
||||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
|
||||
{# Roles described in the minigraph #}
|
||||
{% set ports2cable = {
|
||||
'torrouter_server' : '5m',
|
||||
'leafrouter_torrouter' : '40m',
|
||||
'spinerouter_leafrouter' : '300m'
|
||||
}
|
||||
%}
|
||||
|
||||
{%- macro cable_length(port_name) %}
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
{%- set roles2 = neighbor_role + '_' + switch_role %}
|
||||
{%- set roles1 = roles1 | lower %}
|
||||
{%- set roles2 = roles2 | lower %}
|
||||
{%- if roles1 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
|
||||
{%- elif roles2 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else %}
|
||||
{%- if switch_role.lower() == 'torrouter' %}
|
||||
{%- for local_port in VLAN_MEMBER %}
|
||||
{%- if local_port[1] == port_name %}
|
||||
{%- set roles3 = switch_role + '_' + 'server' %}
|
||||
{%- set roles3 = roles3 | lower %}
|
||||
{%- if roles3 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- if DEVICE_METADATA is defined %}
|
||||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"CABLE_LENGTH": {
|
||||
"AZURE": {
|
||||
{% for port in PORT %}
|
||||
{% set cable = cable_length(port) -%}
|
||||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "47218432",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "17708800"
|
||||
},
|
||||
"lossy_pool": {
|
||||
"size": "18874368",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"xoff":"38816",
|
||||
"size":"1518",
|
||||
"dynamic_th":"1",
|
||||
"xon_offset":"13440"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"BUFFER_POOL": {
|
||||
"lossy_pool": {
|
||||
"size": "56985600",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|0-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
{# Default values which will be used if no actual configura available #}
|
||||
{% set default_cable = '40m' %}
|
||||
|
||||
{# Port configuration to cable length look-up table #}
|
||||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
|
||||
{# Roles described in the minigraph #}
|
||||
{% set ports2cable = {
|
||||
'torrouter_server' : '5m',
|
||||
'leafrouter_torrouter' : '40m',
|
||||
'spinerouter_leafrouter' : '300m'
|
||||
}
|
||||
%}
|
||||
|
||||
{%- macro cable_length(port_name) %}
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
{%- set roles2 = neighbor_role + '_' + switch_role %}
|
||||
{%- set roles1 = roles1 | lower %}
|
||||
{%- set roles2 = roles2 | lower %}
|
||||
{%- if roles1 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
|
||||
{%- elif roles2 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else %}
|
||||
{%- if switch_role.lower() == 'torrouter' %}
|
||||
{%- for local_port in VLAN_MEMBER %}
|
||||
{%- if local_port[1] == port_name %}
|
||||
{%- set roles3 = switch_role + '_' + 'server' %}
|
||||
{%- set roles3 = roles3 | lower %}
|
||||
{%- if roles3 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- if DEVICE_METADATA is defined %}
|
||||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"CABLE_LENGTH": {
|
||||
"AZURE": {
|
||||
{% for port in PORT %}
|
||||
{% set cable = cable_length(port) -%}
|
||||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "47218432",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "17708800"
|
||||
},
|
||||
"lossy_pool": {
|
||||
"size": "18874368",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"xoff":"38816",
|
||||
"size":"1518",
|
||||
"dynamic_th":"1",
|
||||
"xon_offset":"13440"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,417 @@
|
||||
ifcs:
|
||||
options:
|
||||
log_level: "info"
|
||||
nodes:
|
||||
- node_id: "0"
|
||||
options:
|
||||
sku: "configs/sku/innovium.77700_B"
|
||||
netdev:
|
||||
- auto_create: "no"
|
||||
multi_interface: "yes"
|
||||
buffer_management_mode: "api_driven"
|
||||
max_lossless_tc: "2"
|
||||
wred_cr_ip_proto_list: "17"
|
||||
ilpm_enable: "1"
|
||||
forward_profile: "IFCS_FORWARD_PROFILE_ID_PROFILE_E"
|
||||
txring:
|
||||
- txring_id: "0"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "1"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "2"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "3"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
rxring:
|
||||
- rxring_id: "0"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39"
|
||||
- rxring_id: "1"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40"
|
||||
- rxring_id: "2"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 47"
|
||||
- rxring_id: "3"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
queues: "42, 43, 44, 45, 46"
|
||||
sys_clk: "1720"
|
||||
ifc_clk: "1200"
|
||||
mac_clk: "1340"
|
||||
|
||||
devports:
|
||||
- id: "0"
|
||||
sysport: "1000"
|
||||
type: "cpu"
|
||||
- fec: "KRFEC"
|
||||
id: "33"
|
||||
lanes: "0:4"
|
||||
serdes_group: "4"
|
||||
speed: "100G"
|
||||
sysport: "33"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "37"
|
||||
lanes: "4:4"
|
||||
serdes_group: "4"
|
||||
speed: "100G"
|
||||
sysport: "37"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "25"
|
||||
lanes: "0:4"
|
||||
serdes_group: "3"
|
||||
speed: "100G"
|
||||
sysport: "25"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "29"
|
||||
lanes: "4:4"
|
||||
serdes_group: "3"
|
||||
speed: "100G"
|
||||
sysport: "29"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "17"
|
||||
lanes: "0:4"
|
||||
serdes_group: "2"
|
||||
speed: "100G"
|
||||
sysport: "17"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "21"
|
||||
lanes: "4:4"
|
||||
serdes_group: "2"
|
||||
speed: "100G"
|
||||
sysport: "21"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "1"
|
||||
lanes: "0:4"
|
||||
serdes_group: "0"
|
||||
speed: "100G"
|
||||
sysport: "1"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "5"
|
||||
lanes: "4:4"
|
||||
serdes_group: "0"
|
||||
speed: "100G"
|
||||
sysport: "5"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "233"
|
||||
lanes: "0:4"
|
||||
serdes_group: "29"
|
||||
speed: "100G"
|
||||
sysport: "233"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "237"
|
||||
lanes: "4:4"
|
||||
serdes_group: "29"
|
||||
speed: "100G"
|
||||
sysport: "237"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "225"
|
||||
lanes: "0:4"
|
||||
serdes_group: "28"
|
||||
speed: "100G"
|
||||
sysport: "225"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "229"
|
||||
lanes: "4:4"
|
||||
serdes_group: "28"
|
||||
speed: "100G"
|
||||
sysport: "229"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "217"
|
||||
lanes: "0:4"
|
||||
serdes_group: "27"
|
||||
speed: "100G"
|
||||
sysport: "217"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "221"
|
||||
lanes: "4:4"
|
||||
serdes_group: "27"
|
||||
speed: "100G"
|
||||
sysport: "221"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "209"
|
||||
lanes: "0:4"
|
||||
serdes_group: "26"
|
||||
speed: "100G"
|
||||
sysport: "209"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "213"
|
||||
lanes: "4:4"
|
||||
serdes_group: "26"
|
||||
speed: "100G"
|
||||
sysport: "213"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "161"
|
||||
lanes: "0:4"
|
||||
serdes_group: "20"
|
||||
speed: "100G"
|
||||
sysport: "161"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "165"
|
||||
lanes: "4:4"
|
||||
serdes_group: "20"
|
||||
speed: "100G"
|
||||
sysport: "165"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "153"
|
||||
lanes: "0:4"
|
||||
serdes_group: "19"
|
||||
speed: "100G"
|
||||
sysport: "153"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "157"
|
||||
lanes: "4:4"
|
||||
serdes_group: "19"
|
||||
speed: "100G"
|
||||
sysport: "157"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "145"
|
||||
lanes: "0:4"
|
||||
serdes_group: "18"
|
||||
speed: "100G"
|
||||
sysport: "145"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "149"
|
||||
lanes: "4:4"
|
||||
serdes_group: "18"
|
||||
speed: "100G"
|
||||
sysport: "149"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "129"
|
||||
lanes: "0:4"
|
||||
serdes_group: "16"
|
||||
speed: "100G"
|
||||
sysport: "129"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "133"
|
||||
lanes: "4:4"
|
||||
serdes_group: "16"
|
||||
speed: "100G"
|
||||
sysport: "133"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "113"
|
||||
lanes: "0:4"
|
||||
serdes_group: "14"
|
||||
speed: "100G"
|
||||
sysport: "113"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "117"
|
||||
lanes: "4:4"
|
||||
serdes_group: "14"
|
||||
speed: "100G"
|
||||
sysport: "117"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "105"
|
||||
lanes: "0:4"
|
||||
serdes_group: "13"
|
||||
speed: "100G"
|
||||
sysport: "105"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "109"
|
||||
lanes: "4:4"
|
||||
serdes_group: "13"
|
||||
speed: "100G"
|
||||
sysport: "109"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "89"
|
||||
lanes: "0:4"
|
||||
serdes_group: "11"
|
||||
speed: "100G"
|
||||
sysport: "89"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "93"
|
||||
lanes: "4:4"
|
||||
serdes_group: "11"
|
||||
speed: "100G"
|
||||
sysport: "93"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "81"
|
||||
lanes: "0:4"
|
||||
serdes_group: "10"
|
||||
speed: "100G"
|
||||
sysport: "81"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "85"
|
||||
lanes: "4:4"
|
||||
serdes_group: "10"
|
||||
speed: "100G"
|
||||
sysport: "85"
|
||||
type: "eth"
|
||||
isg:
|
||||
- id: "0"
|
||||
tx_polarity: "11011111"
|
||||
rx_polarity: "10001000"
|
||||
lane_swap: "67543210"
|
||||
- id: "1"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "2"
|
||||
tx_polarity: "11011000"
|
||||
rx_polarity: "10001110"
|
||||
lane_swap: "67543210"
|
||||
- id: "3"
|
||||
tx_polarity: "11101110"
|
||||
rx_polarity: "01001000"
|
||||
lane_swap: "67542310"
|
||||
- id: "4"
|
||||
tx_polarity: "11001000"
|
||||
rx_polarity: "11000110"
|
||||
lane_swap: "67542310"
|
||||
- id: "5"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "6"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "7"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "8"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "9"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "10"
|
||||
tx_polarity: "10100100"
|
||||
rx_polarity: "10101100"
|
||||
lane_swap: "67451320"
|
||||
- id: "11"
|
||||
tx_polarity: "10000000"
|
||||
rx_polarity: "11111011"
|
||||
lane_swap: "67542310"
|
||||
- id: "12"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "13"
|
||||
tx_polarity: "11001001"
|
||||
rx_polarity: "01001110"
|
||||
lane_swap: "76542310"
|
||||
- id: "14"
|
||||
tx_polarity: "01000100"
|
||||
rx_polarity: "01010110"
|
||||
lane_swap: "67452301"
|
||||
- id: "15"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "16"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "01111101"
|
||||
lane_swap: "67542310"
|
||||
- id: "17"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "18"
|
||||
tx_polarity: "11101101"
|
||||
rx_polarity: "01001101"
|
||||
lane_swap: "76542310"
|
||||
- id: "19"
|
||||
tx_polarity: "00111111"
|
||||
rx_polarity: "10101100"
|
||||
lane_swap: "67542310"
|
||||
- id: "20"
|
||||
tx_polarity: "11101100"
|
||||
rx_polarity: "01001000"
|
||||
lane_swap: "67542310"
|
||||
- id: "21"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "22"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "23"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "24"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "25"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "26"
|
||||
tx_polarity: "10001110"
|
||||
rx_polarity: "11000100"
|
||||
lane_swap: "67542310"
|
||||
- id: "27"
|
||||
tx_polarity: "11000101"
|
||||
rx_polarity: "01001010"
|
||||
lane_swap: "76542310"
|
||||
- id: "28"
|
||||
tx_polarity: "11001000"
|
||||
rx_polarity: "10000111"
|
||||
lane_swap: "67542310"
|
||||
- id: "29"
|
||||
tx_polarity: "11110111"
|
||||
rx_polarity: "00101110"
|
||||
lane_swap: "67452310"
|
||||
- id: "30"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "31"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "32"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
@ -0,0 +1,59 @@
|
||||
sku: innovium.77700_B
|
||||
|
||||
device_id: 0x1b58
|
||||
|
||||
# Hardware constraint information
|
||||
hardware:
|
||||
num_ibs: 6
|
||||
|
||||
ports_per_ib: 32, 32, 32, 32, 20, 20
|
||||
recirc_port_num: 32, 32, 32, 32, 32, 32
|
||||
cpu_port_num: 33
|
||||
cpu_port_ib: 0
|
||||
mgmt_port_num: 33
|
||||
mgmt_port_ibs: 1,2
|
||||
|
||||
pics_per_ib: 6, 7, 7, 6, 5, 5
|
||||
pic_ports_per_pic: 8
|
||||
max_serdes_speed: 50
|
||||
|
||||
num_shared_pics: 2
|
||||
|
||||
isg [0-4]:
|
||||
ib: 0
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [5-9]:
|
||||
ib: 5
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [10-14]:
|
||||
ib: 1
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [16-20]:
|
||||
ib: 3
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [21-25]:
|
||||
ib: 4
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [26-30]:
|
||||
ib: 2
|
||||
pic_id: [0-4]
|
||||
|
||||
isg 15:
|
||||
mode: 4:4
|
||||
ib: 1, 3
|
||||
pic_id: 5
|
||||
|
||||
isg 31:
|
||||
mode: 4:4
|
||||
ib: 0, 2
|
||||
pic_id: 5
|
||||
|
||||
isg 32:
|
||||
mode: 1:1
|
||||
ib: 1, 2
|
||||
pic_id: 6
|
@ -0,0 +1,9 @@
|
||||
IFCS_INIT_FILE : "/usr/share/sonic/hwsku/config_32x100G_Cameo-esc601-32q.yaml"
|
||||
IFCS_SKU_FILE : "/usr/share/sonic/hwsku/innovium.77700_B"
|
||||
IFCS_INNO_CLI_PORT : "9999"
|
||||
IFCS_TARGET : "device"
|
||||
INNOVIUM_DIR : "/innovium"
|
||||
NRZ_PORTS_SIG_DETECT_MODE_TL7 : "1"
|
||||
PYTHONPATH : "$INNOVIUM_DIR:$INNOVIUM_DIR/cmds:$INNOVIUM_DIR/scripts:$INNOVIUM_DIR/test/:$INNOVIUM_DIR/test/utils:$INNOVIUM_DIR/utils:$INNOVIUM_DIR/pyctypes"
|
||||
IVM_SAI_DATAPATH_CONFIG_FILE: "/usr/share/sonic/hwsku/ivm.sai.datapath.config.yaml"
|
||||
IVM_SAI_PARAM_A0008: "32"
|
@ -0,0 +1,9 @@
|
||||
ISAI_PARAM_P0_0_LS : "4608 4608 4608 4608 2880 2880"
|
||||
ISAI_PARAM_P0_1_LS : "2226 1946 1946 1890 1218 1218"
|
||||
ISAI_PARAM_P0_1_ALS : "434 154 154 98 98 98"
|
||||
ISAI_PARAM_P1_0_LS : "1536 1536 1536 1536 960 960"
|
||||
ISAI_PARAM_P1_0_LL : "3072 3072 3072 3072 1920 1920"
|
||||
ISAI_PARAM_P1_1_LS : "1778 1498 1498 1442 938 938"
|
||||
ISAI_PARAM_P1_1_LL : "2478 2478 2478 2478 2478 2478"
|
||||
ISAI_PARAM_P1_1_ALS : "434 154 154 98 98 98"
|
||||
ISAI_PARAM_P1_1_ALL : "126 126 126 126 126 126"
|
@ -0,0 +1,18 @@
|
||||
# PG lossless profiles.
|
||||
# speed cable size xon xoff threshold xon_offset
|
||||
25000 5m 1518 0 15680 1 13440
|
||||
50000 5m 1518 0 21248 1 13440
|
||||
100000 5m 1518 0 34624 1 13440
|
||||
400000 5m 1518 0 117536 1 13440
|
||||
25000 40m 1518 0 16928 1 13440
|
||||
50000 40m 1518 0 23392 1 13440
|
||||
100000 40m 1518 0 38816 1 13440
|
||||
400000 40m 1518 0 135520 1 13440
|
||||
25000 100m 1518 0 18848 1 13440
|
||||
50000 100m 1518 0 27264 1 13440
|
||||
100000 100m 1518 0 46496 1 13440
|
||||
400000 100m 1518 0 166688 1 13440
|
||||
25000 300m 1518 0 25184 1 13440
|
||||
50000 300m 1518 0 40128 1 13440
|
||||
100000 300m 1518 0 72384 1 13440
|
||||
400000 300m 1518 0 268640 1 13440
|
@ -0,0 +1,33 @@
|
||||
# name lanes alias speed index mtu fec
|
||||
Ethernet0 33,34,35,36 Eth1 100000 0 9126 rs
|
||||
Ethernet4 37,38,39,40 Eth2 100000 1 9126 rs
|
||||
Ethernet8 25,26,27,28 Eth3 100000 2 9126 rs
|
||||
Ethernet12 29,30,31,32 Eth4 100000 3 9126 rs
|
||||
Ethernet16 17,18,19,20 Eth5 100000 4 9126 rs
|
||||
Ethernet20 21,22,23,24 Eth6 100000 5 9126 rs
|
||||
Ethernet24 1,2,3,4 Eth7 100000 6 9126 rs
|
||||
Ethernet28 5,6,7,8 Eth8 100000 7 9126 rs
|
||||
Ethernet32 233,234,235,236 Eth9 100000 8 9126 rs
|
||||
Ethernet36 237,238,239,240 Eth10 100000 9 9126 rs
|
||||
Ethernet40 225,226,227,228 Eth11 100000 10 9126 rs
|
||||
Ethernet44 229,230,231,232 Eth12 100000 11 9126 rs
|
||||
Ethernet48 217,218,219,220 Eth13 100000 12 9126 rs
|
||||
Ethernet52 221,222,223,224 Eth14 100000 13 9126 rs
|
||||
Ethernet56 209,210,211,212 Eth15 100000 14 9126 rs
|
||||
Ethernet60 213,214,215,216 Eth16 100000 15 9126 rs
|
||||
Ethernet64 161,162,163,164 Eth17 100000 16 9126 rs
|
||||
Ethernet68 165,166,167,168 Eth18 100000 17 9126 rs
|
||||
Ethernet72 153,154,155,156 Eth19 100000 18 9126 rs
|
||||
Ethernet76 157,158,159,160 Eth20 100000 19 9126 rs
|
||||
Ethernet80 145,146,147,148 Eth21 100000 20 9126 rs
|
||||
Ethernet84 149,150,151,152 Eth22 100000 21 9126 rs
|
||||
Ethernet88 129,130,131,132 Eth23 100000 22 9126 rs
|
||||
Ethernet92 133,134,135,136 Eth24 100000 23 9126 rs
|
||||
Ethernet96 113,114,115,116 Eth25 100000 24 9126 rs
|
||||
Ethernet100 117,118,119,120 Eth26 100000 25 9126 rs
|
||||
Ethernet104 105,106,107,108 Eth27 100000 26 9126 rs
|
||||
Ethernet108 109,110,111,112 Eth28 100000 27 9126 rs
|
||||
Ethernet112 89,90,91,92 Eth29 100000 28 9126 rs
|
||||
Ethernet116 93,94,95,96 Eth30 100000 29 9126 rs
|
||||
Ethernet120 81,82,83,84 Eth31 100000 30 9126 rs
|
||||
Ethernet124 85,86,87,88 Eth32 100000 31 9126 rs
|
114
device/cameo/x86_64-cameo_esc601_32q-r0/esc601-32q/qos.json.j2
Normal file
114
device/cameo/x86_64-cameo_esc601_32q-r0/esc601-32q/qos.json.j2
Normal file
@ -0,0 +1,114 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSLESS" : {
|
||||
"red_min_threshold":"50000"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"0",
|
||||
"4":"0",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"0",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]"
|
||||
}
|
||||
},
|
||||
"SCHEDULER": {
|
||||
"scheduler.7": {
|
||||
"type": "STRICT"
|
||||
}
|
||||
},
|
||||
"QUEUE": {
|
||||
"{{ port_names }}|7": {
|
||||
"scheduler": "[SCHEDULER|scheduler.7]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSLESS" : {
|
||||
"red_min_threshold":"50000"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/ivm.sai.config.yaml
|
@ -0,0 +1,137 @@
|
||||
{# Default values which will be used if no actual configura available #}
|
||||
{% set default_cable = '40m' %}
|
||||
|
||||
{# Port configuration to cable length look-up table #}
|
||||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
|
||||
{# Roles described in the minigraph #}
|
||||
{% set ports2cable = {
|
||||
'torrouter_server' : '5m',
|
||||
'leafrouter_torrouter' : '40m',
|
||||
'spinerouter_leafrouter' : '300m'
|
||||
}
|
||||
%}
|
||||
|
||||
{%- macro cable_length(port_name) %}
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
{%- set roles2 = neighbor_role + '_' + switch_role %}
|
||||
{%- set roles1 = roles1 | lower %}
|
||||
{%- set roles2 = roles2 | lower %}
|
||||
{%- if roles1 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
|
||||
{%- elif roles2 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else %}
|
||||
{%- if switch_role.lower() == 'torrouter' %}
|
||||
{%- for local_port in VLAN_MEMBER %}
|
||||
{%- if local_port[1] == port_name %}
|
||||
{%- set roles3 = switch_role + '_' + 'server' %}
|
||||
{%- set roles3 = roles3 | lower %}
|
||||
{%- if roles3 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- if DEVICE_METADATA is defined %}
|
||||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"CABLE_LENGTH": {
|
||||
"AZURE": {
|
||||
{% for port in PORT %}
|
||||
{% set cable = cable_length(port) -%}
|
||||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "47218432",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "17708800"
|
||||
},
|
||||
"lossy_pool": {
|
||||
"size": "18874368",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"xoff":"38816",
|
||||
"size":"1518",
|
||||
"dynamic_th":"1",
|
||||
"xon_offset":"13440"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"BUFFER_POOL": {
|
||||
"lossy_pool": {
|
||||
"size": "56985600",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|0-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
{# Default values which will be used if no actual configura available #}
|
||||
{% set default_cable = '40m' %}
|
||||
|
||||
{# Port configuration to cable length look-up table #}
|
||||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
|
||||
{# Roles described in the minigraph #}
|
||||
{% set ports2cable = {
|
||||
'torrouter_server' : '5m',
|
||||
'leafrouter_torrouter' : '40m',
|
||||
'spinerouter_leafrouter' : '300m'
|
||||
}
|
||||
%}
|
||||
|
||||
{%- macro cable_length(port_name) %}
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
{%- set roles2 = neighbor_role + '_' + switch_role %}
|
||||
{%- set roles1 = roles1 | lower %}
|
||||
{%- set roles2 = roles2 | lower %}
|
||||
{%- if roles1 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
|
||||
{%- elif roles2 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else %}
|
||||
{%- if switch_role.lower() == 'torrouter' %}
|
||||
{%- for local_port in VLAN_MEMBER %}
|
||||
{%- if local_port[1] == port_name %}
|
||||
{%- set roles3 = switch_role + '_' + 'server' %}
|
||||
{%- set roles3 = roles3 | lower %}
|
||||
{%- if roles3 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- if DEVICE_METADATA is defined %}
|
||||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"CABLE_LENGTH": {
|
||||
"AZURE": {
|
||||
{% for port in PORT %}
|
||||
{% set cable = cable_length(port) -%}
|
||||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "47218432",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "17708800"
|
||||
},
|
||||
"lossy_pool": {
|
||||
"size": "18874368",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"xoff":"38816",
|
||||
"size":"1518",
|
||||
"dynamic_th":"1",
|
||||
"xon_offset":"13440"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"9497600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,417 @@
|
||||
ifcs:
|
||||
options:
|
||||
log_level: "info"
|
||||
nodes:
|
||||
- node_id: "0"
|
||||
options:
|
||||
sku: "configs/sku/innovium.77700_B"
|
||||
netdev:
|
||||
- auto_create: "no"
|
||||
multi_interface: "yes"
|
||||
buffer_management_mode: "api_driven"
|
||||
max_lossless_tc: "2"
|
||||
wred_cr_ip_proto_list: "17"
|
||||
ilpm_enable: "1"
|
||||
forward_profile: "IFCS_FORWARD_PROFILE_ID_PROFILE_E"
|
||||
txring:
|
||||
- txring_id: "0"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "1"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "2"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "3"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
rxring:
|
||||
- rxring_id: "0"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39"
|
||||
- rxring_id: "1"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40"
|
||||
- rxring_id: "2"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 47"
|
||||
- rxring_id: "3"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
queues: "42, 43, 44, 45, 46"
|
||||
sys_clk: "1720"
|
||||
ifc_clk: "1200"
|
||||
mac_clk: "1340"
|
||||
|
||||
devports:
|
||||
- id: "0"
|
||||
sysport: "1000"
|
||||
type: "cpu"
|
||||
- fec: "KPFEC"
|
||||
id: "33"
|
||||
lanes: "0:4"
|
||||
serdes_group: "4"
|
||||
speed: "200G"
|
||||
sysport: "33"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "37"
|
||||
lanes: "4:4"
|
||||
serdes_group: "4"
|
||||
speed: "200G"
|
||||
sysport: "37"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "25"
|
||||
lanes: "0:4"
|
||||
serdes_group: "3"
|
||||
speed: "200G"
|
||||
sysport: "25"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "29"
|
||||
lanes: "4:4"
|
||||
serdes_group: "3"
|
||||
speed: "200G"
|
||||
sysport: "29"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "17"
|
||||
lanes: "0:4"
|
||||
serdes_group: "2"
|
||||
speed: "200G"
|
||||
sysport: "17"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "21"
|
||||
lanes: "4:4"
|
||||
serdes_group: "2"
|
||||
speed: "200G"
|
||||
sysport: "21"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "1"
|
||||
lanes: "0:4"
|
||||
serdes_group: "0"
|
||||
speed: "200G"
|
||||
sysport: "1"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "5"
|
||||
lanes: "4:4"
|
||||
serdes_group: "0"
|
||||
speed: "200G"
|
||||
sysport: "5"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "233"
|
||||
lanes: "0:4"
|
||||
serdes_group: "29"
|
||||
speed: "200G"
|
||||
sysport: "233"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "237"
|
||||
lanes: "4:4"
|
||||
serdes_group: "29"
|
||||
speed: "200G"
|
||||
sysport: "237"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "225"
|
||||
lanes: "0:4"
|
||||
serdes_group: "28"
|
||||
speed: "200G"
|
||||
sysport: "225"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "229"
|
||||
lanes: "4:4"
|
||||
serdes_group: "28"
|
||||
speed: "200G"
|
||||
sysport: "229"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "217"
|
||||
lanes: "0:4"
|
||||
serdes_group: "27"
|
||||
speed: "200G"
|
||||
sysport: "217"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "221"
|
||||
lanes: "4:4"
|
||||
serdes_group: "27"
|
||||
speed: "200G"
|
||||
sysport: "221"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "209"
|
||||
lanes: "0:4"
|
||||
serdes_group: "26"
|
||||
speed: "200G"
|
||||
sysport: "209"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "213"
|
||||
lanes: "4:4"
|
||||
serdes_group: "26"
|
||||
speed: "200G"
|
||||
sysport: "213"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "161"
|
||||
lanes: "0:4"
|
||||
serdes_group: "20"
|
||||
speed: "200G"
|
||||
sysport: "161"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "165"
|
||||
lanes: "4:4"
|
||||
serdes_group: "20"
|
||||
speed: "200G"
|
||||
sysport: "165"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "153"
|
||||
lanes: "0:4"
|
||||
serdes_group: "19"
|
||||
speed: "200G"
|
||||
sysport: "153"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "157"
|
||||
lanes: "4:4"
|
||||
serdes_group: "19"
|
||||
speed: "200G"
|
||||
sysport: "157"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "145"
|
||||
lanes: "0:4"
|
||||
serdes_group: "18"
|
||||
speed: "200G"
|
||||
sysport: "145"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "149"
|
||||
lanes: "4:4"
|
||||
serdes_group: "18"
|
||||
speed: "200G"
|
||||
sysport: "149"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "129"
|
||||
lanes: "0:4"
|
||||
serdes_group: "16"
|
||||
speed: "200G"
|
||||
sysport: "129"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "133"
|
||||
lanes: "4:4"
|
||||
serdes_group: "16"
|
||||
speed: "200G"
|
||||
sysport: "133"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "113"
|
||||
lanes: "0:4"
|
||||
serdes_group: "14"
|
||||
speed: "200G"
|
||||
sysport: "113"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "117"
|
||||
lanes: "4:4"
|
||||
serdes_group: "14"
|
||||
speed: "200G"
|
||||
sysport: "117"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "105"
|
||||
lanes: "0:4"
|
||||
serdes_group: "13"
|
||||
speed: "200G"
|
||||
sysport: "105"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "109"
|
||||
lanes: "4:4"
|
||||
serdes_group: "13"
|
||||
speed: "200G"
|
||||
sysport: "109"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "89"
|
||||
lanes: "0:4"
|
||||
serdes_group: "11"
|
||||
speed: "200G"
|
||||
sysport: "89"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "93"
|
||||
lanes: "4:4"
|
||||
serdes_group: "11"
|
||||
speed: "200G"
|
||||
sysport: "93"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "81"
|
||||
lanes: "0:4"
|
||||
serdes_group: "10"
|
||||
speed: "200G"
|
||||
sysport: "81"
|
||||
type: "eth"
|
||||
- fec: "KPFEC"
|
||||
id: "85"
|
||||
lanes: "4:4"
|
||||
serdes_group: "10"
|
||||
speed: "200G"
|
||||
sysport: "85"
|
||||
type: "eth"
|
||||
isg:
|
||||
- id: "0"
|
||||
tx_polarity: "11011111"
|
||||
rx_polarity: "10001000"
|
||||
lane_swap: "67543210"
|
||||
- id: "1"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "2"
|
||||
tx_polarity: "11011000"
|
||||
rx_polarity: "10001110"
|
||||
lane_swap: "67543210"
|
||||
- id: "3"
|
||||
tx_polarity: "11101110"
|
||||
rx_polarity: "01001000"
|
||||
lane_swap: "67542310"
|
||||
- id: "4"
|
||||
tx_polarity: "11001000"
|
||||
rx_polarity: "11000110"
|
||||
lane_swap: "67542310"
|
||||
- id: "5"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "6"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "7"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "8"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "9"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "10"
|
||||
tx_polarity: "10100100"
|
||||
rx_polarity: "10101100"
|
||||
lane_swap: "67451320"
|
||||
- id: "11"
|
||||
tx_polarity: "10000000"
|
||||
rx_polarity: "11111011"
|
||||
lane_swap: "67542310"
|
||||
- id: "12"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "13"
|
||||
tx_polarity: "11001001"
|
||||
rx_polarity: "01001110"
|
||||
lane_swap: "76542310"
|
||||
- id: "14"
|
||||
tx_polarity: "01000100"
|
||||
rx_polarity: "01010110"
|
||||
lane_swap: "67452301"
|
||||
- id: "15"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "16"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "01111101"
|
||||
lane_swap: "67542310"
|
||||
- id: "17"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "18"
|
||||
tx_polarity: "11101101"
|
||||
rx_polarity: "01001101"
|
||||
lane_swap: "76542310"
|
||||
- id: "19"
|
||||
tx_polarity: "00111111"
|
||||
rx_polarity: "10101100"
|
||||
lane_swap: "67542310"
|
||||
- id: "20"
|
||||
tx_polarity: "11101100"
|
||||
rx_polarity: "01001000"
|
||||
lane_swap: "67542310"
|
||||
- id: "21"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "22"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "23"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "24"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "25"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "26"
|
||||
tx_polarity: "10001110"
|
||||
rx_polarity: "11000100"
|
||||
lane_swap: "67542310"
|
||||
- id: "27"
|
||||
tx_polarity: "11000101"
|
||||
rx_polarity: "01001010"
|
||||
lane_swap: "76542310"
|
||||
- id: "28"
|
||||
tx_polarity: "11001000"
|
||||
rx_polarity: "10000111"
|
||||
lane_swap: "67542310"
|
||||
- id: "29"
|
||||
tx_polarity: "11110111"
|
||||
rx_polarity: "00101110"
|
||||
lane_swap: "67452310"
|
||||
- id: "30"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "31"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
||||
- id: "32"
|
||||
tx_polarity: "00000000"
|
||||
rx_polarity: "00000000"
|
||||
lane_swap: "01234567"
|
@ -0,0 +1,59 @@
|
||||
sku: innovium.77700_B
|
||||
|
||||
device_id: 0x1b58
|
||||
|
||||
# Hardware constraint information
|
||||
hardware:
|
||||
num_ibs: 6
|
||||
|
||||
ports_per_ib: 32, 32, 32, 32, 20, 20
|
||||
recirc_port_num: 32, 32, 32, 32, 32, 32
|
||||
cpu_port_num: 33
|
||||
cpu_port_ib: 0
|
||||
mgmt_port_num: 33
|
||||
mgmt_port_ibs: 1,2
|
||||
|
||||
pics_per_ib: 6, 7, 7, 6, 5, 5
|
||||
pic_ports_per_pic: 8
|
||||
max_serdes_speed: 50
|
||||
|
||||
num_shared_pics: 2
|
||||
|
||||
isg [0-4]:
|
||||
ib: 0
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [5-9]:
|
||||
ib: 5
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [10-14]:
|
||||
ib: 1
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [16-20]:
|
||||
ib: 3
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [21-25]:
|
||||
ib: 4
|
||||
pic_id: [0-4]
|
||||
|
||||
isg [26-30]:
|
||||
ib: 2
|
||||
pic_id: [0-4]
|
||||
|
||||
isg 15:
|
||||
mode: 4:4
|
||||
ib: 1, 3
|
||||
pic_id: 5
|
||||
|
||||
isg 31:
|
||||
mode: 4:4
|
||||
ib: 0, 2
|
||||
pic_id: 5
|
||||
|
||||
isg 32:
|
||||
mode: 1:1
|
||||
ib: 1, 2
|
||||
pic_id: 6
|
@ -0,0 +1,9 @@
|
||||
IFCS_INIT_FILE : "/usr/share/sonic/hwsku/config_32x200G_Cameo-esc601-32q.yaml"
|
||||
IFCS_SKU_FILE : "/usr/share/sonic/hwsku/innovium.77700_B"
|
||||
IFCS_INNO_CLI_PORT : "9999"
|
||||
IFCS_TARGET : "device"
|
||||
INNOVIUM_DIR : "/innovium"
|
||||
NRZ_PORTS_SIG_DETECT_MODE_TL7 : "1"
|
||||
PYTHONPATH : "$INNOVIUM_DIR:$INNOVIUM_DIR/cmds:$INNOVIUM_DIR/scripts:$INNOVIUM_DIR/test/:$INNOVIUM_DIR/test/utils:$INNOVIUM_DIR/utils:$INNOVIUM_DIR/pyctypes"
|
||||
IVM_SAI_DATAPATH_CONFIG_FILE: "/usr/share/sonic/hwsku/ivm.sai.datapath.config.yaml"
|
||||
IVM_SAI_PARAM_A0008: "32"
|
@ -0,0 +1,9 @@
|
||||
ISAI_PARAM_P0_0_LS : "4608 4608 4608 4608 2880 2880"
|
||||
ISAI_PARAM_P0_1_LS : "2226 1946 1946 1890 1218 1218"
|
||||
ISAI_PARAM_P0_1_ALS : "434 154 154 98 98 98"
|
||||
ISAI_PARAM_P1_0_LS : "1536 1536 1536 1536 960 960"
|
||||
ISAI_PARAM_P1_0_LL : "3072 3072 3072 3072 1920 1920"
|
||||
ISAI_PARAM_P1_1_LS : "1778 1498 1498 1442 938 938"
|
||||
ISAI_PARAM_P1_1_LL : "2478 2478 2478 2478 2478 2478"
|
||||
ISAI_PARAM_P1_1_ALS : "434 154 154 98 98 98"
|
||||
ISAI_PARAM_P1_1_ALL : "126 126 126 126 126 126"
|
@ -0,0 +1,18 @@
|
||||
# PG lossless profiles.
|
||||
# speed cable size xon xoff threshold xon_offset
|
||||
25000 5m 1518 0 15680 1 13440
|
||||
50000 5m 1518 0 21248 1 13440
|
||||
100000 5m 1518 0 34624 1 13440
|
||||
400000 5m 1518 0 117536 1 13440
|
||||
25000 40m 1518 0 16928 1 13440
|
||||
50000 40m 1518 0 23392 1 13440
|
||||
100000 40m 1518 0 38816 1 13440
|
||||
400000 40m 1518 0 135520 1 13440
|
||||
25000 100m 1518 0 18848 1 13440
|
||||
50000 100m 1518 0 27264 1 13440
|
||||
100000 100m 1518 0 46496 1 13440
|
||||
400000 100m 1518 0 166688 1 13440
|
||||
25000 300m 1518 0 25184 1 13440
|
||||
50000 300m 1518 0 40128 1 13440
|
||||
100000 300m 1518 0 72384 1 13440
|
||||
400000 300m 1518 0 268640 1 13440
|
@ -0,0 +1,33 @@
|
||||
# name lanes speed index mtu fec
|
||||
Ethernet0 33,34,35,36 200000 0 9126 rs
|
||||
Ethernet4 37,38,39,40 200000 1 9126 rs
|
||||
Ethernet8 25,26,27,28 200000 2 9126 rs
|
||||
Ethernet12 29,30,31,32 200000 3 9126 rs
|
||||
Ethernet16 17,18,19,20 200000 4 9126 rs
|
||||
Ethernet20 21,22,23,24 200000 5 9126 rs
|
||||
Ethernet24 1,2,3,4 200000 6 9126 rs
|
||||
Ethernet28 5,6,7,8 200000 7 9126 rs
|
||||
Ethernet32 233,234,235,236 200000 8 9126 rs
|
||||
Ethernet36 237,238,239,240 200000 9 9126 rs
|
||||
Ethernet40 225,226,227,228 200000 10 9126 rs
|
||||
Ethernet44 229,230,231,232 200000 11 9126 rs
|
||||
Ethernet48 217,218,219,220 200000 12 9126 rs
|
||||
Ethernet52 221,222,223,224 200000 13 9126 rs
|
||||
Ethernet56 209,210,211,212 200000 14 9126 rs
|
||||
Ethernet60 213,214,215,216 200000 15 9126 rs
|
||||
Ethernet64 161,162,163,164 200000 16 9126 rs
|
||||
Ethernet68 165,166,167,168 200000 17 9126 rs
|
||||
Ethernet72 153,154,155,156 200000 18 9126 rs
|
||||
Ethernet76 157,158,159,160 200000 19 9126 rs
|
||||
Ethernet80 145,146,147,148 200000 20 9126 rs
|
||||
Ethernet84 149,150,151,152 200000 21 9126 rs
|
||||
Ethernet88 129,130,131,132 200000 22 9126 rs
|
||||
Ethernet92 133,134,135,136 200000 23 9126 rs
|
||||
Ethernet96 113,114,115,116 200000 24 9126 rs
|
||||
Ethernet100 117,118,119,120 200000 25 9126 rs
|
||||
Ethernet104 105,106,107,108 200000 26 9126 rs
|
||||
Ethernet108 109,110,111,112 200000 27 9126 rs
|
||||
Ethernet112 89,90,91,92 200000 28 9126 rs
|
||||
Ethernet116 93,94,95,96 200000 29 9126 rs
|
||||
Ethernet120 81,82,83,84 200000 30 9126 rs
|
||||
Ethernet124 85,86,87,88 200000 31 9126 rs
|
114
device/cameo/x86_64-cameo_esc601_32q-r0/escc600-32q/qos.json.j2
Normal file
114
device/cameo/x86_64-cameo_esc601_32q-r0/escc600-32q/qos.json.j2
Normal file
@ -0,0 +1,114 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSLESS" : {
|
||||
"red_min_threshold":"50000"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"0",
|
||||
"4":"0",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"0",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]"
|
||||
}
|
||||
},
|
||||
"SCHEDULER": {
|
||||
"scheduler.7": {
|
||||
"type": "STRICT"
|
||||
}
|
||||
},
|
||||
"QUEUE": {
|
||||
"{{ port_names }}|7": {
|
||||
"scheduler": "[SCHEDULER|scheduler.7]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSLESS" : {
|
||||
"red_min_threshold":"50000"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/ivm.sai.config.yaml
|
3
device/cameo/x86_64-cameo_esc601_32q-r0/installer.conf
Normal file
3
device/cameo/x86_64-cameo_esc601_32q-r0/installer.conf
Normal file
@ -0,0 +1,3 @@
|
||||
CONSOLE_PORT=0x3f8
|
||||
CONSOLE_DEV=0
|
||||
CONSOLE_SPEED=115200
|
18
device/cameo/x86_64-cameo_esc601_32q-r0/platform_reboot
Executable file
18
device/cameo/x86_64-cameo_esc601_32q-r0/platform_reboot
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
mr_reboot() {
|
||||
|
||||
#echo "mr_reboot"
|
||||
sudo rmmod x86-64-cameo-esc601-32q
|
||||
sudo i2cset -y 0 0x30 0xa4 0
|
||||
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ] || [ $@ = "-f" ] || [ $@ = "--force" ] || [ $@ = "reboot" ]; then
|
||||
mr_reboot
|
||||
elif [ $@ = "-p" ] ; then
|
||||
# echo "sudo halt"
|
||||
sudo halt
|
||||
else
|
||||
echo "unsupported option"
|
||||
fi
|
12
device/cameo/x86_64-cameo_esc601_32q-r0/plugins/eeprom.py
Normal file
12
device/cameo/x86_64-cameo_esc601_32q-r0/plugins/eeprom.py
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
from sonic_eeprom import eeprom_tlvinfo
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
||||
_TLV_INFO_MAX_LEN = 256
|
||||
def __init__(self, name, path, cpld_root, ro):
|
||||
self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom"
|
||||
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
102
device/cameo/x86_64-cameo_esc601_32q-r0/plugins/psuutil.py
Normal file
102
device/cameo/x86_64-cameo_esc601_32q-r0/plugins/psuutil.py
Normal file
@ -0,0 +1,102 @@
|
||||
#
|
||||
# psuutil.py
|
||||
# Platform-specific PSU status interface for SONiC
|
||||
#
|
||||
|
||||
|
||||
import os.path
|
||||
|
||||
try:
|
||||
from sonic_psu.psu_base import PsuBase
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
attr_path = '/sys/class/hwmon/hwmon2/device/'
|
||||
|
||||
class PsuUtil(PsuBase):
|
||||
"""Platform-specific PSUutil class"""
|
||||
|
||||
SYSFS_PSU_DIR = ["/sys/bus/i2c/devices/i2c-10/10-0050",
|
||||
"/sys/bus/i2c/devices/i2c-9/9-0050"]
|
||||
|
||||
def __init__(self):
|
||||
PsuBase.__init__(self)
|
||||
|
||||
|
||||
# Get sysfs attribute
|
||||
def get_attr_value(self, path):
|
||||
|
||||
retval = 'ERR'
|
||||
if (not os.path.isfile(path)):
|
||||
return retval
|
||||
|
||||
try:
|
||||
with open(path, 'r') as fd:
|
||||
retval = fd.read()
|
||||
except Exception as error:
|
||||
logging.error("Unable to open ", path, " file !")
|
||||
|
||||
retval = retval.rstrip('\r\n')
|
||||
return retval
|
||||
|
||||
def get_num_psus(self):
|
||||
"""
|
||||
Retrieves the number of PSUs available on the device
|
||||
:return: An integer, the number of PSUs available on the device
|
||||
"""
|
||||
MAX_PSUS = 2
|
||||
return MAX_PSUS
|
||||
|
||||
def get_psu_status(self, index):
|
||||
"""
|
||||
Retrieves the oprational status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is operating properly, False if PSU is\
|
||||
faulty
|
||||
"""
|
||||
status = 0
|
||||
attr_file = 'psu_status'
|
||||
status_path = attr_path+'/ESC601_PSU/' + attr_file
|
||||
try:
|
||||
reg_file = open(status_path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text_lines = reg_file.read()
|
||||
|
||||
search_str = "PSU {} is power Good".format(index)
|
||||
|
||||
if search_str in text_lines:
|
||||
status = 1
|
||||
|
||||
reg_file.close()
|
||||
|
||||
return status
|
||||
|
||||
def get_psu_presence(self, index):
|
||||
"""
|
||||
Retrieves the presence status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is plugged, False if not
|
||||
"""
|
||||
status = 0
|
||||
attr_file ='psu_present'
|
||||
presence_path = attr_path+'ESC601_PSU/' + attr_file
|
||||
try:
|
||||
reg_file = open(presence_path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text_lines = reg_file.read()
|
||||
|
||||
search_str = "PSU {} is present".format(index)
|
||||
|
||||
if search_str in text_lines:
|
||||
status = 1
|
||||
|
||||
reg_file.close()
|
||||
|
||||
return status
|
||||
|
165
device/cameo/x86_64-cameo_esc601_32q-r0/plugins/sfputil.py
Normal file
165
device/cameo/x86_64-cameo_esc601_32q-r0/plugins/sfputil.py
Normal file
@ -0,0 +1,165 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
import time
|
||||
import json
|
||||
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
attr_path = '/sys/class/hwmon/hwmon2/device/'
|
||||
PLATFORM_INSTALL_INFO_FILE="/etc/sonic/platform_install.json"
|
||||
PLATFORM_SFP_GROUPS = ['SFP-G01','SFP-G02','SFP-G03','SFP-G04']
|
||||
|
||||
class SfpUtil(SfpUtilBase):
|
||||
"""Platform specific SfpUtill class"""
|
||||
|
||||
_port_start = 0
|
||||
_port_end = 31
|
||||
_port_in_block =32
|
||||
_port_to_eeprom_mapping = {}
|
||||
_global_port_pres_dict = {}
|
||||
|
||||
def __init__(self):
|
||||
eeprom_path = "{}/eeprom"
|
||||
path_list = self.get_sfp_path()
|
||||
for x in range(self._port_start, self._port_end + 1):
|
||||
port_eeprom_path = eeprom_path.format(path_list[x])
|
||||
self._port_to_eeprom_mapping[x] = port_eeprom_path
|
||||
|
||||
self.init_global_port_presence()
|
||||
SfpUtilBase.__init__(self)
|
||||
|
||||
def get_sfp_path(self):
|
||||
map = []
|
||||
with open(PLATFORM_INSTALL_INFO_FILE) as fd:
|
||||
install_info = json.load(fd)
|
||||
for sfp_group_name in PLATFORM_SFP_GROUPS:
|
||||
sfp_group = install_info[2][sfp_group_name]
|
||||
map = map + sfp_group['paths']
|
||||
return map
|
||||
|
||||
def reset(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+'ESC601_QSFP/QSFP_reset'
|
||||
try:
|
||||
reg_file = open(path, 'w')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
#toggle reset
|
||||
#reg_file.seek(0)
|
||||
reg_file.write(str(port_num+1))
|
||||
#time.sleep(1)
|
||||
#reg_file.seek(0)
|
||||
#reg_file.write('0')
|
||||
reg_file.close()
|
||||
return True
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+'ESC601_QSFP/QSFP_low_power_'+str(port_num+1)
|
||||
try:
|
||||
reg_file = open(path, 'w')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
# the gpio pin is ACTIVE_HIGH
|
||||
if lpmode is True:
|
||||
val = "1"
|
||||
else:
|
||||
val = "0"
|
||||
|
||||
# write value to gpio
|
||||
reg_file.seek(0)
|
||||
reg_file.write(val)
|
||||
reg_file.close()
|
||||
|
||||
return True
|
||||
|
||||
def get_low_power_mode(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+'ESC601_QSFP/QSFP_low_power_'+str(port_num+1)
|
||||
try:
|
||||
reg_file = open(path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
text_lines = reg_file.readline()
|
||||
reg_file.close()
|
||||
if text_lines.find('OFF') < 0:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_presence(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+'ESC601_QSFP/QSFP_present'
|
||||
try:
|
||||
reg_file = open(path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text_lines = reg_file.readlines()
|
||||
reg_file.close()
|
||||
if text_lines[port_num].find('not') < 0:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def init_global_port_presence(self):
|
||||
for port_num in range(self.port_start, (self.port_end + 1)):
|
||||
presence = self.get_presence(port_num)
|
||||
if(presence):
|
||||
self._global_port_pres_dict[port_num] = '1'
|
||||
else:
|
||||
self._global_port_pres_dict[port_num] = '0'
|
||||
|
||||
def get_transceiver_change_event(self, timeout=0):
|
||||
port_dict = {}
|
||||
while True:
|
||||
for port_num in range(self.port_start, (self.port_end + 1)):
|
||||
presence = self.get_presence(port_num)
|
||||
if(presence and self._global_port_pres_dict[port_num] == '0'):
|
||||
self._global_port_pres_dict[port_num] = '1'
|
||||
port_dict[port_num] = '1'
|
||||
elif(not presence and
|
||||
self._global_port_pres_dict[port_num] == '1'):
|
||||
self._global_port_pres_dict[port_num] = '0'
|
||||
port_dict[port_num] = '0'
|
||||
|
||||
if(len(port_dict) > 0):
|
||||
return True, port_dict
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
@property
|
||||
def port_start(self):
|
||||
return self._port_start
|
||||
|
||||
@property
|
||||
def port_end(self):
|
||||
return self._port_end
|
||||
|
||||
@property
|
||||
def qsfp_ports(self):
|
||||
return range(0, self._port_in_block + 1)
|
||||
|
||||
@property
|
||||
def port_to_eeprom_mapping(self):
|
||||
return self._port_to_eeprom_mapping
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"skip_ledd": true,
|
||||
"skip_thermalctld": true
|
||||
}
|
22
device/cameo/x86_64-cameo_esc601_32q-r0/sensors.conf
Normal file
22
device/cameo/x86_64-cameo_esc601_32q-r0/sensors.conf
Normal file
@ -0,0 +1,22 @@
|
||||
bus "i2c-43" "i2c-0-mux (chan_id 2)"
|
||||
chip "g781-i2c-43-4c"
|
||||
label temp1 "local temp sensor"
|
||||
label temp2 "Sensor on left bottom PCB"
|
||||
|
||||
bus "i2c-44" "i2c-0-mux (chan_id 3)"
|
||||
chip "g781-i2c-44-4c"
|
||||
label temp1 "local temp sensor"
|
||||
label temp2 "Sensor on rear bottom PCB"
|
||||
|
||||
bus "i2c-42" "i2c-0-mux (chan_id 1)"
|
||||
chip "g781-i2c-42-4c"
|
||||
label temp1 "local temp sensor"
|
||||
label temp2 "Sensor on rear center PCB"
|
||||
|
||||
bus "i2c-41" "i2c-0-mux (chan_id 0)"
|
||||
chip "nct7511-i2c-*-2e"
|
||||
label temp1 "local temp sensor"
|
||||
label temp2 "Sensor on right bottom PCB"
|
||||
ignore fan1
|
||||
|
||||
|
1
device/cameo/x86_64-cameo_esc601_32q-r0/topo.conf
Normal file
1
device/cameo/x86_64-cameo_esc601_32q-r0/topo.conf
Normal file
@ -0,0 +1 @@
|
||||
t1
|
1
device/cameo/x86_64-cameo_esc602_32q-r0/default_sku
Normal file
1
device/cameo/x86_64-cameo_esc602_32q-r0/default_sku
Normal file
@ -0,0 +1 @@
|
||||
esc602-32q t1
|
@ -0,0 +1,137 @@
|
||||
{# Default values which will be used if no actual configura available #}
|
||||
{% set default_cable = '40m' %}
|
||||
|
||||
{# Port configuration to cable length look-up table #}
|
||||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
|
||||
{# Roles described in the minigraph #}
|
||||
{% set ports2cable = {
|
||||
'torrouter_server' : '5m',
|
||||
'leafrouter_torrouter' : '40m',
|
||||
'spinerouter_leafrouter' : '300m'
|
||||
}
|
||||
%}
|
||||
|
||||
{%- macro cable_length(port_name) %}
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
{%- set roles2 = neighbor_role + '_' + switch_role %}
|
||||
{%- set roles1 = roles1 | lower %}
|
||||
{%- set roles2 = roles2 | lower %}
|
||||
{%- if roles1 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
|
||||
{%- elif roles2 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else %}
|
||||
{%- if switch_role.lower() == 'torrouter' %}
|
||||
{%- for local_port in VLAN_MEMBER %}
|
||||
{%- if local_port[1] == port_name %}
|
||||
{%- set roles3 = switch_role + '_' + 'server' %}
|
||||
{%- set roles3 = roles3 | lower %}
|
||||
{%- if roles3 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- if DEVICE_METADATA is defined %}
|
||||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"CABLE_LENGTH": {
|
||||
"AZURE": {
|
||||
{% for port in PORT %}
|
||||
{% set cable = cable_length(port) -%}
|
||||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "34056960",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "4185600"
|
||||
},
|
||||
"lossy_pool": {
|
||||
"size": "14595840",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"xoff":"38816",
|
||||
"size":"1518",
|
||||
"dynamic_th":"1",
|
||||
"xon_offset":"13440"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"23001600"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"23001600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"BUFFER_POOL": {
|
||||
"lossy_pool": {
|
||||
"size": "46003200",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"23001600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|0-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
{# Default values which will be used if no actual configura available #}
|
||||
{% set default_cable = '40m' %}
|
||||
|
||||
{# Port configuration to cable length look-up table #}
|
||||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
|
||||
{# Roles described in the minigraph #}
|
||||
{% set ports2cable = {
|
||||
'torrouter_server' : '5m',
|
||||
'leafrouter_torrouter' : '40m',
|
||||
'spinerouter_leafrouter' : '300m'
|
||||
}
|
||||
%}
|
||||
|
||||
{%- macro cable_length(port_name) %}
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
{%- set roles2 = neighbor_role + '_' + switch_role %}
|
||||
{%- set roles1 = roles1 | lower %}
|
||||
{%- set roles2 = roles2 | lower %}
|
||||
{%- if roles1 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
|
||||
{%- elif roles2 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else %}
|
||||
{%- if switch_role.lower() == 'torrouter' %}
|
||||
{%- for local_port in VLAN_MEMBER %}
|
||||
{%- if local_port[1] == port_name %}
|
||||
{%- set roles3 = switch_role + '_' + 'server' %}
|
||||
{%- set roles3 = roles3 | lower %}
|
||||
{%- if roles3 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- if DEVICE_METADATA is defined %}
|
||||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"CABLE_LENGTH": {
|
||||
"AZURE": {
|
||||
{% for port in PORT %}
|
||||
{% set cable = cable_length(port) -%}
|
||||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "34056960",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "4185600"
|
||||
},
|
||||
"lossy_pool": {
|
||||
"size": "14595840",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"xoff":"38816",
|
||||
"size":"1518",
|
||||
"dynamic_th":"1",
|
||||
"xon_offset":"13440"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"23001600"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"23001600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,397 @@
|
||||
ifcs:
|
||||
options:
|
||||
log_level: "info"
|
||||
nodes:
|
||||
- node_id: "0"
|
||||
options:
|
||||
sku: "configs/sku/innovium.55300"
|
||||
netdev:
|
||||
- auto_create: "no"
|
||||
multi_interface: "yes"
|
||||
buffer_management_mode: "api_driven"
|
||||
max_lossless_tc: "2"
|
||||
skip_pll_check: "false"
|
||||
ilpm_enable: "1"
|
||||
forward_profile: "IFCS_FORWARD_PROFILE_ID_PROFILE_E"
|
||||
mac_clk: "750"
|
||||
sys_clk: "1300"
|
||||
ifc_clk: "675"
|
||||
txring:
|
||||
- txring_id: "0"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "1"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "2"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "3"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
rxring:
|
||||
- rxring_id: "0"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39"
|
||||
- rxring_id: "1"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40"
|
||||
- rxring_id: "2"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 47"
|
||||
- rxring_id: "3"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
queues: "42, 43, 44, 45, 46"
|
||||
devports:
|
||||
- id: "0"
|
||||
sysport: "129"
|
||||
type: "cpu"
|
||||
- fec: "KRFEC"
|
||||
id: "121"
|
||||
lanes: "0:4"
|
||||
serdes_group: "15"
|
||||
speed: "100G"
|
||||
sysport: "121"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "125"
|
||||
lanes: "4:4"
|
||||
serdes_group: "15"
|
||||
speed: "100G"
|
||||
sysport: "125"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "113"
|
||||
lanes: "0:4"
|
||||
serdes_group: "14"
|
||||
speed: "100G"
|
||||
sysport: "113"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "117"
|
||||
lanes: "4:4"
|
||||
serdes_group: "14"
|
||||
speed: "100G"
|
||||
sysport: "117"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "105"
|
||||
lanes: "0:4"
|
||||
serdes_group: "13"
|
||||
speed: "100G"
|
||||
sysport: "105"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "109"
|
||||
lanes: "4:4"
|
||||
serdes_group: "13"
|
||||
speed: "100G"
|
||||
sysport: "109"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "97"
|
||||
lanes: "0:4"
|
||||
serdes_group: "12"
|
||||
speed: "100G"
|
||||
sysport: "97"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "101"
|
||||
lanes: "4:4"
|
||||
serdes_group: "12"
|
||||
speed: "100G"
|
||||
sysport: "101"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "89"
|
||||
lanes: "0:4"
|
||||
serdes_group: "11"
|
||||
speed: "100G"
|
||||
sysport: "89"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "93"
|
||||
lanes: "4:4"
|
||||
serdes_group: "11"
|
||||
speed: "100G"
|
||||
sysport: "93"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "81"
|
||||
lanes: "0:4"
|
||||
serdes_group: "10"
|
||||
speed: "100G"
|
||||
sysport: "81"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "85"
|
||||
lanes: "4:4"
|
||||
serdes_group: "10"
|
||||
speed: "100G"
|
||||
sysport: "85"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "73"
|
||||
lanes: "0:4"
|
||||
serdes_group: "9"
|
||||
speed: "100G"
|
||||
sysport: "73"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "77"
|
||||
lanes: "4:4"
|
||||
serdes_group: "9"
|
||||
speed: "100G"
|
||||
sysport: "77"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "65"
|
||||
lanes: "0:4"
|
||||
serdes_group: "8"
|
||||
speed: "100G"
|
||||
sysport: "65"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "69"
|
||||
lanes: "4:4"
|
||||
serdes_group: "8"
|
||||
speed: "100G"
|
||||
sysport: "69"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "57"
|
||||
lanes: "0:4"
|
||||
serdes_group: "7"
|
||||
speed: "100G"
|
||||
sysport: "57"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "61"
|
||||
lanes: "4:4"
|
||||
serdes_group: "7"
|
||||
speed: "100G"
|
||||
sysport: "61"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "49"
|
||||
lanes: "0:4"
|
||||
serdes_group: "6"
|
||||
speed: "100G"
|
||||
sysport: "49"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "53"
|
||||
lanes: "4:4"
|
||||
serdes_group: "6"
|
||||
speed: "100G"
|
||||
sysport: "53"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "41"
|
||||
lanes: "0:4"
|
||||
serdes_group: "5"
|
||||
speed: "100G"
|
||||
sysport: "41"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "45"
|
||||
lanes: "4:4"
|
||||
serdes_group: "5"
|
||||
speed: "100G"
|
||||
sysport: "45"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "33"
|
||||
lanes: "0:4"
|
||||
serdes_group: "4"
|
||||
speed: "100G"
|
||||
sysport: "33"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "37"
|
||||
lanes: "4:4"
|
||||
serdes_group: "4"
|
||||
speed: "100G"
|
||||
sysport: "37"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "25"
|
||||
lanes: "0:4"
|
||||
serdes_group: "3"
|
||||
speed: "100G"
|
||||
sysport: "25"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "29"
|
||||
lanes: "4:4"
|
||||
serdes_group: "3"
|
||||
speed: "100G"
|
||||
sysport: "29"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "17"
|
||||
lanes: "0:4"
|
||||
serdes_group: "2"
|
||||
speed: "100G"
|
||||
sysport: "17"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "21"
|
||||
lanes: "4:4"
|
||||
serdes_group: "2"
|
||||
speed: "100G"
|
||||
sysport: "21"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "9"
|
||||
lanes: "0:4"
|
||||
serdes_group: "1"
|
||||
speed: "100G"
|
||||
sysport: "9"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "13"
|
||||
lanes: "4:4"
|
||||
serdes_group: "1"
|
||||
speed: "100G"
|
||||
sysport: "13"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "1"
|
||||
lanes: "0:4"
|
||||
serdes_group: "0"
|
||||
speed: "100G"
|
||||
sysport: "1"
|
||||
type: "eth"
|
||||
- fec: "KRFEC"
|
||||
id: "5"
|
||||
lanes: "4:4"
|
||||
serdes_group: "0"
|
||||
speed: "100G"
|
||||
sysport: "5"
|
||||
type: "eth"
|
||||
# Aux ports to be enabled later
|
||||
# - id: "33"
|
||||
# fec: "NONE"
|
||||
# lanes: "0:1"
|
||||
# serdes_group: "16"
|
||||
# speed: "10G"
|
||||
# sysport: "33"
|
||||
# type: "mgmt 0"
|
||||
# - id: "34"
|
||||
# fec: "NONE"
|
||||
# lanes: "1:1"
|
||||
# serdes_group: "16"
|
||||
# speed: "10G"
|
||||
# sysport: "34"
|
||||
# type: "mgmt 1"
|
||||
isg:
|
||||
- id: "0"
|
||||
tx_polarity: "00001010"
|
||||
rx_polarity: "01001001"
|
||||
lane_swap: "46750132"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "1"
|
||||
tx_polarity: "00011111"
|
||||
rx_polarity: "01101001"
|
||||
lane_swap: "46752130"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "2"
|
||||
tx_polarity: "00101000"
|
||||
rx_polarity: "11110111"
|
||||
lane_swap: "57462301"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "3"
|
||||
tx_polarity: "00111101"
|
||||
rx_polarity: "00101101"
|
||||
lane_swap: "67542301"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "4"
|
||||
tx_polarity: "01110110"
|
||||
rx_polarity: "01111101"
|
||||
lane_swap: "76543021"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "5"
|
||||
tx_polarity: "00100100"
|
||||
rx_polarity: "01101010"
|
||||
lane_swap: "76542103"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "6"
|
||||
tx_polarity: "11000011"
|
||||
rx_polarity: "11110101"
|
||||
lane_swap: "45672013"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "7"
|
||||
tx_polarity: "10011101"
|
||||
rx_polarity: "11111010"
|
||||
lane_swap: "74562103"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "8"
|
||||
tx_polarity: "01001000"
|
||||
rx_polarity: "00100011"
|
||||
lane_swap: "54672301"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "9"
|
||||
tx_polarity: "11111111"
|
||||
rx_polarity: "01110111"
|
||||
lane_swap: "46750321"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "10"
|
||||
tx_polarity: "10011110"
|
||||
rx_polarity: "10110000"
|
||||
lane_swap: "67542310"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "11"
|
||||
tx_polarity: "01010010"
|
||||
rx_polarity: "10101011"
|
||||
lane_swap: "65741302"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "12"
|
||||
tx_polarity: "11010110"
|
||||
rx_polarity: "01101001"
|
||||
lane_swap: "45760321"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "13"
|
||||
tx_polarity: "01110111"
|
||||
rx_polarity: "00101000"
|
||||
lane_swap: "45670123"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "14"
|
||||
tx_polarity: "11110110"
|
||||
rx_polarity: "10111100"
|
||||
lane_swap: "67542013"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "15"
|
||||
tx_polarity: "01011011"
|
||||
rx_polarity: "01101000"
|
||||
lane_swap: "64572103"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
|
||||
|
@ -0,0 +1,62 @@
|
||||
sku: innovium.55300
|
||||
|
||||
device_id: 0x1b59
|
||||
|
||||
# Hardware constraint information
|
||||
hardware:
|
||||
num_ibs: 2
|
||||
ib_active: 0, 1
|
||||
|
||||
ports_per_ib: 64, 64
|
||||
recirc_port_num: 64, 64
|
||||
cpu_port_num: 65
|
||||
cpu_port_ib: 0
|
||||
mgmt_port_num: 65, 66
|
||||
mgmt_port_ibs: 1, 1
|
||||
|
||||
pics_per_ib: 9, 9
|
||||
pic_ports_per_pic: 8
|
||||
max_serdes_speed: 25
|
||||
|
||||
num_shared_pics: 0
|
||||
|
||||
isg [0-7]:
|
||||
ib: 0
|
||||
pic_id: [0-7]
|
||||
|
||||
isg 8:
|
||||
ib: 1
|
||||
pic_id: 7
|
||||
|
||||
isg 9:
|
||||
ib: 1
|
||||
pic_id: 6
|
||||
|
||||
isg 10:
|
||||
ib: 1
|
||||
pic_id: 5
|
||||
|
||||
isg 11:
|
||||
ib: 1
|
||||
pic_id: 4
|
||||
|
||||
isg 12:
|
||||
ib: 1
|
||||
pic_id: 3
|
||||
|
||||
isg 13:
|
||||
ib: 1
|
||||
pic_id: 2
|
||||
|
||||
isg 14:
|
||||
ib: 1
|
||||
pic_id: 1
|
||||
|
||||
isg 15:
|
||||
ib: 1
|
||||
pic_id: 0
|
||||
|
||||
isg 16:
|
||||
mode: 0:2
|
||||
ib: 1
|
||||
pic_id: 8
|
@ -0,0 +1,8 @@
|
||||
IFCS_INIT_FILE : "/usr/share/sonic/hwsku/config_32x100G_Cameo-esc602-32q.yaml"
|
||||
IFCS_SKU_FILE : "/usr/share/sonic/hwsku/innovium.55300"
|
||||
IFCS_INNO_CLI_PORT : "9999"
|
||||
IFCS_TARGET : "device"
|
||||
INNOVIUM_DIR : "/innovium"
|
||||
PYTHONPATH : "$INNOVIUM_DIR:$INNOVIUM_DIR/cmds:$INNOVIUM_DIR/scripts:$INNOVIUM_DIR/test/:$INNOVIUM_DIR/test/utils:$INNOVIUM_DIR/utils:$INNOVIUM_DIR/pyctypes"
|
||||
IVM_SAI_DATAPATH_CONFIG_FILE: "/usr/share/sonic/hwsku/ivm.sai.datapath.config.yaml"
|
||||
IVM_SAI_PARAM_A0008: "64"
|
@ -0,0 +1,9 @@
|
||||
ISAI_PARAM_P0_0_LS : "9216 9216"
|
||||
ISAI_PARAM_P0_1_LS : "2850 2650"
|
||||
ISAI_PARAM_P0_1_ALS : "290 90"
|
||||
ISAI_PARAM_P1_0_LS : "3072 3072"
|
||||
ISAI_PARAM_P1_0_LL : "6144 6144"
|
||||
ISAI_PARAM_P1_1_LS : "2210 2010"
|
||||
ISAI_PARAM_P1_1_LL : "1330 1330"
|
||||
ISAI_PARAM_P1_1_ALS : "290 90"
|
||||
ISAI_PARAM_P1_1_ALL : "50 50"
|
@ -0,0 +1,18 @@
|
||||
# PG lossless profiles.
|
||||
# speed cable size xon xoff threshold xon_offset
|
||||
25000 5m 1518 0 15680 1 13440
|
||||
50000 5m 1518 0 21248 1 13440
|
||||
100000 5m 1518 0 34624 1 13440
|
||||
400000 5m 1518 0 117536 1 13440
|
||||
25000 40m 1518 0 16928 1 13440
|
||||
50000 40m 1518 0 23392 1 13440
|
||||
100000 40m 1518 0 38816 1 13440
|
||||
400000 40m 1518 0 135520 1 13440
|
||||
25000 100m 1518 0 18848 1 13440
|
||||
50000 100m 1518 0 27264 1 13440
|
||||
100000 100m 1518 0 46496 1 13440
|
||||
400000 100m 1518 0 166688 1 13440
|
||||
25000 300m 1518 0 25184 1 13440
|
||||
50000 300m 1518 0 40128 1 13440
|
||||
100000 300m 1518 0 72384 1 13440
|
||||
400000 300m 1518 0 268640 1 13440
|
@ -0,0 +1,33 @@
|
||||
# name lanes speed index mtu fec
|
||||
Ethernet0 121,122,123,124 100000 0 9126 rs
|
||||
Ethernet4 125,126,127,128 100000 1 9126 rs
|
||||
Ethernet8 113,114,115,116 100000 2 9126 rs
|
||||
Ethernet12 117,118,119,120 100000 3 9126 rs
|
||||
Ethernet16 105,106,107,108 100000 4 9126 rs
|
||||
Ethernet20 109,110,111,112 100000 5 9126 rs
|
||||
Ethernet24 97,98,99,100 100000 6 9126 rs
|
||||
Ethernet28 101,102,103,104 100000 7 9126 rs
|
||||
Ethernet32 89,90,91,92 100000 8 9126 rs
|
||||
Ethernet36 93,94,95,96 100000 9 9126 rs
|
||||
Ethernet40 81,82,83,84 100000 10 9126 rs
|
||||
Ethernet44 85,86,87,88 100000 11 9126 rs
|
||||
Ethernet48 73,74,75,76 100000 12 9126 rs
|
||||
Ethernet52 77,78,79,80 100000 13 9126 rs
|
||||
Ethernet56 65,66,67,68 100000 14 9126 rs
|
||||
Ethernet60 69,70,71,72 100000 15 9126 rs
|
||||
Ethernet64 57,58,59,60 100000 16 9126 rs
|
||||
Ethernet68 61,62,63,64 100000 17 9126 rs
|
||||
Ethernet72 49,50,51,52 100000 18 9126 rs
|
||||
Ethernet76 53,54,55,56 100000 19 9126 rs
|
||||
Ethernet80 41,42,43,44 100000 20 9126 rs
|
||||
Ethernet84 45,46,47,48 100000 21 9126 rs
|
||||
Ethernet88 33,34,35,36 100000 22 9126 rs
|
||||
Ethernet92 37,38,39,40 100000 23 9126 rs
|
||||
Ethernet96 25,26,27,28 100000 24 9126 rs
|
||||
Ethernet100 29,30,31,32 100000 25 9126 rs
|
||||
Ethernet104 17,18,19,20 100000 26 9126 rs
|
||||
Ethernet108 21,22,23,24 100000 27 9126 rs
|
||||
Ethernet112 9,10,11,12 100000 28 9126 rs
|
||||
Ethernet116 13,14,15,16 100000 29 9126 rs
|
||||
Ethernet120 1,2,3,4 100000 30 9126 rs
|
||||
Ethernet124 5,6,7,8 100000 31 9126 rs
|
114
device/cameo/x86_64-cameo_esc602_32q-r0/esc602-32q/qos.json.j2
Normal file
114
device/cameo/x86_64-cameo_esc602_32q-r0/esc602-32q/qos.json.j2
Normal file
@ -0,0 +1,114 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSLESS" : {
|
||||
"red_min_threshold":"50000"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"0",
|
||||
"4":"0",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"0",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]"
|
||||
}
|
||||
},
|
||||
"SCHEDULER": {
|
||||
"scheduler.7": {
|
||||
"type": "STRICT"
|
||||
}
|
||||
},
|
||||
"QUEUE": {
|
||||
"{{ port_names }}|7": {
|
||||
"scheduler": "[SCHEDULER|scheduler.7]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSLESS" : {
|
||||
"red_min_threshold":"50000"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/ivm.sai.config.yaml
|
3
device/cameo/x86_64-cameo_esc602_32q-r0/installer.conf
Normal file
3
device/cameo/x86_64-cameo_esc602_32q-r0/installer.conf
Normal file
@ -0,0 +1,3 @@
|
||||
CONSOLE_PORT=0x3f8
|
||||
CONSOLE_DEV=0
|
||||
CONSOLE_SPEED=115200
|
16
device/cameo/x86_64-cameo_esc602_32q-r0/platform_reboot
Executable file
16
device/cameo/x86_64-cameo_esc602_32q-r0/platform_reboot
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
mr_reboot() {
|
||||
|
||||
sudo rmmod x86-64-cameo-esc602-32q
|
||||
sudo i2cset -y 0 0x30 0xa1 0
|
||||
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ] || [ $@ = "-f" ] || [ $@ = "--force" ] || [ $@ = "reboot" ]; then
|
||||
mr_reboot
|
||||
elif [ $@ = "-p" ] ; then
|
||||
sudo halt
|
||||
else
|
||||
echo "unsupported option"
|
||||
fi
|
12
device/cameo/x86_64-cameo_esc602_32q-r0/plugins/eeprom.py
Executable file
12
device/cameo/x86_64-cameo_esc602_32q-r0/plugins/eeprom.py
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
from sonic_eeprom import eeprom_tlvinfo
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
||||
_TLV_INFO_MAX_LEN = 256
|
||||
def __init__(self, name, path, cpld_root, ro):
|
||||
self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom"
|
||||
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
95
device/cameo/x86_64-cameo_esc602_32q-r0/plugins/psuutil.py
Executable file
95
device/cameo/x86_64-cameo_esc602_32q-r0/plugins/psuutil.py
Executable file
@ -0,0 +1,95 @@
|
||||
#
|
||||
# psuutil.py
|
||||
# Platform-specific PSU status interface for SONiC
|
||||
#
|
||||
|
||||
|
||||
import os.path
|
||||
|
||||
try:
|
||||
from sonic_psu.psu_base import PsuBase
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
attr_path = '/sys/class/hwmon/hwmon2/device/ESC602_POWER/'
|
||||
|
||||
class PsuUtil(PsuBase):
|
||||
"""Platform-specific PSUutil class"""
|
||||
|
||||
def __init__(self):
|
||||
PsuBase.__init__(self)
|
||||
|
||||
|
||||
# Get sysfs attribute
|
||||
def get_attr_value(self, path):
|
||||
|
||||
retval = 'ERR'
|
||||
if (not os.path.isfile(path)):
|
||||
return retval
|
||||
|
||||
try:
|
||||
with open(path, 'r') as fd:
|
||||
retval = fd.read()
|
||||
except Exception as error:
|
||||
logging.error("Unable to open ", path, " file !")
|
||||
|
||||
retval = retval.rstrip('\r\n')
|
||||
return retval
|
||||
|
||||
def get_num_psus(self):
|
||||
"""
|
||||
Retrieves the number of PSUs available on the device
|
||||
:return: An integer, the number of PSUs available on the device
|
||||
"""
|
||||
MAX_PSUS = 2
|
||||
return MAX_PSUS
|
||||
|
||||
def get_psu_status(self, index):
|
||||
"""
|
||||
Retrieves the oprational status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is operating properly, False if PSU is\
|
||||
faulty
|
||||
"""
|
||||
status = 0
|
||||
attr_file = 'psu{}_good'.format(index)
|
||||
status_path = attr_path + attr_file
|
||||
try:
|
||||
reg_file = open(status_path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text = reg_file.read()
|
||||
|
||||
if int(text) == 1:
|
||||
status = 1
|
||||
|
||||
reg_file.close()
|
||||
|
||||
return status
|
||||
|
||||
def get_psu_presence(self, index):
|
||||
"""
|
||||
Retrieves the presence status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is plugged, False if not
|
||||
"""
|
||||
status = 0
|
||||
attr_file ='psu{}_prnt'.format(index)
|
||||
presence_path = attr_path + attr_file
|
||||
try:
|
||||
reg_file = open(presence_path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text = reg_file.read()
|
||||
|
||||
if int(text) == 1:
|
||||
status = 1
|
||||
|
||||
reg_file.close()
|
||||
|
||||
return status
|
||||
|
166
device/cameo/x86_64-cameo_esc602_32q-r0/plugins/sfputil.py
Executable file
166
device/cameo/x86_64-cameo_esc602_32q-r0/plugins/sfputil.py
Executable file
@ -0,0 +1,166 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
import time
|
||||
import json
|
||||
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
attr_path = '/sys/class/hwmon/hwmon2/device/'
|
||||
PLATFORM_INSTALL_INFO_FILE="/etc/sonic/platform_install.json"
|
||||
PLATFORM_SFP_GROUPS = ['SFP-G01','SFP-G02','SFP-G03','SFP-G04']
|
||||
|
||||
QSFP_RESET_FILE = 'ESC602_QSFP/qsfp{}_reset'
|
||||
QSFP_LOWPOWER_FILE = 'ESC602_QSFP/qsfp{}_low_power'
|
||||
QSFP_PRESENT_FILE = 'ESC602_QSFP/qsfp{}_present'
|
||||
|
||||
class SfpUtil(SfpUtilBase):
|
||||
"""Platform specific SfpUtill class"""
|
||||
|
||||
_port_start = 0
|
||||
_port_end = 31
|
||||
_port_in_block =32
|
||||
_port_to_eeprom_mapping = {}
|
||||
_global_port_pres_dict = {}
|
||||
|
||||
def __init__(self):
|
||||
eeprom_path = "{}/eeprom"
|
||||
path_list = self.get_sfp_path()
|
||||
for x in range(self._port_start, self._port_end + 1):
|
||||
port_eeprom_path = eeprom_path.format(path_list[x])
|
||||
self._port_to_eeprom_mapping[x] = port_eeprom_path
|
||||
|
||||
self.init_global_port_presence()
|
||||
SfpUtilBase.__init__(self)
|
||||
|
||||
def get_sfp_path(self):
|
||||
map = []
|
||||
with open(PLATFORM_INSTALL_INFO_FILE) as fd:
|
||||
install_info = json.load(fd)
|
||||
for sfp_group_name in PLATFORM_SFP_GROUPS:
|
||||
sfp_group = install_info[2][sfp_group_name]
|
||||
map = map + sfp_group['paths']
|
||||
return map
|
||||
|
||||
def reset(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+QSFP_RESET_FILE.format(port_num+1)
|
||||
try:
|
||||
reg_file = open(path, 'w')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
reg_file.seek(0)
|
||||
reg_file.write('1')
|
||||
|
||||
reg_file.close()
|
||||
return True
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+QSFP_LOWPOWER_FILE.format(port_num+1)
|
||||
try:
|
||||
reg_file = open(path, 'w')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
# the gpio pin is ACTIVE_HIGH
|
||||
if lpmode is True:
|
||||
val = "1"
|
||||
else:
|
||||
val = "0"
|
||||
|
||||
# write value to gpio
|
||||
reg_file.seek(0)
|
||||
reg_file.write(val)
|
||||
reg_file.close()
|
||||
|
||||
return True
|
||||
|
||||
def get_low_power_mode(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+QSFP_LOWPOWER_FILE.format(port_num+1)
|
||||
try:
|
||||
reg_file = open(path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
text = reg_file.read()
|
||||
reg_file.close()
|
||||
if int(text) == 1:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_presence(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+QSFP_PRESENT_FILE.format(port_num+1)
|
||||
try:
|
||||
reg_file = open(path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text = reg_file.read()
|
||||
reg_file.close()
|
||||
if int(text) == 1:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def init_global_port_presence(self):
|
||||
for port_num in range(self.port_start, (self.port_end + 1)):
|
||||
presence = self.get_presence(port_num)
|
||||
if(presence):
|
||||
self._global_port_pres_dict[port_num] = '1'
|
||||
else:
|
||||
self._global_port_pres_dict[port_num] = '0'
|
||||
|
||||
def get_transceiver_change_event(self, timeout=0):
|
||||
port_dict = {}
|
||||
while True:
|
||||
for port_num in range(self.port_start, (self.port_end + 1)):
|
||||
presence = self.get_presence(port_num)
|
||||
if(presence and self._global_port_pres_dict[port_num] == '0'):
|
||||
self._global_port_pres_dict[port_num] = '1'
|
||||
port_dict[port_num] = '1'
|
||||
elif(not presence and
|
||||
self._global_port_pres_dict[port_num] == '1'):
|
||||
self._global_port_pres_dict[port_num] = '0'
|
||||
port_dict[port_num] = '0'
|
||||
|
||||
if(len(port_dict) > 0):
|
||||
return True, port_dict
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
@property
|
||||
def port_start(self):
|
||||
return self._port_start
|
||||
|
||||
@property
|
||||
def port_end(self):
|
||||
return self._port_end
|
||||
|
||||
@property
|
||||
def qsfp_ports(self):
|
||||
return range(0, self._port_in_block + 1)
|
||||
|
||||
@property
|
||||
def port_to_eeprom_mapping(self):
|
||||
return self._port_to_eeprom_mapping
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"skip_ledd": true,
|
||||
"skip_thermalctld": true
|
||||
}
|
3
device/cameo/x86_64-cameo_esc602_32q-r0/sensors.conf
Normal file
3
device/cameo/x86_64-cameo_esc602_32q-r0/sensors.conf
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
|
1
device/cameo/x86_64-cameo_esc602_32q-r0/topo.conf
Normal file
1
device/cameo/x86_64-cameo_esc602_32q-r0/topo.conf
Normal file
@ -0,0 +1 @@
|
||||
t1
|
1
device/cameo/x86_64-cameo_esqc610_56sq-r0/default_sku
Normal file
1
device/cameo/x86_64-cameo_esqc610_56sq-r0/default_sku
Normal file
@ -0,0 +1 @@
|
||||
esqc610-56sq t1
|
@ -0,0 +1,137 @@
|
||||
{# Default values which will be used if no actual configura available #}
|
||||
{% set default_cable = '40m' %}
|
||||
|
||||
{# Port configuration to cable length look-up table #}
|
||||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
|
||||
{# Roles described in the minigraph #}
|
||||
{% set ports2cable = {
|
||||
'torrouter_server' : '5m',
|
||||
'leafrouter_torrouter' : '40m',
|
||||
'spinerouter_leafrouter' : '300m'
|
||||
}
|
||||
%}
|
||||
|
||||
{%- macro cable_length(port_name) %}
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
{%- set roles2 = neighbor_role + '_' + switch_role %}
|
||||
{%- set roles1 = roles1 | lower %}
|
||||
{%- set roles2 = roles2 | lower %}
|
||||
{%- if roles1 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
|
||||
{%- elif roles2 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else %}
|
||||
{%- if switch_role.lower() == 'torrouter' %}
|
||||
{%- for local_port in VLAN_MEMBER %}
|
||||
{%- if local_port[1] == port_name %}
|
||||
{%- set roles3 = switch_role + '_' + 'server' %}
|
||||
{%- set roles3 = roles3 | lower %}
|
||||
{%- if roles3 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- if DEVICE_METADATA is defined %}
|
||||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"CABLE_LENGTH": {
|
||||
"AZURE": {
|
||||
{% for port in PORT %}
|
||||
{% set cable = cable_length(port) -%}
|
||||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "34056960",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "4185600"
|
||||
},
|
||||
"lossy_pool": {
|
||||
"size": "14595840",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"xoff":"38816",
|
||||
"size":"1518",
|
||||
"dynamic_th":"1",
|
||||
"xon_offset":"13440"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"23001600"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"23001600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"BUFFER_POOL": {
|
||||
"lossy_pool": {
|
||||
"size": "46003200",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"23001600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|0-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,137 @@
|
||||
{# Default values which will be used if no actual configura available #}
|
||||
{% set default_cable = '40m' %}
|
||||
|
||||
{# Port configuration to cable length look-up table #}
|
||||
{# Each record describes mapping of DUT (DUT port) role and neighbor role to cable length #}
|
||||
{# Roles described in the minigraph #}
|
||||
{% set ports2cable = {
|
||||
'torrouter_server' : '5m',
|
||||
'leafrouter_torrouter' : '40m',
|
||||
'spinerouter_leafrouter' : '300m'
|
||||
}
|
||||
%}
|
||||
|
||||
{%- macro cable_length(port_name) %}
|
||||
{%- set cable_len = [] %}
|
||||
{%- for local_port in DEVICE_NEIGHBOR %}
|
||||
{%- if local_port == port_name %}
|
||||
{%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %}
|
||||
{%- set neighbor_role = neighbor.type %}
|
||||
{%- set roles1 = switch_role + '_' + neighbor_role %}
|
||||
{%- set roles2 = neighbor_role + '_' + switch_role %}
|
||||
{%- set roles1 = roles1 | lower %}
|
||||
{%- set roles2 = roles2 | lower %}
|
||||
{%- if roles1 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles1]) %}{% endif %}
|
||||
{%- elif roles2 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles2]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else %}
|
||||
{%- if switch_role.lower() == 'torrouter' %}
|
||||
{%- for local_port in VLAN_MEMBER %}
|
||||
{%- if local_port[1] == port_name %}
|
||||
{%- set roles3 = switch_role + '_' + 'server' %}
|
||||
{%- set roles3 = roles3 | lower %}
|
||||
{%- if roles3 in ports2cable %}
|
||||
{%- if cable_len.append(ports2cable[roles3]) %}{% endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- if cable_len -%}
|
||||
{{ cable_len.0 }}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- else -%}
|
||||
{{ default_cable }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{%- if DEVICE_METADATA is defined %}
|
||||
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
|
||||
{%- endif -%}
|
||||
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
{
|
||||
"CABLE_LENGTH": {
|
||||
"AZURE": {
|
||||
{% for port in PORT %}
|
||||
{% set cable = cable_length(port) -%}
|
||||
"{{ port }}": "{{ cable }}"{%- if not loop.last -%},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
}
|
||||
},
|
||||
"BUFFER_POOL": {
|
||||
"ingress_lossless_pool": {
|
||||
"size": "34056960",
|
||||
"type": "ingress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "4185600"
|
||||
},
|
||||
"lossy_pool": {
|
||||
"size": "14595840",
|
||||
"type": "egress",
|
||||
"mode": "dynamic",
|
||||
"xoff": "0"
|
||||
}
|
||||
},
|
||||
"BUFFER_PROFILE": {
|
||||
"ingress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"xoff":"38816",
|
||||
"size":"1518",
|
||||
"dynamic_th":"1",
|
||||
"xon_offset":"13440"
|
||||
},
|
||||
"egress_lossless_profile": {
|
||||
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
|
||||
"size":"0",
|
||||
"static_th":"23001600"
|
||||
},
|
||||
"ingress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"0",
|
||||
"static_th":"23001600"
|
||||
},
|
||||
"egress_lossy_profile": {
|
||||
"pool":"[BUFFER_POOL|lossy_pool]",
|
||||
"size":"1518",
|
||||
"dynamic_th":"2"
|
||||
}
|
||||
},
|
||||
"BUFFER_PG": {
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
|
||||
}
|
||||
},
|
||||
"BUFFER_QUEUE": {
|
||||
"{{ port_names }}|3-4": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
|
||||
},
|
||||
"{{ port_names }}|0-2": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
},
|
||||
"{{ port_names }}|5-7": {
|
||||
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,563 @@
|
||||
ifcs:
|
||||
options:
|
||||
log_level: "info"
|
||||
nodes:
|
||||
- node_id: "0"
|
||||
options:
|
||||
sku: "configs/sku/innovium.55200"
|
||||
netdev:
|
||||
- auto_create: "no"
|
||||
multi_interface: "yes"
|
||||
buffer_management_mode: "api_driven"
|
||||
max_lossless_tc: "2"
|
||||
skip_pll_check: "false"
|
||||
ilpm_enable: "1"
|
||||
forward_profile: "IFCS_FORWARD_PROFILE_ID_PROFILE_E"
|
||||
mac_clk: "750"
|
||||
sys_clk: "975"
|
||||
ifc_clk: "525"
|
||||
txring:
|
||||
- txring_id: "0"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "1"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "2"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
- txring_id: "3"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
rxring:
|
||||
- rxring_id: "0"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39"
|
||||
- rxring_id: "1"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40"
|
||||
- rxring_id: "2"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
netdev: "true"
|
||||
queues: "2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 47"
|
||||
- rxring_id: "3"
|
||||
desc_count: "1024"
|
||||
prio: "1"
|
||||
queues: "42, 43, 44, 45, 46"
|
||||
devports:
|
||||
- id: "0"
|
||||
sysport: "129"
|
||||
type: "cpu"
|
||||
- id: "113"
|
||||
fec: "KRFEC"
|
||||
lanes: "0:1"
|
||||
serdes_group: "14"
|
||||
speed: "25G"
|
||||
sysport: "113"
|
||||
type: "eth"
|
||||
- id: "114"
|
||||
fec: "KRFEC"
|
||||
lanes: "1:1"
|
||||
serdes_group: "14"
|
||||
speed: "25G"
|
||||
sysport: "114"
|
||||
type: "eth"
|
||||
- id: "115"
|
||||
fec: "KRFEC"
|
||||
lanes: "2:1"
|
||||
serdes_group: "14"
|
||||
speed: "25G"
|
||||
sysport: "115"
|
||||
type: "eth"
|
||||
- id: "116"
|
||||
fec: "KRFEC"
|
||||
lanes: "3:1"
|
||||
serdes_group: "14"
|
||||
speed: "25G"
|
||||
sysport: "116"
|
||||
type: "eth"
|
||||
- id: "117"
|
||||
fec: "KRFEC"
|
||||
lanes: "4:1"
|
||||
serdes_group: "14"
|
||||
speed: "25G"
|
||||
sysport: "117"
|
||||
type: "eth"
|
||||
- id: "105"
|
||||
fec: "KRFEC"
|
||||
lanes: "0:1"
|
||||
serdes_group: "13"
|
||||
speed: "25G"
|
||||
sysport: "105"
|
||||
type: "eth"
|
||||
- id: "106"
|
||||
fec: "KRFEC"
|
||||
lanes: "1:1"
|
||||
serdes_group: "13"
|
||||
speed: "25G"
|
||||
sysport: "106"
|
||||
type: "eth"
|
||||
- id: "107"
|
||||
fec: "KRFEC"
|
||||
lanes: "2:1"
|
||||
serdes_group: "13"
|
||||
speed: "25G"
|
||||
sysport: "107"
|
||||
type: "eth"
|
||||
- id: "108"
|
||||
fec: "KRFEC"
|
||||
lanes: "3:1"
|
||||
serdes_group: "13"
|
||||
speed: "25G"
|
||||
sysport: "108"
|
||||
type: "eth"
|
||||
- id: "109"
|
||||
fec: "KRFEC"
|
||||
lanes: "4:1"
|
||||
serdes_group: "13"
|
||||
speed: "25G"
|
||||
sysport: "109"
|
||||
type: "eth"
|
||||
- id: "110"
|
||||
fec: "KRFEC"
|
||||
lanes: "5:1"
|
||||
serdes_group: "13"
|
||||
speed: "25G"
|
||||
sysport: "110"
|
||||
type: "eth"
|
||||
- id: "111"
|
||||
fec: "KRFEC"
|
||||
lanes: "6:1"
|
||||
serdes_group: "13"
|
||||
speed: "25G"
|
||||
sysport: "111"
|
||||
type: "eth"
|
||||
- id: "112"
|
||||
fec: "KRFEC"
|
||||
lanes: "7:1"
|
||||
serdes_group: "13"
|
||||
speed: "25G"
|
||||
sysport: "112"
|
||||
type: "eth"
|
||||
- id: "89"
|
||||
fec: "KRFEC"
|
||||
lanes: "0:1"
|
||||
serdes_group: "11"
|
||||
speed: "25G"
|
||||
sysport: "89"
|
||||
type: "eth"
|
||||
- id: "90"
|
||||
fec: "KRFEC"
|
||||
lanes: "1:1"
|
||||
serdes_group: "11"
|
||||
speed: "25G"
|
||||
sysport: "90"
|
||||
type: "eth"
|
||||
- id: "91"
|
||||
fec: "KRFEC"
|
||||
lanes: "2:1"
|
||||
serdes_group: "11"
|
||||
speed: "25G"
|
||||
sysport: "91"
|
||||
type: "eth"
|
||||
- id: "92"
|
||||
fec: "KRFEC"
|
||||
lanes: "3:1"
|
||||
serdes_group: "11"
|
||||
speed: "25G"
|
||||
sysport: "92"
|
||||
type: "eth"
|
||||
- id: "93"
|
||||
fec: "KRFEC"
|
||||
lanes: "4:1"
|
||||
serdes_group: "11"
|
||||
speed: "25G"
|
||||
sysport: "93"
|
||||
type: "eth"
|
||||
- id: "94"
|
||||
fec: "KRFEC"
|
||||
lanes: "5:1"
|
||||
serdes_group: "11"
|
||||
speed: "25G"
|
||||
sysport: "94"
|
||||
type: "eth"
|
||||
- id: "95"
|
||||
fec: "KRFEC"
|
||||
lanes: "6:1"
|
||||
serdes_group: "11"
|
||||
speed: "25G"
|
||||
sysport: "95"
|
||||
type: "eth"
|
||||
- id: "96"
|
||||
fec: "KRFEC"
|
||||
lanes: "7:1"
|
||||
serdes_group: "11"
|
||||
speed: "25G"
|
||||
sysport: "96"
|
||||
type: "eth"
|
||||
- id: "118"
|
||||
fec: "KRFEC"
|
||||
lanes: "5:1"
|
||||
serdes_group: "14"
|
||||
speed: "25G"
|
||||
sysport: "118"
|
||||
type: "eth"
|
||||
- id: "119"
|
||||
fec: "KRFEC"
|
||||
lanes: "6:1"
|
||||
serdes_group: "14"
|
||||
speed: "25G"
|
||||
sysport: "119"
|
||||
type: "eth"
|
||||
- id: "120"
|
||||
fec: "KRFEC"
|
||||
lanes: "7:1"
|
||||
serdes_group: "14"
|
||||
speed: "25G"
|
||||
sysport: "120"
|
||||
type: "eth"
|
||||
- id: "41"
|
||||
fec: "KRFEC"
|
||||
lanes: "0:1"
|
||||
serdes_group: "5"
|
||||
speed: "25G"
|
||||
sysport: "41"
|
||||
type: "eth"
|
||||
- id: "42"
|
||||
fec: "KRFEC"
|
||||
lanes: "1:1"
|
||||
serdes_group: "5"
|
||||
speed: "25G"
|
||||
sysport: "42"
|
||||
type: "eth"
|
||||
- id: "43"
|
||||
fec: "KRFEC"
|
||||
lanes: "2:1"
|
||||
serdes_group: "5"
|
||||
speed: "25G"
|
||||
sysport: "43"
|
||||
type: "eth"
|
||||
- id: "44"
|
||||
fec: "KRFEC"
|
||||
lanes: "3:1"
|
||||
serdes_group: "5"
|
||||
speed: "25G"
|
||||
sysport: "44"
|
||||
type: "eth"
|
||||
- id: "45"
|
||||
fec: "KRFEC"
|
||||
lanes: "4:1"
|
||||
serdes_group: "5"
|
||||
speed: "25G"
|
||||
sysport: "45"
|
||||
type: "eth"
|
||||
- id: "46"
|
||||
fec: "KRFEC"
|
||||
lanes: "5:1"
|
||||
serdes_group: "5"
|
||||
speed: "25G"
|
||||
sysport: "46"
|
||||
type: "eth"
|
||||
- id: "47"
|
||||
fec: "KRFEC"
|
||||
lanes: "6:1"
|
||||
serdes_group: "5"
|
||||
speed: "25G"
|
||||
sysport: "47"
|
||||
type: "eth"
|
||||
- id: "48"
|
||||
fec: "KRFEC"
|
||||
lanes: "7:1"
|
||||
serdes_group: "5"
|
||||
speed: "25G"
|
||||
sysport: "48"
|
||||
type: "eth"
|
||||
- id: "25"
|
||||
fec: "KRFEC"
|
||||
lanes: "0:1"
|
||||
serdes_group: "3"
|
||||
speed: "25G"
|
||||
sysport: "25"
|
||||
type: "eth"
|
||||
- id: "26"
|
||||
fec: "KRFEC"
|
||||
lanes: "1:1"
|
||||
serdes_group: "3"
|
||||
speed: "25G"
|
||||
sysport: "26"
|
||||
type: "eth"
|
||||
- id: "27"
|
||||
fec: "KRFEC"
|
||||
lanes: "2:1"
|
||||
serdes_group: "3"
|
||||
speed: "25G"
|
||||
sysport: "27"
|
||||
type: "eth"
|
||||
- id: "28"
|
||||
fec: "KRFEC"
|
||||
lanes: "3:1"
|
||||
serdes_group: "3"
|
||||
speed: "25G"
|
||||
sysport: "28"
|
||||
type: "eth"
|
||||
- id: "29"
|
||||
fec: "KRFEC"
|
||||
lanes: "4:1"
|
||||
serdes_group: "3"
|
||||
speed: "25G"
|
||||
sysport: "29"
|
||||
type: "eth"
|
||||
- id: "30"
|
||||
fec: "KRFEC"
|
||||
lanes: "5:1"
|
||||
serdes_group: "3"
|
||||
speed: "25G"
|
||||
sysport: "30"
|
||||
type: "eth"
|
||||
- id: "31"
|
||||
fec: "KRFEC"
|
||||
lanes: "6:1"
|
||||
serdes_group: "3"
|
||||
speed: "25G"
|
||||
sysport: "31"
|
||||
type: "eth"
|
||||
- id: "32"
|
||||
fec: "KRFEC"
|
||||
lanes: "7:1"
|
||||
serdes_group: "3"
|
||||
speed: "25G"
|
||||
sysport: "32"
|
||||
type: "eth"
|
||||
- id: "17"
|
||||
fec: "KRFEC"
|
||||
lanes: "0:1"
|
||||
serdes_group: "2"
|
||||
speed: "25G"
|
||||
sysport: "17"
|
||||
type: "eth"
|
||||
- id: "18"
|
||||
fec: "KRFEC"
|
||||
lanes: "1:1"
|
||||
serdes_group: "2"
|
||||
speed: "25G"
|
||||
sysport: "18"
|
||||
type: "eth"
|
||||
- id: "19"
|
||||
fec: "KRFEC"
|
||||
lanes: "2:1"
|
||||
serdes_group: "2"
|
||||
speed: "25G"
|
||||
sysport: "19"
|
||||
type: "eth"
|
||||
- id: "20"
|
||||
fec: "KRFEC"
|
||||
lanes: "3:1"
|
||||
serdes_group: "2"
|
||||
speed: "25G"
|
||||
sysport: "20"
|
||||
type: "eth"
|
||||
- id: "21"
|
||||
fec: "KRFEC"
|
||||
lanes: "4:1"
|
||||
serdes_group: "2"
|
||||
speed: "25G"
|
||||
sysport: "21"
|
||||
type: "eth"
|
||||
- id: "22"
|
||||
fec: "KRFEC"
|
||||
lanes: "5:1"
|
||||
serdes_group: "2"
|
||||
speed: "25G"
|
||||
sysport: "22"
|
||||
type: "eth"
|
||||
- id: "23"
|
||||
fec: "KRFEC"
|
||||
lanes: "6:1"
|
||||
serdes_group: "2"
|
||||
speed: "25G"
|
||||
sysport: "23"
|
||||
type: "eth"
|
||||
- id: "24"
|
||||
fec: "KRFEC"
|
||||
lanes: "7:1"
|
||||
serdes_group: "2"
|
||||
speed: "25G"
|
||||
sysport: "24"
|
||||
type: "eth"
|
||||
- id: "73"
|
||||
fec: "KRFEC"
|
||||
lanes: "0:4"
|
||||
serdes_group: "9"
|
||||
speed: "100G"
|
||||
sysport: "73"
|
||||
type: "eth"
|
||||
- id: "77"
|
||||
fec: "KRFEC"
|
||||
lanes: "4:4"
|
||||
serdes_group: "9"
|
||||
speed: "100G"
|
||||
sysport: "77"
|
||||
type: "eth"
|
||||
- id: "65"
|
||||
fec: "KRFEC"
|
||||
lanes: "0:4"
|
||||
serdes_group: "8"
|
||||
speed: "100G"
|
||||
sysport: "65"
|
||||
type: "eth"
|
||||
- id: "69"
|
||||
fec: "KRFEC"
|
||||
lanes: "4:4"
|
||||
serdes_group: "8"
|
||||
speed: "100G"
|
||||
sysport: "69"
|
||||
type: "eth"
|
||||
- id: "9"
|
||||
fec: "KRFEC"
|
||||
lanes: "0:4"
|
||||
serdes_group: "1"
|
||||
speed: "100G"
|
||||
sysport: "9"
|
||||
type: "eth"
|
||||
- id: "13"
|
||||
fec: "KRFEC"
|
||||
lanes: "4:4"
|
||||
serdes_group: "1"
|
||||
speed: "100G"
|
||||
sysport: "13"
|
||||
type: "eth"
|
||||
- id: "1"
|
||||
fec: "KRFEC"
|
||||
lanes: "0:4"
|
||||
serdes_group: "0"
|
||||
speed: "100G"
|
||||
sysport: "1"
|
||||
type: "eth"
|
||||
- id: "5"
|
||||
fec: "KRFEC"
|
||||
lanes: "4:4"
|
||||
serdes_group: "0"
|
||||
speed: "100G"
|
||||
sysport: "5"
|
||||
type: "eth"
|
||||
# Aux ports to be enabled later
|
||||
# - id: "33"
|
||||
# fec: "NONE"
|
||||
# lanes: "0:1"
|
||||
# serdes_group: "16"
|
||||
# speed: "10G"
|
||||
# sysport: "33"
|
||||
# type: "mgmt 0"
|
||||
# - id: "34"
|
||||
# fec: "NONE"
|
||||
# lanes: "1:1"
|
||||
# serdes_group: "16"
|
||||
# speed: "10G"
|
||||
# sysport: "34"
|
||||
# type: "mgmt 1"
|
||||
isg:
|
||||
- id: "0"
|
||||
lane_swap: "10325674"
|
||||
rx_polarity: "00000110"
|
||||
tx_polarity: "00010001"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "1"
|
||||
lane_swap: "12305476"
|
||||
rx_polarity: "01111110"
|
||||
tx_polarity: "10111101"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "2"
|
||||
lane_swap: "20416375"
|
||||
rx_polarity: "00101011"
|
||||
tx_polarity: "01100011"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "3"
|
||||
lane_swap: "01234576"
|
||||
rx_polarity: "01010111"
|
||||
tx_polarity: "10001110"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "4"
|
||||
lane_swap: "01234567"
|
||||
rx_polarity: "00000000"
|
||||
tx_polarity: "10100000"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "5"
|
||||
lane_swap: "13250467"
|
||||
rx_polarity: "10100110"
|
||||
tx_polarity: "10101001"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "6"
|
||||
lane_swap: "01234567"
|
||||
rx_polarity: "00000000"
|
||||
tx_polarity: "10100000"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "7"
|
||||
lane_swap: "01234567"
|
||||
rx_polarity: "00000000"
|
||||
tx_polarity: "10100000"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "8"
|
||||
lane_swap: "03214576"
|
||||
rx_polarity: "01110010"
|
||||
tx_polarity: "01101010"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "9"
|
||||
lane_swap: "30217456"
|
||||
rx_polarity: "00000111"
|
||||
tx_polarity: "01010001"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "10"
|
||||
lane_swap: "01234567"
|
||||
rx_polarity: "00000000"
|
||||
tx_polarity: "10100000"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "11"
|
||||
lane_swap: "76543201"
|
||||
rx_polarity: "10010100"
|
||||
tx_polarity: "11010010"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "12"
|
||||
lane_swap: "01234567"
|
||||
rx_polarity: "00000000"
|
||||
tx_polarity: "10100000"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "13"
|
||||
lane_swap: "75614320"
|
||||
rx_polarity: "01101111"
|
||||
tx_polarity: "11010111"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "14"
|
||||
lane_swap: "52476013"
|
||||
rx_polarity: "01011011"
|
||||
tx_polarity: "00011000"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
||||
- id: "15"
|
||||
lane_swap: "01234567"
|
||||
rx_polarity: "00000000"
|
||||
tx_polarity: "10100000"
|
||||
pre1: "-3, -3, -3, -3, -3, -3, -3, -3"
|
||||
main: "20, 20, 20, 20, 20, 20, 20, 20"
|
@ -0,0 +1,62 @@
|
||||
sku: innovium.55200
|
||||
|
||||
device_id: 0x1b59
|
||||
|
||||
# Hardware constraint information
|
||||
hardware:
|
||||
num_ibs: 2
|
||||
ib_active: 0, 1
|
||||
|
||||
ports_per_ib: 64, 64
|
||||
recirc_port_num: 64, 64
|
||||
cpu_port_num: 65
|
||||
cpu_port_ib: 0
|
||||
mgmt_port_num: 65, 66
|
||||
mgmt_port_ibs: 1, 1
|
||||
|
||||
pics_per_ib: 9, 9
|
||||
pic_ports_per_pic: 8
|
||||
max_serdes_speed: 25
|
||||
|
||||
num_shared_pics: 0
|
||||
|
||||
isg [0-7]:
|
||||
ib: 0
|
||||
pic_id: [0-7]
|
||||
|
||||
isg 8:
|
||||
ib: 1
|
||||
pic_id: 7
|
||||
|
||||
isg 9:
|
||||
ib: 1
|
||||
pic_id: 6
|
||||
|
||||
isg 10:
|
||||
ib: 1
|
||||
pic_id: 5
|
||||
|
||||
isg 11:
|
||||
ib: 1
|
||||
pic_id: 4
|
||||
|
||||
isg 12:
|
||||
ib: 1
|
||||
pic_id: 3
|
||||
|
||||
isg 13:
|
||||
ib: 1
|
||||
pic_id: 2
|
||||
|
||||
isg 14:
|
||||
ib: 1
|
||||
pic_id: 1
|
||||
|
||||
isg 15:
|
||||
ib: 1
|
||||
pic_id: 0
|
||||
|
||||
isg 16:
|
||||
mode: 0:2
|
||||
ib: 1
|
||||
pic_id: 8
|
@ -0,0 +1,8 @@
|
||||
IFCS_INIT_FILE : "/usr/share/sonic/hwsku/config_48x25G_8x100G_Cameo-esqc610-56sq.yaml"
|
||||
IFCS_SKU_FILE : "/usr/share/sonic/hwsku/innovium.55200"
|
||||
IFCS_INNO_CLI_PORT : "9999"
|
||||
IFCS_TARGET : "device"
|
||||
INNOVIUM_DIR : "/innovium"
|
||||
PYTHONPATH : "$INNOVIUM_DIR:$INNOVIUM_DIR/cmds:$INNOVIUM_DIR/scripts:$INNOVIUM_DIR/test/:$INNOVIUM_DIR/test/utils:$INNOVIUM_DIR/utils:$INNOVIUM_DIR/pyctypes"
|
||||
IVM_SAI_DATAPATH_CONFIG_FILE: "/usr/share/sonic/hwsku/ivm.sai.datapath.config.yaml"
|
||||
IVM_SAI_PARAM_A0008: "64"
|
@ -0,0 +1,9 @@
|
||||
ISAI_PARAM_P0_0_LS : "9216 9216"
|
||||
ISAI_PARAM_P0_1_LS : "2850 2650"
|
||||
ISAI_PARAM_P0_1_ALS : "290 90"
|
||||
ISAI_PARAM_P1_0_LS : "3072 3072"
|
||||
ISAI_PARAM_P1_0_LL : "6144 6144"
|
||||
ISAI_PARAM_P1_1_LS : "2210 2010"
|
||||
ISAI_PARAM_P1_1_LL : "1330 1330"
|
||||
ISAI_PARAM_P1_1_ALS : "290 90"
|
||||
ISAI_PARAM_P1_1_ALL : "50 50"
|
@ -0,0 +1,18 @@
|
||||
# PG lossless profiles.
|
||||
# speed cable size xon xoff threshold xon_offset
|
||||
25000 5m 1518 0 15680 1 13440
|
||||
50000 5m 1518 0 21248 1 13440
|
||||
100000 5m 1518 0 34624 1 13440
|
||||
400000 5m 1518 0 117536 1 13440
|
||||
25000 40m 1518 0 16928 1 13440
|
||||
50000 40m 1518 0 23392 1 13440
|
||||
100000 40m 1518 0 38816 1 13440
|
||||
400000 40m 1518 0 135520 1 13440
|
||||
25000 100m 1518 0 18848 1 13440
|
||||
50000 100m 1518 0 27264 1 13440
|
||||
100000 100m 1518 0 46496 1 13440
|
||||
400000 100m 1518 0 166688 1 13440
|
||||
25000 300m 1518 0 25184 1 13440
|
||||
50000 300m 1518 0 40128 1 13440
|
||||
100000 300m 1518 0 72384 1 13440
|
||||
400000 300m 1518 0 268640 1 13440
|
@ -0,0 +1,57 @@
|
||||
# name lanes speed index mtu fec
|
||||
Ethernet0 113 25000 0 9126 rs
|
||||
Ethernet1 114 25000 1 9126 rs
|
||||
Ethernet2 115 25000 2 9126 rs
|
||||
Ethernet3 116 25000 3 9126 rs
|
||||
Ethernet4 117 25000 4 9126 rs
|
||||
Ethernet5 105 25000 5 9126 rs
|
||||
Ethernet6 106 25000 6 9126 rs
|
||||
Ethernet7 107 25000 7 9126 rs
|
||||
Ethernet8 108 25000 8 9126 rs
|
||||
Ethernet9 109 25000 9 9126 rs
|
||||
Ethernet10 110 25000 10 9126 rs
|
||||
Ethernet11 111 25000 11 9126 rs
|
||||
Ethernet12 112 25000 12 9126 rs
|
||||
Ethernet13 89 25000 13 9126 rs
|
||||
Ethernet14 90 25000 14 9126 rs
|
||||
Ethernet15 91 25000 15 9126 rs
|
||||
Ethernet16 92 25000 16 9126 rs
|
||||
Ethernet17 93 25000 17 9126 rs
|
||||
Ethernet18 94 25000 18 9126 rs
|
||||
Ethernet19 95 25000 19 9126 rs
|
||||
Ethernet20 96 25000 20 9126 rs
|
||||
Ethernet21 118 25000 21 9126 rs
|
||||
Ethernet22 119 25000 22 9126 rs
|
||||
Ethernet23 120 25000 23 9126 rs
|
||||
Ethernet24 41 25000 24 9126 rs
|
||||
Ethernet25 42 25000 25 9126 rs
|
||||
Ethernet26 43 25000 26 9126 rs
|
||||
Ethernet27 44 25000 27 9126 rs
|
||||
Ethernet28 45 25000 28 9126 rs
|
||||
Ethernet29 46 25000 29 9126 rs
|
||||
Ethernet30 47 25000 30 9126 rs
|
||||
Ethernet31 48 25000 31 9126 rs
|
||||
Ethernet32 25 25000 32 9126 rs
|
||||
Ethernet33 26 25000 33 9126 rs
|
||||
Ethernet34 27 25000 34 9126 rs
|
||||
Ethernet35 28 25000 35 9126 rs
|
||||
Ethernet36 29 25000 36 9126 rs
|
||||
Ethernet37 30 25000 37 9126 rs
|
||||
Ethernet38 31 25000 38 9126 rs
|
||||
Ethernet39 32 25000 39 9126 rs
|
||||
Ethernet40 17 25000 40 9126 rs
|
||||
Ethernet41 18 25000 41 9126 rs
|
||||
Ethernet42 19 25000 42 9126 rs
|
||||
Ethernet43 20 25000 43 9126 rs
|
||||
Ethernet44 21 25000 44 9126 rs
|
||||
Ethernet45 22 25000 45 9126 rs
|
||||
Ethernet46 23 25000 46 9126 rs
|
||||
Ethernet47 24 25000 47 9126 rs
|
||||
Ethernet48 73,74,75,76 100000 48 9126 rs
|
||||
Ethernet52 77,78,79,80 100000 49 9126 rs
|
||||
Ethernet56 65,66,67,68 100000 50 9126 rs
|
||||
Ethernet60 69,70,71,72 100000 51 9126 rs
|
||||
Ethernet64 9,10,11,12 100000 52 9126 rs
|
||||
Ethernet68 13,14,15,16 100000 53 9126 rs
|
||||
Ethernet72 1,2,3,4 100000 54 9126 rs
|
||||
Ethernet76 5,6,7,8 100000 55 9126 rs
|
@ -0,0 +1,114 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSLESS" : {
|
||||
"red_min_threshold":"50000"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"0",
|
||||
"4":"0",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"0",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]"
|
||||
}
|
||||
},
|
||||
"SCHEDULER": {
|
||||
"scheduler.7": {
|
||||
"type": "STRICT"
|
||||
}
|
||||
},
|
||||
"QUEUE": {
|
||||
"{{ port_names }}|7": {
|
||||
"scheduler": "[SCHEDULER|scheduler.7]"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
{% set port_names_list = [] %}
|
||||
{% for port in PORT %}
|
||||
{%- if port_names_list.append(port) %}{% endif %}
|
||||
{% endfor %}
|
||||
{% set port_names = port_names_list | join(',') -%}
|
||||
|
||||
|
||||
{
|
||||
"TC_TO_QUEUE_MAP":{
|
||||
"AZURE":{
|
||||
"0":"0",
|
||||
"1":"1",
|
||||
"2":"2",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"5",
|
||||
"6":"6",
|
||||
"7":"7"
|
||||
}
|
||||
},
|
||||
"TC_TO_PRIORITY_GROUP_MAP": {
|
||||
"AZURE": {
|
||||
"0": "0",
|
||||
"1": "0",
|
||||
"2": "0",
|
||||
"3": "3",
|
||||
"4": "4",
|
||||
"5": "0",
|
||||
"6": "0",
|
||||
"7": "0"
|
||||
}
|
||||
},
|
||||
"DSCP_TO_TC_MAP": {
|
||||
"AZURE": {
|
||||
"0":"0",
|
||||
"1":"0",
|
||||
"2":"0",
|
||||
"3":"3",
|
||||
"4":"4",
|
||||
"5":"0",
|
||||
"6":"0",
|
||||
"7":"0",
|
||||
"8":"1",
|
||||
"9":"0",
|
||||
"10":"0",
|
||||
"11":"0",
|
||||
"12":"0",
|
||||
"13":"0",
|
||||
"14":"0",
|
||||
"15":"0",
|
||||
"16":"0",
|
||||
"17":"0",
|
||||
"18":"0",
|
||||
"19":"0",
|
||||
"20":"0",
|
||||
"21":"0",
|
||||
"22":"0",
|
||||
"23":"0",
|
||||
"24":"0",
|
||||
"25":"0",
|
||||
"26":"0",
|
||||
"27":"0",
|
||||
"28":"0",
|
||||
"29":"0",
|
||||
"30":"0",
|
||||
"31":"0",
|
||||
"32":"0",
|
||||
"33":"0",
|
||||
"34":"0",
|
||||
"35":"0",
|
||||
"36":"0",
|
||||
"37":"0",
|
||||
"38":"0",
|
||||
"39":"0",
|
||||
"40":"0",
|
||||
"41":"0",
|
||||
"42":"0",
|
||||
"43":"0",
|
||||
"44":"0",
|
||||
"45":"0",
|
||||
"46":"0",
|
||||
"47":"0",
|
||||
"48":"0",
|
||||
"49":"0",
|
||||
"50":"0",
|
||||
"51":"0",
|
||||
"52":"0",
|
||||
"53":"0",
|
||||
"54":"0",
|
||||
"55":"0",
|
||||
"56":"0",
|
||||
"57":"0",
|
||||
"58":"0",
|
||||
"59":"0",
|
||||
"60":"0",
|
||||
"61":"0",
|
||||
"62":"0",
|
||||
"63":"0"
|
||||
}
|
||||
},
|
||||
"PORT_QOS_MAP": {
|
||||
"{{ port_names }}": {
|
||||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]",
|
||||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]",
|
||||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]",
|
||||
"pfc_enable": "3,4"
|
||||
}
|
||||
},
|
||||
"WRED_PROFILE": {
|
||||
"AZURE_LOSSLESS" : {
|
||||
"red_min_threshold":"50000"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
SAI_INIT_CONFIG_FILE=/usr/share/sonic/hwsku/ivm.sai.config.yaml
|
3
device/cameo/x86_64-cameo_esqc610_56sq-r0/installer.conf
Normal file
3
device/cameo/x86_64-cameo_esqc610_56sq-r0/installer.conf
Normal file
@ -0,0 +1,3 @@
|
||||
CONSOLE_PORT=0x3f8
|
||||
CONSOLE_DEV=0
|
||||
CONSOLE_SPEED=115200
|
16
device/cameo/x86_64-cameo_esqc610_56sq-r0/platform_reboot
Executable file
16
device/cameo/x86_64-cameo_esqc610_56sq-r0/platform_reboot
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
mr_reboot() {
|
||||
|
||||
sudo rmmod x86-64-cameo-esqc610-56sq
|
||||
sudo i2cset -y 0 0x30 0xa1 0
|
||||
|
||||
}
|
||||
|
||||
if [ $# -eq 0 ] || [ $@ = "-f" ] || [ $@ = "--force" ] || [ $@ = "reboot" ]; then
|
||||
mr_reboot
|
||||
elif [ $@ = "-p" ] ; then
|
||||
sudo halt
|
||||
else
|
||||
echo "unsupported option"
|
||||
fi
|
12
device/cameo/x86_64-cameo_esqc610_56sq-r0/plugins/eeprom.py
Executable file
12
device/cameo/x86_64-cameo_esqc610_56sq-r0/plugins/eeprom.py
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
from sonic_eeprom import eeprom_tlvinfo
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
||||
_TLV_INFO_MAX_LEN = 256
|
||||
def __init__(self, name, path, cpld_root, ro):
|
||||
self.eeprom_path = "/sys/bus/i2c/devices/0-0056/eeprom"
|
||||
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
99
device/cameo/x86_64-cameo_esqc610_56sq-r0/plugins/psuutil.py
Executable file
99
device/cameo/x86_64-cameo_esqc610_56sq-r0/plugins/psuutil.py
Executable file
@ -0,0 +1,99 @@
|
||||
#
|
||||
# psuutil.py
|
||||
# Platform-specific PSU status interface for SONiC
|
||||
#
|
||||
|
||||
|
||||
import os.path
|
||||
|
||||
try:
|
||||
from sonic_psu.psu_base import PsuBase
|
||||
except ImportError as e:
|
||||
raise ImportError(str(e) + "- required module not found")
|
||||
|
||||
attr_path = '/sys/class/hwmon/hwmon2/device/'
|
||||
|
||||
class PsuUtil(PsuBase):
|
||||
"""Platform-specific PSUutil class"""
|
||||
|
||||
def __init__(self):
|
||||
PsuBase.__init__(self)
|
||||
|
||||
|
||||
# Get sysfs attribute
|
||||
def get_attr_value(self, path):
|
||||
|
||||
retval = 'ERR'
|
||||
if (not os.path.isfile(path)):
|
||||
return retval
|
||||
|
||||
try:
|
||||
with open(path, 'r') as fd:
|
||||
retval = fd.read()
|
||||
except Exception as error:
|
||||
logging.error("Unable to open ", path, " file !")
|
||||
|
||||
retval = retval.rstrip('\r\n')
|
||||
return retval
|
||||
|
||||
def get_num_psus(self):
|
||||
"""
|
||||
Retrieves the number of PSUs available on the device
|
||||
:return: An integer, the number of PSUs available on the device
|
||||
"""
|
||||
MAX_PSUS = 2
|
||||
return MAX_PSUS
|
||||
|
||||
def get_psu_status(self, index):
|
||||
"""
|
||||
Retrieves the oprational status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is operating properly, False if PSU is\
|
||||
faulty
|
||||
"""
|
||||
status = 0
|
||||
attr_file = 'psu_status'
|
||||
status_path = attr_path+'/ESQC610_PSU/' + attr_file
|
||||
try:
|
||||
reg_file = open(status_path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text_lines = reg_file.read()
|
||||
|
||||
search_str = "PSU {} is power Good".format(index)
|
||||
|
||||
if search_str in text_lines:
|
||||
status = 1
|
||||
|
||||
reg_file.close()
|
||||
|
||||
return status
|
||||
|
||||
def get_psu_presence(self, index):
|
||||
"""
|
||||
Retrieves the presence status of power supply unit (PSU) defined
|
||||
by index <index>
|
||||
:param index: An integer, index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is plugged, False if not
|
||||
"""
|
||||
status = 0
|
||||
attr_file ='psu_present'
|
||||
presence_path = attr_path+'ESQC610_PSU/' + attr_file
|
||||
try:
|
||||
reg_file = open(presence_path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text_lines = reg_file.read()
|
||||
|
||||
search_str = "PSU {} is present".format(index)
|
||||
|
||||
if search_str in text_lines:
|
||||
status = 1
|
||||
|
||||
reg_file.close()
|
||||
|
||||
return status
|
||||
|
172
device/cameo/x86_64-cameo_esqc610_56sq-r0/plugins/sfputil.py
Executable file
172
device/cameo/x86_64-cameo_esqc610_56sq-r0/plugins/sfputil.py
Executable file
@ -0,0 +1,172 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
try:
|
||||
import time
|
||||
import json
|
||||
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
attr_path = '/sys/class/hwmon/hwmon2/device/'
|
||||
PLATFORM_INSTALL_INFO_FILE="/etc/sonic/platform_install.json"
|
||||
PLATFORM_SFP_GROUPS = ['SFP-G01','SFP-G02','SFP-G03','SFP-G04','SFP-G05', 'SFP-G06', 'SFP-G07']
|
||||
|
||||
class SfpUtil(SfpUtilBase):
|
||||
"""Platform specific SfpUtill class"""
|
||||
|
||||
_port_start = 0
|
||||
_port_end = 55
|
||||
_qsfp_port_start = 48
|
||||
_port_in_block =56
|
||||
_port_to_eeprom_mapping = {}
|
||||
_global_port_pres_dict = {}
|
||||
|
||||
def __init__(self):
|
||||
eeprom_path = "{}/eeprom"
|
||||
path_list = self.get_sfp_path()
|
||||
for x in range(self._port_start, self._port_end + 1):
|
||||
port_eeprom_path = eeprom_path.format(path_list[x])
|
||||
self._port_to_eeprom_mapping[x] = port_eeprom_path
|
||||
|
||||
self.init_global_port_presence()
|
||||
SfpUtilBase.__init__(self)
|
||||
|
||||
def get_sfp_path(self):
|
||||
map = []
|
||||
with open(PLATFORM_INSTALL_INFO_FILE) as fd:
|
||||
install_info = json.load(fd)
|
||||
for sfp_group_name in PLATFORM_SFP_GROUPS:
|
||||
sfp_group = install_info[2][sfp_group_name]
|
||||
map = map + sfp_group['paths']
|
||||
return map
|
||||
|
||||
def reset(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._qsfp_port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+'ESQC610_QSFP/QSFP_reset'
|
||||
try:
|
||||
reg_file = open(path, 'w')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
#toggle reset
|
||||
#reg_file.seek(0)
|
||||
reg_file.write(str(port_num-self._qsfp_port_start+1))
|
||||
#time.sleep(1)
|
||||
#reg_file.seek(0)
|
||||
#reg_file.write('0')
|
||||
reg_file.close()
|
||||
return True
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._qsfp_port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+'ESQC610_QSFP/QSFP_low_power_'+str(port_num-self._qsfp_port_start+1)
|
||||
try:
|
||||
reg_file = open(path, 'w')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
# the gpio pin is ACTIVE_HIGH
|
||||
if lpmode is True:
|
||||
val = "1"
|
||||
else:
|
||||
val = "0"
|
||||
|
||||
# write value to gpio
|
||||
reg_file.seek(0)
|
||||
reg_file.write(val)
|
||||
reg_file.close()
|
||||
|
||||
return True
|
||||
|
||||
def get_low_power_mode(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._qsfp_port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
path = attr_path+'ESQC610_QSFP/QSFP_low_power_'+str(port_num-self._qsfp_port_start+1)
|
||||
try:
|
||||
reg_file = open(path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
|
||||
text_lines = reg_file.readline()
|
||||
reg_file.close()
|
||||
if text_lines.find('OFF') < 0:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_presence(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self._port_start or port_num > self._port_end:
|
||||
return False
|
||||
|
||||
if port_num >= self._qsfp_port_start:
|
||||
path = attr_path+'ESQC610_QSFP/QSFP_present'
|
||||
line = port_num - self._qsfp_port_start
|
||||
else:
|
||||
path = attr_path+'ESQC610_SFP/SFP_present'
|
||||
line = port_num
|
||||
|
||||
try:
|
||||
reg_file = open(path, 'r')
|
||||
except IOError as e:
|
||||
print( "Error: unable to open file: %s" % str(e))
|
||||
return False
|
||||
text_lines = reg_file.readlines()
|
||||
reg_file.close()
|
||||
if text_lines[line].find('not') < 0:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def init_global_port_presence(self):
|
||||
for port_num in range(self.port_start, (self.port_end + 1)):
|
||||
presence = self.get_presence(port_num)
|
||||
if(presence):
|
||||
self._global_port_pres_dict[port_num] = '1'
|
||||
else:
|
||||
self._global_port_pres_dict[port_num] = '0'
|
||||
|
||||
def get_transceiver_change_event(self, timeout=0):
|
||||
port_dict = {}
|
||||
while True:
|
||||
for port_num in range(self.port_start, (self.port_end + 1)):
|
||||
presence = self.get_presence(port_num)
|
||||
if(presence and self._global_port_pres_dict[port_num] == '0'):
|
||||
self._global_port_pres_dict[port_num] = '1'
|
||||
port_dict[port_num] = '1'
|
||||
elif(not presence and
|
||||
self._global_port_pres_dict[port_num] == '1'):
|
||||
self._global_port_pres_dict[port_num] = '0'
|
||||
port_dict[port_num] = '0'
|
||||
|
||||
if(len(port_dict) > 0):
|
||||
return True, port_dict
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
@property
|
||||
def port_start(self):
|
||||
return self._port_start
|
||||
|
||||
@property
|
||||
def port_end(self):
|
||||
return self._port_end
|
||||
|
||||
@property
|
||||
def qsfp_ports(self):
|
||||
return range(self._qsfp_port_start, self._port_in_block + 1)
|
||||
|
||||
@property
|
||||
def port_to_eeprom_mapping(self):
|
||||
return self._port_to_eeprom_mapping
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"skip_ledd": true,
|
||||
"skip_thermalctld": true
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user