Skip to content

Commit

Permalink
Add the ability to skip NIC setup in prepare script
Browse files Browse the repository at this point in the history
  • Loading branch information
PlagueCZ authored and guvenc committed Sep 26, 2024
1 parent 03b65d8 commit 5110cd8
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 5110cd8

Please sign in to comment.