[ovs-dev] [PATCH 2/4] Upcall NL packet format: NL Flow utilities, parametrized Key to NL conversion

Nithin Raju nithin at vmware.com
Tue Oct 14 21:36:23 UTC 2014


> /*
>  *----------------------------------------------------------------------------
> - *  _MapFlowTunKeyToNlKey --
> - *    Maps OvsIPv4TunnelKey to OVS_TUNNEL_KEY_ATTR_ID attribute.
> + *  MapFlowTunKeyToNlKey --
> + *   Maps OvsIPv4TunnelKey to OVS_TUNNEL_KEY_ATTR_ID attribute.
>  *----------------------------------------------------------------------------
>  */
> -static NTSTATUS
> -_MapFlowTunKeyToNlKey(PNL_BUFFER nlBuf, OvsIPv4TunnelKey *tunKey)
> +NTSTATUS
> +MapFlowTunKeyToNlKey(PNL_BUFFER nlBuf,
> +                     OvsIPv4TunnelKey *tunKey,
> +                     UINT16 tunKeyType)
> {
>     NTSTATUS rc = STATUS_SUCCESS;
>     UINT32 offset = 0;
> 
> -    offset = NlMsgStartNested(nlBuf, OVS_KEY_ATTR_TUNNEL);
> +    offset = NlMsgStartNested(nlBuf, tunKeyType);
>     if (!offset) {
>         /* Starting the nested attribute failed. */
>         rc = STATUS_UNSUCCESSFUL;
> @@ -2302,4 +2305,43 @@ unlock:
>     return status;
> }
> 
> +UINT32
> +OvsTunKeyAttrSize(void)


Should these functions not be the other way round? ie. OvsFlowKeyAttrSize() includes the tunKey as well, rather than OvsTunKeyAttrSize() including OvsFlowKeyAttrSize()?

Looks good otherwise.

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


More information about the dev mailing list