Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cameo platform ESC601-32Q #5057

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ src/**/*.o
platform/**/*.egg-info
platform/**/*-none-any.whl
platform/**/.pybuild
platform/**/debian/*
!platform/**/debian/*
platform/**/build
platform/broadcom/sonic-platform-modules-dell/s5232f/sonic_platform/ipmihelper.py
platform/broadcom/sonic-platform-modules-dell/s6100/modules/dell_ich.c
Expand Down
1 change: 1 addition & 0 deletions device/cameo/x86_64-cameo_esc600_128q-r0/default_sku
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
esc600-128q t1
137 changes: 137 additions & 0 deletions device/cameo/x86_64-cameo_esc600_128q-r0/esc600-128q/buffers.json.j2
Original file line number Diff line number Diff line change
@@ -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":"3",
"xon_offset":"9408"
},
"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":"3"
}
},
"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]"
}
}
}
Original file line number Diff line number Diff line change
@@ -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":"3"
}
},
"BUFFER_PG": {
"{{ port_names }}|0-7": {
"profile" : "[BUFFER_PROFILE|ingress_lossy_profile]"
}
},
"BUFFER_QUEUE": {
"{{ port_names }}|0-7": {
"profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
}
}
}
Original file line number Diff line number Diff line change
@@ -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":"3",
"xon_offset":"9408"
},
"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":"3"
}
},
"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]"
}
}
}
Loading