diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-09-18 15:29:48 -0700 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-09-22 15:21:32 +0200 |
| commit | 261e8a37ecbaf462cdf9c336d2b2f5056088401a (patch) | |
| tree | 476af6097dd7dc03cc0a117d590942b8f6a74ef6 /tools/perf/scripts/python | |
| parent | 23d42b9a3bcd55b17d3b371544fedc708c2397e9 (diff) | |
| download | linux-261e8a37ecbaf462cdf9c336d2b2f5056088401a.tar.gz linux-261e8a37ecbaf462cdf9c336d2b2f5056088401a.zip | |
genetlink: report the real command id for dump-only ops in policy dumps
The op-to-policy map a CTRL_CMD_GETPOLICY dump returns is the only way
for userspace to find out which policy index belongs to which command.
ctrl_dumppolicy_put_op() tags the nest with doit->cmd, but an op which
only has a dumpit has no doit and every path which fills the split ops
in zeroes it out, so those entries all claim to be command 0. nlctrl's
own CTRL_CMD_GETPOLICY and NETDEV_CMD_QSTATS_GET are both in that group:
[{'family-id': 16, 'op-policy': {'do': 0, 'dump': 0, 'op-id': 3}},
{'family-id': 16, 'op-policy': {'dump': 1, 'op-id': 0}},
ctrl_fill_info() gets this right - it uses the iterator's cmd for
CTRL_ATTR_OP_ID - so the two introspection interfaces of the same family
contradict each other today.
Pass the command in rather than reconstructing it from
doit->cmd | dumpit->cmd inside the helper, both callers already have it.
Fixes: 26588edbef60 ("genetlink: support split policies in ctrl_dumppolicy_put_op()")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20260918222949.4190284-1-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
