History

net/sched: Reflect HW offload status

Currently there is no way of querying whether a filter is offloaded to HW or not when using "both" policy (where none of skip_sw or skip_hw flags are set by user-space). Add two new flags, "in hw" and "not in hw" such that user space can determine if a filter is actually offloaded to hw or not. The "in hw" UAPI semantics was chosen so it's similar to the "skip hw" flag logic. If none of these two flags are set, this signals running over older kernel.

Or Gerlitz committed 9 years ago

Commit e6960281 parent 7a335ad2 files · +9 −2Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/pkt_cls.h+4−2
@@ -103,8 +103,10 @@ enum { · 102 unmodified lines
103103 #define TCA_POLICE_MAX (__TCA_POLICE_MAX - 1)
104104
105105 /* tca flags definitions */
106−#define TCA_CLS_FLAGS_SKIP_HW (1 << 0)
107−#define TCA_CLS_FLAGS_SKIP_SW (1 << 1)
106+#define TCA_CLS_FLAGS_SKIP_HW (1 << 0) /* don't offload filter to HW */
107+#define TCA_CLS_FLAGS_SKIP_SW (1 << 1) /* don't use filter in SW */
108+#define TCA_CLS_FLAGS_IN_HW (1 << 2) /* filter is offloaded to HW */
109+#define TCA_CLS_FLAGS_NOT_IN_HW (1 << 3) /* filter isn't offloaded to HW */
108110
109111 /* U32 filters */
110112

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t