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

update master branch #107

Merged
merged 8 commits into from
Aug 23, 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
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"p4_pipelines": [
{
"p4_pipeline_name": "pipe",
"config": "share/tofinopd/switch/pipe/tofino.bin",
"context": "share/tofinopd/switch/pipe/context.json"
"config": "share/switch/pipe/tofino.bin",
"context": "share/switch/pipe/context.json"
}
],
"program-name": "switch",
"switchsai": "lib/libswitchsai.so",
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
"bfrt-config": "share/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json",
"switchapi_port_add": false,
"non_default_port_ppgs": 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"p4_pipelines": [
{
"p4_pipeline_name": "pipe",
"config": "share/tofinopd/switch/pipe/tofino.bin",
"context": "share/tofinopd/switch/pipe/context.json"
"config": "share/switch/pipe/tofino.bin",
"context": "share/switch/pipe/context.json"
}
],
"program-name": "switch",
"switchsai": "lib/libswitchsai.so",
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
"bfrt-config": "share/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json",
"switchapi_port_add": false,
"non_default_port_ppgs": 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"p4_pipelines": [
{
"p4_pipeline_name": "pipe",
"config": "share/tofinopd/switch/pipe/tofino.bin",
"context": "share/tofinopd/switch/pipe/context.json"
"config": "share/switch/pipe/tofino.bin",
"context": "share/switch/pipe/context.json"
}
],
"program-name": "switch",
"switchsai": "lib/libswitchsai.so",
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
"bfrt-config": "share/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json",
"switchapi_port_add": false,
"non_default_port_ppgs": 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"p4_pipelines": [
{
"p4_pipeline_name": "pipe",
"config": "share/tofinopd/switch/pipe/tofino.bin",
"context": "share/tofinopd/switch/pipe/context.json"
"config": "share/switch/pipe/tofino.bin",
"context": "share/switch/pipe/context.json"
}
],
"program-name": "switch",
"switchsai": "lib/libswitchsai.so",
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
"bfrt-config": "share/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json",
"switchapi_port_add": false,
"non_default_port_ppgs": 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"p4_pipelines": [
{
"p4_pipeline_name": "pipe",
"config": "share/tofinopd/switch/pipe/tofino.bin",
"context": "share/tofinopd/switch/pipe/context.json"
"config": "share/switch/pipe/tofino.bin",
"context": "share/switch/pipe/context.json"
}
],
"program-name": "switch",
"switchsai": "lib/libswitchsai.so",
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
"bfrt-config": "share/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json",
"switchapi_port_add": false,
"non_default_port_ppgs": 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"p4_pipelines": [
{
"p4_pipeline_name": "pipe",
"config": "share/tofinopd/switch/pipe/tofino.bin",
"context": "share/tofinopd/switch/pipe/context.json"
"config": "share/switch/pipe/tofino.bin",
"context": "share/switch/pipe/context.json"
}
],
"program-name": "switch",
"switchsai": "lib/libswitchsai.so",
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
"bfrt-config": "share/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json",
"switchapi_port_add": false,
"non_default_port_ppgs": 5
Expand Down
8 changes: 6 additions & 2 deletions device/mellanox/x86_64-mlnx_msn2700-r0/platform_reboot
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ declare -r EXIT_SUCCESS="0"
declare -r EXIT_ERROR="1"

declare -r FW_UPGRADE_SCRIPT="/usr/bin/mlnx-fw-upgrade.sh"
declare -r SYSFS_PWR_CYCLE="/sys/devices/platform/mlxplat/mlxreg-io/hwmon/hwmon*/pwr_cycle"

FORCE_REBOOT="no"

