summaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorKevin Traynor <ktraynor@redhat.com>2022-06-24 11:13:23 +0100
committerIan Stokes <ian.stokes@intel.com>2022-07-14 13:17:59 +0100
commit3757e9f8e9c3190cf981740fec662e84b12d07ef (patch)
treee8978d4016aefca9a1e54890bf192b971eeb63bc /vswitchd
parenteacc544c4d45315844d15a6b36aa3301eb8f83d4 (diff)
downloadopenvswitch-3757e9f8e9c3190cf981740fec662e84b12d07ef.tar.gz
netdev-dpdk: Add shared mempool config.
Mempools may currently be shared between DPDK ports based on port MTU and NUMA. With some hint from the user we can increase the sharing on MTU and hence reduce memory consumption in many cases. For example, a port with MTU 9000, uses a mempool with an mbuf size based on 9000 MTU. A port with MTU 1500, uses a different mempool with an mbuf size based on 1500 MTU. In this case, assuming same NUMA, both these ports could share the 9000 MTU mempool. The user must give a hint as order of creation of ports and setting of MTUs may vary and we need to ensure that upgrades from older OVS versions do not require more memory. This scheme can also prevent multiple mempools being created for cases where a port is added picking up a default MTU and an appropriate mempool, but later has it's MTU changed to a different value requiring a different mempool. Example usage: $ ovs-vsctl --no-wait set Open_vSwitch . \ other_config:shared-mempool-config=9000,1500:1,6000:1 Port added on NUMA 0: * MTU 1500, use mempool based on 9000 MTU * MTU 5000, use mempool based on 9000 MTU * MTU 9000, use mempool based on 9000 MTU * MTU 9300, use mempool based on 9300 MTU (existing behaviour) Port added on NUMA 1: * MTU 1500, use mempool based on 1500 MTU * MTU 5000, use mempool based on 6000 MTU * MTU 9000, use mempool based on 9000 MTU * MTU 9300, use mempool based on 9300 MTU (existing behaviour) Default behaviour is unchanged and mempools are still only created when needed. Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Reviewed-by: David Marchand <david.marchand@redhat.com> Acked-by: Sunil Pai G <sunil.pai.g@intel.com> Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/vswitch.xml37
1 files changed, 37 insertions, 0 deletions
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index cc1dd77ec..98486c009 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -490,6 +490,43 @@
</p>
</column>
+ <column name="other_config" key="shared-mempool-config">
+ <p>Specifies dpdk shared mempool config.</p>
+ <p>Value should be set in the following form:</p>
+ <p>
+ <code>other_config:shared-mempool-config=&lt;
+ user-shared-mempool-mtu-list&gt;</code>
+ </p>
+ <p>where</p>
+ <p>
+ <ul>
+ <li>
+ &lt;user-shared-mempool-mtu-list&gt; ::=
+ NULL | &lt;non-empty-list&gt;
+ </li>
+ <li>
+ &lt;non-empty-list&gt; ::= &lt;user-mtus&gt; |
+ &lt;user-mtus&gt; ,
+ &lt;non-empty-list&gt;
+ </li>
+ <li>
+ &lt;user-mtus&gt; ::= &lt;mtu-all-socket&gt; |
+ &lt;mtu-socket-pair&gt;
+ </li>
+ <li>
+ &lt;mtu-all-socket&gt; ::= &lt;mtu&gt;
+ </li>
+ <li>
+ &lt;mtu-socket-pair&gt; ::= &lt;mtu&gt; : &lt;socket-id&gt;
+ </li>
+ </ul>
+ </p>
+ <p>
+ Changing this value requires restarting the daemon if dpdk-init has
+ already been set to true.
+ </p>
+ </column>
+
<column name="other_config" key="tx-flush-interval"
type='{"type": "integer",
"minInteger": 0, "maxInteger": 1000000}'>