nl-linux 0.4.2 → 0.5.0
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/CHANGELOG.md +5 -0
- data/NLSPEC_VERSION +1 -1
- data/generated/nl/linux/binder.rb +103 -187
- data/generated/nl/linux/conntrack.rb +1053 -1649
- data/generated/nl/linux/dev_energymodel.rb +303 -265
- data/generated/nl/linux/devlink.rb +4904 -5576
- data/generated/nl/linux/dpll.rb +1097 -1467
- data/generated/nl/linux/drm_ras.rb +235 -195
- data/generated/nl/linux/ethtool.rb +6652 -7415
- data/generated/nl/linux/fou.rb +234 -255
- data/generated/nl/linux/handshake.rb +208 -280
- data/generated/nl/linux/lockd.rb +99 -73
- data/generated/nl/linux/mptcp_pm.rb +589 -687
- data/generated/nl/linux/net_shaper.rb +520 -615
- data/generated/nl/linux/netdev.rb +1640 -1987
- data/generated/nl/linux/nfsd.rb +1341 -1215
- data/generated/nl/linux/nftables.rb +5143 -4870
- data/generated/nl/linux/nl80211.rb +2542 -6316
- data/generated/nl/linux/nlctrl.rb +338 -483
- data/generated/nl/linux/ovpn.rb +1006 -1522
- data/generated/nl/linux/ovs_datapath.rb +291 -186
- data/generated/nl/linux/ovs_flow.rb +1393 -2065
- data/generated/nl/linux/ovs_packet.rb +186 -223
- data/generated/nl/linux/ovs_vport.rb +328 -285
- data/generated/nl/linux/psp.rb +812 -717
- data/generated/nl/linux/rt_addr.rb +513 -243
- data/generated/nl/linux/rt_link.rb +4504 -7238
- data/generated/nl/linux/rt_neigh.rb +935 -847
- data/generated/nl/linux/rt_route.rb +1198 -871
- data/generated/nl/linux/rt_rule.rb +680 -659
- data/generated/nl/linux/sunrpc_cache.rb +323 -321
- data/generated/nl/linux/tc.rb +9058 -10454
- data/generated/nl/linux/tcp_metrics.rb +258 -367
- data/generated/nl/linux/team.rb +327 -345
- data/generated/nl/linux/wireguard.rb +270 -434
- data/lib/nl/linux/nlctrl_resolver.rb +1 -1
- data/lib/nl/linux/version.rb +1 -1
- data/linux/conntrack.yaml +18 -3
- data/linux/devlink.yaml +26 -4
- data/linux/dpll.yaml +19 -0
- data/linux/netdev.yaml +21 -0
- data/linux/nfsd.yaml +111 -0
- data/linux/nl80211.yaml +2 -2
- data/linux/rt-addr.yaml +4 -0
- data/linux/rt-link.yaml +7 -0
- data/linux/rt-neigh.yaml +3 -0
- data/linux/rt-route.yaml +83 -2
- data/sig/generated/nl/linux/binder.rbs +77 -220
- data/sig/generated/nl/linux/conntrack.rbs +770 -1954
- data/sig/generated/nl/linux/dev_energymodel.rbs +207 -291
- data/sig/generated/nl/linux/devlink.rbs +3318 -6068
- data/sig/generated/nl/linux/dpll.rbs +791 -1589
- data/sig/generated/nl/linux/drm_ras.rbs +160 -208
- data/sig/generated/nl/linux/ethtool.rbs +4205 -7581
- data/sig/generated/nl/linux/fou.rbs +139 -254
- data/sig/generated/nl/linux/handshake.rbs +144 -319
- data/sig/generated/nl/linux/lockd.rbs +64 -74
- data/sig/generated/nl/linux/mptcp_pm.rbs +426 -835
- data/sig/generated/nl/linux/net_shaper.rbs +351 -644
- data/sig/generated/nl/linux/netdev.rbs +1151 -2146
- data/sig/generated/nl/linux/nfsd.rbs +1047 -1409
- data/sig/generated/nl/linux/nftables.rbs +2907 -5030
- data/sig/generated/nl/linux/nl80211.rbs +1807 -7964
- data/sig/generated/nl/linux/nlctrl.rbs +220 -544
- data/sig/generated/nl/linux/ovpn.rbs +835 -1859
- data/sig/generated/nl/linux/ovs_datapath.rbs +141 -181
- data/sig/generated/nl/linux/ovs_flow.rbs +817 -2332
- data/sig/generated/nl/linux/ovs_packet.rbs +110 -237
- data/sig/generated/nl/linux/ovs_vport.rbs +174 -294
- data/sig/generated/nl/linux/psp.rbs +550 -741
- data/sig/generated/nl/linux/rt_addr.rbs +188 -226
- data/sig/generated/nl/linux/rt_link.rbs +2687 -8370
- data/sig/generated/nl/linux/rt_neigh.rbs +471 -1005
- data/sig/generated/nl/linux/rt_route.rbs +632 -862
- data/sig/generated/nl/linux/rt_rule.rbs +217 -639
- data/sig/generated/nl/linux/sunrpc_cache.rbs +233 -369
- data/sig/generated/nl/linux/tc.rbs +6199 -13391
- data/sig/generated/nl/linux/tcp_metrics.rbs +179 -421
- data/sig/generated/nl/linux/team.rbs +232 -391
- data/sig/generated/nl/linux/wireguard.rbs +197 -502
- metadata +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
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/drm_ras.yaml from Linux v7.
|
|
3
|
+
# This file is based on Documentation/netlink/specs/drm_ras.yaml from Linux v7.3.
|
|
4
4
|
#--
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
@@ -27,7 +27,7 @@ class DrmRas < ::Nl::Genl::Family
|
|
|
27
27
|
super
|
|
28
28
|
end
|
|
29
29
|
# @private
|
|
30
|
-
MCAST_GROUPS =
|
|
30
|
+
MCAST_GROUPS = {}.freeze #: Hash[::Symbol, ::Nl::McastGroup]
|
|
31
31
|
module Enums
|
|
32
32
|
# Type of the node. Currently, only error-counter nodes are supported, which expose reliability counters for a hardware/software component.
|
|
33
33
|
module NodeType
|
|
@@ -38,165 +38,87 @@ class DrmRas < ::Nl::Genl::Family
|
|
|
38
38
|
end
|
|
39
39
|
module AttributeSets
|
|
40
40
|
class NodeAttrs < ::Nl::AttributeSet
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
module Definitions
|
|
42
|
+
# Unique identifier for the node. Assigned dynamically by the DRM RAS core upon registration.
|
|
43
|
+
# @rbs return: ::Integer
|
|
44
|
+
# @return [Integer]
|
|
45
|
+
def node_id; self[:"node_id"]; end
|
|
46
|
+
# Device name chosen by the driver at registration. Can be a PCI BDF, UUID, or module name if unique.
|
|
47
|
+
# @rbs return: ::String
|
|
48
|
+
# @return [String]
|
|
49
|
+
def device_name; self[:"device_name"]; end
|
|
50
|
+
# 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.
|
|
51
|
+
# @rbs return: ::String
|
|
52
|
+
# @return [String]
|
|
53
|
+
def node_name; self[:"node_name"]; end
|
|
54
|
+
# Type of this node, identifying its function.
|
|
55
|
+
#
|
|
56
|
+
# Known enum values are defined in {Enums::NodeType}.
|
|
57
|
+
# @rbs return: ::Integer
|
|
58
|
+
# @return [Integer]
|
|
59
|
+
def node_type; self[:"node_type"]; end
|
|
43
60
|
end
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
ORDER = 0
|
|
50
|
-
# @private
|
|
51
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
52
|
-
end
|
|
53
|
-
# Device name chosen by the driver at registration. Can be a PCI BDF, UUID, or module name if unique.
|
|
54
|
-
class DeviceName < Attribute
|
|
55
|
-
TYPE = 2
|
|
56
|
-
NAME = :"device_name"
|
|
57
|
-
# @private
|
|
58
|
-
ORDER = 1
|
|
59
|
-
# @private
|
|
60
|
-
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
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.
|
|
63
|
-
class NodeName < Attribute
|
|
64
|
-
TYPE = 3
|
|
65
|
-
NAME = :"node_name"
|
|
66
|
-
# @private
|
|
67
|
-
ORDER = 2
|
|
68
|
-
# @private
|
|
69
|
-
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
70
|
-
end
|
|
71
|
-
# Type of this node, identifying its function.
|
|
72
|
-
#
|
|
73
|
-
# Known enum values are defined in {Enums::NodeType}.
|
|
74
|
-
class NodeType < Attribute
|
|
75
|
-
TYPE = 4
|
|
76
|
-
NAME = :"node_type"
|
|
77
|
-
# @private
|
|
78
|
-
ORDER = 3
|
|
79
|
-
# @private
|
|
80
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
81
|
-
end
|
|
82
|
-
# @private
|
|
83
|
-
BY_NAME = Ractor.make_shareable({:"node_id" => NodeId, :"device_name" => DeviceName, :"node_name" => NodeName, :"node_type" => NodeType}) #: Hash[::Symbol, Attribute]
|
|
84
|
-
# @private
|
|
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
|
|
108
|
-
class << self
|
|
109
|
-
# Looks up Attribute class by name.
|
|
110
|
-
# @rbs name: Symbol
|
|
111
|
-
# @rbs return: Attribute
|
|
112
|
-
# @param [Symbol] name
|
|
113
|
-
# @return [Attribute]
|
|
114
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
115
|
-
# Looks up Attribute class by type value.
|
|
116
|
-
# @rbs type: Integer
|
|
117
|
-
# @rbs return: Attribute
|
|
118
|
-
# @param [Integer] type
|
|
119
|
-
# @return [Attribute]
|
|
120
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
61
|
+
include Definitions
|
|
62
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
63
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
64
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
65
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
121
66
|
end
|
|
122
67
|
end
|
|
123
68
|
class ErrorCounterAttrs < ::Nl::AttributeSet
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
# @
|
|
132
|
-
|
|
133
|
-
#
|
|
134
|
-
|
|
69
|
+
module Definitions
|
|
70
|
+
# Node ID targeted by this error counter operation.
|
|
71
|
+
# @rbs return: ::Integer
|
|
72
|
+
# @return [Integer]
|
|
73
|
+
def node_id; self[:"node_id"]; end
|
|
74
|
+
# Unique identifier for a specific error counter within an node.
|
|
75
|
+
# @rbs return: ::Integer
|
|
76
|
+
# @return [Integer]
|
|
77
|
+
def error_id; self[:"error_id"]; end
|
|
78
|
+
# Name of the error.
|
|
79
|
+
# @rbs return: ::String
|
|
80
|
+
# @return [String]
|
|
81
|
+
def error_name; self[:"error_name"]; end
|
|
82
|
+
# Current value of the requested error counter.
|
|
83
|
+
# @rbs return: ::Integer
|
|
84
|
+
# @return [Integer]
|
|
85
|
+
def error_value; self[:"error_value"]; end
|
|
135
86
|
end
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
ORDER = 1
|
|
142
|
-
# @private
|
|
143
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
87
|
+
include Definitions
|
|
88
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
89
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
90
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
91
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
144
92
|
end
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
module AttributeSets
|
|
96
|
+
class NodeAttrs
|
|
97
|
+
module Definitions
|
|
149
98
|
# @private
|
|
150
|
-
|
|
99
|
+
BY_TYPE = ::Array.new(5).tap do |definitions|
|
|
100
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"node_id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
101
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"device_name", datatype: ::Nl::DataTypes::String.new, multi: false, order: 1, selector_slot: nil)
|
|
102
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"node_name", datatype: ::Nl::DataTypes::String.new, multi: false, order: 2, selector_slot: nil)
|
|
103
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"node_type", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 3, selector_slot: nil)
|
|
104
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
105
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
151
106
|
# @private
|
|
152
|
-
|
|
107
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
153
108
|
end
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
NAME = :"error_value"
|
|
109
|
+
end
|
|
110
|
+
class ErrorCounterAttrs
|
|
111
|
+
module Definitions
|
|
158
112
|
# @private
|
|
159
|
-
|
|
113
|
+
BY_TYPE = ::Array.new(5).tap do |definitions|
|
|
114
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"node_id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
115
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"error_id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
116
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"error_name", datatype: ::Nl::DataTypes::String.new, multi: false, order: 2, selector_slot: nil)
|
|
117
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"error_value", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 3, selector_slot: nil)
|
|
118
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
119
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
160
120
|
# @private
|
|
161
|
-
|
|
162
|
-
end
|
|
163
|
-
# @private
|
|
164
|
-
BY_NAME = Ractor.make_shareable({:"node_id" => NodeId, :"error_id" => ErrorId, :"error_name" => ErrorName, :"error_value" => ErrorValue}) #: Hash[::Symbol, Attribute]
|
|
165
|
-
# @private
|
|
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
|
|
187
|
-
class << self
|
|
188
|
-
# Looks up Attribute class by name.
|
|
189
|
-
# @rbs name: Symbol
|
|
190
|
-
# @rbs return: Attribute
|
|
191
|
-
# @param [Symbol] name
|
|
192
|
-
# @return [Attribute]
|
|
193
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
194
|
-
# Looks up Attribute class by type value.
|
|
195
|
-
# @rbs type: Integer
|
|
196
|
-
# @rbs return: Attribute
|
|
197
|
-
# @param [Integer] type
|
|
198
|
-
# @return [Attribute]
|
|
199
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
121
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
200
122
|
end
|
|
201
123
|
end
|
|
202
124
|
end
|
|
@@ -204,148 +126,266 @@ class DrmRas < ::Nl::Genl::Family
|
|
|
204
126
|
# 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.
|
|
205
127
|
#
|
|
206
128
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
207
|
-
class DumpListNodesRequest < ::Nl::
|
|
129
|
+
class DumpListNodesRequest < ::Nl::Message
|
|
208
130
|
TYPE = 1
|
|
209
131
|
FIXED_HEADER = nil
|
|
210
132
|
ATTRIBUTE_SET = AttributeSets::NodeAttrs
|
|
211
|
-
ATTRIBUTES =
|
|
133
|
+
ATTRIBUTES = %i[].freeze
|
|
134
|
+
include ATTRIBUTE_SET::Definitions
|
|
135
|
+
def initialize(attributes = [])
|
|
136
|
+
@attributes = attributes
|
|
137
|
+
end
|
|
138
|
+
# @private
|
|
139
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
140
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
141
|
+
new(
|
|
142
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
143
|
+
)
|
|
144
|
+
end
|
|
145
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
146
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
147
|
+
def self.decode(decoder)
|
|
148
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
149
|
+
end
|
|
150
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
151
|
+
encode_attributes(encoder, external_selectors:)
|
|
152
|
+
end
|
|
212
153
|
end
|
|
213
154
|
# 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
155
|
#
|
|
215
156
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
216
|
-
class DumpListNodesReply < ::Nl::
|
|
157
|
+
class DumpListNodesReply < ::Nl::Message
|
|
217
158
|
TYPE = 1
|
|
218
159
|
FIXED_HEADER = nil
|
|
219
160
|
ATTRIBUTE_SET = AttributeSets::NodeAttrs
|
|
220
|
-
ATTRIBUTES =
|
|
161
|
+
ATTRIBUTES = %i[node_id device_name node_name node_type].freeze
|
|
162
|
+
include ATTRIBUTE_SET::Definitions
|
|
163
|
+
def initialize(attributes = [])
|
|
164
|
+
@attributes = attributes
|
|
165
|
+
end
|
|
166
|
+
# @private
|
|
167
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
168
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
169
|
+
new(
|
|
170
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
174
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
175
|
+
def self.decode(decoder)
|
|
176
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
177
|
+
end
|
|
178
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
179
|
+
encode_attributes(encoder, external_selectors:)
|
|
180
|
+
end
|
|
221
181
|
# Unique identifier for the node. Assigned dynamically by the DRM RAS core upon registration.
|
|
222
182
|
# @rbs return: ::Integer
|
|
223
183
|
# @return [Integer]
|
|
224
|
-
|
|
225
|
-
def node_id; attributes[:"node_id"]&.value; end
|
|
184
|
+
def node_id; self[:"node_id"]; end
|
|
226
185
|
# Device name chosen by the driver at registration. Can be a PCI BDF, UUID, or module name if unique.
|
|
227
186
|
# @rbs return: ::String
|
|
228
187
|
# @return [String]
|
|
229
|
-
|
|
230
|
-
def device_name; attributes[:"device_name"]&.value; end
|
|
188
|
+
def device_name; self[:"device_name"]; end
|
|
231
189
|
# 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.
|
|
232
190
|
# @rbs return: ::String
|
|
233
191
|
# @return [String]
|
|
234
|
-
|
|
235
|
-
def node_name; attributes[:"node_name"]&.value; end
|
|
192
|
+
def node_name; self[:"node_name"]; end
|
|
236
193
|
# Type of this node, identifying its function.
|
|
237
194
|
#
|
|
238
195
|
# Known enum values are defined in {Enums::NodeType}.
|
|
239
196
|
# @rbs return: ::Integer
|
|
240
197
|
# @return [Integer]
|
|
241
|
-
|
|
242
|
-
def node_type; attributes[:"node_type"]&.value; end
|
|
198
|
+
def node_type; self[:"node_type"]; end
|
|
243
199
|
end
|
|
244
200
|
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
245
201
|
#
|
|
246
202
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
247
|
-
class DoGetErrorCounterRequest < ::Nl::
|
|
203
|
+
class DoGetErrorCounterRequest < ::Nl::Message
|
|
248
204
|
TYPE = 2
|
|
249
205
|
FIXED_HEADER = nil
|
|
250
206
|
ATTRIBUTE_SET = AttributeSets::ErrorCounterAttrs
|
|
251
|
-
ATTRIBUTES =
|
|
207
|
+
ATTRIBUTES = %i[node_id error_id].freeze
|
|
208
|
+
include ATTRIBUTE_SET::Definitions
|
|
209
|
+
def initialize(attributes = [])
|
|
210
|
+
@attributes = attributes
|
|
211
|
+
end
|
|
212
|
+
# @private
|
|
213
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
214
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
215
|
+
new(
|
|
216
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
217
|
+
)
|
|
218
|
+
end
|
|
219
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
220
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
221
|
+
def self.decode(decoder)
|
|
222
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
223
|
+
end
|
|
224
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
225
|
+
encode_attributes(encoder, external_selectors:)
|
|
226
|
+
end
|
|
252
227
|
# Node ID targeted by this error counter operation.
|
|
253
228
|
# @rbs return: ::Integer
|
|
254
229
|
# @return [Integer]
|
|
255
|
-
|
|
256
|
-
def node_id; attributes[:"node_id"]&.value; end
|
|
230
|
+
def node_id; self[:"node_id"]; end
|
|
257
231
|
# Unique identifier for a specific error counter within an node.
|
|
258
232
|
# @rbs return: ::Integer
|
|
259
233
|
# @return [Integer]
|
|
260
|
-
|
|
261
|
-
def error_id; attributes[:"error_id"]&.value; end
|
|
234
|
+
def error_id; self[:"error_id"]; end
|
|
262
235
|
end
|
|
263
236
|
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
264
237
|
#
|
|
265
238
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
266
|
-
class DoGetErrorCounterReply < ::Nl::
|
|
239
|
+
class DoGetErrorCounterReply < ::Nl::Message
|
|
267
240
|
TYPE = 2
|
|
268
241
|
FIXED_HEADER = nil
|
|
269
242
|
ATTRIBUTE_SET = AttributeSets::ErrorCounterAttrs
|
|
270
|
-
ATTRIBUTES =
|
|
243
|
+
ATTRIBUTES = %i[error_id error_name error_value].freeze
|
|
244
|
+
include ATTRIBUTE_SET::Definitions
|
|
245
|
+
def initialize(attributes = [])
|
|
246
|
+
@attributes = attributes
|
|
247
|
+
end
|
|
248
|
+
# @private
|
|
249
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
250
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
251
|
+
new(
|
|
252
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
253
|
+
)
|
|
254
|
+
end
|
|
255
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
256
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
257
|
+
def self.decode(decoder)
|
|
258
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
259
|
+
end
|
|
260
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
261
|
+
encode_attributes(encoder, external_selectors:)
|
|
262
|
+
end
|
|
271
263
|
# Unique identifier for a specific error counter within an node.
|
|
272
264
|
# @rbs return: ::Integer
|
|
273
265
|
# @return [Integer]
|
|
274
|
-
|
|
275
|
-
def error_id; attributes[:"error_id"]&.value; end
|
|
266
|
+
def error_id; self[:"error_id"]; end
|
|
276
267
|
# Name of the error.
|
|
277
268
|
# @rbs return: ::String
|
|
278
269
|
# @return [String]
|
|
279
|
-
|
|
280
|
-
def error_name; attributes[:"error_name"]&.value; end
|
|
270
|
+
def error_name; self[:"error_name"]; end
|
|
281
271
|
# Current value of the requested error counter.
|
|
282
272
|
# @rbs return: ::Integer
|
|
283
273
|
# @return [Integer]
|
|
284
|
-
|
|
285
|
-
def error_value; attributes[:"error_value"]&.value; end
|
|
274
|
+
def error_value; self[:"error_value"]; end
|
|
286
275
|
end
|
|
287
276
|
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
288
277
|
#
|
|
289
278
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
290
|
-
class DumpGetErrorCounterRequest < ::Nl::
|
|
279
|
+
class DumpGetErrorCounterRequest < ::Nl::Message
|
|
291
280
|
TYPE = 2
|
|
292
281
|
FIXED_HEADER = nil
|
|
293
282
|
ATTRIBUTE_SET = AttributeSets::ErrorCounterAttrs
|
|
294
|
-
ATTRIBUTES =
|
|
283
|
+
ATTRIBUTES = %i[node_id].freeze
|
|
284
|
+
include ATTRIBUTE_SET::Definitions
|
|
285
|
+
def initialize(attributes = [])
|
|
286
|
+
@attributes = attributes
|
|
287
|
+
end
|
|
288
|
+
# @private
|
|
289
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
290
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
291
|
+
new(
|
|
292
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
293
|
+
)
|
|
294
|
+
end
|
|
295
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
296
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
297
|
+
def self.decode(decoder)
|
|
298
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
299
|
+
end
|
|
300
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
301
|
+
encode_attributes(encoder, external_selectors:)
|
|
302
|
+
end
|
|
295
303
|
# Node ID targeted by this error counter operation.
|
|
296
304
|
# @rbs return: ::Integer
|
|
297
305
|
# @return [Integer]
|
|
298
|
-
|
|
299
|
-
def node_id; attributes[:"node_id"]&.value; end
|
|
306
|
+
def node_id; self[:"node_id"]; end
|
|
300
307
|
end
|
|
301
308
|
# Retrieve error counter for a given node. The response includes the id, the name, and even the current value of each counter.
|
|
302
309
|
#
|
|
303
310
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
304
|
-
class DumpGetErrorCounterReply < ::Nl::
|
|
311
|
+
class DumpGetErrorCounterReply < ::Nl::Message
|
|
305
312
|
TYPE = 2
|
|
306
313
|
FIXED_HEADER = nil
|
|
307
314
|
ATTRIBUTE_SET = AttributeSets::ErrorCounterAttrs
|
|
308
|
-
ATTRIBUTES =
|
|
315
|
+
ATTRIBUTES = %i[error_id error_name error_value].freeze
|
|
316
|
+
include ATTRIBUTE_SET::Definitions
|
|
317
|
+
def initialize(attributes = [])
|
|
318
|
+
@attributes = attributes
|
|
319
|
+
end
|
|
320
|
+
# @private
|
|
321
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
322
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
323
|
+
new(
|
|
324
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
325
|
+
)
|
|
326
|
+
end
|
|
327
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
328
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
329
|
+
def self.decode(decoder)
|
|
330
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
331
|
+
end
|
|
332
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
333
|
+
encode_attributes(encoder, external_selectors:)
|
|
334
|
+
end
|
|
309
335
|
# Unique identifier for a specific error counter within an node.
|
|
310
336
|
# @rbs return: ::Integer
|
|
311
337
|
# @return [Integer]
|
|
312
|
-
|
|
313
|
-
def error_id; attributes[:"error_id"]&.value; end
|
|
338
|
+
def error_id; self[:"error_id"]; end
|
|
314
339
|
# Name of the error.
|
|
315
340
|
# @rbs return: ::String
|
|
316
341
|
# @return [String]
|
|
317
|
-
|
|
318
|
-
def error_name; attributes[:"error_name"]&.value; end
|
|
342
|
+
def error_name; self[:"error_name"]; end
|
|
319
343
|
# Current value of the requested error counter.
|
|
320
344
|
# @rbs return: ::Integer
|
|
321
345
|
# @return [Integer]
|
|
322
|
-
|
|
323
|
-
def error_value; attributes[:"error_value"]&.value; end
|
|
346
|
+
def error_value; self[:"error_value"]; end
|
|
324
347
|
end
|
|
325
348
|
# Clear error counter for a given node. The request includes the error-id and node-id of the counter to be cleared.
|
|
326
349
|
#
|
|
327
350
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
328
|
-
class DoClearErrorCounterRequest < ::Nl::
|
|
351
|
+
class DoClearErrorCounterRequest < ::Nl::Message
|
|
329
352
|
TYPE = 3
|
|
330
353
|
FIXED_HEADER = nil
|
|
331
354
|
ATTRIBUTE_SET = AttributeSets::ErrorCounterAttrs
|
|
332
|
-
ATTRIBUTES =
|
|
355
|
+
ATTRIBUTES = %i[node_id error_id].freeze
|
|
356
|
+
include ATTRIBUTE_SET::Definitions
|
|
357
|
+
def initialize(attributes = [])
|
|
358
|
+
@attributes = attributes
|
|
359
|
+
end
|
|
360
|
+
# @private
|
|
361
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
362
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
363
|
+
new(
|
|
364
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
365
|
+
)
|
|
366
|
+
end
|
|
367
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
368
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
369
|
+
def self.decode(decoder)
|
|
370
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
371
|
+
end
|
|
372
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
373
|
+
encode_attributes(encoder, external_selectors:)
|
|
374
|
+
end
|
|
333
375
|
# Node ID targeted by this error counter operation.
|
|
334
376
|
# @rbs return: ::Integer
|
|
335
377
|
# @return [Integer]
|
|
336
|
-
|
|
337
|
-
def node_id; attributes[:"node_id"]&.value; end
|
|
378
|
+
def node_id; self[:"node_id"]; end
|
|
338
379
|
# Unique identifier for a specific error counter within an node.
|
|
339
380
|
# @rbs return: ::Integer
|
|
340
381
|
# @return [Integer]
|
|
341
|
-
|
|
342
|
-
def error_id; attributes[:"error_id"]&.value; end
|
|
382
|
+
def error_id; self[:"error_id"]; end
|
|
343
383
|
end
|
|
344
384
|
end
|
|
345
385
|
module Notifications
|
|
346
386
|
end
|
|
347
387
|
# @private
|
|
348
|
-
NOTIFICATIONS =
|
|
388
|
+
NOTIFICATIONS = {}.freeze #: Hash[::Integer, ::Class]
|
|
349
389
|
# 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
390
|
#
|
|
351
391
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|