net/sched: use rtnl_notify() instead of rtnetlink_send()
Subsystems (3)
PATCH 4/4 net/sched: use rtnl_notify() instead of rtnetlink_send()
The rtnetlink_send() is already removed. use rtnl_notify() instead.
Signed-off-by Yajun Deng <[email protected]>
--- net/sched/act_api.c | 13 ++++++------- net/sched/cls_api.c | 14 +++++++------- net/sched/sch_api.c | 13 ++++++------- 3 files changed, 19 insertions(+), 21 deletions(-)
net/sched/act_api.c +6 -7
@@ -1349,8 +1349,8 @@ static int tca_action_flush(struct net *net, struct nlattr *nla, nlh->nlmsg_len =skb_tail_pointer (skb) - b; nlh->nlmsg_flags |=NLM_F_ROOT ;module_put (ops->owner); - err =rtnetlink_send (skb, net, portid,RTNLGRP_TC , - n->nlmsg_flags &NLM_F_ECHO ); + err =rtnl_notify (skb, net, portid,RTNLGRP_TC , +nlmsg_report (n),GFP_KERNEL );if (err <0 )NL_SET_ERR_MSG (extack,"Failed to send TC action flush notification" );
@@ -1419,9 +1419,8 @@ tcf_del_notify(struct net *net, struct nlmsghdr *n, struct tc_action *actions[],return ret; } - ret =rtnetlink_send (skb, net, portid,RTNLGRP_TC , - n->nlmsg_flags &NLM_F_ECHO ); -return ret; +return rtnl_notify (skb, net, portid,RTNLGRP_TC , +nlmsg_report (n),GFP_KERNEL ); } static int
@@ -1490,8 +1489,8 @@ tcf_add_notify(struct net *net, struct nlmsghdr *n, struct tc_action *actions[],return -EINVAL ; } -return rtnetlink_send (skb, net, portid,RTNLGRP_TC , - n->nlmsg_flags &NLM_F_ECHO ); +return rtnl_notify (skb, net, portid,RTNLGRP_TC , +nlmsg_report (n),GFP_KERNEL ); } static int tcf_action_add(struct net *net, struct nlattr *nla,
net/sched/cls_api.c +7 -7
@@ -1872,8 +1872,8 @@ static int tfilter_notify(struct net *net, struct sk_buff *oskb,if (unicast) err =rtnl_unicast (skb, net, portid);else - err =rtnetlink_send (skb, net, portid,RTNLGRP_TC , - n->nlmsg_flags &NLM_F_ECHO ); + err =rtnl_notify (skb, net, portid,RTNLGRP_TC , +nlmsg_report (n),GFP_KERNEL );return err; }
@@ -1908,8 +1908,8 @@ static int tfilter_del_notify(struct net *net, struct sk_buff *oskb,if (unicast) err =rtnl_unicast (skb, net, portid);else - err =rtnetlink_send (skb, net, portid,RTNLGRP_TC , - n->nlmsg_flags &NLM_F_ECHO ); + err =rtnl_notify (skb, net, portid,RTNLGRP_TC , +nlmsg_report (n),GFP_KERNEL );if (err <0 )NL_SET_ERR_MSG (extack,"Failed to send filter delete notification" );
@@ -2708,8 +2708,8 @@ static int tc_chain_notify(struct tcf_chain *chain, struct sk_buff *oskb,if (unicast) err =rtnl_unicast (skb, net, portid);else - err =rtnetlink_send (skb, net, portid,RTNLGRP_TC , - flags &NLM_F_ECHO ); + err =rtnl_notify (skb, net, portid,RTNLGRP_TC , + flags &NLM_F_ECHO ,GFP_KERNEL );return err; }
@@ -2736,7 +2736,7 @@ static int tc_chain_notify_delete(const struct tcf_proto_ops *tmplt_ops,if (unicast)return rtnl_unicast (skb, net, portid); -return rtnetlink_send (skb, net, portid,RTNLGRP_TC , flags &NLM_F_ECHO ); +return rtnl_notify (skb, net, portid,RTNLGRP_TC , flags &NLM_F_ECHO ,GFP_KERNEL ); } static int tc_chain_tmplt_add(struct tcf_chain *chain, struct net *net,
net/sched/sch_api.c +6 -7
@@ -987,8 +987,8 @@ static int qdisc_notify(struct net *net, struct sk_buff *oskb, }if (skb->len) -return rtnetlink_send (skb, net, portid,RTNLGRP_TC , - n->nlmsg_flags &NLM_F_ECHO ); +return rtnl_notify (skb, net, portid,RTNLGRP_TC , +nlmsg_report (n),GFP_KERNEL ); err_out:kfree_skb (skb);
@@ -1855,8 +1855,8 @@ static int tclass_notify(struct net *net, struct sk_buff *oskb,return -EINVAL ; } -return rtnetlink_send (skb, net, portid,RTNLGRP_TC , - n->nlmsg_flags &NLM_F_ECHO ); +return rtnl_notify (skb, net, portid,RTNLGRP_TC , +nlmsg_report (n),GFP_KERNEL ); } static int tclass_del_notify(struct net *net,
@@ -1888,9 +1888,8 @@ static int tclass_del_notify(struct net *net,return err; } - err =rtnetlink_send (skb, net, portid,RTNLGRP_TC , - n->nlmsg_flags &NLM_F_ECHO ); -return err; +return rtnl_notify (skb, net, portid,RTNLGRP_TC , +nlmsg_report (n),GFP_KERNEL ); }#ifdef CONFIG_NET_CLS
Signature · 1 line
2.32.0