History

sched: act: allow user to specify type of HW stats for a filter

Currently, user who is adding an action expects HW to report stats, however it does not have exact expectations about the stats types. That is aligned with TCA_ACT_HW_STATS_TYPE_ANY. Allow user to specify the type of HW stats for an action and require it. Pass the information down to flow_offload layer.

Jiri Pirko committed 6 years ago

Commit 44f86581 parent d7cb1e34 files · +69 −0Browse files

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

Unified · Split

include/uapi/linux/pkt_cls.h+22−0
@@ -17,6 +17,7 @@ enum { · 16 unmodified lines
1717 TCA_ACT_PAD,
1818 TCA_ACT_COOKIE,
1919 TCA_ACT_FLAGS,
20+ TCA_ACT_HW_STATS_TYPE,
2021 __TCA_ACT_MAX
2122 };
2223
@@ -24,6 +25,27 @@ enum { · 1 unmodified line
2425 * actions stats.
2526 */
2627
28+/* tca HW stats type
29+ * When user does not pass the attribute, he does not care.
30+ * It is the same as if he would pass the attribute with
31+ * all supported bits set.
32+ * In case no bits are set, user is not interested in getting any HW statistics.
33+ */
34+#define TCA_ACT_HW_STATS_TYPE_IMMEDIATE (1 << 0) /* Means that in dump, user
35+ * gets the current HW stats
36+ * state from the device
37+ * queried at the dump time.
38+ */
39+#define TCA_ACT_HW_STATS_TYPE_DELAYED (1 << 1) /* Means that in dump, user gets
40+ * HW stats that might be out
41+ * of date for some time, maybe
42+ * couple of seconds. This is
43+ * the case when driver polls
44+ * stats updates periodically
45+ * or when it gets async stats update
46+ * from the device.
47+ */
48+
2749 #define TCA_ACT_MAX __TCA_ACT_MAX
2850 #define TCA_OLD_COMPAT (TCA_ACT_MAX+1)
2951 #define TCA_ACT_MAX_PRIO 32