Update neutron ovs agent for ovs-dpdk
This ps update neutron ovs agent to support properly: - setting mtu on dpdk bond and nic interface port - setting vhost-iommu-support on dpdk bond and nic interface port - setting n_txq values on dpdk bond and nic interface port Change-Id: I422fa21a622642ecb7c49914fef04073e4f984bc
This commit is contained in:
parent
52c132b935
commit
97ac0575ba
@ -206,13 +206,17 @@ function process_dpdk_nics {
|
|||||||
if [ -n "${n_rxq}" ]; then
|
if [ -n "${n_rxq}" ]; then
|
||||||
dpdk_options+='options:n_rxq=${n_rxq} '
|
dpdk_options+='options:n_rxq=${n_rxq} '
|
||||||
fi
|
fi
|
||||||
|
n_txq=$(get_dpdk_config_value ${nic} '.n_txq')
|
||||||
|
if [ -n "${n_txq}" ]; then
|
||||||
|
dpdk_options+='options:n_txq=${n_txq} '
|
||||||
|
fi
|
||||||
pmd_rxq_affinity=$(get_dpdk_config_value ${nic} '.pmd_rxq_affinity')
|
pmd_rxq_affinity=$(get_dpdk_config_value ${nic} '.pmd_rxq_affinity')
|
||||||
if [ -n "${pmd_rxq_affinity}" ]; then
|
if [ -n "${pmd_rxq_affinity}" ]; then
|
||||||
dpdk_options+='other_config:pmd-rxq-affinity=${pmd_rxq_affinity} '
|
dpdk_options+='other_config:pmd-rxq-affinity=${pmd_rxq_affinity} '
|
||||||
fi
|
fi
|
||||||
mtu=$(get_dpdk_config_value ${nic} '.mtu')
|
mtu=$(get_dpdk_config_value ${nic} '.mtu')
|
||||||
if [ -n "${mtu}" ]; then
|
if [ -n "${mtu}" ]; then
|
||||||
dpdk_options+='mtu_request=${mtu} '
|
dpdk_options+='options:mtu_request=${mtu} '
|
||||||
fi
|
fi
|
||||||
n_rxq_size=$(get_dpdk_config_value ${nic} '.n_rxq_size')
|
n_rxq_size=$(get_dpdk_config_value ${nic} '.n_rxq_size')
|
||||||
if [ -n "${n_rxq_size}" ]; then
|
if [ -n "${n_rxq_size}" ]; then
|
||||||
@ -222,6 +226,10 @@ function process_dpdk_nics {
|
|||||||
if [ -n "${n_txq_size}" ]; then
|
if [ -n "${n_txq_size}" ]; then
|
||||||
dpdk_options+='options:n_txq_desc=${n_txq_size} '
|
dpdk_options+='options:n_txq_desc=${n_txq_size} '
|
||||||
fi
|
fi
|
||||||
|
vhost_iommu_support=$(get_dpdk_config_value ${nic} '.vhost-iommu-support')
|
||||||
|
if [ -n "${vhost_iommu_support}" ]; then
|
||||||
|
dpdk_options+='options:vhost-iommu-support=${vhost_iommu_support} '
|
||||||
|
fi
|
||||||
|
|
||||||
ovs-vsctl --db=unix:${OVS_SOCKET} --may-exist add-port ${bridge} ${port_name} \
|
ovs-vsctl --db=unix:${OVS_SOCKET} --may-exist add-port ${bridge} ${port_name} \
|
||||||
-- set Interface ${port_name} type=dpdk options:dpdk-devargs=${pci_id} ${dpdk_options}
|
-- set Interface ${port_name} type=dpdk options:dpdk-devargs=${pci_id} ${dpdk_options}
|
||||||
@ -239,9 +247,11 @@ function process_dpdk_bonds {
|
|||||||
local migrate_ip=$(get_dpdk_config_value ${bond} '.migrate_ip')
|
local migrate_ip=$(get_dpdk_config_value ${bond} '.migrate_ip')
|
||||||
local mtu=$(get_dpdk_config_value ${bond} '.mtu')
|
local mtu=$(get_dpdk_config_value ${bond} '.mtu')
|
||||||
local n_rxq=$(get_dpdk_config_value ${bond} '.n_rxq')
|
local n_rxq=$(get_dpdk_config_value ${bond} '.n_rxq')
|
||||||
|
local n_txq=$(get_dpdk_config_value ${bond} '.n_txq')
|
||||||
local ofport_request=$(get_dpdk_config_value ${bond} '.ofport_request')
|
local ofport_request=$(get_dpdk_config_value ${bond} '.ofport_request')
|
||||||
local n_rxq_size=$(get_dpdk_config_value ${bond} '.n_rxq_size')
|
local n_rxq_size=$(get_dpdk_config_value ${bond} '.n_rxq_size')
|
||||||
local n_txq_size=$(get_dpdk_config_value ${bond} '.n_txq_size')
|
local n_txq_size=$(get_dpdk_config_value ${bond} '.n_txq_size')
|
||||||
|
local vhost_iommu_support=$(get_dpdk_config_value ${bond} '.vhost-iommu-support')
|
||||||
local ovs_options=$(get_dpdk_config_value ${bond} '.ovs_options')
|
local ovs_options=$(get_dpdk_config_value ${bond} '.ovs_options')
|
||||||
|
|
||||||
local nic_name_str=""
|
local nic_name_str=""
|
||||||
@ -283,13 +293,17 @@ function process_dpdk_bonds {
|
|||||||
dev_args_str+=" -- set Interface "${nic_name}" type=dpdk options:dpdk-devargs=""${dpdk_pci_id}"
|
dev_args_str+=" -- set Interface "${nic_name}" type=dpdk options:dpdk-devargs=""${dpdk_pci_id}"
|
||||||
|
|
||||||
if [[ -n ${mtu} ]]; then
|
if [[ -n ${mtu} ]]; then
|
||||||
dev_args_str+=" -- set Interface "${nic_name}" mtu_request=${mtu}"
|
dev_args_str+=" -- set Interface "${nic_name}" options:mtu_request=${mtu}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n ${n_rxq} ]]; then
|
if [[ -n ${n_rxq} ]]; then
|
||||||
dev_args_str+=" -- set Interface "${nic_name}" options:n_rxq=${n_rxq}"
|
dev_args_str+=" -- set Interface "${nic_name}" options:n_rxq=${n_rxq}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n ${n_txq} ]]; then
|
||||||
|
dev_args_str+=" -- set Interface "${nic_name}" options:n_txq=${n_txq}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n ${ofport_request} ]]; then
|
if [[ -n ${ofport_request} ]]; then
|
||||||
dev_args_str+=" -- set Interface "${nic_name}" ofport_request=${ofport_request}"
|
dev_args_str+=" -- set Interface "${nic_name}" ofport_request=${ofport_request}"
|
||||||
fi
|
fi
|
||||||
@ -305,6 +319,10 @@ function process_dpdk_bonds {
|
|||||||
if [[ -n ${n_txq_size} ]]; then
|
if [[ -n ${n_txq_size} ]]; then
|
||||||
dev_args_str+=" -- set Interface "${nic_name}" options:n_txq_desc=${n_txq_size}"
|
dev_args_str+=" -- set Interface "${nic_name}" options:n_txq_desc=${n_txq_size}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n ${vhost_iommu_support} ]]; then
|
||||||
|
dev_args_str+=" -- set Interface "${nic_name}" options:vhost-iommu-support=${vhost_iommu_support}"
|
||||||
|
fi
|
||||||
done < /tmp/nics_array
|
done < /tmp/nics_array
|
||||||
|
|
||||||
ovs-vsctl --db=unix:${OVS_SOCKET} --if-exists del-port "${bond_name}"
|
ovs-vsctl --db=unix:${OVS_SOCKET} --if-exists del-port "${bond_name}"
|
||||||
|
@ -2011,6 +2011,7 @@ conf:
|
|||||||
bridge: br-phy
|
bridge: br-phy
|
||||||
migrate_ip: true
|
migrate_ip: true
|
||||||
n_rxq: 2
|
n_rxq: 2
|
||||||
|
n_txq: 2
|
||||||
pmd_rxq_affinity: "0:3,1:27"
|
pmd_rxq_affinity: "0:3,1:27"
|
||||||
ofport_request: 1
|
ofport_request: 1
|
||||||
# optional parameters for tuning the OVS DPDK config
|
# optional parameters for tuning the OVS DPDK config
|
||||||
@ -2018,6 +2019,7 @@ conf:
|
|||||||
# mtu: 2000
|
# mtu: 2000
|
||||||
# n_rxq_size: 1024
|
# n_rxq_size: 1024
|
||||||
# n_txq_size: 1024
|
# n_txq_size: 1024
|
||||||
|
# vhost-iommu-support: true
|
||||||
bridges:
|
bridges:
|
||||||
- name: br-phy
|
- name: br-phy
|
||||||
# Optional parameter for configuring bonding in OVS-DPDK
|
# Optional parameter for configuring bonding in OVS-DPDK
|
||||||
@ -2032,10 +2034,13 @@ conf:
|
|||||||
# # rather than denoting the total number of rx queues for
|
# # rather than denoting the total number of rx queues for
|
||||||
# # the bond as a whole. So setting n_rxq = 2 below for ex.
|
# # the bond as a whole. So setting n_rxq = 2 below for ex.
|
||||||
# # would be 4 rx queues in total for the bond.
|
# # would be 4 rx queues in total for the bond.
|
||||||
|
# # Same for n_txq
|
||||||
# n_rxq: 2
|
# n_rxq: 2
|
||||||
|
# n_txq: 2
|
||||||
# ofport_request: 1
|
# ofport_request: 1
|
||||||
# n_rxq_size: 1024
|
# n_rxq_size: 1024
|
||||||
# n_txq_size: 1024
|
# n_txq_size: 1024
|
||||||
|
# vhost-iommu-support: true
|
||||||
# ovs_options: "bond_mode=active-backup"
|
# ovs_options: "bond_mode=active-backup"
|
||||||
# nics:
|
# nics:
|
||||||
# - name: dpdk_b0s0
|
# - name: dpdk_b0s0
|
||||||
|
Loading…
Reference in New Issue
Block a user