netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next v2 0/4] Support qevents
@ 2020-06-30 10:14 Petr Machata
  2020-06-30 10:14 ` [PATCH iproute2-next v2 1/4] uapi: pkt_sched: Add two new RED attributes Petr Machata
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Petr Machata @ 2020-06-30 10:14 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger, David Ahern, Petr Machata

To allow configuring user-defined actions as a result of inner workings of
a qdisc, a concept of qevents was recently introduced to the kernel.
Qevents are attach points for TC blocks, where filters can be put that are
executed as the packet hits well-defined points in the qdisc algorithms.
The attached blocks can be shared, in a manner similar to clsact ingress
and egress blocks, arbitrary classifiers with arbitrary actions can be put
on them, etc.

For example:

# tc qdisc add dev eth0 root handle 1: \
	red limit 500K avpkt 1K qevent early_drop block 10
# tc filter add block 10 \
	matchall action mirred egress mirror dev eth1

This patch set introduces the corresponding iproute2 support. Patch #1 adds
the new netlink attribute enumerators. Patch #2 adds a set of helpers to
implement qevents, and #3 adds a generic documentation to tc.8. Patch #4
then adds two new qevents to the RED qdisc: mark and early_drop.

Changes from v1 to v2:
- Patch #3:
    - s/early/early_drop/ in the example.

Changes from RFC to v1:
- Rename "tail" qevent to "tail_drop".
- Adapt to the new 100-column standard.
- Add a selftest

Petr Machata (4):
  uapi: pkt_sched: Add two new RED attributes
  tc: Add helpers to support qevent handling
  man: tc: Describe qevents
  tc: q_red: Add support for qevents "mark" and "early_drop"

 include/uapi/linux/pkt_sched.h |   2 +
 man/man8/tc-red.8              |  18 ++-
 man/man8/tc.8                  |  19 ++++
 tc/Makefile                    |   1 +
 tc/q_red.c                     |  30 ++++-
 tc/tc_qevent.c                 | 202 +++++++++++++++++++++++++++++++++
 tc/tc_qevent.h                 |  49 ++++++++
 7 files changed, 317 insertions(+), 4 deletions(-)
 create mode 100644 tc/tc_qevent.c
 create mode 100644 tc/tc_qevent.h

-- 
2.20.1


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

end of thread, other threads:[~2020-07-05 15:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 10:14 [PATCH iproute2-next v2 0/4] Support qevents Petr Machata
2020-06-30 10:14 ` [PATCH iproute2-next v2 1/4] uapi: pkt_sched: Add two new RED attributes Petr Machata
2020-06-30 10:14 ` [PATCH iproute2-next v2 2/4] tc: Add helpers to support qevent handling Petr Machata
2020-06-30 10:14 ` [PATCH iproute2-next v2 3/4] man: tc: Describe qevents Petr Machata
2020-06-30 10:14 ` [PATCH iproute2-next v2 4/4] tc: q_red: Add support for qevents "mark" and "early_drop" Petr Machata
2020-07-05 15:46 ` [PATCH iproute2-next v2 0/4] Support qevents David Ahern

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).