Netdev List
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: davem@davemloft.net, dsahern@gmail.com, daniel@iogearbox.net,
	john.fastabend@gmail.com, netdev@vger.kernel.org,
	oss-drivers@netronome.com, aring@mojatatu.com
Subject: Re: [PATCH net-next 02/12] net: sched: prepare for reimplementation of tc_cls_common_offload_init()
Date: Wed, 24 Jan 2018 09:52:16 +0100	[thread overview]
Message-ID: <20180124085216.GB2234@nanopsycho> (raw)
In-Reply-To: <20180124024608.11328-3-jakub.kicinski@netronome.com>

Wed, Jan 24, 2018 at 03:45:58AM CET, jakub.kicinski@netronome.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@netronome.com>
>Reviewed-by: Simon Horman <simon.horman@netronome.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.

  reply	other threads:[~2018-01-24  8:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24  2:45 [PATCH net-next 00/12] net: sched: propagate extack to cls offloads on destroy and only with skip_sw Jakub Kicinski
2018-01-24  2:45 ` [PATCH net-next 01/12] net: sched: propagate extack to cls->destroy callbacks Jakub Kicinski
2018-01-24  2:45 ` [PATCH net-next 02/12] net: sched: prepare for reimplementation of tc_cls_common_offload_init() Jakub Kicinski
2018-01-24  8:52   ` Jiri Pirko [this message]
2018-01-24  9:04     ` Jakub Kicinski
2018-01-24 15:37   ` David Miller
2018-01-24 19:48     ` Jakub Kicinski
2018-01-24  2:45 ` [PATCH net-next 03/12] cls_bpf: remove gen_flags from bpf_offload Jakub Kicinski
2018-01-24  2:46 ` [PATCH net-next 04/12] cls_bpf: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24  2:46 ` [PATCH net-next 05/12] cls_bpf: propagate extack to offload delete callback Jakub Kicinski
2018-01-24  2:46 ` [PATCH net-next 06/12] cls_matchall: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24  2:46 ` [PATCH net-next 07/12] cls_matchall: propagate extack to delete callback Jakub Kicinski
2018-01-24  2:46 ` [PATCH net-next 08/12] cls_flower: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24  2:46 ` [PATCH net-next 09/12] cls_flower: propagate extack to delete callback Jakub Kicinski
2018-01-24  2:46 ` [PATCH net-next 10/12] cls_u32: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24  2:46 ` [PATCH net-next 11/12] cls_u32: propagate extack to delete callback Jakub Kicinski
2018-01-24  2:46 ` [PATCH net-next 12/12] net: sched: remove tc_cls_common_offload_init__() Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180124085216.GB2234@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=aring@mojatatu.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox