summaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorGaetan Rivet <grive@u256.net>2021-09-08 11:47:38 +0200
committerIlya Maximets <i.maximets@ovn.org>2022-01-19 01:35:19 +0100
commit62c2d8a67543c8694dde828a2dc813105d973c23 (patch)
tree1be557342df412d0617b1bcab0ae56bbc52a27fe /vswitchd
parent2eac33c6cc4a9d933a60164971c4c3fbf95aa846 (diff)
downloadopenvswitch-62c2d8a67543c8694dde828a2dc813105d973c23.tar.gz
netdev-offload: Add multi-thread API.
Expose functions reporting user configuration of offloading threads, as well as utility functions for multithreading. This will only expose the configuration knob to the user, while no datapath will implement the multiple thread request. This will allow implementations to use this API for offload thread management in relevant layers before enabling the actual dataplane implementation. The offload thread ID is lazily allocated and can as such be in a different order than the offload thread start sequence. The RCU thread will sometime access hardware-offload objects from a provider for reclamation purposes. In such case, it will get a default offload thread ID of 0. Care must be taken that using this thread ID is safe concurrently with the offload threads. Signed-off-by: Gaetan Rivet <grive@u256.net> Reviewed-by: Eli Britstein <elibr@nvidia.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/vswitch.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 026b5e2ca..064e0facf 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -247,6 +247,22 @@
</p>
</column>
+ <column name="other_config" key="n-offload-threads"
+ type='{"type": "integer", "minInteger": 1, "maxInteger": 10}'>
+ <p>
+ Set this value to the number of threads created to manage hardware
+ offloads.
+ </p>
+ <p>
+ The default value is <code>1</code>. Changing this value requires
+ restarting the daemon.
+ </p>
+ <p>
+ This is only relevant for userspace datapath and only if
+ <ref column="other_config" key="hw-offload"/> is enabled.
+ </p>
+ </column>
+
<column name="other_config" key="tc-policy"
type='{"type": "string",
"enum": ["set", ["none", "skip_sw", "skip_hw"]]}'>