Skip to content

Commit

Permalink
[Netberg][Barefoot] Added support for Aurora 610 (sonic-net#10579)
Browse files Browse the repository at this point in the history
Why I did it
Support Intel Tofino based platforms Netberg Aurora 610
ASIC: Intel Tofino BFN-T10-032D-020
Pors: 48x 25G + 8x 100G

How I did it
Added specification to device/netberg directory
Added platform/barefoot/sonic-platform-modules-netberg contains kernel modules, scripts and sonic_platform packages.
Modified the platform/barefoot/one-image.mk and platform/barefoot/rule.mk to include Aurora 610 related ID and files.

How to verify it
Build SONiC

Install the image on the device and verify the related components are installed and shown correctly.
  • Loading branch information
andrewsapronov authored Jun 30, 2022
1 parent 9a6da79 commit 7f10b6b
Show file tree
Hide file tree
Showing 59 changed files with 22,794 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{%- set default_topo = 't0' %}
{%- include 'buffers_config.j2' %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{% set default_cable = '5m' %}
{% set ingress_lossless_pool_size = '4194304' %}
{% set ingress_lossy_pool_size = '7340032' %}
{% set egress_lossless_pool_size = '16777152' %}
{% set egress_lossy_pool_size = '7340032' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,47) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
{%- endfor %}
{% for port_idx in range(48,55) %}
{% if PORT.append("Ethernet%d" % (48 + ( port_idx - 48 )*4)) %}{% endif %}
{% endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic"
},
"ingress_lossy_pool": {
"size": "{{ ingress_lossy_pool_size }}",
"type": "ingress",
"mode": "dynamic"
},
"egress_lossless_pool": {
"size": "{{ egress_lossless_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
"pool":"ingress_lossless_pool",
"size":"4096",
"dynamic_th":"0",
"xon":"18432",
"xoff":"18432"
},
"ingress_lossy_profile": {
"pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"egress_lossless_pool",
"size":"4096",
"dynamic_th":"7",
"xon":"18432",
"xoff":"18432"
},
"egress_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
},
{%- endmacro %}

{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
"profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
"profile" : "egress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{% set default_cable = '5m' %}
{% set ingress_lossless_pool_size = '2097152' %}
{% set ingress_lossy_pool_size = '5242880' %}
{% set egress_lossless_pool_size = '16777152' %}
{% set egress_lossy_pool_size = '5242880' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
{%- for port_idx in range(0,47) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx)) %}{%- endif %}
{%- endfor %}
{% for port_idx in range(48,55) %}
{% if PORT.append("Ethernet%d" % (48+(port_idx-48)*4)) %}{% endif %}
{% endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic"
},
"ingress_lossy_pool": {
"size": "{{ ingress_lossy_pool_size }}",
"type": "ingress",
"mode": "dynamic"
},
"egress_lossless_pool": {
"size": "{{ egress_lossless_pool_size }}",
"type": "egress",
"mode": "dynamic"
},
"egress_lossy_pool": {
"size": "{{ egress_lossy_pool_size }}",
"type": "egress",
"mode": "dynamic"
}
},
"BUFFER_PROFILE": {
"ingress_lossless_profile": {
"pool":"ingress_lossless_pool",
"size":"4096",
"dynamic_th":"0",
"xon":"18432",
"xoff":"18432"
},
"ingress_lossy_profile": {
"pool":"ingress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"egress_lossless_pool",
"size":"4096",
"dynamic_th":"7",
"xon":"18432",
"xoff":"18432"
},
"egress_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
"pool":"egress_lossy_pool",
"size":"4096",
"dynamic_th":"3"
}
},
{%- endmacro %}

{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
{% for port in port_names.split(',') %}
"{{ port }}|0-2": {
"profile" : "q_lossy_profile"
},
{% endfor %}
{% for port in port_names.split(',') %}
"{{ port }}|3-4": {
"profile" : "egress_lossless_profile"
}{% if not loop.last %},{% endif %}
{% endfor %}
}
{%- endmacro %}
Loading

0 comments on commit 7f10b6b

Please sign in to comment.