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

Add the ability to skip NIC setup in prepare script #607

Merged
merged 1 commit into from
Sep 26, 2024
Merged
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
10 changes: 10 additions & 0 deletions hack/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ CONFIG="/tmp/dp_service.conf"
IS_X86_WITH_BLUEFIELD=false
IS_ARM_WITH_BLUEFIELD=false
IS_X86_WITH_MLX=false
CONFIG_ONLY=false

function log() {
echo "$(date +"%Y-%m-%d_%H-%M-%S-%3N") $1"
Expand Down Expand Up @@ -149,6 +150,12 @@ function create_vf() {
return
fi

if [[ "$CONFIG_ONLY" == "true" ]]; then
actualvfs=$(cat /sys/bus/pci/devices/$pf/sriov_numvfs)
log "Skipping VF creation as requested"
return
fi

# we disable automatic binding so that VFs don't get created, saves a lot of time
# plus we don't need to unbind them before enabling switchdev mode
log "disabling automatic binding of VFs on pf: $pf"
Expand Down Expand Up @@ -261,6 +268,9 @@ while [[ $# -gt 0 ]]; do
--force)
CONFIG_EXISTS=false
;;
--config-only)
CONFIG_ONLY=true
;;
*)
err "Invalid argument $1"
esac
Expand Down
Loading