[ovs-git] [openvswitch/ovs] c4f8dc: datapath-windows: Address memory allocation issues...

Alin Gabriel Serdean noreply at github.com
Wed Apr 3 14:20:41 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: c4f8dc7a9c5c1802f6b185b2440f9245a719f73b
      https://github.com/openvswitch/ovs/commit/c4f8dc7a9c5c1802f6b185b2440f9245a719f73b
  Author: Anand Kumar via dev <ovs-dev at openvswitch.org>
  Date:   2019-04-03 (Wed, 03 Apr 2019)

  Changed paths:
    M datapath-windows/ovsext/BufferMgmt.h

  Log Message:
  -----------
  datapath-windows: Address memory allocation issues for OVS_BUFFER_CONTEXT

With current implementation, when nbl pool is allocated, context size is
specified as 64 bytes, while the OVS_BUFFER_CONTEXT size is only 32 bytes.
Since context size is never changed, additional memory is not required.

This patch makes it simpler to allocate memory for OVS_BUFFER_CONTEXT so
that it is always aligned to MEMORY_ALLOCATION_ALIGNMENT.
This is acheived by updating "value" field in the context
structure, so that number of elements in array is always a multiple of
MEMORY_ALLOCATION_ALIGNMENT.

Also change the DEFAULT_CONTEXT_SIZE to accomodate OVS_BUFFER_CONTEXT size.

Signed-off-by: Anand Kumar <kumaranand at vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean at ovn.org>
Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>




More information about the git mailing list