datapath: Add backport for genlmsg_new_unicast().
authorJesse Gross <jesse@nicira.com>
Wed, 4 Dec 2013 04:06:09 +0000 (20:06 -0800)
committerJesse Gross <jesse@nicira.com>
Wed, 4 Dec 2013 04:06:09 +0000 (20:06 -0800)
genlmsg_new_unicast() will be proposed upstream to support memory
mapped Netlink but on existing kernels it just uses genlmsg_new().

Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/linux/compat/include/net/genetlink.h

index 91be168..09ee23b 100644 (file)
 extern void genl_notify(struct sk_buff *skb, struct net *net, u32 portid,
                        u32 group, struct nlmsghdr *nlh, gfp_t flags);
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
+static inline struct sk_buff *genlmsg_new_unicast(size_t payload,
+                                                 struct genl_info *info,
+                                                 gfp_t flags)
+{
+       return genlmsg_new(payload, flags);
+}
+#endif
+
 #endif /* genetlink.h */