summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Leroy <maxime.leroy@6wind.com>2015-09-30 12:28:06 +0200
committerMaxime Leroy <maxime.leroy@6wind.com>2015-10-08 16:54:58 +0200
commitcb2d5e8e4d435f4c82a1214ccc6d968781666005 (patch)
treeab42c9566866a29fda7f01403e3d24ff9f6cbd2d
parentfb2833bb72707b05919f024b508b310670154d77 (diff)
devstack: use core_port_mapping autoconfig feature
The fast path is able to automatically generate a core_port_mapping, if this one is not provided in the fast-path.env. So no needs to generate this one manually in libs/fast-path. Change-Id: Ieb15587e6381865025ea2f166c91c6e7f8a1def9
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Francesco Santoro <francesco.santoro@6wind.com> Workflow+1: Francesco Santoro <francesco.santoro@6wind.com> Submitted-by: Jenkins Submitted-at: Mon, 12 Oct 2015 09:49:51 +0000 Reviewed-on: https://review.openstack.org/232582 Project: stackforge/networking-6wind Branch: refs/heads/master
-rw-r--r--devstack/libs/fast-path28
1 files changed, 0 insertions, 28 deletions
diff --git a/devstack/libs/fast-path b/devstack/libs/fast-path
index 2f74e11..43a26ec 100644
--- a/devstack/libs/fast-path
+++ b/devstack/libs/fast-path
@@ -113,39 +113,11 @@ function write_fast_path_conf {
113 echo $EAL_OPTIONS 113 echo $EAL_OPTIONS
114 sudo sed "s~#*: \${EAL_OPTIONS:=.*~: \${EAL_OPTIONS:=$EAL_OPTIONS}~" -i $FP_CONF 114 sudo sed "s~#*: \${EAL_OPTIONS:=.*~: \${EAL_OPTIONS:=$EAL_OPTIONS}~" -i $FP_CONF
115 115
116 FPNSDK_OPTIONS=""
117 if [[ $nb_ifaces == 0 ]]; then
118 # disable autoconfig
119 FPNSDK_OPTIONS+=" --rxq-per-port 0"
120 fi
121 # command to preallocate vhostuser ports 116 # command to preallocate vhostuser ports
122 FPNSDK_OPTIONS+=" --vdevs driver=pmd-vhost,nb_devices=$FP_NB_VHOSTUSER_PORTS" 117 FPNSDK_OPTIONS+=" --vdevs driver=pmd-vhost,nb_devices=$FP_NB_VHOSTUSER_PORTS"
123 FPNSDK_OPTIONS+=",sockname=/tmp/vhost-socket%num%,ifname=tap_unused_" 118 FPNSDK_OPTIONS+=",sockname=/tmp/vhost-socket%num%,ifname=tap_unused_"
124 sudo sed "s~#*: \${FPNSDK_OPTIONS:=.*~: \${FPNSDK_OPTIONS:=$FPNSDK_OPTIONS}~" -i $FP_CONF 119 sudo sed "s~#*: \${FPNSDK_OPTIONS:=.*~: \${FPNSDK_OPTIONS:=$FPNSDK_OPTIONS}~" -i $FP_CONF
125 120
126 CORE_PORT_MAPPING=""
127 list_ifaces=""
128 for (( nm_iface=0; nm_iface < $nb_ifaces; nm_iface++))
129 do
130 list_ifaces=$list_ifaces$nm_iface":"
131 done
132
133 if [[ -n $list_ifaces ]]; then
134 # remove last ':'
135 list_ifaces=${list_ifaces::-1}
136
137 for nm_core in `seq 0 $FP_MASK`;
138 do
139 coremask=$((1 << $nm_core))
140 if [[ ($(($coremask & FP_MASK)) != 0) ]]; then
141 CORE_PORT_MAPPING+="c$nm_core=$list_ifaces/"
142 fi
143 done
144 # remove last '/'
145 CORE_PORT_MAPPING=${CORE_PORT_MAPPING::-1}
146 fi
147 sudo sed "s~#*: \${CORE_PORT_MAPPING:=.*~: \${CORE_PORT_MAPPING:=$CORE_PORT_MAPPING}~" -i $FP_CONF
148
149 if [[ "$FP_GREEN_MODE" == "True" ]]; then 121 if [[ "$FP_GREEN_MODE" == "True" ]]; then
150 sudo sed "s~#*: \${MAINLOOP_DELAY_US:=.*~: \${MAINLOOP_DELAY_US:=500}~" -i $FP_CONF 122 sudo sed "s~#*: \${MAINLOOP_DELAY_US:=.*~: \${MAINLOOP_DELAY_US:=500}~" -i $FP_CONF
151 fi 123 fi