diff options
author | Sorin Vinturis <svinturis@cloudbasesolutions.com> | 2016-04-07 11:21:12 +0000 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-04-10 12:43:45 -0700 |
commit | 811c911ff523b0cbba4fbf1b4523a63690d522f1 (patch) | |
tree | 7f186e73612ee86e5f3252777f6f225788230ddd /datapath-windows/ovsext/Util.h | |
parent | 6982ee960e47616f4bd5178d94740e81feaea26c (diff) | |
download | openvswitch-811c911ff523b0cbba4fbf1b4523a63690d522f1.tar.gz |
datapath-windows: Hot add CPU support.
Hot add CPU is the ability to dynamically add CPUs to a running
system. Adding CPUs can occur physically by adding new hardware,
logically by online hardware partitioning, or virtually through
a virtualization layer.
This patch add support to reallocate any per-cpu resources, in
case a new processor is added.
Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/112
Acked-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/Util.h')
-rw-r--r-- | datapath-windows/ovsext/Util.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/Util.h b/datapath-windows/ovsext/Util.h index 038754dd0..78b926d3b 100644 --- a/datapath-windows/ovsext/Util.h +++ b/datapath-windows/ovsext/Util.h @@ -41,7 +41,7 @@ VOID *OvsAllocateMemory(size_t size); VOID *OvsAllocateMemoryWithTag(size_t size, ULONG tag); VOID *OvsAllocateAlignedMemory(size_t size, UINT16 align); -VOID *OvsAllocateMemoryPerCpu(size_t size, ULONG tag); +VOID *OvsAllocateMemoryPerCpu(size_t size, size_t count, ULONG tag); VOID OvsFreeMemory(VOID *ptr); VOID OvsFreeMemoryWithTag(VOID *ptr, ULONG tag); VOID OvsFreeAlignedMemory(VOID *ptr); @@ -94,4 +94,22 @@ VOID OvsAppendList(PLIST_ENTRY dst, PLIST_ENTRY src); BOOLEAN OvsCompareString(PVOID string1, PVOID string2); +/* + * -------------------------------------------------------------------------- + * OvsPerCpuDataInit -- + * The function allocates necessary per-processor resources. + * -------------------------------------------------------------------------- + */ +NTSTATUS +OvsPerCpuDataInit(); + +/* + * -------------------------------------------------------------------------- + * OvsPerCpuDataCleanup -- + * The function frees all per-processor resources. + * -------------------------------------------------------------------------- + */ +VOID +OvsPerCpuDataCleanup(); + #endif /* __UTIL_H_ */ |