netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: davem@davemloft.net, jiri@resnulli.us, dsahern@gmail.com,
	daniel@iogearbox.net, john.fastabend@gmail.com
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
	aring@mojatatu.com, Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH net-next v2 04/12] cls_bpf: pass offload flags to tc_cls_common_offload_init()
Date: Wed, 24 Jan 2018 12:54:16 -0800	[thread overview]
Message-ID: <20180124205424.6976-5-jakub.kicinski@netronome.com> (raw)
In-Reply-To: <20180124205424.6976-1-jakub.kicinski@netronome.com>

Pass offload flags to the new implementation of
tc_cls_common_offload_init().  Extack will now only
be set if user requested skip_sw.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
---
 net/sched/cls_bpf.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
index b8f953d00c46..323b01f76a4c 100644
--- a/net/sched/cls_bpf.c
+++ b/net/sched/cls_bpf.c
@@ -159,7 +159,8 @@ static int cls_bpf_offload_cmd(struct tcf_proto *tp, struct cls_bpf_prog *prog,
 	skip_sw = prog && tc_skip_sw(prog->gen_flags);
 	obj = prog ?: oldprog;
 
-	tc_cls_common_offload_init_deprecated(&cls_bpf.common, tp, extack);
+	tc_cls_common_offload_init(&cls_bpf.common, tp, obj->gen_flags,
+				   extack);
 	cls_bpf.command = TC_CLSBPF_OFFLOAD;
 	cls_bpf.exts = &obj->exts;
 	cls_bpf.prog = prog ? prog->filter : NULL;
@@ -226,7 +227,7 @@ static void cls_bpf_offload_update_stats(struct tcf_proto *tp,
 	struct tcf_block *block = tp->chain->block;
 	struct tc_cls_bpf_offload cls_bpf = {};
 
-	tc_cls_common_offload_init_deprecated(&cls_bpf.common, tp, NULL);
+	tc_cls_common_offload_init(&cls_bpf.common, tp, prog->gen_flags, NULL);
 	cls_bpf.command = TC_CLSBPF_STATS;
 	cls_bpf.exts = &prog->exts;
 	cls_bpf.prog = prog->filter;
-- 
2.15.1

  parent reply	other threads:[~2018-01-24 20:55 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 20:54 [PATCH net-next v2 00/12] net: sched: propagate extack to cls offloads on destroy and only with skip_sw Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 01/12] net: sched: propagate extack to cls->destroy callbacks Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 02/12] net: sched: prepare for reimplementation of tc_cls_common_offload_init() Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 03/12] cls_bpf: remove gen_flags from bpf_offload Jakub Kicinski
2018-01-24 20:54 ` Jakub Kicinski [this message]
2018-01-24 20:54 ` [PATCH net-next v2 05/12] cls_bpf: propagate extack to offload delete callback Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 06/12] cls_matchall: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 07/12] cls_matchall: propagate extack to delete callback Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 08/12] cls_flower: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 09/12] cls_flower: propagate extack to delete callback Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 10/12] cls_u32: pass offload flags to tc_cls_common_offload_init() Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 11/12] cls_u32: propagate extack to delete callback Jakub Kicinski
2018-01-24 20:54 ` [PATCH net-next v2 12/12] net: sched: remove tc_cls_common_offload_init_deprecated() Jakub Kicinski
2018-01-24 21:03 ` [PATCH net-next v2 00/12] net: sched: propagate extack to cls offloads on destroy and only with skip_sw David Miller
2018-01-24 21:04 ` Jiri Pirko
2018-01-24 21:07   ` David Ahern
2018-01-24 21:15     ` Jiri Pirko
2018-01-24 21:49       ` Jakub Kicinski
2018-01-25 15:11 ` Marcelo Ricardo Leitner
2018-01-25 22:57   ` Jakub Kicinski
2018-01-28 22:39     ` Marcelo Ricardo Leitner
2018-01-29 23:36       ` 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=20180124205424.6976-5-jakub.kicinski@netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=aring@mojatatu.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=jiri@resnulli.us \
    --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;
as well as URLs for NNTP newsgroup(s).