Expand All @@ -20,7 +21,7 @@ function ParseArguments() {

ParseArguments "$@"

${FW_UPGRADE_SCRIPT} --upgrade
${FW_UPGRADE_SCRIPT} --upgrade --verbose
EXIT_CODE="$?"
if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then
echo "Failed to burn MLNX FW: errno=${EXIT_CODE}"
Expand All @@ -31,4 +32,7 @@ if [[ "${EXIT_CODE}" != "${EXIT_SUCCESS}" ]]; then
fi
fi

exec /sbin/reboot $@
# perform "hardware" reboot
echo 1 > $SYSFS_PWR_CYCLE
sleep 3
echo 0 > $SYSFS_PWR_CYCLE

This file was deleted.

21 changes: 21 additions & 0 deletions device/mellanox/x86_64-mlnx_msn2700_simx-r0/platform_reboot
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

declare -r EXIT_SUCCESS="0"
declare -r EXIT_ERROR="1"

FORCE_REBOOT="no"

function ParseArguments() {
while [ $# -ge 1 ]; do
case "$1" in
-f|--force)
FORCE_REBOOT="yes"
;;
esac
shift
done
}

ParseArguments "$@"

exec /sbin/reboot $@
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"p4_pipelines": [
{
"p4_pipeline_name": "pipe",
"config": "share/tofinopd/switch/pipe/tofino.bin",
"context": "share/tofinopd/switch/pipe/context.json"
"config": "share/switch/pipe/tofino.bin",
"context": "share/switch/pipe/context.json"
}
],
"program-name": "switch",
"switchsai": "lib/libswitchsai.so",
"bfrt-config": "share/tofinopd/switch/bf-rt.json",
"bfrt-config": "share/switch/bf-rt.json",
"model_json_path" : "share/switch/aug_model.json",
"switchapi_port_add": false,
"non_default_port_ppgs": 5
Expand Down
3 changes: 2 additions & 1 deletion dockers/docker-fpm-frr/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ CONFIG_TYPE=`sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["docker_routing_co
if [ -z "$CONFIG_TYPE" ] || [ "$CONFIG_TYPE" == "separated" ]; then
sonic-cfggen -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/frr/bgpd.conf
sonic-cfggen -d -t /usr/share/sonic/templates/zebra.conf.j2 > /etc/frr/zebra.conf
sonic-cfggen -d -t /usr/share/sonic/templates/staticd.conf.j2 > /etc/frr/staticd.conf
echo "no service integrated-vtysh-config" > /etc/frr/vtysh.conf
rm -f /etc/frr/frr.conf
elif [ "$CONFIG_TYPE" == "unified" ]; then
sonic-cfggen -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/frr.conf.j2 >/etc/frr/frr.conf
echo "service integrated-vtysh-config" > /etc/frr/vtysh.conf
rm -f /etc/frr/bgpd.conf /etc/frr/zebra.conf
rm -f /etc/frr/bgpd.conf /etc/frr/zebra.conf /etc/frr/staticd.conf
fi

sonic-cfggen -d -t /usr/share/sonic/templates/isolate.j2 > /usr/sbin/bgp-isolate
Expand Down
29 changes: 29 additions & 0 deletions dockers/docker-fpm-frr/staticd.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
!
{% block banner %}
! =========== Managed by sonic-cfggen DO NOT edit manually! ====================
! generated by templates/frr/staticd.conf.j2 using config DB data
! file: staticd.conf
!
{% endblock banner %}
!
{% block sys_init %}
hostname {{ DEVICE_METADATA['localhost']['hostname'] }}
password zebra
enable password zebra
{% endblock sys_init %}
!
{% block default_route %}
! set static default route to mgmt gateway as a backup to learned default
{% for (name, prefix) in MGMT_INTERFACE|pfx_filter %}
{% if prefix | ipv4 %}
ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200
{% endif %}
{% endfor %}
{% endblock default_route %}
!
{% block logging %}
log syslog informational
log facility local4
{% endblock logging %}
!

9 changes: 0 additions & 9 deletions dockers/docker-fpm-frr/zebra.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ link-detect
{% endfor %}
{% endblock interfaces %}
!
{% block default_route %}
! set static default route to mgmt gateway as a backup to learned default
{% for (name, prefix) in MGMT_INTERFACE|pfx_filter %}
{% if prefix | ipv4 %}
ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200
{% endif %}
{% endfor %}
{% endblock default_route %}
!
{% block source_loopback %}
{% set lo_ipv4_addrs = [] %}
{% set lo_ipv6_addrs = [] %}
Expand Down
4 changes: 2 additions & 2 deletions files/build_templates/radv.service.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Unit]
Description=Router advertiser container
Requires=updategraph.service swss.service
Requires=updategraph.service
After=updategraph.service swss.service
Before=ntp-config.service

Expand All @@ -11,4 +11,4 @@ ExecStart=/usr/bin/{{ docker_container_name }}.sh wait
ExecStop=/usr/bin/{{ docker_container_name }}.sh stop

[Install]
WantedBy=multi-user.target swss.service
WantedBy=multi-user.target
2 changes: 1 addition & 1 deletion files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

SERVICE="swss"
PEER="syncd"
DEPENDENT="teamd"
DEPENDENT="teamd radv"
DEBUGLOG="/tmp/swss-syncd-debug.log"
LOCKFILE="/tmp/swss-syncd-lock"

Expand Down
2 changes: 1 addition & 1 deletion files/scripts/syncd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function getBootType()
TYPE='fastfast'
;;
*SONIC_BOOT_TYPE=fast*|*fast-reboot*)
TYPE='fast'
TYPE=$(awk '{ if ($1 <= 180) print "fast"; else print "cold" }' /proc/uptime)
;;
*)
TYPE='cold'
Expand Down
6 changes: 3 additions & 3 deletions platform/barefoot/bfn-platform.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BFN_PLATFORM = bfnplatform_8_9_1.x.ab1e16f.deb
$(BFN_PLATFORM)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_8_9_1/bfnplatform_8_9_1.x.ab1e16f.deb"
BFN_PLATFORM = bfnplatform_9.0.0.cc6ccbe_pr_deb9.deb
$(BFN_PLATFORM)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_9_0/bfnplatform_9.0.0.cc6ccbe_pr_deb9.deb"

SONIC_ONLINE_DEBS += $(BFN_PLATFORM) # $(BFN_SAI_DEV)
SONIC_ONLINE_DEBS += $(BFN_PLATFORM)
$(BFN_SAI_DEV)_DEPENDS += $(BFN_PLATFORM)
6 changes: 3 additions & 3 deletions platform/barefoot/bfn-sai.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BFN_SAI = bfnsdk_8_9_1.x.ab1e16f.deb
$(BFN_SAI)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_8_9_1/bfnsdk_8_9_1.x.ab1e16f.deb"
BFN_SAI = bfnsdk_9.0.0.cc6ccbe_pr_deb9.deb
$(BFN_SAI)_URL = "https://github.com/barefootnetworks/sonic-release-pkgs/raw/rel_9_0/bfnsdk_9.0.0.cc6ccbe_pr_deb9.deb"

SONIC_ONLINE_DEBS += $(BFN_SAI) # $(BFN_SAI_DEV)
SONIC_ONLINE_DEBS += $(BFN_SAI)
$(BFN_SAI_DEV)_DEPENDS += $(BFN_SAI)
Loading