All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 00/12] net: sched: propagate extack to cls offloads on destroy and only with skip_sw
@ 2018-01-24  2:45 Jakub Kicinski
  2018-01-24  2:45 ` [PATCH net-next 01/12] net: sched: propagate extack to cls->destroy callbacks Jakub Kicinski
                   ` (11 more replies)
  0 siblings, 12 replies; 17+ messages in thread
From: Jakub Kicinski @ 2018-01-24  2:45 UTC (permalink / raw)
  To: davem, dsahern, daniel, john.fastabend, jiri
  Cc: netdev, oss-drivers, aring, Jakub Kicinski

Hi!

This series some of Jiri's comments and the fact that today drivers
may produce extack even if there is no skip_sw flag (meaning the
driver failure is not really a problem), and warning messages will
only confuse the users.

First patch propagates extack to destroy as requested by Jiri, extack
is then propagated to the driver callback for each classifier.  I chose
not to provide the extack on error paths.  As a rule of thumb it seems
best to keep the extack of the condition which caused the error.  E.g.

     err = this_will_fail(arg, extack);
     if (err) {
        undo_things(arg, NULL /* don't pass extack */);
	return err;
     }

Note that NL_SET_ERR_MSG() will ignore the message if extack is NULL.
I was pondering whether we should make NL_SET_ERR_MSG() refuse to
overwrite the msg, but there seem to be cases in the tree where extack
is set like this:

     err = this_will_fail(arg, extack);
     if (err) {
        undo_things(arg, NULL /* don't pass extack */);
	NL_SET_ERR_MSG(extack, "extack is set after undo call :/");
	return err;
     }

I think not passing extack to undo calls is reasonable.

Jakub Kicinski (12):
  net: sched: propagate extack to cls->destroy callbacks
  net: sched: prepare for reimplementation of
    tc_cls_common_offload_init()
  cls_bpf: remove gen_flags from bpf_offload
  cls_bpf: pass offload flags to tc_cls_common_offload_init()
  cls_bpf: propagate extack to offload delete callback
  cls_matchall: pass offload flags to tc_cls_common_offload_init()
  cls_matchall: propagate extack to delete callback
  cls_flower: pass offload flags to tc_cls_common_offload_init()
  cls_flower: propagate extack to delete callback
  cls_u32: pass offload flags to tc_cls_common_offload_init()
  cls_u32: propagate extack to delete callback
  net: sched: remove tc_cls_common_offload_init__()

 include/net/pkt_cls.h     | 24 ++++++++++++------------
 include/net/sch_generic.h |  3 ++-
 net/sched/cls_api.c       | 15 ++++++++-------
 net/sched/cls_basic.c     |  2 +-
 net/sched/cls_bpf.c       | 24 +++++++++++++-----------
 net/sched/cls_cgroup.c    |  3 ++-
 net/sched/cls_flow.c      |  2 +-
 net/sched/cls_flower.c    | 24 +++++++++++++-----------
 net/sched/cls_fw.c        |  2 +-
 net/sched/cls_matchall.c  | 13 +++++++------
 net/sched/cls_route.c     |  2 +-
 net/sched/cls_rsvp.h      |  2 +-
 net/sched/cls_tcindex.c   |  3 ++-
 net/sched/cls_u32.c       | 42 ++++++++++++++++++++++++------------------
 14 files changed, 88 insertions(+), 73 deletions(-)

-- 
2.15.1

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-01-24 19:49 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.