diff options
author | Ankur Sharma <ankursharma@vmware.com> | 2014-09-03 16:33:15 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-09-04 09:16:58 -0700 |
commit | f67a578d93fe8c08ffc1d4e910fc4eed5fbbab32 (patch) | |
tree | c218c98afc9072b0f7be7d7041dbe455163b77c4 /datapath-windows/ovsext/Netlink | |
parent | ba10fc7c1f768bcb3273e9b2a65521693f8d3477 (diff) | |
download | openvswitch-f67a578d93fe8c08ffc1d4e910fc4eed5fbbab32.tar.gz |
datapath-windows: NetlinkProto: Fix typo and add padding macro.
Added a new macro for calculating the number of bytes required
for padding. Fixed a minor typo.
Signed-off-by: Ankur Sharma <ankursharma@vmware.com>
Tested-by: Ankur Sharma <ankursharma@vmware.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/37
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Acked-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/Netlink')
-rw-r--r-- | datapath-windows/ovsext/Netlink/NetlinkProto.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/Netlink/NetlinkProto.h b/datapath-windows/ovsext/Netlink/NetlinkProto.h index 898cc84f1..2c438a6ce 100644 --- a/datapath-windows/ovsext/Netlink/NetlinkProto.h +++ b/datapath-windows/ovsext/Netlink/NetlinkProto.h @@ -39,6 +39,9 @@ /* Returns X rounded up to the nearest multiple of Y. */ #define ROUND_UP(X, Y) (DIV_ROUND_UP(X, Y) * (Y)) +/* Returns the least number that, when added to X, yields a multiple of Y. */ +#define PAD_SIZE(X, Y) (ROUND_UP(X, Y) - (X)) + /* Netlink message */ /* nlmsg_flags bits. */ @@ -92,7 +95,7 @@ typedef struct _GENL_MSG_HDR { UINT8 cmd; UINT8 version; UINT16 reserved; -} GENL_MSG_HDR, *PGENL_MDG_HDR; +} GENL_MSG_HDR, *PGENL_MSG_HDR; BUILD_ASSERT_DECL(sizeof(GENL_MSG_HDR) == 4); /* Netlink attributes */ |