Skip to content

Commit

Permalink
net/sched: act_api: use the correct TCA_ACT attributes in dump
Browse files Browse the repository at this point in the history
4 places in the act api code are using 'TCA_' definitions where they
should be using 'TCA_ACT_', which is confusing for the reader, although
functionally they are equivalent.

Cc: Hangbin Liu <[email protected]>
Reviewed-by: Jamal Hadi Salim <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Signed-off-by: Pedro Tammela <[email protected]>
Acked-by: Hangbin Liu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tammela authored and davem330 committed Mar 23, 2023
1 parent d0e4391 commit fcb3a46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/sched/act_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ static size_t tcf_action_shared_attrs_size(const struct tc_action *act)
+ nla_total_size_64bit(sizeof(u64))
/* TCA_STATS_QUEUE */
+ nla_total_size_64bit(sizeof(struct gnet_stats_queue))
+ nla_total_size(0) /* TCA_OPTIONS nested */
+ nla_total_size(0) /* TCA_ACT_OPTIONS nested */
+ nla_total_size(sizeof(struct tcf_t)); /* TCA_GACT_TM */
}

Expand All @@ -480,7 +480,7 @@ tcf_action_dump_terse(struct sk_buff *skb, struct tc_action *a, bool from_act)
unsigned char *b = skb_tail_pointer(skb);
struct tc_cookie *cookie;

if (nla_put_string(skb, TCA_KIND, a->ops->kind))
if (nla_put_string(skb, TCA_ACT_KIND, a->ops->kind))
goto nla_put_failure;
if (tcf_action_copy_stats(skb, a, 0))
goto nla_put_failure;
Expand Down Expand Up @@ -598,7 +598,7 @@ static int tcf_del_walker(struct tcf_idrinfo *idrinfo, struct sk_buff *skb,
nest = nla_nest_start_noflag(skb, 0);
if (nest == NULL)
goto nla_put_failure;
if (nla_put_string(skb, TCA_KIND, ops->kind))
if (nla_put_string(skb, TCA_ACT_KIND, ops->kind))
goto nla_put_failure;

ret = 0;
Expand Down Expand Up @@ -1189,7 +1189,7 @@ tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
if (nla_put_u32(skb, TCA_ACT_IN_HW_COUNT, a->in_hw_count))
goto nla_put_failure;

nest = nla_nest_start_noflag(skb, TCA_OPTIONS);
nest = nla_nest_start_noflag(skb, TCA_ACT_OPTIONS);
if (nest == NULL)
goto nla_put_failure;
err = tcf_action_dump_old(skb, a, bind, ref);
Expand Down

0 comments on commit fcb3a46

Please sign in to comment.