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 3/7] net: sched: cls_flower: implement offload tcf_proto_op
Date: Mon, 25 Jun 2018 22:48:37 +0200 [thread overview]
Message-ID: <20180625204837.GG2161@nanopsycho> (raw)
In-Reply-To: <20180625043431.13413-4-jakub.kicinski@netronome.com>
Mon, Jun 25, 2018 at 06:34:27AM CEST, jakub.kicinski@netronome.com wrote:
>From: John Hurley <john.hurley@netronome.com>
>
>Add the reoffload tcf_proto_op in flower to generate an offload message
>for each filter in the given tcf_proto. Call the specified callback with
>this new offload message. The function only returns an error if the
>callback rejects adding a 'hardware only' rule.
>
>A filter contains a flag to indicate if it is in hardware or not. To
>ensure the reoffload function properly maintains this flag, keep a
>reference counter for the number of instances of the filter that are in
>hardware. Only update the flag when this counter changes from or to 0. Add
>a generic helper function to implement this behaviour.
>
>Signed-off-by: John Hurley <john.hurley@netronome.com>
>Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
>---
> include/net/sch_generic.h | 15 +++++++++++++
> net/sched/cls_flower.c | 44 +++++++++++++++++++++++++++++++++++++++
> 2 files changed, 59 insertions(+)
>
>diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
>index 88ed64f60056..c0bd11a928ed 100644
>--- a/include/net/sch_generic.h
>+++ b/include/net/sch_generic.h
>@@ -336,6 +336,21 @@ static inline void tcf_block_offload_dec(struct tcf_block *block, u32 *flags)
> block->offloadcnt--;
> }
>
>+static inline void
>+tc_cls_offload_cnt_update(struct tcf_block *block, u32 *cnt, u32 *flags,
Why u32? This is not uapi or hw facing. Just use "unsigned int".
[...]
next prev parent reply other threads:[~2018-06-25 20:49 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
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 [this message]
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=20180625204837.GG2161@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 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).