Skip to content

Commit

Permalink
[innovium]: Initial commit (sonic-net#3243)
Browse files Browse the repository at this point in the history
[build] Add ipmitool
[dockers] Add innovium platform in orchagent + ipmitool in snmp
[platform/innovium] Add innovium platform
[device/celestica] Add x86_64-cel_midstone-r0 device for innovium
[device/delta] Add x86_64-delta_et-c032if-r0 device for innovium
[sonic-slave-stretch] Add texi2html

Signed-off-by: Tony Titus ttitus@innovium.com
  • Loading branch information
tonytitus authored and Tony Titus committed Aug 15, 2019
1 parent 64063b2 commit 1e062dc
Show file tree
Hide file tree
Showing 156 changed files with 18,548 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
mtr-tiny \
locales \
mcelog \
ndisc6
ndisc6 \
ipmitool

#Adds a locale to a debian system in non-interactive mode
sudo sed -i '/^#.* en_US.* /s/^#//' $FILESYSTEM_ROOT/etc/locale.gen && \
Expand Down
120 changes: 120 additions & 0 deletions device/celestica/x86_64-cel_midstone-r0/Midstone-200i/buffers.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{# Default values which will be used if no actual configura available #}
{% set default_cable = '300m' %}
{% set default_ports_num = 64 -%}

{# 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[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 -%}
{{ default_cable }}
{%- endif -%}
{% endmacro %}

{%- if DEVICE_METADATA is defined %}
{%- set switch_role = DEVICE_METADATA['localhost']['type'] %}
{%- endif -%}

{# Generate list of ports if not defined #}
{% if PORT is not defined %}
{% set PORT = [] %}
{% for port_idx in range(0,default_ports_num) %}
{% if PORT.append("Ethernet%d" % (port_idx*4)) %}{% endif %}
{% endfor %}
{% endif -%}

{% 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": {
"ingress_lossless_pool": {
"size": "47218432",
"type": "ingress",
"mode": "dynamic",
"xoff": "17708800"
},
"egress_lossy_pool": {
"size": "18874368",
"type": "egress",
"mode": "dynamic",
"xoff": "0"
}
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"xoff":"1433600",
"size":"1518",
"dynamic_th":"-4",
"xon_offset":"6272"
},
"ingress_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossless_pool]",
"size":"0",
"static_th":"9721600"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"0",
"static_th":"9721600"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"1518",
"dynamic_th":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-3": {
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
},
"{{ port_names }}|4-5": {
"profile" : "[BUFFER_PROFILE|ingress_lossless_profile]"
},
"{{ port_names }}|6-7": {
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|4-5": {
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
},
"{{ port_names }}|0-3": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
},
"{{ port_names }}|6-7": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}
}
}
Loading

0 comments on commit 1e062dc

Please sign in to comment.