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

[barefoot] Added Newport platform support #3709

Merged
merged 5 commits into from
Nov 7, 2019
Merged
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
1 change: 1 addition & 0 deletions device/barefoot/x86_64-accton_as9516bf_32d-r0/default_sku
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
newport t1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONSOLE_SPEED=57600
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,71 @@
{% 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,32) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "2867200"
},
"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_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|egress_lossless_pool]",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
}
},
{%- endmacro %}

{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
},
"{{ port_names }}|0-1": {
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
}
}
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{% 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,32) %}
{%- if PORT_ALL.append("Ethernet%d" % (port_idx * 4)) %}{%- endif %}
{%- endfor %}
{%- endmacro %}

{%- macro generate_buffer_pool_and_profiles() %}
"BUFFER_POOL": {
"ingress_lossless_pool": {
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "2867200"
},
"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_lossy_profile": {
"pool":"[BUFFER_POOL|ingress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
},
"egress_lossless_profile": {
"pool":"[BUFFER_POOL|egress_lossless_pool]",
"size":"0",
"dynamic_th":"7"
},
"egress_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
},
"q_lossy_profile": {
"pool":"[BUFFER_POOL|egress_lossy_pool]",
"size":"4096",
"dynamic_th":"3"
}
},
{%- endmacro %}

