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
17 TCA_ACT_PAD,17 TCA_ACT_PAD,
18 TCA_ACT_COOKIE,18 TCA_ACT_COOKIE,
19 TCA_ACT_FLAGS,19 TCA_ACT_FLAGS,
20 TCA_ACT_HW_STATS_TYPE,
20 __TCA_ACT_MAX21 __TCA_ACT_MAX
21};22};
22 23
@@ -24,6 +25,27 @@ enum { · 1 unmodified line
24 * actions stats.25 * actions stats.
25 */26 */
26 27
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
27#define TCA_ACT_MAX __TCA_ACT_MAX49#define TCA_ACT_MAX __TCA_ACT_MAX
28#define TCA_OLD_COMPAT (TCA_ACT_MAX+1)50#define TCA_OLD_COMPAT (TCA_ACT_MAX+1)
29#define TCA_ACT_MAX_PRIO 3251#define TCA_ACT_MAX_PRIO 32