diff options
author | Alessandro Marcolini <alessandromarcolini99@gmail.com> | 2024-01-25 19:59:42 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-01-29 15:08:42 +0300 |
commit | 0efc7e541fd51ed11a328c43ccf10a12f1727746 (patch) | |
tree | ea59f66a149cb889fe87d5cb3104b0f119af8398 /tools/perf/scripts/python/task-analyzer.py | |
parent | c57e32fb29f20535bfa8b5ec45285d0bf0370ecd (diff) | |
download | linux-0efc7e541fd51ed11a328c43ccf10a12f1727746.tar.xz |
taprio: validate TCA_TAPRIO_ATTR_FLAGS through policy instead of open-coding
As of now, the field TCA_TAPRIO_ATTR_FLAGS is being validated by manually
checking its value, using the function taprio_flags_valid().
With this patch, the field will be validated through the netlink policy
NLA_POLICY_MASK, where the mask is defined by TAPRIO_SUPPORTED_FLAGS.
The mutual exclusivity of the two flags TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD
and TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST is still checked manually.
Changes since RFC:
- fixed reversed xmas tree
- use NL_SET_ERR_MSG_MOD() for both invalid configuration
Changes since v1:
- Changed NL_SET_ERR_MSG_MOD to NL_SET_ERR_MSG_ATTR when wrong flags
issued
- Changed __u32 to u32
Changes since v2:
- Added the missing parameter for NL_SET_ERR_MSG_ATTR (sorry again for
the noise)
Signed-off-by: Alessandro Marcolini <alessandromarcolini99@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions