[ovs-dev] [PATCH v3 2/9] datapath-windows: Add support for Netfilter netlink message
Nithin Raju
nithin at vmware.com
Mon Jun 27 19:11:17 UTC 2016
A couple of minor comments, but looks good otherwise.
Acked-by: Nithin Raju <nithin at vmware.com>
>+/*
>+ *
>--------------------------------------------------------------------------
>-
>+ * Returns size of to nfnlmsg attributes.
>+ *
>--------------------------------------------------------------------------
>-
>+ */
>+UINT32
>+NfNlMsgAttrsLen(const PNL_MSG_HDR nlh)
NlNfMsgAttrsLen() might be a more suitable name, given that all of the
other functions in that file start with Nlxxx.
>+{
>+ return NlHdrPayloadLen(nlh) - NF_GEN_MSG_HDRLEN - OVS_HDRLEN;
>+}
>+
> /* Netlink message parse. */
>
> /*
>diff --git a/datapath-windows/ovsext/Netlink/Netlink.h
>b/datapath-windows/ovsext/Netlink/Netlink.h
>index b1b3bed..cce7ec3 100644
>--- a/datapath-windows/ovsext/Netlink/Netlink.h
>+++ b/datapath-windows/ovsext/Netlink/Netlink.h
>@@ -27,7 +27,10 @@
> */
> typedef struct _OVS_MESSAGE {
> NL_MSG_HDR nlMsg;
>- GENL_MSG_HDR genlMsg;
>+ union {
>+ GENL_MSG_HDR genlMsg;
>+ NF_GEN_MSG_HDR nfGenMsg;
>+ };
Can you pls. BUILD_ASSERT(sizeof (GENL_MSG_HDR) == sizeof
(NF_GEN_MSG_HDR))?
More information about the dev
mailing list