Commit e5227555 authored by Pedro Tammela's avatar Pedro Tammela Committed by Jakub Kicinski

net/sched: cls_api: remove 'unicast' argument from delete notification

This argument is never called while set to true, so remove it as there's
no need for it.
Signed-off-by: default avatarPedro Tammela <pctammela@mojatatu.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20231208192847.714940-7-pctammela@mojatatu.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 8d4390f5
...@@ -650,7 +650,7 @@ static void tc_chain_tmplt_del(const struct tcf_proto_ops *tmplt_ops, ...@@ -650,7 +650,7 @@ static void tc_chain_tmplt_del(const struct tcf_proto_ops *tmplt_ops,
static int tc_chain_notify_delete(const struct tcf_proto_ops *tmplt_ops, static int tc_chain_notify_delete(const struct tcf_proto_ops *tmplt_ops,
void *tmplt_priv, u32 chain_index, void *tmplt_priv, u32 chain_index,
struct tcf_block *block, struct sk_buff *oskb, struct tcf_block *block, struct sk_buff *oskb,
u32 seq, u16 flags, bool unicast); u32 seq, u16 flags);
static void __tcf_chain_put(struct tcf_chain *chain, bool by_act, static void __tcf_chain_put(struct tcf_chain *chain, bool by_act,
bool explicitly_created) bool explicitly_created)
...@@ -685,8 +685,7 @@ static void __tcf_chain_put(struct tcf_chain *chain, bool by_act, ...@@ -685,8 +685,7 @@ static void __tcf_chain_put(struct tcf_chain *chain, bool by_act,
if (non_act_refcnt == chain->explicitly_created && !by_act) { if (non_act_refcnt == chain->explicitly_created && !by_act) {
if (non_act_refcnt == 0) if (non_act_refcnt == 0)
tc_chain_notify_delete(tmplt_ops, tmplt_priv, tc_chain_notify_delete(tmplt_ops, tmplt_priv,
chain->index, block, NULL, 0, 0, chain->index, block, NULL, 0, 0);
false);
/* Last reference to chain, no need to lock. */ /* Last reference to chain, no need to lock. */
chain->flushing = false; chain->flushing = false;
} }
...@@ -2075,8 +2074,8 @@ static int tfilter_notify(struct net *net, struct sk_buff *oskb, ...@@ -2075,8 +2074,8 @@ static int tfilter_notify(struct net *net, struct sk_buff *oskb,
static int tfilter_del_notify(struct net *net, struct sk_buff *oskb, static int tfilter_del_notify(struct net *net, struct sk_buff *oskb,
struct nlmsghdr *n, struct tcf_proto *tp, struct nlmsghdr *n, struct tcf_proto *tp,
struct tcf_block *block, struct Qdisc *q, struct tcf_block *block, struct Qdisc *q,
u32 parent, void *fh, bool unicast, bool *last, u32 parent, void *fh, bool *last, bool rtnl_held,
bool rtnl_held, struct netlink_ext_ack *extack) struct netlink_ext_ack *extack)
{ {
struct sk_buff *skb; struct sk_buff *skb;
u32 portid = oskb ? NETLINK_CB(oskb).portid : 0; u32 portid = oskb ? NETLINK_CB(oskb).portid : 0;
...@@ -2100,11 +2099,8 @@ static int tfilter_del_notify(struct net *net, struct sk_buff *oskb, ...@@ -2100,11 +2099,8 @@ static int tfilter_del_notify(struct net *net, struct sk_buff *oskb,
return err; return err;
} }
if (unicast) err = rtnetlink_send(skb, net, portid, RTNLGRP_TC,
err = rtnl_unicast(skb, net, portid); n->nlmsg_flags & NLM_F_ECHO);
else
err = rtnetlink_send(skb, net, portid, RTNLGRP_TC,
n->nlmsg_flags & NLM_F_ECHO);
if (err < 0) if (err < 0)
NL_SET_ERR_MSG(extack, "Failed to send filter delete notification"); NL_SET_ERR_MSG(extack, "Failed to send filter delete notification");
...@@ -2499,9 +2495,8 @@ static int tc_del_tfilter(struct sk_buff *skb, struct nlmsghdr *n, ...@@ -2499,9 +2495,8 @@ static int tc_del_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
} else { } else {
bool last; bool last;
err = tfilter_del_notify(net, skb, n, tp, block, err = tfilter_del_notify(net, skb, n, tp, block, q, parent, fh,
q, parent, fh, false, &last, &last, rtnl_held, extack);
rtnl_held, extack);
if (err) if (err)
goto errout; goto errout;
...@@ -2929,7 +2924,7 @@ static int tc_chain_notify(struct tcf_chain *chain, struct sk_buff *oskb, ...@@ -2929,7 +2924,7 @@ static int tc_chain_notify(struct tcf_chain *chain, struct sk_buff *oskb,
static int tc_chain_notify_delete(const struct tcf_proto_ops *tmplt_ops, static int tc_chain_notify_delete(const struct tcf_proto_ops *tmplt_ops,
void *tmplt_priv, u32 chain_index, void *tmplt_priv, u32 chain_index,
struct tcf_block *block, struct sk_buff *oskb, struct tcf_block *block, struct sk_buff *oskb,
u32 seq, u16 flags, bool unicast) u32 seq, u16 flags)
{ {
u32 portid = oskb ? NETLINK_CB(oskb).portid : 0; u32 portid = oskb ? NETLINK_CB(oskb).portid : 0;
struct net *net = block->net; struct net *net = block->net;
...@@ -2945,9 +2940,6 @@ static int tc_chain_notify_delete(const struct tcf_proto_ops *tmplt_ops, ...@@ -2945,9 +2940,6 @@ static int tc_chain_notify_delete(const struct tcf_proto_ops *tmplt_ops,
return -EINVAL; return -EINVAL;
} }
if (unicast)
return rtnl_unicast(skb, net, portid);
return rtnetlink_send(skb, net, portid, RTNLGRP_TC, flags & NLM_F_ECHO); return rtnetlink_send(skb, net, portid, RTNLGRP_TC, flags & NLM_F_ECHO);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment