[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180124085216.GB2234@nanopsycho>
Date: Wed, 24 Jan 2018 09:52:16 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc: davem@...emloft.net, dsahern@...il.com, daniel@...earbox.net,
john.fastabend@...il.com, netdev@...r.kernel.org,
oss-drivers@...ronome.com, aring@...atatu.com
Subject: Re: [PATCH net-next 02/12] net: sched: prepare for reimplementation
of tc_cls_common_offload_init()
Wed, Jan 24, 2018 at 03:45:58AM CET, jakub.kicinski@...ronome.com wrote:
>Rename tc_cls_common_offload_init() to tc_cls_common_offload_init__()
>and add a new implementation which also takes flags argument. We will
>only set extack if flags indicate that offload is forced (skip_sw)
>otherwise driver errors should be ignored, as they don't influence
>the overall filter installation.
>
>Note that we need the tc_skip_hw() helper for new version, therefore
>it is added later in the file.
>
>Signed-off-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
>Reviewed-by: Simon Horman <simon.horman@...ronome.com>
>---
> include/net/pkt_cls.h | 18 +++++++++++++++---
> net/sched/cls_bpf.c | 4 ++--
> net/sched/cls_flower.c | 6 +++---
> net/sched/cls_matchall.c | 4 ++--
> net/sched/cls_u32.c | 8 ++++----
> 5 files changed, 26 insertions(+), 14 deletions(-)
>
>diff --git a/include/net/pkt_cls.h b/include/net/pkt_cls.h
>index 2f8f16a4d88e..a899fbcfeccd 100644
>--- a/include/net/pkt_cls.h
>+++ b/include/net/pkt_cls.h
>@@ -606,9 +606,9 @@ struct tc_cls_common_offload {
> };
>
> static inline void
>-tc_cls_common_offload_init(struct tc_cls_common_offload *cls_common,
>- const struct tcf_proto *tp,
>- struct netlink_ext_ack *extack)
>+tc_cls_common_offload_init__(struct tc_cls_common_offload *cls_common,
>+ const struct tcf_proto *tp,
>+ struct netlink_ext_ack *extack)
This is really confusing. You do duplication and this odd function
naming only to remove it at the end of the patchset.
But the only goal is to add flags arg and tc_skip_sw check.
So just add the arg and check and change all the calls to this finction
to pass the flags arg. You will reduce like 8 patches into one that
is well-readable.
Powered by blists - more mailing lists