* [PATCH net-next] net/sched: actions: remove unused 'order'
@ 2019-11-12 14:33 Davide Caratti
2019-11-12 14:58 ` Jiri Pirko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Davide Caratti @ 2019-11-12 14:33 UTC (permalink / raw)
To: Vlad Buslov, netdev; +Cc: Ivan Vecera, David S . Miller
after commit 4097e9d250fb ("net: sched: don't use tc_action->order during
action dump"), 'act->order' is initialized but then it's no more read, so
we can just remove this member of struct tc_action.
CC: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
---
include/net/act_api.h | 1 -
net/sched/act_api.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/include/net/act_api.h b/include/net/act_api.h
index 0495bdc034d2..71347a90a9d1 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -23,7 +23,6 @@ struct tc_action_ops;
struct tc_action {
const struct tc_action_ops *ops;
__u32 type; /* for backward compat(TCA_OLD_COMPAT) */
- __u32 order;
struct tcf_idrinfo *idrinfo;
u32 tcfa_index;
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index bda1ba25c59e..7fc1e2c1b656 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -1003,7 +1003,6 @@ int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla,
err = PTR_ERR(act);
goto err;
}
- act->order = i;
sz += tcf_action_fill_size(act);
/* Start from index 0 */
actions[i - 1] = act;
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net/sched: actions: remove unused 'order'
2019-11-12 14:33 [PATCH net-next] net/sched: actions: remove unused 'order' Davide Caratti
@ 2019-11-12 14:58 ` Jiri Pirko
2019-11-12 18:04 ` Ivan Vecera
2019-11-12 20:11 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2019-11-12 14:58 UTC (permalink / raw)
To: Davide Caratti; +Cc: Vlad Buslov, netdev, Ivan Vecera, David S . Miller
Tue, Nov 12, 2019 at 03:33:11PM CET, dcaratti@redhat.com wrote:
>after commit 4097e9d250fb ("net: sched: don't use tc_action->order during
>action dump"), 'act->order' is initialized but then it's no more read, so
>we can just remove this member of struct tc_action.
>
>CC: Ivan Vecera <ivecera@redhat.com>
>Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net/sched: actions: remove unused 'order'
2019-11-12 14:33 [PATCH net-next] net/sched: actions: remove unused 'order' Davide Caratti
2019-11-12 14:58 ` Jiri Pirko
@ 2019-11-12 18:04 ` Ivan Vecera
2019-11-12 20:11 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Ivan Vecera @ 2019-11-12 18:04 UTC (permalink / raw)
To: Davide Caratti; +Cc: Vlad Buslov, netdev, David S . Miller
On Tue, 12 Nov 2019 15:33:11 +0100
Davide Caratti <dcaratti@redhat.com> wrote:
> after commit 4097e9d250fb ("net: sched: don't use tc_action->order during
> action dump"), 'act->order' is initialized but then it's no more read, so
> we can just remove this member of struct tc_action.
>
> CC: Ivan Vecera <ivecera@redhat.com>
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
> ---
> include/net/act_api.h | 1 -
> net/sched/act_api.c | 1 -
> 2 files changed, 2 deletions(-)
>
> diff --git a/include/net/act_api.h b/include/net/act_api.h
> index 0495bdc034d2..71347a90a9d1 100644
> --- a/include/net/act_api.h
> +++ b/include/net/act_api.h
> @@ -23,7 +23,6 @@ struct tc_action_ops;
> struct tc_action {
> const struct tc_action_ops *ops;
> __u32 type; /* for backward compat(TCA_OLD_COMPAT) */
> - __u32 order;
> struct tcf_idrinfo *idrinfo;
>
> u32 tcfa_index;
> diff --git a/net/sched/act_api.c b/net/sched/act_api.c
> index bda1ba25c59e..7fc1e2c1b656 100644
> --- a/net/sched/act_api.c
> +++ b/net/sched/act_api.c
> @@ -1003,7 +1003,6 @@ int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla,
> err = PTR_ERR(act);
> goto err;
> }
> - act->order = i;
> sz += tcf_action_fill_size(act);
> /* Start from index 0 */
> actions[i - 1] = act;
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net/sched: actions: remove unused 'order'
2019-11-12 14:33 [PATCH net-next] net/sched: actions: remove unused 'order' Davide Caratti
2019-11-12 14:58 ` Jiri Pirko
2019-11-12 18:04 ` Ivan Vecera
@ 2019-11-12 20:11 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-11-12 20:11 UTC (permalink / raw)
To: dcaratti; +Cc: vladbu, netdev, ivecera
From: Davide Caratti <dcaratti@redhat.com>
Date: Tue, 12 Nov 2019 15:33:11 +0100
> after commit 4097e9d250fb ("net: sched: don't use tc_action->order during
> action dump"), 'act->order' is initialized but then it's no more read, so
> we can just remove this member of struct tc_action.
>
> CC: Ivan Vecera <ivecera@redhat.com>
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Applied, thanks Davide.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-12 20:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-12 14:33 [PATCH net-next] net/sched: actions: remove unused 'order' Davide Caratti
2019-11-12 14:58 ` Jiri Pirko
2019-11-12 18:04 ` Ivan Vecera
2019-11-12 20:11 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).