-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2021 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
pci_path="/sys/bus/pci/devices/${ADDR}"
drv_path="/sys/bus/pci/drivers/${DRIVER}"
- vd=$(cat ${pci_path}/vendor ${pci_path}/device) || {
- die "Failed to retrieve interface details!"
- }
- set +e
- echo ${vd} | sudo tee ${drv_path}/new_id
- set -e
- echo ${ADDR} | sudo tee ${pci_path}/driver/unbind || {
- die "Failed to unbind interface ${ADDR}!"
- }
+ if [ -d "${pci_path}/driver" ]; then
+ echo ${ADDR} | sudo tee ${pci_path}/driver/unbind || {
+ die "Failed to unbind interface ${ADDR}!"
+ }
+ fi
echo ${ADDR} | sudo tee ${drv_path}/bind || {
die "Failed to bind interface ${ADDR}!"
}
# Automatically remove the container when it exits.
dcr_stc_params+="--rm "
# Size of /dev/shm.
- dcr_stc_params+="--shm-size 512M "
+ dcr_stc_params+="--shm-size 2G "
# Override access to PCI bus by attaching a filesystem mount to the
# container.
dcr_stc_params+="--mount type=tmpfs,destination=/sys/bus/pci/devices "
dcr_stc_params+="--volume /opt/boot/:/opt/boot/ "
# Mount host hugepages for VMs.
dcr_stc_params+="--volume /dev/hugepages/:/dev/hugepages/ "
+ # Disable IPv6.
+ dcr_stc_params+="--sysctl net.ipv6.conf.all.disable_ipv6=1 "
+ dcr_stc_params+="--sysctl net.ipv6.conf.default.disable_ipv6=1 "
# Docker Container UUIDs.
declare -gA DCR_UUIDS