You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/linux/program-type/BPF_PROG_TYPE_SCHED_CLS.md
+42-1Lines changed: 42 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ When attached in direct action mode, the eBPF program will act as both a classif
36
36
*`TC_ACT_REPEAT` (6) - While defined, this action should not be used and holds no particular meaning for eBPF classifiers.
37
37
*`TC_ACT_REDIRECT` (7) - Signals that the packet should be redirected, the details of how and where to are set as side effects by [helpers functions](../helper-function/index.md).
38
38
39
-
Classifiers in direct action mode can still set a class id by setting the `tc_classid` field
39
+
Classifiers in direct action mode can still set a class id by setting the `tc_classid` field
40
40
41
41
## Context
42
42
@@ -101,6 +101,47 @@ For more details on the `tc` command, see the general [man page](https://man7.or
101
101
102
102
For more details on the bpf filter options, see the `tc-bpf`[man page](https://man7.org/linux/man-pages/man8/tc-bpf.8.html).
103
103
104
+
In addition, the kernel supports the tcx (the new tc BPF fast path with BPF link support) since kernel v6.6, which allows for more advanced features like attaching multiple programs to a single qdisc, or attaching programs to a qdisc on the egress side:
The definition of return codes for tcx programs can be found in the kernel sources:
128
+
```c
129
+
/* (Simplified) user return codes for tcx prog type.
130
+
* A valid tcx program must return one of these defined values. All other
131
+
* return codes are reserved for future use. Must remain compatible with
132
+
* their TC_ACT_* counter-parts. For compatibility in behavior, unknown
133
+
* return codes are mapped to TCX_NEXT.
134
+
*/
135
+
enum tcx_action_base {
136
+
TCX_NEXT = -1,
137
+
TCX_PASS = 0,
138
+
TCX_DROP = 2,
139
+
TCX_REDIRECT = 7,
140
+
};
141
+
```
142
+
143
+
For more details of tcx, see the [LSFMM+BPF Summit Recap and Video: Revamping Global Socket Iterator, Netkit and Next Steps](https://ebpf.foundation/lsfmmbpf-summit-recap-and-video-revamping-global-socket-iterator-netkit-next-steps/).
144
+
104
145
## Helper functions
105
146
106
147
Not all helper functions are available in all program types. These are the helper calls available for TC classifier programs:
0 commit comments