Skip to content

Commit 7a3e497

Browse files
akokhanlguohan
authored andcommitted
[barefoot][as9516] Updated Newport configuration (sonic-net#3797)
- Updated buffers config; - Set eth2 as CPU port; - Added systemd service file to load bf_fpga.ko Signed-off-by: Andriy Kokhan <[email protected]>
1 parent 5b18aa5 commit 7a3e497

File tree

7 files changed

+37
-11
lines changed

7 files changed

+37
-11
lines changed

device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/buffers_defaults_t0.j2

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{% set default_cable = '5m' %}
2-
{% set ingress_lossless_pool_size = '4194304' %}
3-
{% set ingress_lossy_pool_size = '7340032' %}
4-
{% set egress_lossless_pool_size = '16777152' %}
5-
{% set egress_lossy_pool_size = '7340032' %}
2+
{% set ingress_lossless_pool_size = '23850816' %}
3+
{% set ingress_lossy_pool_size = '36222208' %}
4+
{% set egress_lossless_pool_size = '29482816' %}
5+
{% set egress_lossy_pool_size = '26400000' %}
66

77
{%- macro generate_port_lists(PORT_ALL) %}
88
{# Generate list of ports #}
@@ -17,7 +17,7 @@
1717
"size": "{{ ingress_lossless_pool_size }}",
1818
"type": "ingress",
1919
"mode": "dynamic",
20-
"xoff": "2867200"
20+
"xoff": "36222208"
2121
},
2222
"ingress_lossy_pool": {
2323
"size": "{{ ingress_lossy_pool_size }}",

device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/buffers_defaults_t1.j2

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{% set default_cable = '5m' %}
2-
{% set ingress_lossless_pool_size = '2097152' %}
3-
{% set ingress_lossy_pool_size = '5242880' %}
4-
{% set egress_lossless_pool_size = '16777152' %}
5-
{% set egress_lossy_pool_size = '5242880' %}
2+
{% set ingress_lossless_pool_size = '23850816' %}
3+
{% set ingress_lossy_pool_size = '36222208' %}
4+
{% set egress_lossless_pool_size = '29482816' %}
5+
{% set egress_lossy_pool_size = '26400000' %}
66

77
{%- macro generate_port_lists(PORT_ALL) %}
88
{# Generate list of ports #}
@@ -17,7 +17,7 @@
1717
"size": "{{ ingress_lossless_pool_size }}",
1818
"type": "ingress",
1919
"mode": "dynamic",
20-
"xoff": "2867200"
20+
"xoff": "36222208"
2121
},
2222
"ingress_lossy_pool": {
2323
"size": "{{ ingress_lossy_pool_size }}",

device/barefoot/x86_64-accton_as9516bf_32d-r0/newport/switch-tna-sai.conf

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"bfrt-config": "share/switch/bf-rt.json",
3333
"model_json_path" : "share/switch/aug_model.json",
3434
"switchapi_port_add": false,
35-
"non_default_port_ppgs": 5
35+
"non_default_port_ppgs": 5,
36+
"cpu_port": "eth2"
3637
}
3738
]
3839
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# eth cpu port
2+
auto eth2
3+
iface eth2 inet
4+
up ifconfig eth2 promisc mtu 9000
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[Unit]
2+
Description=Barefoot Newport FPGA driver
3+
Before=syncd.service
4+
5+
[Service]
6+
User=root
7+
ExecStartPre=/sbin/depmod -a
8+
ExecStart=/sbin/modprobe bf_fpga
9+
ExecStartPost=/sbin/modprobe bf_tun
10+
RemainAfterExit=yes
11+
12+
[Install]
13+
WantedBy=multi-user.target
14+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
configs/systemd/system/bfn-newport.service etc/systemd/system
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
set -e
3+
depmod -a
4+
systemctl enable bfn-newport.service
5+
systemctl start bfn-newport.service
6+
#DEBHELPER#

0 commit comments

Comments
 (0)