[ovs-dev] [PATCH v2 02/10] datapath-windows/Netlink: Add NlFillOvsMsg API for creating Netlink message headers.

Nithin Raju nithin at vmware.com
Thu Sep 25 07:17:27 UTC 2014


On Sep 24, 2014, at 11:57 PM, Ankur Sharma <ankursharma at vmware.com>
 wrote:

> Added NlFillOvsMsg API in Netlink.c This API will be used to populate
> netlink message headers.
> 
> Signed-off-by: Ankur Sharma <ankursharma at vmware.com>
> Acked-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
> Acked-by: Eitan Eliahu <eliahue at vmware.com>
> ---
> datapath-windows/ovsext/Netlink/Netlink.c | 38 +++++++++++++++++++++++++++++++
> datapath-windows/ovsext/Netlink/Netlink.h |  6 +++++
> 2 files changed, 44 insertions(+)
> 
> diff --git a/datapath-windows/ovsext/Netlink/Netlink.c b/datapath-windows/ovsext/Netlink/Netlink.c
> index c286c2f..a2829a5 100644
> --- a/datapath-windows/ovsext/Netlink/Netlink.c
> +++ b/datapath-windows/ovsext/Netlink/Netlink.c
> @@ -34,6 +34,44 @@
> 
> /*
>  * ---------------------------------------------------------------------------
> + * Prepare netlink message headers. Attributes should be added by caller.
> + * ---------------------------------------------------------------------------
> + */
> +NTSTATUS
> +NlFillOvsMsg(POVS_MESSAGE msgOut, PNL_BUFFER nlBuf,
> +             UINT16 nlmsgType, UINT16 nlmsgFlags,
> +             UINT32 nlmsgSeq, UINT32 nlmsgPid,
> +             UINT8 genlCmd, UINT8 genlVer, UINT32 dpNo)

We don't need msgOut and nlBuf both as parameters. One of them will suffice.
You can declare a local variable msgOut = NlBufAt(nlBuf, 0, sizeof *msgOut);

LG otherwise.

Acked-by: Nithin Raju <nithin at vmware.com>

-- Nithin


More information about the dev mailing list