Skip to content

Commit

Permalink
[barefoot][newport] Updated Newport configuration
Browse files Browse the repository at this point in the history
- Updated buffers config;
- Set eth2 as CPU port;
- Added systemd service file to load bf_fpga.ko

Signed-off-by: Andriy Kokhan <akokhan@barefootnetworks.com>
  • Loading branch information
Andriy Kokhan committed Nov 27, 2019
1 parent 0c9040d commit 6fd131b
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% 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' %}
{% set ingress_lossless_pool_size = '23850816' %}
{% set ingress_lossy_pool_size = '36222208' %}
{% set egress_lossless_pool_size = '29482816' %}
{% set egress_lossy_pool_size = '26400000' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
Expand All @@ -17,7 +17,7 @@
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "2867200"
"xoff": "36222208"
},
"ingress_lossy_pool": {
"size": "{{ ingress_lossy_pool_size }}",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% 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' %}
{% set ingress_lossless_pool_size = '23850816' %}
{% set ingress_lossy_pool_size = '36222208' %}
{% set egress_lossless_pool_size = '29482816' %}
{% set egress_lossy_pool_size = '26400000' %}

{%- macro generate_port_lists(PORT_ALL) %}
{# Generate list of ports #}
Expand All @@ -17,7 +17,7 @@
"size": "{{ ingress_lossless_pool_size }}",
"type": "ingress",
"mode": "dynamic",
"xoff": "2867200"
"xoff": "36222208"
},
"ingress_lossy_pool": {
"size": "{{ ingress_lossy_pool_size }}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"bfrt-config": "share/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json",
"switchapi_port_add": false,
"non_default_port_ppgs": 5
"non_default_port_ppgs": 5,
"cpu_port": "eth2"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# eth cpu port
auto eth2
iface eth2 inet
up ifconfig eth2 promisc mtu 9000
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Barefoot Newport FPGA driver
Before=syncd.service

[Service]
User=root
ExecStartPre=/sbin/depmod -a
ExecStart=/sbin/modprobe bf_fpga
ExecStartPost=/sbin/modprobe bf_tun
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
configs/systemd/system/bfn-newport.service etc/systemd/system
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
set -e
depmod -a
systemctl enable bfn-newport.service
systemctl start bfn-newport.service
#DEBHELPER#

0 comments on commit 6fd131b

Please sign in to comment.