API changes are related commit: openvswitch: Revert: "Enable memory mapped Netlink i/o"
revert commit 795449d8b846 ("openvswitch: Enable memory mapped Netlink i/o"). Following the mmaped netlink removal this code can be removed. Signed-off-by: Florian Westphal <f...@strlen.de> Signed-off-by: David S. Miller <da...@davemloft.net> Signed-off-by: Pravin B Shelar <pshe...@ovn.org> --- acinclude.m4 | 1 - datapath/datapath.c | 22 ++++++++-------------- datapath/linux/compat/include/net/genetlink.h | 9 --------- 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index c05121d..083ef77 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -576,7 +576,6 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [genl_has_listeners]) OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [mcgrp_offset]) OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [parallel_ops]) - OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [genlmsg_new_unicast]) OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [netlink_has_listeners(net->genl_sock], [OVS_DEFINE([HAVE_GENL_HAS_LISTENERS_TAKES_NET])]) OVS_GREP_IFELSE([$KSRC/include/net/genetlink.h], [genlmsg_parse]) diff --git a/datapath/datapath.c b/datapath/datapath.c index 3d2385e..6e0d911 100644 --- a/datapath/datapath.c +++ b/datapath/datapath.c @@ -436,12 +436,6 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb, struct sk_buff *nskb = NULL; struct sk_buff *user_skb = NULL; /* to be queued to userspace */ struct nlattr *nla; - struct genl_info info = { -#ifdef HAVE_GENLMSG_NEW_UNICAST - .dst_sk = ovs_dp_get_net(dp)->genl_sock, -#endif - .snd_portid = upcall_info->portid, - }; size_t len; unsigned int hlen; int err, dp_ifindex; @@ -482,7 +476,7 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb, hlen = skb->len; len = upcall_msg_size(upcall_info, hlen - cutlen); - user_skb = genlmsg_new_unicast(len, &info, GFP_ATOMIC); + user_skb = genlmsg_new(len, GFP_ATOMIC); if (!user_skb) { err = -ENOMEM; goto out; @@ -909,7 +903,7 @@ static struct sk_buff *ovs_flow_cmd_alloc_info(const struct sw_flow_actions *act return NULL; len = ovs_flow_cmd_msg_size(acts, sfid, ufid_flags); - skb = genlmsg_new_unicast(len, info, GFP_KERNEL); + skb = genlmsg_new(len, GFP_KERNEL); if (!skb) return ERR_PTR(-ENOMEM); @@ -1522,9 +1516,9 @@ error: return -EMSGSIZE; } -static struct sk_buff *ovs_dp_cmd_alloc_info(struct genl_info *info) +static struct sk_buff *ovs_dp_cmd_alloc_info(void) { - return genlmsg_new_unicast(ovs_dp_cmd_msg_size(), info, GFP_KERNEL); + return genlmsg_new(ovs_dp_cmd_msg_size(), GFP_KERNEL); } /* Called with rcu_read_lock or ovs_mutex. */ @@ -1577,7 +1571,7 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info) if (!a[OVS_DP_ATTR_NAME] || !a[OVS_DP_ATTR_UPCALL_PID]) goto err; - reply = ovs_dp_cmd_alloc_info(info); + reply = ovs_dp_cmd_alloc_info(); if (!reply) return -ENOMEM; @@ -1698,7 +1692,7 @@ static int ovs_dp_cmd_del(struct sk_buff *skb, struct genl_info *info) struct datapath *dp; int err; - reply = ovs_dp_cmd_alloc_info(info); + reply = ovs_dp_cmd_alloc_info(); if (!reply) return -ENOMEM; @@ -1730,7 +1724,7 @@ static int ovs_dp_cmd_set(struct sk_buff *skb, struct genl_info *info) struct datapath *dp; int err; - reply = ovs_dp_cmd_alloc_info(info); + reply = ovs_dp_cmd_alloc_info(); if (!reply) return -ENOMEM; @@ -1763,7 +1757,7 @@ static int ovs_dp_cmd_get(struct sk_buff *skb, struct genl_info *info) struct datapath *dp; int err; - reply = ovs_dp_cmd_alloc_info(info); + reply = ovs_dp_cmd_alloc_info(); if (!reply) return -ENOMEM; diff --git a/datapath/linux/compat/include/net/genetlink.h b/datapath/linux/compat/include/net/genetlink.h index 2830fa3..c8ee81a 100644 --- a/datapath/linux/compat/include/net/genetlink.h +++ b/datapath/linux/compat/include/net/genetlink.h @@ -96,15 +96,6 @@ static inline int rpl_genl_register_family(struct genl_family *family) #endif -#ifndef HAVE_GENLMSG_NEW_UNICAST -static inline struct sk_buff *genlmsg_new_unicast(size_t payload, - struct genl_info *info, - gfp_t flags) -{ - return genlmsg_new(payload, flags); -} -#endif - #ifndef HAVE_GENL_HAS_LISTENERS static inline int genl_has_listeners(struct genl_family *family, struct net *net, unsigned int group) -- 1.8.3.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev