Skip to content

Commit fcb3a46

Browse files
tammeladavem330
authored andcommitted
net/sched: act_api: use the correct TCA_ACT attributes in dump
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 <haliu@redhat.com> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Pedro Tammela <pctammela@mojatatu.com> Acked-by: Hangbin Liu <haliu@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d0e4391 commit fcb3a46

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

net/sched/act_api.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ static size_t tcf_action_shared_attrs_size(const struct tc_action *act)
453453
+ nla_total_size_64bit(sizeof(u64))
454454
/* TCA_STATS_QUEUE */
455455
+ nla_total_size_64bit(sizeof(struct gnet_stats_queue))
456-
+ nla_total_size(0) /* TCA_OPTIONS nested */
456+
+ nla_total_size(0) /* TCA_ACT_OPTIONS nested */
457457
+ nla_total_size(sizeof(struct tcf_t)); /* TCA_GACT_TM */
458458
}
459459

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

483-
if (nla_put_string(skb, TCA_KIND, a->ops->kind))
483+
if (nla_put_string(skb, TCA_ACT_KIND, a->ops->kind))
484484
goto nla_put_failure;
485485
if (tcf_action_copy_stats(skb, a, 0))
486486
goto nla_put_failure;
@@ -598,7 +598,7 @@ static int tcf_del_walker(struct tcf_idrinfo *idrinfo, struct sk_buff *skb,
598598
nest = nla_nest_start_noflag(skb, 0);
599599
if (nest == NULL)
600600
goto nla_put_failure;
601-
if (nla_put_string(skb, TCA_KIND, ops->kind))
601+
if (nla_put_string(skb, TCA_ACT_KIND, ops->kind))
602602
goto nla_put_failure;
603603

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

1192-
nest = nla_nest_start_noflag(skb, TCA_OPTIONS);
1192+
nest = nla_nest_start_noflag(skb, TCA_ACT_OPTIONS);
11931193
if (nest == NULL)
11941194
goto nla_put_failure;
11951195
err = tcf_action_dump_old(skb, a, bind, ref);

0 commit comments

Comments
 (0)