From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: davem@davemloft.net, xiyou.wangcong@gmail.com, jhs@mojatatu.com,
gerlitz.or@gmail.com, netdev@vger.kernel.org,
oss-drivers@netronome.com,
John Hurley <john.hurley@netronome.com>
Subject: Re: [PATCH net-next 2/7] net: sched: add tcf_proto_op to offload a rule
Date: Mon, 25 Jun 2018 22:43:42 +0200 [thread overview]
Message-ID: <20180625204342.GF2161@nanopsycho> (raw)
In-Reply-To: <20180625043431.13413-3-jakub.kicinski@netronome.com>
Mon, Jun 25, 2018 at 06:34:26AM CEST, jakub.kicinski@netronome.com wrote:
>From: John Hurley <john.hurley@netronome.com>
>
>Create a new tcf_proto_op called 'reoffload' that generates a new offload
>message for each node in a tcf_proto. Pointers to the tcf_proto and
>whether the offload request is to add or delete the node are included.
>Also included is a callback function to send the offload message to and
>the option of priv data to go with the cb.
>
>Signed-off-by: John Hurley <john.hurley@netronome.com>
>Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
>---
> include/net/act_api.h | 3 ---
> include/net/sch_generic.h | 6 ++++++
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
>diff --git a/include/net/act_api.h b/include/net/act_api.h
>index 9e59ebfded62..5ff11adbe2a6 100644
>--- a/include/net/act_api.h
>+++ b/include/net/act_api.h
>@@ -190,9 +190,6 @@ static inline void tcf_action_stats_update(struct tc_action *a, u64 bytes,
> #endif
> }
>
>-typedef int tc_setup_cb_t(enum tc_setup_type type,
>- void *type_data, void *cb_priv);
>-
> #ifdef CONFIG_NET_CLS_ACT
> int tc_setup_cb_egdev_register(const struct net_device *dev,
> tc_setup_cb_t *cb, void *cb_priv);
>diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
>index 6488daa32f82..88ed64f60056 100644
>--- a/include/net/sch_generic.h
>+++ b/include/net/sch_generic.h
>@@ -20,6 +20,9 @@ struct qdisc_walker;
> struct tcf_walker;
> struct module;
>
>+typedef int tc_setup_cb_t(enum tc_setup_type type,
>+ void *type_data, void *cb_priv);
>+
> struct qdisc_rate_table {
> struct tc_ratespec rate;
> u32 data[256];
>@@ -256,6 +259,9 @@ struct tcf_proto_ops {
> bool *last,
> struct netlink_ext_ack *);
> void (*walk)(struct tcf_proto*, struct tcf_walker *arg);
>+ int (*reoffload)(struct tcf_proto *, bool,
>+ tc_setup_cb_t *, void *,
>+ struct netlink_ext_ack *);
Please, name the args. Unnamed args are annoying...
> void (*bind_class)(void *, u32, unsigned long);
>
> /* rtnetlink specific */
>--
>2.17.1
>
next prev parent reply other threads:[~2018-06-25 20:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 4:34 [PATCH net-next 0/7] net: sched: support replay of filter offload when binding to block Jakub Kicinski
2018-06-25 4:34 ` [PATCH net-next 1/7] net: sched: pass extack pointer to block binds and cb registration Jakub Kicinski
2018-06-25 4:34 ` [PATCH net-next 2/7] net: sched: add tcf_proto_op to offload a rule Jakub Kicinski
2018-06-25 20:43 ` Jiri Pirko [this message]
2018-06-25 4:34 ` [PATCH net-next 3/7] net: sched: cls_flower: implement offload tcf_proto_op Jakub Kicinski
2018-06-25 20:48 ` Jiri Pirko
2018-06-25 4:34 ` [PATCH net-next 4/7] net: sched: cls_matchall: " Jakub Kicinski
2018-06-25 4:34 ` [PATCH net-next 5/7] net: sched: cls_u32: " Jakub Kicinski
2018-06-25 4:34 ` [PATCH net-next 6/7] net: sched: cls_bpf: " Jakub Kicinski
2018-06-25 4:34 ` [PATCH net-next 7/7] net: sched: call reoffload op on block callback reg Jakub Kicinski
2018-06-25 20:58 ` Jiri Pirko
2018-06-25 21:10 ` Jakub Kicinski
2018-06-25 21:22 ` Jiri Pirko
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=20180625204342.GF2161@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=gerlitz.or@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=jhs@mojatatu.com \
--cc=john.hurley@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
--cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.