{%- macro generate_queue_buffers(port_names) %}
"BUFFER_QUEUE": {
"{{ port_names }}|3-4": {
"profile" : "[BUFFER_PROFILE|egress_lossless_profile]"
},
"{{ port_names }}|0-1": {
"profile" : "[BUFFER_PROFILE|q_lossy_profile]"
}
}
{%- endmacro %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# PG lossless profiles.
# speed cable size xon xoff threshold
10000 5m 34816 18432 16384 7
25000 5m 34816 18432 16384 7
40000 5m 34816 18432 16384 7
50000 5m 34816 18432 16384 7
100000 5m 36864 18432 18432 7
400000 5m 36864 18432 18432 7
10000 40m 36864 18432 18432 7
25000 40m 39936 18432 21504 7
40000 40m 41984 18432 23552 7
50000 40m 41984 18432 23552 7
100000 40m 54272 18432 35840 7
400000 40m 54272 18432 35840 7
10000 300m 49152 18432 30720 7
25000 300m 71680 18432 53248 7
40000 300m 94208 18432 75776 7
50000 300m 94208 18432 75776 7
100000 300m 184320 18432 165888 7
400000 300m 184320 18432 165888 7
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# name lanes alias index speed autoneg fec
Ethernet0 0,1,2,3,4,5,6,7 Ethernet0 1 400000 0 rs
Ethernet8 8,9,10,11,12,13,14,15 Ethernet8 2 400000 0 rs
Ethernet16 16,17,18,19,20,21,22,23 Ethernet16 3 400000 0 rs
Ethernet24 24,25,26,27,28,29,30,31 Ethernet24 4 400000 0 rs
Ethernet32 32,33,34,35,36,37,38,39 Ethernet32 5 400000 0 rs
Ethernet40 40,41,42,43,44,45,46,47 Ethernet40 6 400000 0 rs
Ethernet48 48,49,50,51,52,53,54,55 Ethernet48 7 400000 0 rs
Ethernet56 56,57,58,59,60,61,62,63 Ethernet56 8 400000 0 rs
Ethernet64 64,65,66,67,68,69,70,71 Ethernet64 9 400000 0 rs
Ethernet72 72,73,74,75,76,77,78,79 Ethernet72 10 400000 0 rs
Ethernet80 80,81,82,83,84,85,86,87 Ethernet80 11 400000 0 rs
Ethernet88 88,89,90,91,92,93,94,95 Ethernet88 12 400000 0 rs
Ethernet96 96,97,98,99,100,101,102,103 Ethernet96 13 400000 0 rs
Ethernet104 104,105,106,107,108,109,110,111 Ethernet104 14 400000 0 rs
Ethernet112 112,113,114,115,116,117,118,119 Ethernet112 15 400000 0 rs
Ethernet120 120,121,122,123,124,125,126,127 Ethernet120 16 400000 0 rs
Ethernet128 128,129,130,131,132,133,134,135 Ethernet128 17 400000 0 rs
Ethernet136 136,137,138,139,140,141,142,143 Ethernet136 18 400000 0 rs
Ethernet144 144,145,146,147,148,149,150,151 Ethernet144 19 400000 0 rs
Ethernet152 152,153,154,155,156,157,158,159 Ethernet152 20 400000 0 rs
Ethernet160 160,161,162,163,164,165,166,167 Ethernet160 21 400000 0 rs
Ethernet168 168,169,170,171,172,173,174,175 Ethernet168 22 400000 0 rs
Ethernet176 176,177,178,179,180,181,182,183 Ethernet176 23 400000 0 rs
Ethernet184 184,185,186,187,188,189,190,191 Ethernet184 24 400000 0 rs
Ethernet192 192,193,194,195,196,197,198,199 Ethernet192 25 400000 0 rs
Ethernet200 200,201,202,203,204,205,206,207 Ethernet200 26 400000 0 rs
Ethernet208 208,209,210,211,212,213,214,215 Ethernet208 27 400000 0 rs
Ethernet216 216,217,218,219,220,221,222,223 Ethernet216 28 400000 0 rs
Ethernet224 224,225,226,227,228,229,230,231 Ethernet224 29 400000 0 rs
Ethernet232 232,233,234,235,236,237,238,239 Ethernet232 30 400000 0 rs
Ethernet240 240,241,242,243,244,245,246,247 Ethernet240 31 400000 0 rs
Ethernet248 248,249,250,251,252,253,254,255 Ethernet248 32 400000 0 rs
10 changes: 10 additions & 0 deletions device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/qos.json.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{%- macro generate_tc_to_pg_map() %}
"TC_TO_PRIORITY_GROUP_MAP": {
"AZURE": {
"3": "3",
"4": "4"
}
},
{%- endmacro %}

{%- include 'qos_config.j2' %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SAI_KEY_WARM_BOOT_WRITE_FILE=/var/warmboot/sai-warmboot.bin
SAI_KEY_WARM_BOOT_READ_FILE=/var/warmboot/sai-warmboot.bin

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"instance": 0,
"chip_list": [
{
"id": "asic-0",
"chip_family": "Tofino2",
"instance": 0,
"pcie_sysfs_prefix": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0",
"pcie_domain": 0,
"pcie_bus": 5,
"pcie_fn": 0,
"pcie_dev": 0,
"pcie_int_mode": 1,
"sds_fw_path": "share/tofino_sds_fw/avago/firmware"
}
],
"p4_devices": [
{
"device-id": 0,
"agent0": "lib/platform/x86_64-accton_as9516bf_32d-r0/libpltfm_mgr.so",
"p4_programs": [
{
"p4_pipelines": [
{
"p4_pipeline_name": "pipe",
"config": "share/switch/pipe/tofino2.bin",
"context": "share/switch/pipe/context.json"
}
],
"program-name": "switch",
"switchsai": "lib/libswitchsai.so",
"bfrt-config": "share/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json",
"switchapi_port_add": false,
"non_default_port_ppgs": 5
}
]
}
]
}
1 change: 1 addition & 0 deletions device/barefoot/x86_64-accton_as9516bf_32d-r0/plugins
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"skip_ledd": true,
"skip_xcvrd": false,
"skip_psud": false,
"skip_syseepromd": false
}
1 change: 1 addition & 0 deletions platform/barefoot/one-image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $(SONIC_ONE_IMAGE)_INSTALLS += $(BFN_MODULE) $(PYTHON_THRIFT)
$(SONIC_ONE_IMAGE)_INSTALLS += $(SYSTEMD_SONIC_GENERATOR)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_MONTARA_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(BFN_NEWPORT_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(WNC_OSW1800_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9180_32X_PLATFORM_MODULE)
$(SONIC_ONE_IMAGE)_LAZY_INSTALLS += $(INGRASYS_S9280_64X_PLATFORM_MODULE)
Expand Down
13 changes: 13 additions & 0 deletions platform/barefoot/platform-modules-bfn-newport.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# BFN Platform modules

BFN_NEWPORT_PLATFORM_MODULE_VERSION = 1.0

export BFN_NEWPORT_PLATFORM_MODULE_VERSION

BFN_NEWPORT_PLATFORM_MODULE = sonic-platform-modules-bfn-newport_$(BFN_NEWPORT_PLATFORM_MODULE_VERSION)_amd64.deb
$(BFN_NEWPORT_PLATFORM_MODULE)_SRC_PATH = $(PLATFORM_PATH)/sonic-platform-modules-bfn-newport
$(BFN_NEWPORT_PLATFORM_MODULE)_DEPENDS += $(LINUX_HEADERS) $(LINUX_HEADERS_COMMON)
$(BFN_NEWPORT_PLATFORM_MODULE)_PLATFORM = x86_64-accton_as9516bf_32d-r0
SONIC_DPKG_DEBS += $(BFN_NEWPORT_PLATFORM_MODULE)

SONIC_STRETCH_DEBS += $(BFN_NEWPORT_PLATFORM_MODULE)
1 change: 1 addition & 0 deletions platform/barefoot/rules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include $(PLATFORM_PATH)/platform-modules-arista.mk
include $(PLATFORM_PATH)/platform-modules-bfn.mk
include $(PLATFORM_PATH)/platform-modules-bfn-montara.mk
include $(PLATFORM_PATH)/platform-modules-bfn-newport.mk
include $(PLATFORM_PATH)/platform-modules-wnc-osw1800.mk
include $(PLATFORM_PATH)/platform-modules-ingrasys.mk
include $(PLATFORM_PATH)/bfn-sai.mk
Expand Down
15 changes: 15 additions & 0 deletions platform/barefoot/sonic-platform-modules-bfn-newport/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Copyright (C) 2016 Microsoft, Inc

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file describes the maintainers for sonic-platform-modules-bfn-newport
# See the SONiC project governance document for more information
Mailinglist = [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# sonic-platform-modules-bfn-newport
Device drivers for support of BFN platform for the SONiC project
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# BMC interface
auto usb0
allow-hotplug usb0
iface usb0 inet6
up ifconfig usb0 txqueuelen 64
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sonic-platform-modules-bfn-newport (1.0) unstable; urgency=low

* Initial release

-- Support <[email protected]> Mon, 27 Sep 2019 18:00:00 -0800
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Source: sonic-platform-modules-bfn-newport
Section: main
Priority: extra
Maintainer: Support <[email protected]>
Build-Depends: debhelper (>= 8.0.0), bzip2
Standards-Version: 3.9.3

Package: sonic-platform-modules-bfn-newport
Architecture: amd64
Depends: linux-image-4.9.0-9-2-amd64
Description: kernel module for bfn platform fpga and scripts for the devices such as fan, led, sfp

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Provides linux kernel driver for BF PCIe devices

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Loading