nl-linux 0.2.4 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/.yardopts +5 -0
- data/CHANGELOG.md +8 -0
- data/Rakefile +27 -5
- data/generated/nl/linux/binder.rb +227 -19
- data/generated/nl/linux/conntrack.rb +1325 -365
- data/generated/nl/linux/dev_energymodel.rb +357 -66
- data/generated/nl/linux/devlink.rb +6310 -1859
- data/generated/nl/linux/dpll.rb +2202 -376
- data/generated/nl/linux/drm_ras.rb +312 -63
- data/generated/nl/linux/ethtool.rb +7555 -2447
- data/generated/nl/linux/fou.rb +381 -133
- data/generated/nl/linux/handshake.rb +340 -70
- data/generated/nl/linux/lockd.rb +132 -27
- data/generated/nl/linux/mptcp_pm.rb +773 -161
- data/generated/nl/linux/net_shaper.rb +892 -211
- data/generated/nl/linux/netdev.rb +2366 -518
- data/generated/nl/linux/nfsd.rb +1299 -317
- data/generated/nl/linux/nftables.rb +5351 -1533
- data/generated/nl/linux/nl80211.rb +4601 -882
- data/generated/nl/linux/nlctrl.rb +460 -117
- data/generated/nl/linux/ovpn.rb +1360 -262
- data/generated/nl/linux/ovs_datapath.rb +312 -98
- data/generated/nl/linux/ovs_flow.rb +1866 -358
- data/generated/nl/linux/ovs_packet.rb +331 -45
- data/generated/nl/linux/ovs_vport.rb +374 -123
- data/generated/nl/linux/psp.rb +1093 -201
- data/generated/nl/linux/rt_addr.rb +423 -165
- data/generated/nl/linux/rt_link.rb +6928 -1336
- data/generated/nl/linux/rt_neigh.rb +1063 -297
- data/generated/nl/linux/rt_route.rb +1112 -483
- data/generated/nl/linux/rt_rule.rb +931 -262
- data/generated/nl/linux/sunrpc_cache.rb +407 -82
- data/generated/nl/linux/tc.rb +10081 -1763
- data/generated/nl/linux/tcp_metrics.rb +388 -109
- data/generated/nl/linux/team.rb +350 -84
- data/generated/nl/linux/wireguard.rb +525 -96
- data/generated/nl/linux.rb +1 -0
- data/lib/nl/linux/nlctrl_resolver.rb +31 -0
- data/lib/nl/linux/version.rb +1 -1
- data/sig/generated/nl/linux/binder.rbs +366 -0
- data/sig/generated/nl/linux/conntrack.rbs +2787 -0
- data/sig/generated/nl/linux/dev_energymodel.rbs +636 -0
- data/sig/generated/nl/linux/devlink.rbs +12496 -0
- data/sig/generated/nl/linux/dpll.rbs +3461 -0
- data/sig/generated/nl/linux/drm_ras.rbs +553 -0
- data/sig/generated/nl/linux/ethtool.rbs +15291 -0
- data/sig/generated/nl/linux/fou.rbs +702 -0
- data/sig/generated/nl/linux/handshake.rbs +622 -0
- data/sig/generated/nl/linux/lockd.rbs +234 -0
- data/sig/generated/nl/linux/mptcp_pm.rbs +1511 -0
- data/sig/generated/nl/linux/net_shaper.rbs +1645 -0
- data/sig/generated/nl/linux/netdev.rbs +4187 -0
- data/sig/generated/nl/linux/nfsd.rbs +2520 -0
- data/sig/generated/nl/linux/nftables.rbs +10304 -0
- data/sig/generated/nl/linux/nl80211.rbs +9786 -0
- data/sig/generated/nl/linux/nlctrl.rbs +944 -0
- data/sig/generated/nl/linux/nlctrl_resolver.rbs +20 -0
- data/sig/generated/nl/linux/ovpn.rbs +2564 -0
- data/sig/generated/nl/linux/ovs_datapath.rbs +640 -0
- data/sig/generated/nl/linux/ovs_flow.rbs +3659 -0
- data/sig/generated/nl/linux/ovs_packet.rbs +540 -0
- data/sig/generated/nl/linux/ovs_vport.rbs +777 -0
- data/sig/generated/nl/linux/psp.rbs +1846 -0
- data/sig/generated/nl/linux/rt_addr.rbs +866 -0
- data/sig/generated/nl/linux/rt_link.rbs +13438 -0
- data/sig/generated/nl/linux/rt_neigh.rbs +2124 -0
- data/sig/generated/nl/linux/rt_route.rbs +2218 -0
- data/sig/generated/nl/linux/rt_rule.rbs +1726 -0
- data/sig/generated/nl/linux/sunrpc_cache.rbs +739 -0
- data/sig/generated/nl/linux/tc.rbs +19931 -0
- data/sig/generated/nl/linux/tcp_metrics.rbs +740 -0
- data/sig/generated/nl/linux/team.rbs +733 -0
- data/sig/generated/nl/linux/version.rbs +7 -0
- data/sig/generated/nl/linux/wireguard.rbs +1006 -0
- data/sig/generated/nl/linux.rbs +6 -0
- data/sig/generated/nl-linux.rbs +2 -0
- metadata +51 -10
|
@@ -1,235 +1,526 @@
|
|
|
1
1
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
2
2
|
#
|
|
3
|
+
# This file is based on Documentation/netlink/specs/dev-energymodel.yaml from Linux v7.2.
|
|
4
|
+
#
|
|
5
|
+
# Original YNL comment:
|
|
6
|
+
#
|
|
3
7
|
# Copyright (c) 2025 Valve Corporation.
|
|
4
8
|
#
|
|
5
9
|
#--
|
|
6
10
|
# frozen_string_literal: true
|
|
7
|
-
# rbs_inline: enabled
|
|
8
11
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
9
12
|
require 'nl'
|
|
10
13
|
module Nl; module Linux
|
|
11
14
|
# Energy model netlink interface to notify its changes.
|
|
12
|
-
class DevEnergymodel < ::Nl::Family
|
|
15
|
+
class DevEnergymodel < ::Nl::Genl::Family
|
|
13
16
|
NAME = "dev-energymodel"
|
|
14
|
-
|
|
17
|
+
VERSION = 1
|
|
18
|
+
# @rbs (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) -> (::Nl::Family::Session & instance)
|
|
19
|
+
# @rbs | [R] (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) { (instance) -> R } -> R
|
|
20
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
21
|
+
# @param [#call] resolver
|
|
22
|
+
# @param [Symbol, nil] executor
|
|
23
|
+
# @param [Integer, nil] notification_capacity
|
|
24
|
+
# @return [DevEnergymodel]
|
|
25
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY, &block)
|
|
26
|
+
# @param [#call] resolver
|
|
27
|
+
# @param [Symbol, nil] executor
|
|
28
|
+
# @param [Integer, nil] notification_capacity
|
|
29
|
+
# @yieldparam [DevEnergymodel] family
|
|
30
|
+
# @return [Object] the result of the block
|
|
31
|
+
def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
32
|
+
super
|
|
33
|
+
end
|
|
34
|
+
# @private
|
|
35
|
+
MCAST_GROUPS = Ractor.make_shareable({:"event" => ::Nl::McastGroup.new("event", nil)}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
36
|
+
module Flags
|
|
37
|
+
module PerfStateFlags
|
|
38
|
+
# The performance state is inefficient. There is in this perf-domain, another performance state with a higher frequency but a lower or equal power cost.
|
|
39
|
+
PerfStateInefficient = 1
|
|
40
|
+
end
|
|
41
|
+
module PerfDomainFlags
|
|
42
|
+
# The power values are in micro-Watts or some other scale.
|
|
43
|
+
PerfDomainMicrowatts = 1
|
|
44
|
+
# Skip inefficient states when estimating energy consumption.
|
|
45
|
+
PerfDomainSkipInefficiencies = 2
|
|
46
|
+
# The power values are artificial and might be created by platform missing real power information.
|
|
47
|
+
PerfDomainArtificial = 4
|
|
48
|
+
end
|
|
49
|
+
end
|
|
15
50
|
module Structs
|
|
16
51
|
end
|
|
17
52
|
module AttributeSets
|
|
18
53
|
# Information on a single performance domains.
|
|
19
|
-
class PerfDomain < ::Nl::
|
|
54
|
+
class PerfDomain < ::Nl::AttributeSet
|
|
20
55
|
# Abstract class
|
|
21
|
-
class Attribute < ::Nl::
|
|
56
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
22
57
|
end
|
|
23
58
|
class Pad < Attribute
|
|
24
59
|
TYPE = 1
|
|
25
60
|
NAME = :"pad"
|
|
26
|
-
|
|
61
|
+
# @private
|
|
62
|
+
ORDER = 0
|
|
63
|
+
# @private
|
|
64
|
+
DATATYPE = ::Nl::DataTypes::Pad.new()
|
|
27
65
|
end
|
|
66
|
+
# A unique ID number for each performance domain.
|
|
28
67
|
class PerfDomainId < Attribute
|
|
29
68
|
TYPE = 2
|
|
30
69
|
NAME = :"perf_domain_id"
|
|
31
|
-
|
|
70
|
+
# @private
|
|
71
|
+
ORDER = 1
|
|
72
|
+
# @private
|
|
73
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
32
74
|
end
|
|
75
|
+
# Bitmask of performance domain flags.
|
|
76
|
+
#
|
|
77
|
+
# Known flags are defined in {Flags::PerfDomainFlags}.
|
|
33
78
|
class Flags < Attribute
|
|
34
79
|
TYPE = 3
|
|
35
80
|
NAME = :"flags"
|
|
36
|
-
|
|
81
|
+
# @private
|
|
82
|
+
ORDER = 2
|
|
83
|
+
# @private
|
|
84
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
37
85
|
end
|
|
86
|
+
# CPUs that belong to this performance domain.
|
|
38
87
|
class Cpus < Attribute
|
|
39
88
|
TYPE = 4
|
|
40
89
|
NAME = :"cpus"
|
|
41
|
-
|
|
90
|
+
# @private
|
|
91
|
+
MULTI = true
|
|
92
|
+
# @private
|
|
93
|
+
ORDER = 3
|
|
94
|
+
# @private
|
|
95
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
42
96
|
end
|
|
43
|
-
#
|
|
97
|
+
# @private
|
|
44
98
|
BY_NAME = Ractor.make_shareable({:"pad" => Pad, :"perf_domain_id" => PerfDomainId, :"flags" => Flags, :"cpus" => Cpus}) #: Hash[::Symbol, Attribute]
|
|
45
|
-
#
|
|
99
|
+
# @private
|
|
46
100
|
BY_TYPE = Ractor.make_shareable({1 => Pad, 2 => PerfDomainId, 3 => Flags, 4 => Cpus}) #: Hash[::Integer, Attribute]
|
|
101
|
+
# A unique ID number for each performance domain.
|
|
102
|
+
# @rbs return: ::Integer
|
|
103
|
+
# @return [Integer]
|
|
104
|
+
# @see PerfDomainId
|
|
105
|
+
def perf_domain_id; self[:"perf_domain_id"]&.value; end
|
|
106
|
+
# Bitmask of performance domain flags.
|
|
107
|
+
#
|
|
108
|
+
# Known flags are defined in {Flags::PerfDomainFlags}.
|
|
109
|
+
# @rbs return: ::Integer
|
|
110
|
+
# @return [Integer]
|
|
111
|
+
# @see Flags
|
|
112
|
+
def flags; self[:"flags"]&.value; end
|
|
113
|
+
# CPUs that belong to this performance domain.
|
|
114
|
+
# @rbs return: ::Array[::Integer]
|
|
115
|
+
# @return [Array<Integer>]
|
|
116
|
+
# @see Cpus
|
|
117
|
+
def cpus; self[:"cpus"].map(&:value); end
|
|
47
118
|
class << self
|
|
48
119
|
# Looks up Attribute class by name.
|
|
49
|
-
#--
|
|
50
120
|
# @rbs name: Symbol
|
|
51
121
|
# @rbs return: Attribute
|
|
122
|
+
# @param [Symbol] name
|
|
123
|
+
# @return [Attribute]
|
|
52
124
|
def by_name(name); BY_NAME.fetch(name); end
|
|
53
125
|
# Looks up Attribute class by type value.
|
|
54
|
-
#--
|
|
55
126
|
# @rbs type: Integer
|
|
56
127
|
# @rbs return: Attribute
|
|
128
|
+
# @param [Integer] type
|
|
129
|
+
# @return [Attribute]
|
|
57
130
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
58
131
|
end
|
|
59
132
|
end
|
|
60
133
|
# Performance states table.
|
|
61
|
-
class PerfTable < ::Nl::
|
|
134
|
+
class PerfTable < ::Nl::AttributeSet
|
|
62
135
|
# Abstract class
|
|
63
|
-
class Attribute < ::Nl::
|
|
136
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
64
137
|
end
|
|
138
|
+
# A unique ID number for each performance domain.
|
|
65
139
|
class PerfDomainId < Attribute
|
|
66
140
|
TYPE = 1
|
|
67
141
|
NAME = :"perf_domain_id"
|
|
68
|
-
|
|
142
|
+
# @private
|
|
143
|
+
ORDER = 0
|
|
144
|
+
# @private
|
|
145
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
69
146
|
end
|
|
70
147
|
class PerfState < Attribute
|
|
71
148
|
TYPE = 2
|
|
72
149
|
NAME = :"perf_state"
|
|
150
|
+
# @private
|
|
151
|
+
MULTI = true
|
|
152
|
+
# @private
|
|
153
|
+
ORDER = 1
|
|
73
154
|
end
|
|
74
|
-
#
|
|
155
|
+
# @private
|
|
75
156
|
BY_NAME = Ractor.make_shareable({:"perf_domain_id" => PerfDomainId, :"perf_state" => PerfState}) #: Hash[::Symbol, Attribute]
|
|
76
|
-
#
|
|
157
|
+
# @private
|
|
77
158
|
BY_TYPE = Ractor.make_shareable({1 => PerfDomainId, 2 => PerfState}) #: Hash[::Integer, Attribute]
|
|
159
|
+
# A unique ID number for each performance domain.
|
|
160
|
+
# @rbs return: ::Integer
|
|
161
|
+
# @return [Integer]
|
|
162
|
+
# @see PerfDomainId
|
|
163
|
+
def perf_domain_id; self[:"perf_domain_id"]&.value; end
|
|
164
|
+
# @rbs return: ::Array[AttributeSets::PerfState]
|
|
165
|
+
# @return [Array<AttributeSets::PerfState>]
|
|
166
|
+
# @see PerfState
|
|
167
|
+
def perf_state; self[:"perf_state"].map(&:value); end
|
|
78
168
|
class << self
|
|
79
169
|
# Looks up Attribute class by name.
|
|
80
|
-
#--
|
|
81
170
|
# @rbs name: Symbol
|
|
82
171
|
# @rbs return: Attribute
|
|
172
|
+
# @param [Symbol] name
|
|
173
|
+
# @return [Attribute]
|
|
83
174
|
def by_name(name); BY_NAME.fetch(name); end
|
|
84
175
|
# Looks up Attribute class by type value.
|
|
85
|
-
#--
|
|
86
176
|
# @rbs type: Integer
|
|
87
177
|
# @rbs return: Attribute
|
|
178
|
+
# @param [Integer] type
|
|
179
|
+
# @return [Attribute]
|
|
88
180
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
89
181
|
end
|
|
90
182
|
end
|
|
91
183
|
# Performance state of a performance domain.
|
|
92
|
-
class PerfState < ::Nl::
|
|
184
|
+
class PerfState < ::Nl::AttributeSet
|
|
93
185
|
# Abstract class
|
|
94
|
-
class Attribute < ::Nl::
|
|
186
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
95
187
|
end
|
|
96
188
|
class Pad < Attribute
|
|
97
189
|
TYPE = 1
|
|
98
190
|
NAME = :"pad"
|
|
99
|
-
|
|
191
|
+
# @private
|
|
192
|
+
ORDER = 0
|
|
193
|
+
# @private
|
|
194
|
+
DATATYPE = ::Nl::DataTypes::Pad.new()
|
|
100
195
|
end
|
|
196
|
+
# CPU performance (capacity) at a given frequency.
|
|
101
197
|
class Performance < Attribute
|
|
102
198
|
TYPE = 2
|
|
103
199
|
NAME = :"performance"
|
|
104
|
-
|
|
200
|
+
# @private
|
|
201
|
+
ORDER = 1
|
|
202
|
+
# @private
|
|
203
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
105
204
|
end
|
|
205
|
+
# The frequency in KHz, for consistency with CPUFreq.
|
|
106
206
|
class Frequency < Attribute
|
|
107
207
|
TYPE = 3
|
|
108
208
|
NAME = :"frequency"
|
|
109
|
-
|
|
209
|
+
# @private
|
|
210
|
+
ORDER = 2
|
|
211
|
+
# @private
|
|
212
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
110
213
|
end
|
|
214
|
+
# The power consumed at this level (by 1 CPU or by a registered device). It can be a total power: static and dynamic.
|
|
111
215
|
class Power < Attribute
|
|
112
216
|
TYPE = 4
|
|
113
217
|
NAME = :"power"
|
|
114
|
-
|
|
218
|
+
# @private
|
|
219
|
+
ORDER = 3
|
|
220
|
+
# @private
|
|
221
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
115
222
|
end
|
|
223
|
+
# The cost coefficient associated with this level, used during energy calculation. Equal to: power * max_frequency / frequency.
|
|
116
224
|
class Cost < Attribute
|
|
117
225
|
TYPE = 5
|
|
118
226
|
NAME = :"cost"
|
|
119
|
-
|
|
227
|
+
# @private
|
|
228
|
+
ORDER = 4
|
|
229
|
+
# @private
|
|
230
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
120
231
|
end
|
|
232
|
+
# Bitmask of performance state flags.
|
|
233
|
+
#
|
|
234
|
+
# Known flags are defined in {Flags::PerfStateFlags}.
|
|
121
235
|
class Flags < Attribute
|
|
122
236
|
TYPE = 6
|
|
123
237
|
NAME = :"flags"
|
|
124
|
-
|
|
238
|
+
# @private
|
|
239
|
+
ORDER = 5
|
|
240
|
+
# @private
|
|
241
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
125
242
|
end
|
|
126
|
-
#
|
|
243
|
+
# @private
|
|
127
244
|
BY_NAME = Ractor.make_shareable({:"pad" => Pad, :"performance" => Performance, :"frequency" => Frequency, :"power" => Power, :"cost" => Cost, :"flags" => Flags}) #: Hash[::Symbol, Attribute]
|
|
128
|
-
#
|
|
245
|
+
# @private
|
|
129
246
|
BY_TYPE = Ractor.make_shareable({1 => Pad, 2 => Performance, 3 => Frequency, 4 => Power, 5 => Cost, 6 => Flags}) #: Hash[::Integer, Attribute]
|
|
247
|
+
# CPU performance (capacity) at a given frequency.
|
|
248
|
+
# @rbs return: ::Integer
|
|
249
|
+
# @return [Integer]
|
|
250
|
+
# @see Performance
|
|
251
|
+
def performance; self[:"performance"]&.value; end
|
|
252
|
+
# The frequency in KHz, for consistency with CPUFreq.
|
|
253
|
+
# @rbs return: ::Integer
|
|
254
|
+
# @return [Integer]
|
|
255
|
+
# @see Frequency
|
|
256
|
+
def frequency; self[:"frequency"]&.value; end
|
|
257
|
+
# The power consumed at this level (by 1 CPU or by a registered device). It can be a total power: static and dynamic.
|
|
258
|
+
# @rbs return: ::Integer
|
|
259
|
+
# @return [Integer]
|
|
260
|
+
# @see Power
|
|
261
|
+
def power; self[:"power"]&.value; end
|
|
262
|
+
# The cost coefficient associated with this level, used during energy calculation. Equal to: power * max_frequency / frequency.
|
|
263
|
+
# @rbs return: ::Integer
|
|
264
|
+
# @return [Integer]
|
|
265
|
+
# @see Cost
|
|
266
|
+
def cost; self[:"cost"]&.value; end
|
|
267
|
+
# Bitmask of performance state flags.
|
|
268
|
+
#
|
|
269
|
+
# Known flags are defined in {Flags::PerfStateFlags}.
|
|
270
|
+
# @rbs return: ::Integer
|
|
271
|
+
# @return [Integer]
|
|
272
|
+
# @see Flags
|
|
273
|
+
def flags; self[:"flags"]&.value; end
|
|
130
274
|
class << self
|
|
131
275
|
# Looks up Attribute class by name.
|
|
132
|
-
#--
|
|
133
276
|
# @rbs name: Symbol
|
|
134
277
|
# @rbs return: Attribute
|
|
278
|
+
# @param [Symbol] name
|
|
279
|
+
# @return [Attribute]
|
|
135
280
|
def by_name(name); BY_NAME.fetch(name); end
|
|
136
281
|
# Looks up Attribute class by type value.
|
|
137
|
-
#--
|
|
138
282
|
# @rbs type: Integer
|
|
139
283
|
# @rbs return: Attribute
|
|
284
|
+
# @param [Integer] type
|
|
285
|
+
# @return [Attribute]
|
|
140
286
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
141
287
|
end
|
|
142
288
|
end
|
|
143
|
-
|
|
289
|
+
# @private
|
|
290
|
+
PerfTable::PerfState::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::PerfState, selector_bindings: Ractor.make_shareable([]))
|
|
144
291
|
end
|
|
145
292
|
module Messages
|
|
146
293
|
# Get the list of information for all performance domains.
|
|
147
|
-
class DoGetPerfDomainsRequest < ::Nl::
|
|
294
|
+
class DoGetPerfDomainsRequest < ::Nl::Genl::Message
|
|
148
295
|
TYPE = 1
|
|
149
296
|
FIXED_HEADER = nil
|
|
150
297
|
ATTRIBUTE_SET = AttributeSets::PerfDomain
|
|
151
298
|
ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id])
|
|
152
|
-
#
|
|
153
|
-
#--
|
|
299
|
+
# A unique ID number for each performance domain.
|
|
154
300
|
# @rbs return: ::Integer
|
|
301
|
+
# @return [Integer]
|
|
302
|
+
# @see AttributeSets::PerfDomain::PerfDomainId
|
|
155
303
|
def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
|
|
156
304
|
end
|
|
157
305
|
# Get the list of information for all performance domains.
|
|
158
|
-
class DoGetPerfDomainsReply < ::Nl::
|
|
306
|
+
class DoGetPerfDomainsReply < ::Nl::Genl::Message
|
|
159
307
|
TYPE = 1
|
|
160
308
|
FIXED_HEADER = nil
|
|
161
309
|
ATTRIBUTE_SET = AttributeSets::PerfDomain
|
|
162
310
|
ATTRIBUTES = Ractor.make_shareable(%i[pad perf_domain_id flags cpus])
|
|
163
|
-
#
|
|
164
|
-
#--
|
|
311
|
+
# A unique ID number for each performance domain.
|
|
165
312
|
# @rbs return: ::Integer
|
|
313
|
+
# @return [Integer]
|
|
314
|
+
# @see AttributeSets::PerfDomain::PerfDomainId
|
|
166
315
|
def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
|
|
167
|
-
#
|
|
168
|
-
|
|
316
|
+
# Bitmask of performance domain flags.
|
|
317
|
+
#
|
|
318
|
+
# Known flags are defined in {Flags::PerfDomainFlags}.
|
|
169
319
|
# @rbs return: ::Integer
|
|
320
|
+
# @return [Integer]
|
|
321
|
+
# @see AttributeSets::PerfDomain::Flags
|
|
170
322
|
def flags; attributes[:"flags"]&.value; end
|
|
171
|
-
#
|
|
172
|
-
|
|
173
|
-
# @
|
|
174
|
-
|
|
323
|
+
# CPUs that belong to this performance domain.
|
|
324
|
+
# @rbs return: ::Array[::Integer]
|
|
325
|
+
# @return [Array<Integer>]
|
|
326
|
+
# @see AttributeSets::PerfDomain::Cpus
|
|
327
|
+
def cpus; attributes[:"cpus"].map(&:value); end
|
|
328
|
+
end
|
|
329
|
+
# Get the list of information for all performance domains.
|
|
330
|
+
class DumpGetPerfDomainsRequest < ::Nl::Genl::Message
|
|
331
|
+
TYPE = 1
|
|
332
|
+
FIXED_HEADER = nil
|
|
333
|
+
ATTRIBUTE_SET = AttributeSets::PerfDomain
|
|
334
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
175
335
|
end
|
|
176
336
|
# Get the list of information for all performance domains.
|
|
177
|
-
class DumpGetPerfDomainsReply < ::Nl::
|
|
337
|
+
class DumpGetPerfDomainsReply < ::Nl::Genl::Message
|
|
178
338
|
TYPE = 1
|
|
179
339
|
FIXED_HEADER = nil
|
|
180
340
|
ATTRIBUTE_SET = AttributeSets::PerfDomain
|
|
181
341
|
ATTRIBUTES = Ractor.make_shareable(%i[pad perf_domain_id flags cpus])
|
|
182
|
-
#
|
|
183
|
-
#--
|
|
342
|
+
# A unique ID number for each performance domain.
|
|
184
343
|
# @rbs return: ::Integer
|
|
344
|
+
# @return [Integer]
|
|
345
|
+
# @see AttributeSets::PerfDomain::PerfDomainId
|
|
185
346
|
def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
|
|
186
|
-
#
|
|
187
|
-
|
|
347
|
+
# Bitmask of performance domain flags.
|
|
348
|
+
#
|
|
349
|
+
# Known flags are defined in {Flags::PerfDomainFlags}.
|
|
188
350
|
# @rbs return: ::Integer
|
|
351
|
+
# @return [Integer]
|
|
352
|
+
# @see AttributeSets::PerfDomain::Flags
|
|
189
353
|
def flags; attributes[:"flags"]&.value; end
|
|
190
|
-
#
|
|
191
|
-
|
|
192
|
-
# @
|
|
193
|
-
|
|
354
|
+
# CPUs that belong to this performance domain.
|
|
355
|
+
# @rbs return: ::Array[::Integer]
|
|
356
|
+
# @return [Array<Integer>]
|
|
357
|
+
# @see AttributeSets::PerfDomain::Cpus
|
|
358
|
+
def cpus; attributes[:"cpus"].map(&:value); end
|
|
194
359
|
end
|
|
195
360
|
# Get the energy model table of a performance domain.
|
|
196
|
-
class DoGetPerfTableRequest < ::Nl::
|
|
361
|
+
class DoGetPerfTableRequest < ::Nl::Genl::Message
|
|
197
362
|
TYPE = 2
|
|
198
363
|
FIXED_HEADER = nil
|
|
199
364
|
ATTRIBUTE_SET = AttributeSets::PerfTable
|
|
200
365
|
ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id])
|
|
201
|
-
#
|
|
202
|
-
#--
|
|
366
|
+
# A unique ID number for each performance domain.
|
|
203
367
|
# @rbs return: ::Integer
|
|
368
|
+
# @return [Integer]
|
|
369
|
+
# @see AttributeSets::PerfTable::PerfDomainId
|
|
204
370
|
def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
|
|
205
371
|
end
|
|
206
372
|
# Get the energy model table of a performance domain.
|
|
207
|
-
class DoGetPerfTableReply < ::Nl::
|
|
373
|
+
class DoGetPerfTableReply < ::Nl::Genl::Message
|
|
208
374
|
TYPE = 2
|
|
209
375
|
FIXED_HEADER = nil
|
|
210
376
|
ATTRIBUTE_SET = AttributeSets::PerfTable
|
|
211
377
|
ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id perf_state])
|
|
212
|
-
#
|
|
213
|
-
#--
|
|
378
|
+
# A unique ID number for each performance domain.
|
|
214
379
|
# @rbs return: ::Integer
|
|
380
|
+
# @return [Integer]
|
|
381
|
+
# @see AttributeSets::PerfTable::PerfDomainId
|
|
215
382
|
def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
|
|
216
|
-
#
|
|
217
|
-
|
|
218
|
-
# @
|
|
219
|
-
def perf_state; attributes[:"perf_state"]
|
|
383
|
+
# @rbs return: ::Array[AttributeSets::PerfState]
|
|
384
|
+
# @return [Array<AttributeSets::PerfState>]
|
|
385
|
+
# @see AttributeSets::PerfTable::PerfState
|
|
386
|
+
def perf_state; attributes[:"perf_state"].map(&:value); end
|
|
220
387
|
end
|
|
221
388
|
end
|
|
389
|
+
module Notifications
|
|
390
|
+
# A performance domain is created.
|
|
391
|
+
#
|
|
392
|
+
# Multicast group: `event`.
|
|
393
|
+
class PerfDomainCreated < ::Nl::Genl::Message
|
|
394
|
+
TYPE = 3
|
|
395
|
+
FIXED_HEADER = nil
|
|
396
|
+
ATTRIBUTE_SET = AttributeSets::PerfTable
|
|
397
|
+
ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id perf_state])
|
|
398
|
+
# A unique ID number for each performance domain.
|
|
399
|
+
# @rbs return: ::Integer
|
|
400
|
+
# @return [Integer]
|
|
401
|
+
# @see AttributeSets::PerfTable::PerfDomainId
|
|
402
|
+
def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
|
|
403
|
+
# @rbs return: ::Array[AttributeSets::PerfState]
|
|
404
|
+
# @return [Array<AttributeSets::PerfState>]
|
|
405
|
+
# @see AttributeSets::PerfTable::PerfState
|
|
406
|
+
def perf_state; attributes[:"perf_state"].map(&:value); end
|
|
407
|
+
end
|
|
408
|
+
# A performance domain is updated.
|
|
409
|
+
#
|
|
410
|
+
# Multicast group: `event`.
|
|
411
|
+
class PerfDomainUpdated < ::Nl::Genl::Message
|
|
412
|
+
TYPE = 4
|
|
413
|
+
FIXED_HEADER = nil
|
|
414
|
+
ATTRIBUTE_SET = AttributeSets::PerfTable
|
|
415
|
+
ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id perf_state])
|
|
416
|
+
# A unique ID number for each performance domain.
|
|
417
|
+
# @rbs return: ::Integer
|
|
418
|
+
# @return [Integer]
|
|
419
|
+
# @see AttributeSets::PerfTable::PerfDomainId
|
|
420
|
+
def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
|
|
421
|
+
# @rbs return: ::Array[AttributeSets::PerfState]
|
|
422
|
+
# @return [Array<AttributeSets::PerfState>]
|
|
423
|
+
# @see AttributeSets::PerfTable::PerfState
|
|
424
|
+
def perf_state; attributes[:"perf_state"].map(&:value); end
|
|
425
|
+
end
|
|
426
|
+
# A performance domain is deleted.
|
|
427
|
+
#
|
|
428
|
+
# Multicast group: `event`.
|
|
429
|
+
class PerfDomainDeleted < ::Nl::Genl::Message
|
|
430
|
+
TYPE = 5
|
|
431
|
+
FIXED_HEADER = nil
|
|
432
|
+
ATTRIBUTE_SET = AttributeSets::PerfTable
|
|
433
|
+
ATTRIBUTES = Ractor.make_shareable(%i[perf_domain_id])
|
|
434
|
+
# A unique ID number for each performance domain.
|
|
435
|
+
# @rbs return: ::Integer
|
|
436
|
+
# @return [Integer]
|
|
437
|
+
# @see AttributeSets::PerfTable::PerfDomainId
|
|
438
|
+
def perf_domain_id; attributes[:"perf_domain_id"]&.value; end
|
|
439
|
+
end
|
|
440
|
+
end
|
|
441
|
+
# @private
|
|
442
|
+
NOTIFICATIONS = Ractor.make_shareable({3 => Notifications::PerfDomainCreated, 4 => Notifications::PerfDomainUpdated, 5 => Notifications::PerfDomainDeleted}) #: Hash[::Integer, ::Class]
|
|
222
443
|
# Get the list of information for all performance domains.
|
|
223
|
-
#--
|
|
224
444
|
# @rbs (?perf_domain_id: ::Integer) -> Messages::DoGetPerfDomainsReply
|
|
445
|
+
# @param [Hash] args
|
|
446
|
+
# @option args [Integer] perf_domain_id A unique ID number for each performance domain.
|
|
447
|
+
# @return [Messages::DoGetPerfDomainsReply]
|
|
448
|
+
# @see Messages::DoGetPerfDomainsRequest
|
|
225
449
|
def do_get_perf_domains(**args)
|
|
226
450
|
exchange_message(:"do", Messages::DoGetPerfDomainsRequest, Messages::DoGetPerfDomainsReply, args)
|
|
227
451
|
end
|
|
452
|
+
# Get the list of information for all performance domains.
|
|
453
|
+
# @rbs () -> Array[Messages::DumpGetPerfDomainsReply]
|
|
454
|
+
# | () { (Messages::DumpGetPerfDomainsReply) -> void } -> void
|
|
455
|
+
# @overload dump_get_perf_domains(**args)
|
|
456
|
+
# Returns an array when no block is given.
|
|
457
|
+
# @param [Hash] args
|
|
458
|
+
# @return [Array<Messages::DumpGetPerfDomainsReply>]
|
|
459
|
+
# @overload dump_get_perf_domains(**args, &block)
|
|
460
|
+
# Yields each reply when a block is given.
|
|
461
|
+
# @param [Hash] args
|
|
462
|
+
# @yieldparam [Messages::DumpGetPerfDomainsReply] reply
|
|
463
|
+
# @return [void]
|
|
464
|
+
# @see Messages::DumpGetPerfDomainsRequest
|
|
465
|
+
def dump_get_perf_domains(**args, &block)
|
|
466
|
+
exchange_message(:"dump", Messages::DumpGetPerfDomainsRequest, Messages::DumpGetPerfDomainsReply, args, &block)
|
|
467
|
+
end
|
|
228
468
|
# Get the energy model table of a performance domain.
|
|
229
|
-
#--
|
|
230
469
|
# @rbs (?perf_domain_id: ::Integer) -> Messages::DoGetPerfTableReply
|
|
470
|
+
# @param [Hash] args
|
|
471
|
+
# @option args [Integer] perf_domain_id A unique ID number for each performance domain.
|
|
472
|
+
# @return [Messages::DoGetPerfTableReply]
|
|
473
|
+
# @see Messages::DoGetPerfTableRequest
|
|
231
474
|
def do_get_perf_table(**args)
|
|
232
475
|
exchange_message(:"do", Messages::DoGetPerfTableRequest, Messages::DoGetPerfTableReply, args)
|
|
233
476
|
end
|
|
477
|
+
class AsyncOperations
|
|
478
|
+
# @private
|
|
479
|
+
def initialize(&exchange)
|
|
480
|
+
@exchange = exchange
|
|
481
|
+
end
|
|
482
|
+
# Get the list of information for all performance domains.
|
|
483
|
+
# @rbs (?perf_domain_id: ::Integer) -> ::Nl::Async::Future[Messages::DoGetPerfDomainsReply]
|
|
484
|
+
# @param [Hash] args
|
|
485
|
+
# @option args [Integer] perf_domain_id A unique ID number for each performance domain.
|
|
486
|
+
# @return [Nl::Async::Future<Messages::DoGetPerfDomainsReply>]
|
|
487
|
+
# @see Messages::DoGetPerfDomainsRequest
|
|
488
|
+
def do_get_perf_domains(**args)
|
|
489
|
+
@exchange.call(:"do", Messages::DoGetPerfDomainsRequest, Messages::DoGetPerfDomainsReply, args)
|
|
490
|
+
end
|
|
491
|
+
# Get the list of information for all performance domains.
|
|
492
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpGetPerfDomainsReply]
|
|
493
|
+
# @param [Hash] args
|
|
494
|
+
# @return [Nl::Async::Stream<Messages::DumpGetPerfDomainsReply>]
|
|
495
|
+
# @see Messages::DumpGetPerfDomainsRequest
|
|
496
|
+
def dump_get_perf_domains(**args)
|
|
497
|
+
@exchange.call(:"dump", Messages::DumpGetPerfDomainsRequest, Messages::DumpGetPerfDomainsReply, args)
|
|
498
|
+
end
|
|
499
|
+
# Get the energy model table of a performance domain.
|
|
500
|
+
# @rbs (?perf_domain_id: ::Integer) -> ::Nl::Async::Future[Messages::DoGetPerfTableReply]
|
|
501
|
+
# @param [Hash] args
|
|
502
|
+
# @option args [Integer] perf_domain_id A unique ID number for each performance domain.
|
|
503
|
+
# @return [Nl::Async::Future<Messages::DoGetPerfTableReply>]
|
|
504
|
+
# @see Messages::DoGetPerfTableRequest
|
|
505
|
+
def do_get_perf_table(**args)
|
|
506
|
+
@exchange.call(:"do", Messages::DoGetPerfTableRequest, Messages::DoGetPerfTableReply, args)
|
|
507
|
+
end
|
|
508
|
+
end
|
|
509
|
+
# Returns the asynchronous operation facade for this family.
|
|
510
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
511
|
+
# @param [::Integer, nil] stream_capacity
|
|
512
|
+
# @return [AsyncOperations]
|
|
513
|
+
def async(stream_capacity: nil)
|
|
514
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
515
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
516
|
+
end
|
|
517
|
+
# @rbs (*(:event) groups) -> self
|
|
518
|
+
# @param [Array<:event>] groups
|
|
519
|
+
# @return [self]
|
|
520
|
+
def subscribe(*groups) = super
|
|
521
|
+
# @rbs (*(:event) groups) -> self
|
|
522
|
+
# @param [Array<:event>] groups
|
|
523
|
+
# @return [self]
|
|
524
|
+
def unsubscribe(*groups) = super
|
|
234
525
|
end
|
|
235
526
|
end; end
|