All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/5] net: sched: Fixes for classifiers
@ 2023-07-12 21:13 Victor Nogueira
  2023-07-12 21:13 ` [PATCH net-next v4 1/5] net: sched: cls_matchall: Undo tcf_bind_filter in case of failure after mall_set_parms Victor Nogueira
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Victor Nogueira @ 2023-07-12 21:13 UTC (permalink / raw)
  To: netdev
  Cc: jhs, xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni,
	pctammela, simon.horman, kernel

Four different classifiers (bpf, u32, matchall, and flower) are
calling tcf_bind_filter in their callbacks, but arent't undoing it by
calling tcf_unbind_filter if their was an error after binding.

This patch set fixes all this by calling tcf_unbind_filter in such
cases.

This set also undoes a refcount decrement in cls_u32 when an update
fails under specific conditions which are described in patch #3.

v1 -> v2:
* Remove blank line after fixes tag
* Fix reverse xmas tree issues pointed out by Simon

v2 -> v3:
* Inline functions cls_bpf_set_parms and fl_set_parms to avoid adding
  yet another parameter (and a return value at it) to them.
* Remove similar fixes for u32 and matchall, which will be sent soon,
  once we find a way to do the fixes without adding a return parameter
  to their set_parms functions.

v3 -> v4:
* Inline mall_set_parms to avoid adding yet another parameter.
* Remove set_flags parameter from u32_set_parms and create a separate
  function for calling tcf_bind_filter and tcf_unbind_filter in case of
  failure.
* Change cover letter title to also encompass refcnt fix for u32

Victor Nogueira (5):
  net: sched: cls_matchall: Undo tcf_bind_filter in case of failure
    after mall_set_parms
  net: sched: cls_u32: Undo tcf_bind_filter if u32_replace_hw_knode
  net: sched: cls_u32: Undo refcount decrement in case update failed
  net: sched: cls_bpf: Undo tcf_bind_filter in case of an error
  net: sched: cls_flower: Undo tcf_bind_filter if fl_set_key fails

 net/sched/cls_bpf.c      | 106 +++++++++++++++++++--------------------
 net/sched/cls_flower.c   | 105 +++++++++++++++++++-------------------
 net/sched/cls_matchall.c |  35 +++++--------
 net/sched/cls_u32.c      |  48 ++++++++++++++----
 4 files changed, 153 insertions(+), 141 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2023-07-13 17:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-12 21:13 [PATCH net-next v4 0/5] net: sched: Fixes for classifiers Victor Nogueira
2023-07-12 21:13 ` [PATCH net-next v4 1/5] net: sched: cls_matchall: Undo tcf_bind_filter in case of failure after mall_set_parms Victor Nogueira
2023-07-13  9:17   ` Simon Horman
2023-07-12 21:13 ` [PATCH net-next v4 2/5] net: sched: cls_u32: Undo tcf_bind_filter if u32_replace_hw_knode fails Victor Nogueira
2023-07-13  9:17   ` Simon Horman
2023-07-12 21:13 ` [PATCH net-next v4 3/5] net: sched: cls_u32: Undo refcount decrement in case update failed Victor Nogueira
2023-07-13  9:17   ` Simon Horman
2023-07-12 21:13 ` [PATCH net-next v4 4/5] net: sched: cls_bpf: Undo tcf_bind_filter in case of an error Victor Nogueira
2023-07-13  9:18   ` Simon Horman
2023-07-12 21:13 ` [PATCH net-next v4 5/5] net: sched: cls_flower: " Victor Nogueira
2023-07-13  9:18   ` Simon Horman
2023-07-13 17:25 ` [PATCH net-next v4 0/5] net: sched: Fixes for classifiers 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.