Subject: Re: [PATCH openvswitch] linux: Signal datapath that unaligned Netlink message can be received

From: Ben Pfaff <[email-masked]>
Date: Thu, 21 Nov 2013 12:52:08 -0800

On Thu, Nov 21, 2013 at 10:49:00PM +0400, Sergei Shtylyov wrote:
> On 21-11-2013 22:15, Thomas Graf wrote:
> 
> >Following commit (''netlink: Do not enforce alignment of last Netlink
> >attribute''), signal the ability to receive unaligned Netlink messages
> >to the datapath to enable utilization of zerocopy optimizations.
> 
> >Signed-off-by: Thomas Graf <[email-masked]>
> [...]
> 
> >diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
> >index 1dcf321..5c952bc 100644
> >--- a/lib/dpif-linux.c
> >+++ b/lib/dpif-linux.c
> [...]
> >@@ -1839,6 +1841,10 @@ dpif_linux_dp_to_ofpbuf(const struct dpif_linux_dp *dp, struct ofpbuf *buf)
> >          nl_msg_put_u32(buf, OVS_DP_ATTR_UPCALL_PID, *dp->upcall_pid);
> >      }
> >
> >+    if (dp->user_features) {
> >+        nl_msg_put_u32(buf, OVS_DP_ATTR_USER_FEATURES, dp->user_features);
> >+    }
> >+
> 
>    {} not needed here.

This is Open vSwitch code, so it follows Open vSwitch coding style,
which requires the {}.