[ovs-git] [openvswitch/ovs] 80a73e: ofp-actions: Make struct ofpact constant size acro...

GitHub noreply at github.com
Tue Aug 12 19:29:58 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 80a73e719618d78907c5c7c53aea885a2626c11f
      https://github.com/openvswitch/ovs/commit/80a73e719618d78907c5c7c53aea885a2626c11f
  Author: Ben Pfaff <blp at nicira.com>
  Date:   2014-08-12 (Tue, 12 Aug 2014)

  Changed paths:
    M lib/compiler.h
    M lib/ofp-actions.h

  Log Message:
  -----------
  ofp-actions: Make struct ofpact constant size across implementations.

Before commit c2d936a44fa6 (ofp-actions: Centralize all OpenFlow action
code for maintainability.), struct ofpact was 4 bytes with GCC and Clang,
and 12 bytes with other compilers.  That commit changed struct ofpact so
that it remained 4 bytes with GCC and Clang but shrank to 8 bytes on other
compilers.  An unexpected side effect of that change was that the size
of the pad[] array in struct ofpact_nest shrank to 0 bytes, because that
array padded to a multiple of 8 bytes.  MSVC does not support 0-element
arrays, so this caused a build failure.

This commit fixes the problem by changing struct ofpact so that it is 4
bytes with every compiler.

Reported-by: Alin Serdean <aserdean at cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Alin Serdean <aserdean at cloudbasesolutions.com>


  Commit: 07ba3dbdcdee99fe420198d3cfcebf4903d5dc2a
      https://github.com/openvswitch/ovs/commit/07ba3dbdcdee99fe420198d3cfcebf4903d5dc2a
  Author: Ben Pfaff <blp at nicira.com>
  Date:   2014-08-12 (Tue, 12 Aug 2014)

  Changed paths:
    M lib/automake.mk

  Log Message:
  -----------
  Makefiles: Clean lib/ofp-actions.inc1 and lib/ofp-actions.inc2.

Fixes a failure with make distcheck.

Reported-by: Ankur Sharma <ankursharma at vmware.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/e0a42ae29a28...07ba3dbdcdee


More information about the git mailing list