lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <177022452988.1827734.5121740962985640333.stgit@firesoul>
Date: Wed, 04 Feb 2026 18:02:49 +0100
From: Jesper Dangaard Brouer <hawk@...nel.org>
To: netdev@...r.kernel.org, Eric Dumazet <eric.dumazet@...il.com>,
 "David S. Miller" <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>,
 Toke Høiland-Jørgensen <toke@...e.dk>
Cc: Jesper Dangaard Brouer <hawk@...nel.org>, bpf@...r.kernel.org,
 Jakub Kicinski <kuba@...nel.org>, horms@...nel.org, jiri@...nulli.us,
 edumazet@...gle.com, xiyou.wangcong@...il.com, jhs@...atatu.com,
 carges@...udflare.com, kernel-team@...udflare.com
Subject: [PATCH net-next RFC v1 0/3] net: sched: refactor qdisc drop reasons
 into dedicated tracepoint

RFC: Seeking feedback on this refactoring approach.

This series refactors qdisc drop reason handling by introducing a dedicated
enum qdisc_drop_reason and trace_qdisc_drop tracepoint, providing qdisc
layer drop diagnostics with direct qdisc context visibility.

Background:
-----------
Identifying which qdisc dropped a packet via skb_drop_reason is difficult.
Normally, the kfree_skb tracepoint caller "location" hints at the dropping
code, but qdisc drops happen at a central point (__dev_queue_xmit), making
this unusable. As a workaround, commits 5765c7f6e317 ("net_sched: sch_fq:
add three drop_reason") and a42d71e322a8 ("net_sched: sch_cake: Add drop
reasons") encoded qdisc names directly in the drop reason enums.

This series provides a cleaner solution by creating a dedicated qdisc
tracepoint that naturally includes qdisc context (handle, parent, kind).

Solution:
---------
Create a new tracepoint trace_qdisc_drop that builds on top of existing
trace_qdisc_enqueue infrastructure. It includes qdisc handle, parent,
qdisc kind (name), and device information directly.

The existing SKB_DROP_REASON_QDISC_DROP is retained for backwards
compatibility via kfree_skb_reason(). The qdisc-specific drop reasons
(QDISC_DROP_*) provide fine-grained detail via the new tracepoint.

This implements the alternative approach described in:
https://lore.kernel.org/all/6be17a08-f8aa-4f91-9bd0-d9e1f0a92d90@kernel.org/

Series overview:
----------------
Patch 1: Introduce the qdisc drop reason infrastructure
  - New enum qdisc_drop_reason in dropreason-qdisc.h
  - New trace_qdisc_drop tracepoint with qdisc context
  - Convert FQ, FQ_CoDel, CoDel, SFB, pfifo_fast to use new infrastructure
  - Remove SKB_DROP_REASON_QDISC_* entries from dropreason-core.h

Patch 2: Convert SFQ as example for reviewers
  - Demonstrates how to convert a flow-based qdisc
  - Adds QDISC_DROP_MAXFLOWS for flow table exhaustion
  - Renames FQ_FLOW_LIMIT to common FLOW_LIMIT (shared by FQ and SFQ)

Patch 3: Fix CAKE to use enum qdisc_drop_reason
  - Change cobalt_should_drop() return type for type correctness

---

Jesper Dangaard Brouer (3):
      net: sched: introduce qdisc-specific drop reason tracing
      net: sched: sfq: convert to qdisc drop reasons
      net: sched: sch_cake: use enum qdisc_drop_reason for cobalt_should_drop


 include/net/dropreason-core.h  | 36 -------------
 include/net/dropreason-qdisc.h | 97 ++++++++++++++++++++++++++++++++++
 include/net/sch_generic.h      | 36 ++++++++-----
 include/trace/events/qdisc.h   | 51 ++++++++++++++++++
 net/core/dev.c                 |  8 +--
 net/sched/sch_cake.c           | 26 ++++-----
 net/sched/sch_codel.c          |  5 +-
 net/sched/sch_dualpi2.c        |  8 ++-
 net/sched/sch_fq.c             |  7 ++-
 net/sched/sch_fq_codel.c       |  4 +-
 net/sched/sch_fq_pie.c         |  4 +-
 net/sched/sch_generic.c        | 20 ++++++-
 net/sched/sch_gred.c           |  4 +-
 net/sched/sch_pie.c            |  4 +-
 net/sched/sch_red.c            |  4 +-
 net/sched/sch_sfb.c            |  4 +-
 net/sched/sch_sfq.c            |  8 +--
 17 files changed, 230 insertions(+), 96 deletions(-)
 create mode 100644 include/net/dropreason-qdisc.h

--


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