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,222 +1,471 @@
|
|
|
1
1
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
2
|
+
#
|
|
3
|
+
# This file is based on Documentation/netlink/specs/drm_ras.yaml from Linux v7.2.
|
|
2
4
|
#--
|
|
3
5
|
# frozen_string_literal: true
|
|
4
|
-
# rbs_inline: enabled
|
|
5
6
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
6
7
|
require 'nl'
|
|
7
8
|
module Nl; module Linux
|
|
8
9
|
# DRM RAS (Reliability, Availability, Serviceability) over Generic Netlink. Provides a standardized mechanism for DRM drivers to register "nodes" representing hardware/software components capable of reporting error counters. Userspace tools can query the list of nodes or individual error counters via the Generic Netlink interface.
|
|
9
|
-
class DrmRas < ::Nl::Family
|
|
10
|
+
class DrmRas < ::Nl::Genl::Family
|
|
10
11
|
NAME = "drm-ras"
|
|
11
|
-
|
|
12
|
+
VERSION = 1
|
|
13
|
+
# @rbs (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) -> (::Nl::Family::Session & instance)
|
|
14
|
+
# @rbs | [R] (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) { (instance) -> R } -> R
|
|
15
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
16
|
+
# @param [#call] resolver
|
|
17
|
+
# @param [Symbol, nil] executor
|
|
18
|
+
# @param [Integer, nil] notification_capacity
|
|
19
|
+
# @return [DrmRas]
|
|
20
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY, &block)
|
|
21
|
+
# @param [#call] resolver
|
|
22
|
+
# @param [Symbol, nil] executor
|
|
23
|
+
# @param [Integer, nil] notification_capacity
|
|
24
|
+
# @yieldparam [DrmRas] family
|
|
25
|
+
# @return [Object] the result of the block
|
|
26
|
+
def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
27
|
+
super
|
|
28
|
+
end
|
|
29
|
+
# @private
|
|
30
|
+
MCAST_GROUPS = Ractor.make_shareable({}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
31
|
+
module Enums
|
|
32
|
+
# Type of the node. Currently, only error-counter nodes are supported, which expose reliability counters for a hardware/software component.
|
|
33
|
+
module NodeType
|
|
34
|
+
ErrorCounter = 1
|
|
35
|
+
end
|
|
36
|
+
end
|
|
12
37
|
module Structs
|
|
13
38
|
end
|
|
14
39
|
module AttributeSets
|
|
15
|
-
class NodeAttrs < ::Nl::
|
|
40
|
+
class NodeAttrs < ::Nl::AttributeSet
|
|
16
41
|
# Abstract class
|
|
17
|
-
class Attribute < ::Nl::
|
|
42
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
18
43
|
end
|
|
44
|
+
# Unique identifier for the node. Assigned dynamically by the DRM RAS core upon registration.
|
|
19
45
|
class NodeId < Attribute
|
|
20
46
|
TYPE = 1
|
|
21
47
|
NAME = :"node_id"
|
|
22
|
-
|
|
48
|
+
# @private
|
|
49
|
+
ORDER = 0
|
|
50
|
+
# @private
|
|
51
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
23
52
|
end
|
|
53
|
+
# Device name chosen by the driver at registration. Can be a PCI BDF, UUID, or module name if unique.
|
|
24
54
|
class DeviceName < Attribute
|
|
25
55
|
TYPE = 2
|
|
26
56
|
NAME = :"device_name"
|
|
27
|
-
|
|
57
|
+
# @private
|
|
58
|
+
ORDER = 1
|
|
59
|
+
# @private
|
|
60
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
28
61
|
end
|
|
62
|
+
# Node name chosen by the driver at registration. Can be an IP block name, or any name that identifies the RAS node inside the device.
|
|
29
63
|
class NodeName < Attribute
|
|
30
64
|
TYPE = 3
|
|
31
65
|
NAME = :"node_name"
|
|
32
|
-
|
|
66
|
+
# @private
|
|
67
|
+
ORDER = 2
|
|
68
|
+
# @private
|
|
69
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
33
70
|
end
|
|
71
|
+
# Type of this node, identifying its function.
|
|
72
|
+
#
|
|
73
|
+
# Known enum values are defined in {Enums::NodeType}.
|
|
34
74
|
class NodeType < Attribute
|
|
35
75
|
TYPE = 4
|
|
36
76
|
NAME = :"node_type"
|
|
37
|
-
|
|
77
|
+
# @private
|
|
78
|
+
ORDER = 3
|
|
79
|
+
# @private
|
|
80
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
38
81
|
end
|
|
39
|
-
#
|
|
82
|
+
# @private
|
|
40
83
|
BY_NAME = Ractor.make_shareable({:"node_id" => NodeId, :"device_name" => DeviceName, :"node_name" => NodeName, :"node_type" => NodeType}) #: Hash[::Symbol, Attribute]
|
|
41
|
-
#
|
|
84
|
+
# @private
|
|
42
85
|
BY_TYPE = Ractor.make_shareable({1 => NodeId, 2 => DeviceName, 3 => NodeName, 4 => NodeType}) #: Hash[::Integer, Attribute]
|
|
86
|
+
# Unique identifier for the node. Assigned dynamically by the DRM RAS core upon registration.
|
|
87
|
+
# @rbs return: ::Integer
|
|
88
|
+
# @return [Integer]
|
|
89
|
+
# @see NodeId
|
|
90
|
+
def node_id; self[:"node_id"]&.value; end
|
|
91
|
+
# Device name chosen by the driver at registration. Can be a PCI BDF, UUID, or module name if unique.
|
|
92
|
+
# @rbs return: ::String
|
|
93
|
+
# @return [String]
|
|
94
|
+
# @see DeviceName
|
|
95
|
+
def device_name; self[:"device_name"]&.value; end
|
|
96
|
+
# Node name chosen by the driver at registration. Can be an IP block name, or any name that identifies the RAS node inside the device.
|
|
97
|
+
# @rbs return: ::String
|
|
98
|
+
# @return [String]
|
|
99
|
+
# @see NodeName
|
|
100
|
+
def node_name; self[:"node_name"]&.value; end
|
|
101
|
+
# Type of this node, identifying its function.
|
|
102
|
+
#
|
|
103
|
+
# Known enum values are defined in {Enums::NodeType}.
|
|
104
|
+
# @rbs return: ::Integer
|
|
105
|
+
# @return [Integer]
|
|
106
|
+
# @see NodeType
|
|
107
|
+
def node_type; self[:"node_type"]&.value; end
|
|
43
108
|
class << self
|
|
44
109
|
# Looks up Attribute class by name.
|
|
45
|
-
#--
|
|
46
110
|
# @rbs name: Symbol
|
|
47
111
|
# @rbs return: Attribute
|
|
112
|
+
# @param [Symbol] name
|
|
113
|
+
# @return [Attribute]
|
|
48
114
|
def by_name(name); BY_NAME.fetch(name); end
|
|
49
115
|
# Looks up Attribute class by type value.
|
|
50
|
-
#--
|
|
51
116
|
# @rbs type: Integer
|
|
52
117
|
# @rbs return: Attribute
|
|
118
|
+
# @param [Integer] type
|
|
119
|
+
# @return [Attribute]
|
|
53
120
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
54
121
|
end
|
|
55
122
|
end
|
|
56
|
-
class ErrorCounterAttrs < ::Nl::
|
|
123
|
+
class ErrorCounterAttrs < ::Nl::AttributeSet
|
|
57
124
|
# Abstract class
|
|
58
|
-
class Attribute < ::Nl::
|
|
125
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
59
126
|
end
|
|
127
|
+
# Node ID targeted by this error counter operation.
|
|
60
128
|
class NodeId < Attribute
|
|
61
129
|
TYPE = 1
|
|
62
130
|
NAME = :"node_id"
|
|
63
|
-
|
|
131
|
+
# @private
|
|
132
|
+
ORDER = 0
|
|
133
|
+
# @private
|
|
134
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
64
135
|
end
|
|
136
|
+
# Unique identifier for a specific error counter within an node.
|
|
65
137
|
class ErrorId < Attribute
|
|
66
138
|
TYPE = 2
|
|
67
139
|
NAME = :"error_id"
|
|
68
|
-
|
|
140
|
+
# @private
|
|
141
|
+
ORDER = 1
|
|
142
|
+
# @private
|
|
143
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
69
144
|
end
|
|
145
|
+
# Name of the error.
|
|
70
146
|
class ErrorName < Attribute
|
|
71
147
|
TYPE = 3
|
|
72
148
|
NAME = :"error_name"
|
|
73
|
-
|
|
149
|
+
# @private
|
|
150
|
+
ORDER = 2
|
|
151
|
+
# @private
|
|
152
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
74
153
|
end
|
|
154
|
+
# Current value of the requested error counter.
|
|
75
155
|
class ErrorValue < Attribute
|
|
76
156
|
TYPE = 4
|
|
77
157
|
NAME = :"error_value"
|
|
78
|
-
|
|
158
|
+
# @private
|
|
159
|
+
ORDER = 3
|
|
160
|
+
# @private
|
|
161
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
79
162
|
end
|
|
80
|
-
#
|
|
163
|
+
# @private
|
|
81
164
|
BY_NAME = Ractor.make_shareable({:"node_id" => NodeId, :"error_id" => ErrorId, :"error_name" => ErrorName, :"error_value" => ErrorValue}) #: Hash[::Symbol, Attribute]
|
|
82
|
-
#
|
|
165
|
+
# @private
|
|
83
166
|
BY_TYPE = Ractor.make_shareable({1 => NodeId, 2 => ErrorId, 3 => ErrorName, 4 => ErrorValue}) #: Hash[::Integer, Attribute]
|
|
167
|
+
# Node ID targeted by this error counter operation.
|
|
168
|
+
# @rbs return: ::Integer
|
|
169
|
+
# @return [Integer]
|
|
170
|
+
# @see NodeId
|
|
171
|
+
def node_id; self[:"node_id"]&.value; end
|
|
172
|
+
# Unique identifier for a specific error counter within an node.
|
|
173
|
+
# @rbs return: ::Integer
|
|
174
|
+
# @return [Integer]
|
|
175
|
+
# @see ErrorId
|
|
176
|
+
def error_id; self[:"error_id"]&.value; end
|
|
177
|
+
# Name of the error.
|
|
178
|
+
# @rbs return: ::String
|
|
179
|
+
# @return [String]
|
|
180
|
+
# @see ErrorName
|
|
181
|
+
def error_name; self[:"error_name"]&.value; end
|
|
182
|
+
# Current value of the requested error counter.
|
|
183
|
+
# @rbs return: ::Integer
|
|
184
|
+
# @return [Integer]
|
|
185
|
+
# @see ErrorValue
|
|
186
|
+
def error_value; self[:"error_value"]&.value; end
|
|
84
187
|
class << self
|
|
85
188
|
# Looks up Attribute class by name.
|
|
86
|
-
#--
|
|
87
189
|
# @rbs name: Symbol
|
|
88
190
|
# @rbs return: Attribute
|
|
191
|
+
# @param [Symbol] name
|
|
192
|
+
# @return [Attribute]
|
|
89
193
|
def by_name(name); BY_NAME.fetch(name); end
|
|
90
194
|
# Looks up Attribute class by type value.
|
|
91
|
-
#--
|
|
92
195
|
# @rbs type: Integer
|
|
93
196
|
# @rbs return: Attribute
|
|
197
|
+
# @param [Integer] type
|
|
198
|
+
# @return [Attribute]
|
|
94
199
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
95
200
|
end
|
|
96
201
|
end
|
|
97
202
|
end
|
|
98
203
|
module Messages
|
|
99
204
|
# Retrieve the full list of currently registered DRM RAS nodes. Each node includes its dynamically assigned ID, name, and type. **Important:** User space must call this operation first to obtain the node IDs. These IDs are required for all subsequent operations on nodes, such as querying error counters.
|
|
100
|
-
|
|
205
|
+
#
|
|
206
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
207
|
+
class DumpListNodesRequest < ::Nl::Genl::Message
|
|
208
|
+
TYPE = 1
|
|
209
|
+
FIXED_HEADER = nil
|
|
210
|
+
ATTRIBUTE_SET = AttributeSets::NodeAttrs
|
|
211
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
212
|
+
end
|
|
213
|
+
# Retrieve the full list of currently registered DRM RAS nodes. Each node includes its dynamically assigned ID, name, and type. **Important:** User space must call this operation first to obtain the node IDs. These IDs are required for all subsequent operations on nodes, such as querying error counters.
|
|
214
|
+
#
|
|
215
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
216
|
+
class DumpListNodesReply < ::Nl::Genl::Message
|
|
101
217
|
TYPE = 1
|
|
102
218
|
FIXED_HEADER = nil
|
|
103
219
|
ATTRIBUTE_SET = AttributeSets::NodeAttrs
|
|
104
220
|
ATTRIBUTES = Ractor.make_shareable(%i[node_id device_name node_name node_type])
|
|
105
|
-
#
|
|
106
|
-
#--
|
|
221
|
+
# Unique identifier for the node. Assigned dynamically by the DRM RAS core upon registration.
|
|
107
222
|
# @rbs return: ::Integer
|
|
223
|
+
# @return [Integer]
|
|
224
|
+
# @see AttributeSets::NodeAttrs::NodeId
|
|
108
225
|
def node_id; attributes[:"node_id"]&.value; end
|
|
109
|
-
#
|
|
110
|
-
#--
|
|
226
|
+
# Device name chosen by the driver at registration. Can be a PCI BDF, UUID, or module name if unique.
|
|
111
227
|
# @rbs return: ::String
|
|
228
|
+
# @return [String]
|
|
229
|
+
# @see AttributeSets::NodeAttrs::DeviceName
|
|
112
230
|
def device_name; attributes[:"device_name"]&.value; end
|
|
113
|
-
#
|
|
114
|
-
#--
|
|
231
|
+
# Node name chosen by the driver at registration. Can be an IP block name, or any name that identifies the RAS node inside the device.
|
|
115
232
|
# @rbs return: ::String
|
|
233
|
+
# @return [String]
|
|
234
|
+
# @see AttributeSets::NodeAttrs::NodeName
|
|
116
235
|
def node_name; attributes[:"node_name"]&.value; end
|
|
117
|
-
#
|
|
118
|
-
|
|
236
|
+
# Type of this node, identifying its function.
|
|
237
|
+
#
|
|
238
|
+
# Known enum values are defined in {Enums::NodeType}.
|
|
119
239
|
# @rbs return: ::Integer
|
|
240
|
+
# @return [Integer]
|
|
241
|
+
# @see AttributeSets::NodeAttrs::NodeType
|
|
120
242
|
def node_type; attributes[:"node_type"]&.value; end
|
|
121
243
|
end
|
|
122
244
|
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
123
|
-
|
|
245
|
+
#
|
|
246
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
247
|
+
class DoGetErrorCounterRequest < ::Nl::Genl::Message
|
|
124
248
|
TYPE = 2
|
|
125
249
|
FIXED_HEADER = nil
|
|
126
250
|
ATTRIBUTE_SET = AttributeSets::ErrorCounterAttrs
|
|
127
251
|
ATTRIBUTES = Ractor.make_shareable(%i[node_id error_id])
|
|
128
|
-
#
|
|
129
|
-
#--
|
|
252
|
+
# Node ID targeted by this error counter operation.
|
|
130
253
|
# @rbs return: ::Integer
|
|
254
|
+
# @return [Integer]
|
|
255
|
+
# @see AttributeSets::ErrorCounterAttrs::NodeId
|
|
131
256
|
def node_id; attributes[:"node_id"]&.value; end
|
|
132
|
-
#
|
|
133
|
-
#--
|
|
257
|
+
# Unique identifier for a specific error counter within an node.
|
|
134
258
|
# @rbs return: ::Integer
|
|
259
|
+
# @return [Integer]
|
|
260
|
+
# @see AttributeSets::ErrorCounterAttrs::ErrorId
|
|
135
261
|
def error_id; attributes[:"error_id"]&.value; end
|
|
136
262
|
end
|
|
137
263
|
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
138
|
-
|
|
264
|
+
#
|
|
265
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
266
|
+
class DoGetErrorCounterReply < ::Nl::Genl::Message
|
|
139
267
|
TYPE = 2
|
|
140
268
|
FIXED_HEADER = nil
|
|
141
269
|
ATTRIBUTE_SET = AttributeSets::ErrorCounterAttrs
|
|
142
270
|
ATTRIBUTES = Ractor.make_shareable(%i[error_id error_name error_value])
|
|
143
|
-
#
|
|
144
|
-
#--
|
|
271
|
+
# Unique identifier for a specific error counter within an node.
|
|
145
272
|
# @rbs return: ::Integer
|
|
273
|
+
# @return [Integer]
|
|
274
|
+
# @see AttributeSets::ErrorCounterAttrs::ErrorId
|
|
146
275
|
def error_id; attributes[:"error_id"]&.value; end
|
|
147
|
-
#
|
|
148
|
-
#--
|
|
276
|
+
# Name of the error.
|
|
149
277
|
# @rbs return: ::String
|
|
278
|
+
# @return [String]
|
|
279
|
+
# @see AttributeSets::ErrorCounterAttrs::ErrorName
|
|
150
280
|
def error_name; attributes[:"error_name"]&.value; end
|
|
151
|
-
#
|
|
152
|
-
#--
|
|
281
|
+
# Current value of the requested error counter.
|
|
153
282
|
# @rbs return: ::Integer
|
|
283
|
+
# @return [Integer]
|
|
284
|
+
# @see AttributeSets::ErrorCounterAttrs::ErrorValue
|
|
154
285
|
def error_value; attributes[:"error_value"]&.value; end
|
|
155
286
|
end
|
|
156
287
|
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
157
|
-
|
|
288
|
+
#
|
|
289
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
290
|
+
class DumpGetErrorCounterRequest < ::Nl::Genl::Message
|
|
158
291
|
TYPE = 2
|
|
159
292
|
FIXED_HEADER = nil
|
|
160
293
|
ATTRIBUTE_SET = AttributeSets::ErrorCounterAttrs
|
|
161
294
|
ATTRIBUTES = Ractor.make_shareable(%i[node_id])
|
|
162
|
-
#
|
|
163
|
-
#--
|
|
295
|
+
# Node ID targeted by this error counter operation.
|
|
164
296
|
# @rbs return: ::Integer
|
|
297
|
+
# @return [Integer]
|
|
298
|
+
# @see AttributeSets::ErrorCounterAttrs::NodeId
|
|
165
299
|
def node_id; attributes[:"node_id"]&.value; end
|
|
166
300
|
end
|
|
167
301
|
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
168
|
-
|
|
302
|
+
#
|
|
303
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
304
|
+
class DumpGetErrorCounterReply < ::Nl::Genl::Message
|
|
169
305
|
TYPE = 2
|
|
170
306
|
FIXED_HEADER = nil
|
|
171
307
|
ATTRIBUTE_SET = AttributeSets::ErrorCounterAttrs
|
|
172
308
|
ATTRIBUTES = Ractor.make_shareable(%i[error_id error_name error_value])
|
|
173
|
-
#
|
|
174
|
-
#--
|
|
309
|
+
# Unique identifier for a specific error counter within an node.
|
|
175
310
|
# @rbs return: ::Integer
|
|
311
|
+
# @return [Integer]
|
|
312
|
+
# @see AttributeSets::ErrorCounterAttrs::ErrorId
|
|
176
313
|
def error_id; attributes[:"error_id"]&.value; end
|
|
177
|
-
#
|
|
178
|
-
#--
|
|
314
|
+
# Name of the error.
|
|
179
315
|
# @rbs return: ::String
|
|
316
|
+
# @return [String]
|
|
317
|
+
# @see AttributeSets::ErrorCounterAttrs::ErrorName
|
|
180
318
|
def error_name; attributes[:"error_name"]&.value; end
|
|
181
|
-
#
|
|
182
|
-
#--
|
|
319
|
+
# Current value of the requested error counter.
|
|
183
320
|
# @rbs return: ::Integer
|
|
321
|
+
# @return [Integer]
|
|
322
|
+
# @see AttributeSets::ErrorCounterAttrs::ErrorValue
|
|
184
323
|
def error_value; attributes[:"error_value"]&.value; end
|
|
185
324
|
end
|
|
186
325
|
# Clear error counter for a given node. The request includes the error-id and node-id of the counter to be cleared.
|
|
187
|
-
|
|
326
|
+
#
|
|
327
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
328
|
+
class DoClearErrorCounterRequest < ::Nl::Genl::Message
|
|
188
329
|
TYPE = 3
|
|
189
330
|
FIXED_HEADER = nil
|
|
190
331
|
ATTRIBUTE_SET = AttributeSets::ErrorCounterAttrs
|
|
191
332
|
ATTRIBUTES = Ractor.make_shareable(%i[node_id error_id])
|
|
192
|
-
#
|
|
193
|
-
#--
|
|
333
|
+
# Node ID targeted by this error counter operation.
|
|
194
334
|
# @rbs return: ::Integer
|
|
335
|
+
# @return [Integer]
|
|
336
|
+
# @see AttributeSets::ErrorCounterAttrs::NodeId
|
|
195
337
|
def node_id; attributes[:"node_id"]&.value; end
|
|
196
|
-
#
|
|
197
|
-
#--
|
|
338
|
+
# Unique identifier for a specific error counter within an node.
|
|
198
339
|
# @rbs return: ::Integer
|
|
340
|
+
# @return [Integer]
|
|
341
|
+
# @see AttributeSets::ErrorCounterAttrs::ErrorId
|
|
199
342
|
def error_id; attributes[:"error_id"]&.value; end
|
|
200
343
|
end
|
|
201
344
|
end
|
|
345
|
+
module Notifications
|
|
346
|
+
end
|
|
347
|
+
# @private
|
|
348
|
+
NOTIFICATIONS = Ractor.make_shareable({}) #: Hash[::Integer, ::Class]
|
|
349
|
+
# Retrieve the full list of currently registered DRM RAS nodes. Each node includes its dynamically assigned ID, name, and type. **Important:** User space must call this operation first to obtain the node IDs. These IDs are required for all subsequent operations on nodes, such as querying error counters.
|
|
350
|
+
#
|
|
351
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
352
|
+
# @rbs () -> Array[Messages::DumpListNodesReply]
|
|
353
|
+
# | () { (Messages::DumpListNodesReply) -> void } -> void
|
|
354
|
+
# @overload dump_list_nodes(**args)
|
|
355
|
+
# Returns an array when no block is given.
|
|
356
|
+
# @param [Hash] args
|
|
357
|
+
# @return [Array<Messages::DumpListNodesReply>]
|
|
358
|
+
# @overload dump_list_nodes(**args, &block)
|
|
359
|
+
# Yields each reply when a block is given.
|
|
360
|
+
# @param [Hash] args
|
|
361
|
+
# @yieldparam [Messages::DumpListNodesReply] reply
|
|
362
|
+
# @return [void]
|
|
363
|
+
# @see Messages::DumpListNodesRequest
|
|
364
|
+
def dump_list_nodes(**args, &block)
|
|
365
|
+
exchange_message(:"dump", Messages::DumpListNodesRequest, Messages::DumpListNodesReply, args, &block)
|
|
366
|
+
end
|
|
202
367
|
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
203
|
-
|
|
368
|
+
#
|
|
369
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
204
370
|
# @rbs (?node_id: ::Integer, ?error_id: ::Integer) -> Messages::DoGetErrorCounterReply
|
|
371
|
+
# @param [Hash] args
|
|
372
|
+
# @option args [Integer] node_id Node ID targeted by this error counter operation.
|
|
373
|
+
# @option args [Integer] error_id Unique identifier for a specific error counter within an node.
|
|
374
|
+
# @return [Messages::DoGetErrorCounterReply]
|
|
375
|
+
# @see Messages::DoGetErrorCounterRequest
|
|
205
376
|
def do_get_error_counter(**args)
|
|
206
377
|
exchange_message(:"do", Messages::DoGetErrorCounterRequest, Messages::DoGetErrorCounterReply, args)
|
|
207
378
|
end
|
|
208
379
|
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
209
|
-
|
|
210
|
-
#
|
|
380
|
+
#
|
|
381
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
382
|
+
# @rbs (?node_id: ::Integer) -> Array[Messages::DumpGetErrorCounterReply]
|
|
211
383
|
# | (?node_id: ::Integer) { (Messages::DumpGetErrorCounterReply) -> void } -> void
|
|
384
|
+
# @overload dump_get_error_counter(**args)
|
|
385
|
+
# Returns an array when no block is given.
|
|
386
|
+
# @param [Hash] args
|
|
387
|
+
# @option args [Integer] node_id Node ID targeted by this error counter operation.
|
|
388
|
+
# @return [Array<Messages::DumpGetErrorCounterReply>]
|
|
389
|
+
# @overload dump_get_error_counter(**args, &block)
|
|
390
|
+
# Yields each reply when a block is given.
|
|
391
|
+
# @param [Hash] args
|
|
392
|
+
# @option args [Integer] node_id Node ID targeted by this error counter operation.
|
|
393
|
+
# @yieldparam [Messages::DumpGetErrorCounterReply] reply
|
|
394
|
+
# @return [void]
|
|
395
|
+
# @see Messages::DumpGetErrorCounterRequest
|
|
212
396
|
def dump_get_error_counter(**args, &block)
|
|
213
397
|
exchange_message(:"dump", Messages::DumpGetErrorCounterRequest, Messages::DumpGetErrorCounterReply, args, &block)
|
|
214
398
|
end
|
|
215
399
|
# Clear error counter for a given node. The request includes the error-id and node-id of the counter to be cleared.
|
|
216
|
-
|
|
400
|
+
#
|
|
401
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
217
402
|
# @rbs (?node_id: ::Integer, ?error_id: ::Integer) -> void
|
|
403
|
+
# @param [Hash] args
|
|
404
|
+
# @option args [Integer] node_id Node ID targeted by this error counter operation.
|
|
405
|
+
# @option args [Integer] error_id Unique identifier for a specific error counter within an node.
|
|
406
|
+
# @return [void]
|
|
407
|
+
# @see Messages::DoClearErrorCounterRequest
|
|
218
408
|
def do_clear_error_counter(**args)
|
|
219
409
|
exchange_message(:"do", Messages::DoClearErrorCounterRequest, nil, args)
|
|
220
410
|
end
|
|
411
|
+
class AsyncOperations
|
|
412
|
+
# @private
|
|
413
|
+
def initialize(&exchange)
|
|
414
|
+
@exchange = exchange
|
|
415
|
+
end
|
|
416
|
+
# Retrieve the full list of currently registered DRM RAS nodes. Each node includes its dynamically assigned ID, name, and type. **Important:** User space must call this operation first to obtain the node IDs. These IDs are required for all subsequent operations on nodes, such as querying error counters.
|
|
417
|
+
#
|
|
418
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
419
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpListNodesReply]
|
|
420
|
+
# @param [Hash] args
|
|
421
|
+
# @return [Nl::Async::Stream<Messages::DumpListNodesReply>]
|
|
422
|
+
# @see Messages::DumpListNodesRequest
|
|
423
|
+
def dump_list_nodes(**args)
|
|
424
|
+
@exchange.call(:"dump", Messages::DumpListNodesRequest, Messages::DumpListNodesReply, args)
|
|
425
|
+
end
|
|
426
|
+
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
427
|
+
#
|
|
428
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
429
|
+
# @rbs (?node_id: ::Integer, ?error_id: ::Integer) -> ::Nl::Async::Future[Messages::DoGetErrorCounterReply]
|
|
430
|
+
# @param [Hash] args
|
|
431
|
+
# @option args [Integer] node_id Node ID targeted by this error counter operation.
|
|
432
|
+
# @option args [Integer] error_id Unique identifier for a specific error counter within an node.
|
|
433
|
+
# @return [Nl::Async::Future<Messages::DoGetErrorCounterReply>]
|
|
434
|
+
# @see Messages::DoGetErrorCounterRequest
|
|
435
|
+
def do_get_error_counter(**args)
|
|
436
|
+
@exchange.call(:"do", Messages::DoGetErrorCounterRequest, Messages::DoGetErrorCounterReply, args)
|
|
437
|
+
end
|
|
438
|
+
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
439
|
+
#
|
|
440
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
441
|
+
# @rbs (?node_id: ::Integer) -> ::Nl::Async::Stream[Messages::DumpGetErrorCounterReply]
|
|
442
|
+
# @param [Hash] args
|
|
443
|
+
# @option args [Integer] node_id Node ID targeted by this error counter operation.
|
|
444
|
+
# @return [Nl::Async::Stream<Messages::DumpGetErrorCounterReply>]
|
|
445
|
+
# @see Messages::DumpGetErrorCounterRequest
|
|
446
|
+
def dump_get_error_counter(**args)
|
|
447
|
+
@exchange.call(:"dump", Messages::DumpGetErrorCounterRequest, Messages::DumpGetErrorCounterReply, args)
|
|
448
|
+
end
|
|
449
|
+
# Clear error counter for a given node. The request includes the error-id and node-id of the counter to be cleared.
|
|
450
|
+
#
|
|
451
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
452
|
+
# @rbs (?node_id: ::Integer, ?error_id: ::Integer) -> ::Nl::Async::Future[void]
|
|
453
|
+
# @param [Hash] args
|
|
454
|
+
# @option args [Integer] node_id Node ID targeted by this error counter operation.
|
|
455
|
+
# @option args [Integer] error_id Unique identifier for a specific error counter within an node.
|
|
456
|
+
# @return [Nl::Async::Future<void>]
|
|
457
|
+
# @see Messages::DoClearErrorCounterRequest
|
|
458
|
+
def do_clear_error_counter(**args)
|
|
459
|
+
@exchange.call(:"do", Messages::DoClearErrorCounterRequest, nil, args)
|
|
460
|
+
end
|
|
461
|
+
end
|
|
462
|
+
# Returns the asynchronous operation facade for this family.
|
|
463
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
464
|
+
# @param [::Integer, nil] stream_capacity
|
|
465
|
+
# @return [AsyncOperations]
|
|
466
|
+
def async(stream_capacity: nil)
|
|
467
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
468
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
469
|
+
end
|
|
221
470
|
end
|
|
222
471
|
end; end
|