From 05bff26162cc05286ba563d6e8cec82a36031b7d Mon Sep 17 00:00:00 2001 From: Rihab Banday Date: Wed, 2 Oct 2019 10:39:37 +0200 Subject: [PATCH] Remove need to configure VF during DPDK deployment The current configuration expects VF & bonding info by default. This patch set removes the need to configure them for every deployment. Change-Id: Id546c113b2d3c42591a0326ee8cd442cccc73578 --- .../_neutron-openvswitch-agent-init.sh.tpl | 26 ++++++++++--------- neutron/values_overrides/dpdk.yaml | 1 + 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/neutron/templates/bin/_neutron-openvswitch-agent-init.sh.tpl b/neutron/templates/bin/_neutron-openvswitch-agent-init.sh.tpl index bbc88321dd..35cabf6c3e 100644 --- a/neutron/templates/bin/_neutron-openvswitch-agent-init.sh.tpl +++ b/neutron/templates/bin/_neutron-openvswitch-agent-init.sh.tpl @@ -175,14 +175,15 @@ function process_dpdk_nics { iface=$(get_name_by_pci_id "${pci_id}") - if [ -n "${vf_index}" ]; then - vf_string="vf ${vf_index}" + if [ -n "${iface}" ]; then + ip link set ${iface} promisc on + if [ -n "${vf_index}" ]; then + vf_string="vf ${vf_index}" + ip link set ${iface} ${vf_string} trust on + ip link set ${iface} ${vf_string} spoofchk off + fi fi - ip link set ${iface} promisc on - ip link set ${iface} ${vf_string} trust on - ip link set ${iface} ${vf_string} spoofchk off - # Fetch the PCI to be bound to DPDK driver. # In case VF Index is configured then PCI of that particular VF # is bound to DPDK, otherwise PF PCI is bound to DPDK. @@ -258,14 +259,15 @@ function process_dpdk_bonds { iface=$(get_name_by_pci_id "${pci_id}") - if [ -n "${vf_index}" ]; then - vf_string="vf ${vf_index}" + if [ -n "${iface}" ]; then + ip link set ${iface} promisc on + if [ -n "${vf_index}" ]; then + vf_string="vf ${vf_index}" + ip link set ${iface} ${vf_string} trust on + ip link set ${iface} ${vf_string} spoofchk off + fi fi - ip link set ${iface} promisc on - ip link set ${iface} ${vf_string} trust on - ip link set ${iface} ${vf_string} spoofchk off - # Fetch the PCI to be bound to DPDK driver. # In case VF Index is configured then PCI of that particular VF # is bound to DPDK, otherwise PF PCI is bound to DPDK. diff --git a/neutron/values_overrides/dpdk.yaml b/neutron/values_overrides/dpdk.yaml index ff1a5419cb..fec6b6860d 100644 --- a/neutron/values_overrides/dpdk.yaml +++ b/neutron/values_overrides/dpdk.yaml @@ -21,3 +21,4 @@ conf: migrate_ip: true bridges: - name: br-phy + bonds: []