[dpdk] Enable per port memory model 57/67457/4
authorMichael Polenchuk <mpolenchuk@mirantis.com>
Mon, 1 Apr 2019 15:04:00 +0000 (19:04 +0400)
committerMichael Polenchuk <mpolenchuk@mirantis.com>
Tue, 2 Apr 2019 13:37:46 +0000 (17:37 +0400)
The per port memory model provides a more transparent memory usage model
and avoids pool exhaustion due to competing memory requirements for
interfaces. (http://docs.openvswitch.org/en/latest/topics/dpdk/memory/)

Change-Id: I5add0f49cdcdf2fc3d24affee10a275abe3ca46a
Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
mcp/config/scenario/os-nosdn-ovs-ha.yaml
mcp/config/scenario/os-nosdn-ovs-noha.yaml
mcp/config/scenario/os-odl-ovs-noha.yaml
mcp/config/states/dpdk [deleted file]
mcp/patches/salt-formula-linux/0004-dpdk-Enable-per-port-memory-model.patch [new file with mode: 0644]
mcp/scripts/pharos

index e42d172..9be6540 100644 (file)
@@ -9,7 +9,6 @@
 cluster:
   domain: mcp-ovs-dpdk-ha.local
   states:
-    - dpdk
     - openstack_ha
     - networks
 virtual:
index e1cc6d7..508c2d5 100644 (file)
@@ -9,7 +9,6 @@
 cluster:
   domain: mcp-ovs-dpdk-noha.local
   states:
-    - dpdk
     - openstack_noha
     - neutron_gateway
     - networks
index 0acb5d2..85f74f2 100644 (file)
@@ -9,7 +9,6 @@
 cluster:
   domain: mcp-odl-noha.local
   states:
-    - dpdk
     - opendaylight
     - openstack_noha
     - neutron_gateway
diff --git a/mcp/config/states/dpdk b/mcp/config/states/dpdk
deleted file mode 100755 (executable)
index 65832db..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/bash -e
-##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x
-
-# shellcheck disable=SC1090
-source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh"
-
-salt -I 'nova:compute' alternatives.set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
-salt -I 'nova:compute' service.restart openvswitch-switch
-
-# Set datapath type to netdev for public bridge
-salt -I 'nova:compute' cmd.run 'ovs-vsctl br-exists br-floating && ovs-vsctl set bridge br-floating datapath_type=netdev' ignore_retcode=True
diff --git a/mcp/patches/salt-formula-linux/0004-dpdk-Enable-per-port-memory-model.patch b/mcp/patches/salt-formula-linux/0004-dpdk-Enable-per-port-memory-model.patch
new file mode 100644 (file)
index 0000000..4a35a8a
--- /dev/null
@@ -0,0 +1,25 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2019 Mirantis Inc., Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Michael Polenchuk <mpolenchuk@mirantis.com>
+Date: Mon, 1 Apr 2019 13:09:37 +0400
+Subject: [PATCH] [dpdk] Enable per port memory model
+
+
+diff --git a/linux/network/dpdk.sls b/linux/network/dpdk.sls
+index 786f7c8..48c00f5 100644
+--- a/linux/network/dpdk.sls
++++ b/linux/network/dpdk.sls
+@@ -49,6 +49,7 @@ linux_network_dpdk_ovs_service:
+   - unless: 'ovs-vsctl get Open_vSwitch . other_config | grep "dpdk-init=\"true\""'
+ {%- set ovs_options = [
++  'per-port-memory="true"',
+   "pmd-cpu-mask=\""+network.openvswitch.pmd_cpu_mask+"\"",
+   "dpdk-socket-mem=\""+network.openvswitch.dpdk_socket_mem+"\"",
+   "dpdk-lcore-mask=\""+network.openvswitch.dpdk_lcore_mask+"\"",
index 94f99be..4fd183a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 94f99be1ddd263506231ec5b72b576a6c63d82c6
+Subproject commit 4fd183a336dd1047f0468ae2699860c67116c2b0