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/netdev.yaml from Linux v7.
|
|
3
|
+
# This file is based on Documentation/netlink/specs/netdev.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,10 @@ class Netdev < ::Nl::Genl::Family
|
|
|
27
27
|
super
|
|
28
28
|
end
|
|
29
29
|
# @private
|
|
30
|
-
MCAST_GROUPS =
|
|
30
|
+
MCAST_GROUPS = {:"mgmt" => ::Nl::McastGroup.new("mgmt", nil), :"page_pool" => ::Nl::McastGroup.new("page-pool", nil)}.freeze #: Hash[::Symbol, ::Nl::McastGroup]
|
|
31
|
+
module Constants
|
|
32
|
+
PAGE_SIZE = 0
|
|
33
|
+
end
|
|
31
34
|
module Enums
|
|
32
35
|
module QueueType
|
|
33
36
|
Rx = 0
|
|
@@ -83,1742 +86,992 @@ class Netdev < ::Nl::Genl::Family
|
|
|
83
86
|
end
|
|
84
87
|
module AttributeSets
|
|
85
88
|
class Dev < ::Nl::AttributeSet
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
#
|
|
94
|
-
|
|
95
|
-
# @
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
#
|
|
102
|
-
|
|
103
|
-
#
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
TYPE = 4
|
|
120
|
-
NAME = :"xdp_zc_max_segs"
|
|
121
|
-
# @private
|
|
122
|
-
ORDER = 3
|
|
123
|
-
# @private
|
|
124
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 })
|
|
125
|
-
end
|
|
126
|
-
# Bitmask of supported XDP receive metadata features. See {https://docs.kernel.org/networking/xdp-rx-metadata.html Documentation/networking/xdp-rx-metadata.rst} for more details.
|
|
127
|
-
#
|
|
128
|
-
# Known flags are defined in {Flags::XdpRxMetadata}.
|
|
129
|
-
class XdpRxMetadataFeatures < Attribute
|
|
130
|
-
TYPE = 5
|
|
131
|
-
NAME = :"xdp_rx_metadata_features"
|
|
132
|
-
# @private
|
|
133
|
-
ORDER = 4
|
|
134
|
-
# @private
|
|
135
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
136
|
-
end
|
|
137
|
-
# Bitmask of enabled AF_XDP features.
|
|
138
|
-
#
|
|
139
|
-
# Known flags are defined in {Flags::XskFlags}.
|
|
140
|
-
class XskFeatures < Attribute
|
|
141
|
-
TYPE = 6
|
|
142
|
-
NAME = :"xsk_features"
|
|
143
|
-
# @private
|
|
144
|
-
ORDER = 5
|
|
145
|
-
# @private
|
|
146
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U64, check: nil)
|
|
147
|
-
end
|
|
148
|
-
# @private
|
|
149
|
-
BY_NAME = Ractor.make_shareable({:"ifindex" => Ifindex, :"pad" => Pad, :"xdp_features" => XdpFeatures, :"xdp_zc_max_segs" => XdpZcMaxSegs, :"xdp_rx_metadata_features" => XdpRxMetadataFeatures, :"xsk_features" => XskFeatures}) #: Hash[::Symbol, Attribute]
|
|
150
|
-
# @private
|
|
151
|
-
BY_TYPE = Ractor.make_shareable({1 => Ifindex, 2 => Pad, 3 => XdpFeatures, 4 => XdpZcMaxSegs, 5 => XdpRxMetadataFeatures, 6 => XskFeatures}) #: Hash[::Integer, Attribute]
|
|
152
|
-
# netdev ifindex
|
|
153
|
-
# @rbs return: ::Integer
|
|
154
|
-
# @return [Integer]
|
|
155
|
-
# @see Ifindex
|
|
156
|
-
def ifindex; self[:"ifindex"]&.value; end
|
|
157
|
-
# Bitmask of enabled xdp-features.
|
|
158
|
-
#
|
|
159
|
-
# Known flags are defined in {Flags::XdpAct}.
|
|
160
|
-
# @rbs return: ::Integer
|
|
161
|
-
# @return [Integer]
|
|
162
|
-
# @see XdpFeatures
|
|
163
|
-
def xdp_features; self[:"xdp_features"]&.value; end
|
|
164
|
-
# max fragment count supported by ZC driver
|
|
165
|
-
# @rbs return: ::Integer
|
|
166
|
-
# @return [Integer]
|
|
167
|
-
# @see XdpZcMaxSegs
|
|
168
|
-
def xdp_zc_max_segs; self[:"xdp_zc_max_segs"]&.value; end
|
|
169
|
-
# Bitmask of supported XDP receive metadata features. See {https://docs.kernel.org/networking/xdp-rx-metadata.html Documentation/networking/xdp-rx-metadata.rst} for more details.
|
|
170
|
-
#
|
|
171
|
-
# Known flags are defined in {Flags::XdpRxMetadata}.
|
|
172
|
-
# @rbs return: ::Integer
|
|
173
|
-
# @return [Integer]
|
|
174
|
-
# @see XdpRxMetadataFeatures
|
|
175
|
-
def xdp_rx_metadata_features; self[:"xdp_rx_metadata_features"]&.value; end
|
|
176
|
-
# Bitmask of enabled AF_XDP features.
|
|
177
|
-
#
|
|
178
|
-
# Known flags are defined in {Flags::XskFlags}.
|
|
179
|
-
# @rbs return: ::Integer
|
|
180
|
-
# @return [Integer]
|
|
181
|
-
# @see XskFeatures
|
|
182
|
-
def xsk_features; self[:"xsk_features"]&.value; end
|
|
183
|
-
class << self
|
|
184
|
-
# Looks up Attribute class by name.
|
|
185
|
-
# @rbs name: Symbol
|
|
186
|
-
# @rbs return: Attribute
|
|
187
|
-
# @param [Symbol] name
|
|
188
|
-
# @return [Attribute]
|
|
189
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
190
|
-
# Looks up Attribute class by type value.
|
|
191
|
-
# @rbs type: Integer
|
|
192
|
-
# @rbs return: Attribute
|
|
193
|
-
# @param [Integer] type
|
|
194
|
-
# @return [Attribute]
|
|
195
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
89
|
+
module Definitions
|
|
90
|
+
# netdev ifindex
|
|
91
|
+
# @rbs return: ::Integer
|
|
92
|
+
# @return [Integer]
|
|
93
|
+
def ifindex; self[:"ifindex"]; end
|
|
94
|
+
# Bitmask of enabled xdp-features.
|
|
95
|
+
#
|
|
96
|
+
# Known flags are defined in {Flags::XdpAct}.
|
|
97
|
+
# @rbs return: ::Integer
|
|
98
|
+
# @return [Integer]
|
|
99
|
+
def xdp_features; self[:"xdp_features"]; end
|
|
100
|
+
# max fragment count supported by ZC driver
|
|
101
|
+
# @rbs return: ::Integer
|
|
102
|
+
# @return [Integer]
|
|
103
|
+
def xdp_zc_max_segs; self[:"xdp_zc_max_segs"]; end
|
|
104
|
+
# Bitmask of supported XDP receive metadata features. See {https://docs.kernel.org/networking/xdp-rx-metadata.html Documentation/networking/xdp-rx-metadata.rst} for more details.
|
|
105
|
+
#
|
|
106
|
+
# Known flags are defined in {Flags::XdpRxMetadata}.
|
|
107
|
+
# @rbs return: ::Integer
|
|
108
|
+
# @return [Integer]
|
|
109
|
+
def xdp_rx_metadata_features; self[:"xdp_rx_metadata_features"]; end
|
|
110
|
+
# Bitmask of enabled AF_XDP features.
|
|
111
|
+
#
|
|
112
|
+
# Known flags are defined in {Flags::XskFlags}.
|
|
113
|
+
# @rbs return: ::Integer
|
|
114
|
+
# @return [Integer]
|
|
115
|
+
def xsk_features; self[:"xsk_features"]; end
|
|
116
|
+
end
|
|
117
|
+
include Definitions
|
|
118
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
119
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
120
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
121
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
196
122
|
end
|
|
197
123
|
end
|
|
198
124
|
class IoUringProviderInfo < ::Nl::AttributeSet
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
TYPE = 1
|
|
207
|
-
NAME = :"rx_buf_len"
|
|
208
|
-
# @private
|
|
209
|
-
ORDER = 0
|
|
210
|
-
# @private
|
|
211
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
125
|
+
module Definitions
|
|
126
|
+
# RX buffer length in bytes for this io_uring memory provider.
|
|
127
|
+
# Reflects the rx_buf_len passed at io_uring zerocopy rx
|
|
128
|
+
# registration time.
|
|
129
|
+
# @rbs return: ::Integer
|
|
130
|
+
# @return [Integer]
|
|
131
|
+
def rx_buf_len; self[:"rx_buf_len"]; end
|
|
212
132
|
end
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
# @
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
# Reflects the rx_buf_len passed at io_uring zerocopy rx
|
|
219
|
-
# registration time.
|
|
220
|
-
# @rbs return: ::Integer
|
|
221
|
-
# @return [Integer]
|
|
222
|
-
# @see RxBufLen
|
|
223
|
-
def rx_buf_len; self[:"rx_buf_len"]&.value; end
|
|
224
|
-
class << self
|
|
225
|
-
# Looks up Attribute class by name.
|
|
226
|
-
# @rbs name: Symbol
|
|
227
|
-
# @rbs return: Attribute
|
|
228
|
-
# @param [Symbol] name
|
|
229
|
-
# @return [Attribute]
|
|
230
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
231
|
-
# Looks up Attribute class by type value.
|
|
232
|
-
# @rbs type: Integer
|
|
233
|
-
# @rbs return: Attribute
|
|
234
|
-
# @param [Integer] type
|
|
235
|
-
# @return [Attribute]
|
|
236
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
133
|
+
include Definitions
|
|
134
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
135
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
136
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
137
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
237
138
|
end
|
|
238
139
|
end
|
|
239
140
|
class PagePool < ::Nl::AttributeSet
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
#
|
|
248
|
-
|
|
249
|
-
# @
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
#
|
|
260
|
-
|
|
261
|
-
# @
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
#
|
|
269
|
-
|
|
270
|
-
#
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
# @
|
|
281
|
-
|
|
282
|
-
#
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
293
|
-
end
|
|
294
|
-
# Seconds in CLOCK_BOOTTIME of when Page Pool was detached by
|
|
295
|
-
# the driver. Once detached Page Pool can no longer be used to
|
|
296
|
-
# allocate memory.
|
|
297
|
-
# Page Pools wait for all the memory allocated from them to be freed
|
|
298
|
-
# before truly disappearing. "Detached" Page Pools cannot be
|
|
299
|
-
# "re-attached", they are just waiting to disappear.
|
|
300
|
-
# Attribute is absent if Page Pool has not been detached, and
|
|
301
|
-
# can still be used to allocate new memory.
|
|
302
|
-
class DetachTime < Attribute
|
|
303
|
-
TYPE = 6
|
|
304
|
-
NAME = :"detach_time"
|
|
305
|
-
# @private
|
|
306
|
-
ORDER = 5
|
|
307
|
-
# @private
|
|
308
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
309
|
-
end
|
|
310
|
-
# ID of the dmabuf this page-pool is attached to.
|
|
311
|
-
class Dmabuf < Attribute
|
|
312
|
-
TYPE = 7
|
|
313
|
-
NAME = :"dmabuf"
|
|
314
|
-
# @private
|
|
315
|
-
ORDER = 6
|
|
316
|
-
# @private
|
|
317
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
318
|
-
end
|
|
319
|
-
# io-uring memory provider information.
|
|
320
|
-
class IoUring < Attribute
|
|
321
|
-
TYPE = 8
|
|
322
|
-
NAME = :"io_uring"
|
|
323
|
-
# @private
|
|
324
|
-
ORDER = 7
|
|
325
|
-
end
|
|
326
|
-
# @private
|
|
327
|
-
BY_NAME = Ractor.make_shareable({:"id" => Id, :"ifindex" => Ifindex, :"napi_id" => NapiId, :"inflight" => Inflight, :"inflight_mem" => InflightMem, :"detach_time" => DetachTime, :"dmabuf" => Dmabuf, :"io_uring" => IoUring}) #: Hash[::Symbol, Attribute]
|
|
328
|
-
# @private
|
|
329
|
-
BY_TYPE = Ractor.make_shareable({1 => Id, 2 => Ifindex, 3 => NapiId, 4 => Inflight, 5 => InflightMem, 6 => DetachTime, 7 => Dmabuf, 8 => IoUring}) #: Hash[::Integer, Attribute]
|
|
330
|
-
# Unique ID of a Page Pool instance.
|
|
331
|
-
# @rbs return: ::Integer
|
|
332
|
-
# @return [Integer]
|
|
333
|
-
# @see Id
|
|
334
|
-
def id; self[:"id"]&.value; end
|
|
335
|
-
# ifindex of the netdev to which the pool belongs.
|
|
336
|
-
# May not be reported if the page pool was allocated for a netdev
|
|
337
|
-
# which got destroyed already (page pools may outlast their netdevs
|
|
338
|
-
# because they wait for all memory to be returned).
|
|
339
|
-
# @rbs return: ::Integer
|
|
340
|
-
# @return [Integer]
|
|
341
|
-
# @see Ifindex
|
|
342
|
-
def ifindex; self[:"ifindex"]&.value; end
|
|
343
|
-
# Id of NAPI using this Page Pool instance.
|
|
344
|
-
# @rbs return: ::Integer
|
|
345
|
-
# @return [Integer]
|
|
346
|
-
# @see NapiId
|
|
347
|
-
def napi_id; self[:"napi_id"]&.value; end
|
|
348
|
-
# Number of outstanding references to this page pool (allocated
|
|
349
|
-
# but yet to be freed pages). Allocated pages may be held in
|
|
350
|
-
# socket receive queues, driver receive ring, page pool recycling
|
|
351
|
-
# ring, the page pool cache, etc.
|
|
352
|
-
# @rbs return: ::Integer
|
|
353
|
-
# @return [Integer]
|
|
354
|
-
# @see Inflight
|
|
355
|
-
def inflight; self[:"inflight"]&.value; end
|
|
356
|
-
# Amount of memory held by inflight pages.
|
|
357
|
-
# @rbs return: ::Integer
|
|
358
|
-
# @return [Integer]
|
|
359
|
-
# @see InflightMem
|
|
360
|
-
def inflight_mem; self[:"inflight_mem"]&.value; end
|
|
361
|
-
# Seconds in CLOCK_BOOTTIME of when Page Pool was detached by
|
|
362
|
-
# the driver. Once detached Page Pool can no longer be used to
|
|
363
|
-
# allocate memory.
|
|
364
|
-
# Page Pools wait for all the memory allocated from them to be freed
|
|
365
|
-
# before truly disappearing. "Detached" Page Pools cannot be
|
|
366
|
-
# "re-attached", they are just waiting to disappear.
|
|
367
|
-
# Attribute is absent if Page Pool has not been detached, and
|
|
368
|
-
# can still be used to allocate new memory.
|
|
369
|
-
# @rbs return: ::Integer
|
|
370
|
-
# @return [Integer]
|
|
371
|
-
# @see DetachTime
|
|
372
|
-
def detach_time; self[:"detach_time"]&.value; end
|
|
373
|
-
# ID of the dmabuf this page-pool is attached to.
|
|
374
|
-
# @rbs return: ::Integer
|
|
375
|
-
# @return [Integer]
|
|
376
|
-
# @see Dmabuf
|
|
377
|
-
def dmabuf; self[:"dmabuf"]&.value; end
|
|
378
|
-
# io-uring memory provider information.
|
|
379
|
-
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
380
|
-
# @return [AttributeSets::IoUringProviderInfo]
|
|
381
|
-
# @see IoUring
|
|
382
|
-
def io_uring; self[:"io_uring"]&.value; end
|
|
383
|
-
class << self
|
|
384
|
-
# Looks up Attribute class by name.
|
|
385
|
-
# @rbs name: Symbol
|
|
386
|
-
# @rbs return: Attribute
|
|
387
|
-
# @param [Symbol] name
|
|
388
|
-
# @return [Attribute]
|
|
389
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
390
|
-
# Looks up Attribute class by type value.
|
|
391
|
-
# @rbs type: Integer
|
|
392
|
-
# @rbs return: Attribute
|
|
393
|
-
# @param [Integer] type
|
|
394
|
-
# @return [Attribute]
|
|
395
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
141
|
+
module Definitions
|
|
142
|
+
# Unique ID of a Page Pool instance.
|
|
143
|
+
# @rbs return: ::Integer
|
|
144
|
+
# @return [Integer]
|
|
145
|
+
def id; self[:"id"]; end
|
|
146
|
+
# ifindex of the netdev to which the pool belongs.
|
|
147
|
+
# May not be reported if the page pool was allocated for a netdev
|
|
148
|
+
# which got destroyed already (page pools may outlast their netdevs
|
|
149
|
+
# because they wait for all memory to be returned).
|
|
150
|
+
# @rbs return: ::Integer
|
|
151
|
+
# @return [Integer]
|
|
152
|
+
def ifindex; self[:"ifindex"]; end
|
|
153
|
+
# Id of NAPI using this Page Pool instance.
|
|
154
|
+
# @rbs return: ::Integer
|
|
155
|
+
# @return [Integer]
|
|
156
|
+
def napi_id; self[:"napi_id"]; end
|
|
157
|
+
# Number of outstanding references to this page pool (allocated
|
|
158
|
+
# but yet to be freed pages). Allocated pages may be held in
|
|
159
|
+
# socket receive queues, driver receive ring, page pool recycling
|
|
160
|
+
# ring, the page pool cache, etc.
|
|
161
|
+
# @rbs return: ::Integer
|
|
162
|
+
# @return [Integer]
|
|
163
|
+
def inflight; self[:"inflight"]; end
|
|
164
|
+
# Amount of memory held by inflight pages.
|
|
165
|
+
# @rbs return: ::Integer
|
|
166
|
+
# @return [Integer]
|
|
167
|
+
def inflight_mem; self[:"inflight_mem"]; end
|
|
168
|
+
# Seconds in CLOCK_BOOTTIME of when Page Pool was detached by
|
|
169
|
+
# the driver. Once detached Page Pool can no longer be used to
|
|
170
|
+
# allocate memory.
|
|
171
|
+
# Page Pools wait for all the memory allocated from them to be freed
|
|
172
|
+
# before truly disappearing. "Detached" Page Pools cannot be
|
|
173
|
+
# "re-attached", they are just waiting to disappear.
|
|
174
|
+
# Attribute is absent if Page Pool has not been detached, and
|
|
175
|
+
# can still be used to allocate new memory.
|
|
176
|
+
# @rbs return: ::Integer
|
|
177
|
+
# @return [Integer]
|
|
178
|
+
def detach_time; self[:"detach_time"]; end
|
|
179
|
+
# ID of the dmabuf this page-pool is attached to.
|
|
180
|
+
# @rbs return: ::Integer
|
|
181
|
+
# @return [Integer]
|
|
182
|
+
def dmabuf; self[:"dmabuf"]; end
|
|
183
|
+
# io-uring memory provider information.
|
|
184
|
+
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
185
|
+
# @return [AttributeSets::IoUringProviderInfo]
|
|
186
|
+
def io_uring; self[:"io_uring"]; end
|
|
187
|
+
end
|
|
188
|
+
include Definitions
|
|
189
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
190
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
191
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
192
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
396
193
|
end
|
|
397
194
|
end
|
|
398
195
|
class PagePoolInfo < ::Nl::AttributeSet
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
#
|
|
407
|
-
|
|
408
|
-
# @
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
#
|
|
414
|
-
#
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
NAME = :"ifindex"
|
|
418
|
-
# @private
|
|
419
|
-
ORDER = 1
|
|
420
|
-
# @private
|
|
421
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1; raise ArgumentError, "Value #{it.inspect} is greater than maximum 2147483647" unless it <= 2147483647 })
|
|
422
|
-
end
|
|
423
|
-
# @private
|
|
424
|
-
BY_NAME = Ractor.make_shareable({:"id" => Id, :"ifindex" => Ifindex}) #: Hash[::Symbol, Attribute]
|
|
425
|
-
# @private
|
|
426
|
-
BY_TYPE = Ractor.make_shareable({1 => Id, 2 => Ifindex}) #: Hash[::Integer, Attribute]
|
|
427
|
-
# Unique ID of a Page Pool instance.
|
|
428
|
-
# @rbs return: ::Integer
|
|
429
|
-
# @return [Integer]
|
|
430
|
-
# @see Id
|
|
431
|
-
def id; self[:"id"]&.value; end
|
|
432
|
-
# ifindex of the netdev to which the pool belongs.
|
|
433
|
-
# May not be reported if the page pool was allocated for a netdev
|
|
434
|
-
# which got destroyed already (page pools may outlast their netdevs
|
|
435
|
-
# because they wait for all memory to be returned).
|
|
436
|
-
# @rbs return: ::Integer
|
|
437
|
-
# @return [Integer]
|
|
438
|
-
# @see Ifindex
|
|
439
|
-
def ifindex; self[:"ifindex"]&.value; end
|
|
440
|
-
class << self
|
|
441
|
-
# Looks up Attribute class by name.
|
|
442
|
-
# @rbs name: Symbol
|
|
443
|
-
# @rbs return: Attribute
|
|
444
|
-
# @param [Symbol] name
|
|
445
|
-
# @return [Attribute]
|
|
446
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
447
|
-
# Looks up Attribute class by type value.
|
|
448
|
-
# @rbs type: Integer
|
|
449
|
-
# @rbs return: Attribute
|
|
450
|
-
# @param [Integer] type
|
|
451
|
-
# @return [Attribute]
|
|
452
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
453
|
-
end
|
|
454
|
-
end
|
|
455
|
-
# Page pool statistics, see docs for struct page_pool_stats
|
|
456
|
-
# for information about individual statistics.
|
|
457
|
-
class PagePoolStats < ::Nl::AttributeSet
|
|
458
|
-
# Abstract class
|
|
459
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
460
|
-
end
|
|
461
|
-
# Page pool identifying information.
|
|
462
|
-
class Info < Attribute
|
|
463
|
-
TYPE = 1
|
|
464
|
-
NAME = :"info"
|
|
465
|
-
# @private
|
|
466
|
-
ORDER = 0
|
|
467
|
-
end
|
|
468
|
-
class AllocFast < Attribute
|
|
469
|
-
TYPE = 8
|
|
470
|
-
NAME = :"alloc_fast"
|
|
471
|
-
# @private
|
|
472
|
-
ORDER = 1
|
|
473
|
-
# @private
|
|
474
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
475
|
-
end
|
|
476
|
-
class AllocSlow < Attribute
|
|
477
|
-
TYPE = 9
|
|
478
|
-
NAME = :"alloc_slow"
|
|
479
|
-
# @private
|
|
480
|
-
ORDER = 2
|
|
481
|
-
# @private
|
|
482
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
483
|
-
end
|
|
484
|
-
class AllocSlowHighOrder < Attribute
|
|
485
|
-
TYPE = 10
|
|
486
|
-
NAME = :"alloc_slow_high_order"
|
|
487
|
-
# @private
|
|
488
|
-
ORDER = 3
|
|
489
|
-
# @private
|
|
490
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
491
|
-
end
|
|
492
|
-
class AllocEmpty < Attribute
|
|
493
|
-
TYPE = 11
|
|
494
|
-
NAME = :"alloc_empty"
|
|
495
|
-
# @private
|
|
496
|
-
ORDER = 4
|
|
497
|
-
# @private
|
|
498
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
499
|
-
end
|
|
500
|
-
class AllocRefill < Attribute
|
|
501
|
-
TYPE = 12
|
|
502
|
-
NAME = :"alloc_refill"
|
|
503
|
-
# @private
|
|
504
|
-
ORDER = 5
|
|
505
|
-
# @private
|
|
506
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
507
|
-
end
|
|
508
|
-
class AllocWaive < Attribute
|
|
509
|
-
TYPE = 13
|
|
510
|
-
NAME = :"alloc_waive"
|
|
511
|
-
# @private
|
|
512
|
-
ORDER = 6
|
|
513
|
-
# @private
|
|
514
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
515
|
-
end
|
|
516
|
-
class RecycleCached < Attribute
|
|
517
|
-
TYPE = 14
|
|
518
|
-
NAME = :"recycle_cached"
|
|
519
|
-
# @private
|
|
520
|
-
ORDER = 7
|
|
521
|
-
# @private
|
|
522
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
523
|
-
end
|
|
524
|
-
class RecycleCacheFull < Attribute
|
|
525
|
-
TYPE = 15
|
|
526
|
-
NAME = :"recycle_cache_full"
|
|
527
|
-
# @private
|
|
528
|
-
ORDER = 8
|
|
529
|
-
# @private
|
|
530
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
531
|
-
end
|
|
532
|
-
class RecycleRing < Attribute
|
|
533
|
-
TYPE = 16
|
|
534
|
-
NAME = :"recycle_ring"
|
|
535
|
-
# @private
|
|
536
|
-
ORDER = 9
|
|
537
|
-
# @private
|
|
538
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
539
|
-
end
|
|
540
|
-
class RecycleRingFull < Attribute
|
|
541
|
-
TYPE = 17
|
|
542
|
-
NAME = :"recycle_ring_full"
|
|
543
|
-
# @private
|
|
544
|
-
ORDER = 10
|
|
545
|
-
# @private
|
|
546
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
547
|
-
end
|
|
548
|
-
class RecycleReleasedRefcnt < Attribute
|
|
549
|
-
TYPE = 18
|
|
550
|
-
NAME = :"recycle_released_refcnt"
|
|
551
|
-
# @private
|
|
552
|
-
ORDER = 11
|
|
553
|
-
# @private
|
|
554
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
555
|
-
end
|
|
556
|
-
# @private
|
|
557
|
-
BY_NAME = Ractor.make_shareable({:"info" => Info, :"alloc_fast" => AllocFast, :"alloc_slow" => AllocSlow, :"alloc_slow_high_order" => AllocSlowHighOrder, :"alloc_empty" => AllocEmpty, :"alloc_refill" => AllocRefill, :"alloc_waive" => AllocWaive, :"recycle_cached" => RecycleCached, :"recycle_cache_full" => RecycleCacheFull, :"recycle_ring" => RecycleRing, :"recycle_ring_full" => RecycleRingFull, :"recycle_released_refcnt" => RecycleReleasedRefcnt}) #: Hash[::Symbol, Attribute]
|
|
558
|
-
# @private
|
|
559
|
-
BY_TYPE = Ractor.make_shareable({1 => Info, 8 => AllocFast, 9 => AllocSlow, 10 => AllocSlowHighOrder, 11 => AllocEmpty, 12 => AllocRefill, 13 => AllocWaive, 14 => RecycleCached, 15 => RecycleCacheFull, 16 => RecycleRing, 17 => RecycleRingFull, 18 => RecycleReleasedRefcnt}) #: Hash[::Integer, Attribute]
|
|
560
|
-
# Page pool identifying information.
|
|
561
|
-
# @rbs return: AttributeSets::PagePoolInfo
|
|
562
|
-
# @return [AttributeSets::PagePoolInfo]
|
|
563
|
-
# @see Info
|
|
564
|
-
def info; self[:"info"]&.value; end
|
|
565
|
-
# @rbs return: ::Integer
|
|
566
|
-
# @return [Integer]
|
|
567
|
-
# @see AllocFast
|
|
568
|
-
def alloc_fast; self[:"alloc_fast"]&.value; end
|
|
569
|
-
# @rbs return: ::Integer
|
|
570
|
-
# @return [Integer]
|
|
571
|
-
# @see AllocSlow
|
|
572
|
-
def alloc_slow; self[:"alloc_slow"]&.value; end
|
|
573
|
-
# @rbs return: ::Integer
|
|
574
|
-
# @return [Integer]
|
|
575
|
-
# @see AllocSlowHighOrder
|
|
576
|
-
def alloc_slow_high_order; self[:"alloc_slow_high_order"]&.value; end
|
|
577
|
-
# @rbs return: ::Integer
|
|
578
|
-
# @return [Integer]
|
|
579
|
-
# @see AllocEmpty
|
|
580
|
-
def alloc_empty; self[:"alloc_empty"]&.value; end
|
|
581
|
-
# @rbs return: ::Integer
|
|
582
|
-
# @return [Integer]
|
|
583
|
-
# @see AllocRefill
|
|
584
|
-
def alloc_refill; self[:"alloc_refill"]&.value; end
|
|
585
|
-
# @rbs return: ::Integer
|
|
586
|
-
# @return [Integer]
|
|
587
|
-
# @see AllocWaive
|
|
588
|
-
def alloc_waive; self[:"alloc_waive"]&.value; end
|
|
589
|
-
# @rbs return: ::Integer
|
|
590
|
-
# @return [Integer]
|
|
591
|
-
# @see RecycleCached
|
|
592
|
-
def recycle_cached; self[:"recycle_cached"]&.value; end
|
|
593
|
-
# @rbs return: ::Integer
|
|
594
|
-
# @return [Integer]
|
|
595
|
-
# @see RecycleCacheFull
|
|
596
|
-
def recycle_cache_full; self[:"recycle_cache_full"]&.value; end
|
|
597
|
-
# @rbs return: ::Integer
|
|
598
|
-
# @return [Integer]
|
|
599
|
-
# @see RecycleRing
|
|
600
|
-
def recycle_ring; self[:"recycle_ring"]&.value; end
|
|
601
|
-
# @rbs return: ::Integer
|
|
602
|
-
# @return [Integer]
|
|
603
|
-
# @see RecycleRingFull
|
|
604
|
-
def recycle_ring_full; self[:"recycle_ring_full"]&.value; end
|
|
605
|
-
# @rbs return: ::Integer
|
|
606
|
-
# @return [Integer]
|
|
607
|
-
# @see RecycleReleasedRefcnt
|
|
608
|
-
def recycle_released_refcnt; self[:"recycle_released_refcnt"]&.value; end
|
|
609
|
-
class << self
|
|
610
|
-
# Looks up Attribute class by name.
|
|
611
|
-
# @rbs name: Symbol
|
|
612
|
-
# @rbs return: Attribute
|
|
613
|
-
# @param [Symbol] name
|
|
614
|
-
# @return [Attribute]
|
|
615
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
616
|
-
# Looks up Attribute class by type value.
|
|
617
|
-
# @rbs type: Integer
|
|
618
|
-
# @rbs return: Attribute
|
|
619
|
-
# @param [Integer] type
|
|
620
|
-
# @return [Attribute]
|
|
621
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
196
|
+
module Definitions
|
|
197
|
+
# Unique ID of a Page Pool instance.
|
|
198
|
+
# @rbs return: ::Integer
|
|
199
|
+
# @return [Integer]
|
|
200
|
+
def id; self[:"id"]; end
|
|
201
|
+
# ifindex of the netdev to which the pool belongs.
|
|
202
|
+
# May not be reported if the page pool was allocated for a netdev
|
|
203
|
+
# which got destroyed already (page pools may outlast their netdevs
|
|
204
|
+
# because they wait for all memory to be returned).
|
|
205
|
+
# @rbs return: ::Integer
|
|
206
|
+
# @return [Integer]
|
|
207
|
+
def ifindex; self[:"ifindex"]; end
|
|
208
|
+
end
|
|
209
|
+
include Definitions
|
|
210
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
211
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
212
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
213
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
622
214
|
end
|
|
623
215
|
end
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
# @
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
# @
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
# @
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
# @
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: -> { raise ArgumentError, "Value #{it.inspect} is greater than maximum 2147483647" unless it <= 2147483647 })
|
|
672
|
-
end
|
|
673
|
-
# The timeout, in nanoseconds, of when to trigger the NAPI watchdog timer which schedules NAPI processing. Additionally, a non-zero value will also prevent GRO from flushing recent super-frames at the end of a NAPI cycle. This may add receive latency in exchange for reducing the number of frames processed by the network stack.
|
|
674
|
-
class GroFlushTimeout < Attribute
|
|
675
|
-
TYPE = 6
|
|
676
|
-
NAME = :"gro_flush_timeout"
|
|
677
|
-
# @private
|
|
678
|
-
ORDER = 5
|
|
679
|
-
# @private
|
|
680
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
681
|
-
end
|
|
682
|
-
# The timeout, in nanoseconds, of how long to suspend irq processing, if event polling finds events
|
|
683
|
-
class IrqSuspendTimeout < Attribute
|
|
684
|
-
TYPE = 7
|
|
685
|
-
NAME = :"irq_suspend_timeout"
|
|
686
|
-
# @private
|
|
687
|
-
ORDER = 6
|
|
688
|
-
# @private
|
|
689
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
690
|
-
end
|
|
691
|
-
# Whether the NAPI is configured to operate in threaded polling mode. If this is set to enabled then the NAPI context operates in threaded polling mode. If this is set to busy-poll, then the threaded polling mode also busy polls.
|
|
692
|
-
#
|
|
693
|
-
# Known enum values are defined in {Enums::NapiThreaded}.
|
|
694
|
-
class Threaded < Attribute
|
|
695
|
-
TYPE = 8
|
|
696
|
-
NAME = :"threaded"
|
|
697
|
-
# @private
|
|
698
|
-
ORDER = 7
|
|
699
|
-
# @private
|
|
700
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
701
|
-
end
|
|
702
|
-
# @private
|
|
703
|
-
BY_NAME = Ractor.make_shareable({:"ifindex" => Ifindex, :"id" => Id, :"irq" => Irq, :"pid" => Pid, :"defer_hard_irqs" => DeferHardIrqs, :"gro_flush_timeout" => GroFlushTimeout, :"irq_suspend_timeout" => IrqSuspendTimeout, :"threaded" => Threaded}) #: Hash[::Symbol, Attribute]
|
|
704
|
-
# @private
|
|
705
|
-
BY_TYPE = Ractor.make_shareable({1 => Ifindex, 2 => Id, 3 => Irq, 4 => Pid, 5 => DeferHardIrqs, 6 => GroFlushTimeout, 7 => IrqSuspendTimeout, 8 => Threaded}) #: Hash[::Integer, Attribute]
|
|
706
|
-
# ifindex of the netdevice to which NAPI instance belongs.
|
|
707
|
-
# @rbs return: ::Integer
|
|
708
|
-
# @return [Integer]
|
|
709
|
-
# @see Ifindex
|
|
710
|
-
def ifindex; self[:"ifindex"]&.value; end
|
|
711
|
-
# ID of the NAPI instance.
|
|
712
|
-
# @rbs return: ::Integer
|
|
713
|
-
# @return [Integer]
|
|
714
|
-
# @see Id
|
|
715
|
-
def id; self[:"id"]&.value; end
|
|
716
|
-
# The associated interrupt vector number for the napi
|
|
717
|
-
# @rbs return: ::Integer
|
|
718
|
-
# @return [Integer]
|
|
719
|
-
# @see Irq
|
|
720
|
-
def irq; self[:"irq"]&.value; end
|
|
721
|
-
# PID of the napi thread, if NAPI is configured to operate in threaded mode. If NAPI is not in threaded mode (i.e. uses normal softirq context), the attribute will be absent.
|
|
722
|
-
# @rbs return: ::Integer
|
|
723
|
-
# @return [Integer]
|
|
724
|
-
# @see Pid
|
|
725
|
-
def pid; self[:"pid"]&.value; end
|
|
726
|
-
# The number of consecutive empty polls before IRQ deferral ends and hardware IRQs are re-enabled.
|
|
727
|
-
# @rbs return: ::Integer
|
|
728
|
-
# @return [Integer]
|
|
729
|
-
# @see DeferHardIrqs
|
|
730
|
-
def defer_hard_irqs; self[:"defer_hard_irqs"]&.value; end
|
|
731
|
-
# The timeout, in nanoseconds, of when to trigger the NAPI watchdog timer which schedules NAPI processing. Additionally, a non-zero value will also prevent GRO from flushing recent super-frames at the end of a NAPI cycle. This may add receive latency in exchange for reducing the number of frames processed by the network stack.
|
|
732
|
-
# @rbs return: ::Integer
|
|
733
|
-
# @return [Integer]
|
|
734
|
-
# @see GroFlushTimeout
|
|
735
|
-
def gro_flush_timeout; self[:"gro_flush_timeout"]&.value; end
|
|
736
|
-
# The timeout, in nanoseconds, of how long to suspend irq processing, if event polling finds events
|
|
737
|
-
# @rbs return: ::Integer
|
|
738
|
-
# @return [Integer]
|
|
739
|
-
# @see IrqSuspendTimeout
|
|
740
|
-
def irq_suspend_timeout; self[:"irq_suspend_timeout"]&.value; end
|
|
741
|
-
# Whether the NAPI is configured to operate in threaded polling mode. If this is set to enabled then the NAPI context operates in threaded polling mode. If this is set to busy-poll, then the threaded polling mode also busy polls.
|
|
742
|
-
#
|
|
743
|
-
# Known enum values are defined in {Enums::NapiThreaded}.
|
|
744
|
-
# @rbs return: ::Integer
|
|
745
|
-
# @return [Integer]
|
|
746
|
-
# @see Threaded
|
|
747
|
-
def threaded; self[:"threaded"]&.value; end
|
|
748
|
-
class << self
|
|
749
|
-
# Looks up Attribute class by name.
|
|
750
|
-
# @rbs name: Symbol
|
|
751
|
-
# @rbs return: Attribute
|
|
752
|
-
# @param [Symbol] name
|
|
753
|
-
# @return [Attribute]
|
|
754
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
755
|
-
# Looks up Attribute class by type value.
|
|
756
|
-
# @rbs type: Integer
|
|
757
|
-
# @rbs return: Attribute
|
|
758
|
-
# @param [Integer] type
|
|
759
|
-
# @return [Attribute]
|
|
760
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
761
|
-
end
|
|
762
|
-
end
|
|
763
|
-
class XskInfo < ::Nl::AttributeSet
|
|
764
|
-
# Abstract class
|
|
765
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
766
|
-
end
|
|
767
|
-
# @private
|
|
768
|
-
BY_NAME = Ractor.make_shareable({}) #: Hash[::Symbol, Attribute]
|
|
769
|
-
# @private
|
|
770
|
-
BY_TYPE = Ractor.make_shareable({}) #: Hash[::Integer, Attribute]
|
|
771
|
-
class << self
|
|
772
|
-
# Looks up Attribute class by name.
|
|
773
|
-
# @rbs name: Symbol
|
|
774
|
-
# @rbs return: Attribute
|
|
775
|
-
# @param [Symbol] name
|
|
776
|
-
# @return [Attribute]
|
|
777
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
778
|
-
# Looks up Attribute class by type value.
|
|
779
|
-
# @rbs type: Integer
|
|
780
|
-
# @rbs return: Attribute
|
|
781
|
-
# @param [Integer] type
|
|
782
|
-
# @return [Attribute]
|
|
783
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
784
|
-
end
|
|
785
|
-
end
|
|
786
|
-
class Queue < ::Nl::AttributeSet
|
|
787
|
-
# Abstract class
|
|
788
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
789
|
-
end
|
|
790
|
-
# Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.
|
|
791
|
-
class Id < Attribute
|
|
792
|
-
TYPE = 1
|
|
793
|
-
NAME = :"id"
|
|
794
|
-
# @private
|
|
795
|
-
ORDER = 0
|
|
796
|
-
# @private
|
|
797
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
798
|
-
end
|
|
799
|
-
# ifindex of the netdevice to which the queue belongs.
|
|
800
|
-
class Ifindex < Attribute
|
|
801
|
-
TYPE = 2
|
|
802
|
-
NAME = :"ifindex"
|
|
803
|
-
# @private
|
|
804
|
-
ORDER = 1
|
|
805
|
-
# @private
|
|
806
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 })
|
|
807
|
-
end
|
|
808
|
-
# Queue type as rx, tx. Each queue type defines a separate ID space. XDP TX queues allocated in the kernel are not linked to NAPIs and thus not listed. AF_XDP queues will have more information set in the xsk attribute.
|
|
809
|
-
#
|
|
810
|
-
# Known enum values are defined in {Enums::QueueType}.
|
|
811
|
-
class Type < Attribute
|
|
812
|
-
TYPE = 3
|
|
813
|
-
NAME = :"type"
|
|
814
|
-
# @private
|
|
815
|
-
ORDER = 2
|
|
816
|
-
# @private
|
|
817
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
818
|
-
end
|
|
819
|
-
# ID of the NAPI instance which services this queue.
|
|
820
|
-
class NapiId < Attribute
|
|
821
|
-
TYPE = 4
|
|
822
|
-
NAME = :"napi_id"
|
|
823
|
-
# @private
|
|
824
|
-
ORDER = 3
|
|
825
|
-
# @private
|
|
826
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
827
|
-
end
|
|
828
|
-
# ID of the dmabuf attached to this queue, if any.
|
|
829
|
-
class Dmabuf < Attribute
|
|
830
|
-
TYPE = 5
|
|
831
|
-
NAME = :"dmabuf"
|
|
832
|
-
# @private
|
|
833
|
-
ORDER = 4
|
|
834
|
-
# @private
|
|
835
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
836
|
-
end
|
|
837
|
-
# io_uring memory provider information.
|
|
838
|
-
class IoUring < Attribute
|
|
839
|
-
TYPE = 6
|
|
840
|
-
NAME = :"io_uring"
|
|
841
|
-
# @private
|
|
842
|
-
ORDER = 5
|
|
843
|
-
end
|
|
844
|
-
# XSK information for this queue, if any.
|
|
845
|
-
class Xsk < Attribute
|
|
846
|
-
TYPE = 7
|
|
847
|
-
NAME = :"xsk"
|
|
848
|
-
# @private
|
|
849
|
-
ORDER = 6
|
|
850
|
-
end
|
|
851
|
-
# A queue from a virtual device can have a lease which refers to
|
|
852
|
-
# another queue from a physical device. This is useful for memory
|
|
853
|
-
# providers and AF_XDP operations which take an ifindex and queue id
|
|
854
|
-
# to allow applications to bind against virtual devices in containers.
|
|
855
|
-
class Lease < Attribute
|
|
856
|
-
TYPE = 8
|
|
857
|
-
NAME = :"lease"
|
|
858
|
-
# @private
|
|
859
|
-
ORDER = 7
|
|
860
|
-
end
|
|
861
|
-
# @private
|
|
862
|
-
BY_NAME = Ractor.make_shareable({:"id" => Id, :"ifindex" => Ifindex, :"type" => Type, :"napi_id" => NapiId, :"dmabuf" => Dmabuf, :"io_uring" => IoUring, :"xsk" => Xsk, :"lease" => Lease}) #: Hash[::Symbol, Attribute]
|
|
863
|
-
# @private
|
|
864
|
-
BY_TYPE = Ractor.make_shareable({1 => Id, 2 => Ifindex, 3 => Type, 4 => NapiId, 5 => Dmabuf, 6 => IoUring, 7 => Xsk, 8 => Lease}) #: Hash[::Integer, Attribute]
|
|
865
|
-
# Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.
|
|
866
|
-
# @rbs return: ::Integer
|
|
867
|
-
# @return [Integer]
|
|
868
|
-
# @see Id
|
|
869
|
-
def id; self[:"id"]&.value; end
|
|
870
|
-
# ifindex of the netdevice to which the queue belongs.
|
|
871
|
-
# @rbs return: ::Integer
|
|
872
|
-
# @return [Integer]
|
|
873
|
-
# @see Ifindex
|
|
874
|
-
def ifindex; self[:"ifindex"]&.value; end
|
|
875
|
-
# Queue type as rx, tx. Each queue type defines a separate ID space. XDP TX queues allocated in the kernel are not linked to NAPIs and thus not listed. AF_XDP queues will have more information set in the xsk attribute.
|
|
876
|
-
#
|
|
877
|
-
# Known enum values are defined in {Enums::QueueType}.
|
|
878
|
-
# @rbs return: ::Integer
|
|
879
|
-
# @return [Integer]
|
|
880
|
-
# @see Type
|
|
881
|
-
def type; self[:"type"]&.value; end
|
|
882
|
-
# ID of the NAPI instance which services this queue.
|
|
883
|
-
# @rbs return: ::Integer
|
|
884
|
-
# @return [Integer]
|
|
885
|
-
# @see NapiId
|
|
886
|
-
def napi_id; self[:"napi_id"]&.value; end
|
|
887
|
-
# ID of the dmabuf attached to this queue, if any.
|
|
888
|
-
# @rbs return: ::Integer
|
|
889
|
-
# @return [Integer]
|
|
890
|
-
# @see Dmabuf
|
|
891
|
-
def dmabuf; self[:"dmabuf"]&.value; end
|
|
892
|
-
# io_uring memory provider information.
|
|
893
|
-
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
894
|
-
# @return [AttributeSets::IoUringProviderInfo]
|
|
895
|
-
# @see IoUring
|
|
896
|
-
def io_uring; self[:"io_uring"]&.value; end
|
|
897
|
-
# XSK information for this queue, if any.
|
|
898
|
-
# @rbs return: AttributeSets::XskInfo
|
|
899
|
-
# @return [AttributeSets::XskInfo]
|
|
900
|
-
# @see Xsk
|
|
901
|
-
def xsk; self[:"xsk"]&.value; end
|
|
902
|
-
# A queue from a virtual device can have a lease which refers to
|
|
903
|
-
# another queue from a physical device. This is useful for memory
|
|
904
|
-
# providers and AF_XDP operations which take an ifindex and queue id
|
|
905
|
-
# to allow applications to bind against virtual devices in containers.
|
|
906
|
-
# @rbs return: AttributeSets::Lease
|
|
907
|
-
# @return [AttributeSets::Lease]
|
|
908
|
-
# @see Lease
|
|
909
|
-
def lease; self[:"lease"]&.value; end
|
|
910
|
-
class << self
|
|
911
|
-
# Looks up Attribute class by name.
|
|
912
|
-
# @rbs name: Symbol
|
|
913
|
-
# @rbs return: Attribute
|
|
914
|
-
# @param [Symbol] name
|
|
915
|
-
# @return [Attribute]
|
|
916
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
917
|
-
# Looks up Attribute class by type value.
|
|
918
|
-
# @rbs type: Integer
|
|
919
|
-
# @rbs return: Attribute
|
|
920
|
-
# @param [Integer] type
|
|
921
|
-
# @return [Attribute]
|
|
922
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
923
|
-
end
|
|
924
|
-
end
|
|
925
|
-
# Get device statistics, scoped to a device or a queue.
|
|
926
|
-
# These statistics extend (and partially duplicate) statistics available
|
|
927
|
-
# in struct rtnl_link_stats64.
|
|
928
|
-
# Value of the `scope` attribute determines how statistics are
|
|
929
|
-
# aggregated. When aggregated for the entire device the statistics
|
|
930
|
-
# represent the total number of events since last explicit reset of
|
|
931
|
-
# the device (i.e. not a reconfiguration like changing queue count).
|
|
932
|
-
# When reported per-queue, however, the statistics may not add
|
|
933
|
-
# up to the total number of events, will only be reported for currently
|
|
934
|
-
# active objects, and will likely report the number of events since last
|
|
935
|
-
# reconfiguration.
|
|
936
|
-
class Qstats < ::Nl::AttributeSet
|
|
937
|
-
# Abstract class
|
|
938
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
939
|
-
end
|
|
940
|
-
# ifindex of the netdevice to which stats belong.
|
|
941
|
-
class Ifindex < Attribute
|
|
942
|
-
TYPE = 1
|
|
943
|
-
NAME = :"ifindex"
|
|
944
|
-
# @private
|
|
945
|
-
ORDER = 0
|
|
946
|
-
# @private
|
|
947
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 })
|
|
948
|
-
end
|
|
949
|
-
# Queue type as rx, tx, for queue-id.
|
|
950
|
-
#
|
|
951
|
-
# Known enum values are defined in {Enums::QueueType}.
|
|
952
|
-
class QueueType < Attribute
|
|
953
|
-
TYPE = 2
|
|
954
|
-
NAME = :"queue_type"
|
|
955
|
-
# @private
|
|
956
|
-
ORDER = 1
|
|
957
|
-
# @private
|
|
958
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
959
|
-
end
|
|
960
|
-
# Queue ID, if stats are scoped to a single queue instance.
|
|
961
|
-
class QueueId < Attribute
|
|
962
|
-
TYPE = 3
|
|
963
|
-
NAME = :"queue_id"
|
|
964
|
-
# @private
|
|
965
|
-
ORDER = 2
|
|
966
|
-
# @private
|
|
967
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
968
|
-
end
|
|
969
|
-
# What object type should be used to iterate over the stats.
|
|
970
|
-
#
|
|
971
|
-
#
|
|
972
|
-
# Known flags are defined in {Flags::QstatsScope}.
|
|
973
|
-
class Scope < Attribute
|
|
974
|
-
TYPE = 4
|
|
975
|
-
NAME = :"scope"
|
|
976
|
-
# @private
|
|
977
|
-
ORDER = 3
|
|
978
|
-
# @private
|
|
979
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
980
|
-
end
|
|
981
|
-
# Number of wire packets successfully received and passed to the stack.
|
|
982
|
-
# For drivers supporting XDP, XDP is considered the first layer
|
|
983
|
-
# of the stack, so packets consumed by XDP are still counted here.
|
|
984
|
-
class RxPackets < Attribute
|
|
985
|
-
TYPE = 8
|
|
986
|
-
NAME = :"rx_packets"
|
|
987
|
-
# @private
|
|
988
|
-
ORDER = 4
|
|
989
|
-
# @private
|
|
990
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
991
|
-
end
|
|
992
|
-
# Successfully received bytes, see `rx-packets`.
|
|
993
|
-
class RxBytes < Attribute
|
|
994
|
-
TYPE = 9
|
|
995
|
-
NAME = :"rx_bytes"
|
|
996
|
-
# @private
|
|
997
|
-
ORDER = 5
|
|
998
|
-
# @private
|
|
999
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1000
|
-
end
|
|
1001
|
-
# Number of wire packets successfully sent. Packet is considered to be
|
|
1002
|
-
# successfully sent once it is in device memory (usually this means
|
|
1003
|
-
# the device has issued a DMA completion for the packet).
|
|
1004
|
-
class TxPackets < Attribute
|
|
1005
|
-
TYPE = 10
|
|
1006
|
-
NAME = :"tx_packets"
|
|
1007
|
-
# @private
|
|
1008
|
-
ORDER = 6
|
|
1009
|
-
# @private
|
|
1010
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1011
|
-
end
|
|
1012
|
-
# Successfully sent bytes, see `tx-packets`.
|
|
1013
|
-
class TxBytes < Attribute
|
|
1014
|
-
TYPE = 11
|
|
1015
|
-
NAME = :"tx_bytes"
|
|
1016
|
-
# @private
|
|
1017
|
-
ORDER = 7
|
|
1018
|
-
# @private
|
|
1019
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1020
|
-
end
|
|
1021
|
-
# Number of times skb or buffer allocation failed on the Rx datapath.
|
|
1022
|
-
# Allocation failure may, or may not result in a packet drop, depending
|
|
1023
|
-
# on driver implementation and whether system recovers quickly.
|
|
1024
|
-
class RxAllocFail < Attribute
|
|
1025
|
-
TYPE = 12
|
|
1026
|
-
NAME = :"rx_alloc_fail"
|
|
1027
|
-
# @private
|
|
1028
|
-
ORDER = 8
|
|
1029
|
-
# @private
|
|
1030
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1031
|
-
end
|
|
1032
|
-
# Number of all packets which entered the device, but never left it,
|
|
1033
|
-
# including but not limited to: packets dropped due to lack of buffer
|
|
1034
|
-
# space, processing errors, explicit or implicit policies and packet
|
|
1035
|
-
# filters.
|
|
1036
|
-
class RxHwDrops < Attribute
|
|
1037
|
-
TYPE = 13
|
|
1038
|
-
NAME = :"rx_hw_drops"
|
|
1039
|
-
# @private
|
|
1040
|
-
ORDER = 9
|
|
1041
|
-
# @private
|
|
1042
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1043
|
-
end
|
|
1044
|
-
# Number of packets dropped due to transient lack of resources, such as
|
|
1045
|
-
# buffer space, host descriptors etc.
|
|
1046
|
-
class RxHwDropOverruns < Attribute
|
|
1047
|
-
TYPE = 14
|
|
1048
|
-
NAME = :"rx_hw_drop_overruns"
|
|
1049
|
-
# @private
|
|
1050
|
-
ORDER = 10
|
|
1051
|
-
# @private
|
|
1052
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1053
|
-
end
|
|
1054
|
-
# Number of packets that were marked as CHECKSUM_COMPLETE.
|
|
1055
|
-
class RxCsumComplete < Attribute
|
|
1056
|
-
TYPE = 15
|
|
1057
|
-
NAME = :"rx_csum_complete"
|
|
1058
|
-
# @private
|
|
1059
|
-
ORDER = 11
|
|
1060
|
-
# @private
|
|
1061
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1062
|
-
end
|
|
1063
|
-
# Number of packets that were marked as CHECKSUM_UNNECESSARY.
|
|
1064
|
-
class RxCsumUnnecessary < Attribute
|
|
1065
|
-
TYPE = 16
|
|
1066
|
-
NAME = :"rx_csum_unnecessary"
|
|
1067
|
-
# @private
|
|
1068
|
-
ORDER = 12
|
|
1069
|
-
# @private
|
|
1070
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1071
|
-
end
|
|
1072
|
-
# Number of packets that were not checksummed by device.
|
|
1073
|
-
class RxCsumNone < Attribute
|
|
1074
|
-
TYPE = 17
|
|
1075
|
-
NAME = :"rx_csum_none"
|
|
1076
|
-
# @private
|
|
1077
|
-
ORDER = 13
|
|
1078
|
-
# @private
|
|
1079
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1080
|
-
end
|
|
1081
|
-
# Number of packets with bad checksum. The packets are not discarded,
|
|
1082
|
-
# but still delivered to the stack.
|
|
1083
|
-
class RxCsumBad < Attribute
|
|
1084
|
-
TYPE = 18
|
|
1085
|
-
NAME = :"rx_csum_bad"
|
|
1086
|
-
# @private
|
|
1087
|
-
ORDER = 14
|
|
1088
|
-
# @private
|
|
1089
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1090
|
-
end
|
|
1091
|
-
# Number of packets that were coalesced from smaller packets by the
|
|
1092
|
-
# device. Counts only packets coalesced with the HW-GRO netdevice
|
|
1093
|
-
# feature, LRO-coalesced packets are not counted.
|
|
1094
|
-
class RxHwGroPackets < Attribute
|
|
1095
|
-
TYPE = 19
|
|
1096
|
-
NAME = :"rx_hw_gro_packets"
|
|
1097
|
-
# @private
|
|
1098
|
-
ORDER = 15
|
|
1099
|
-
# @private
|
|
1100
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1101
|
-
end
|
|
1102
|
-
# See `rx-hw-gro-packets`.
|
|
1103
|
-
class RxHwGroBytes < Attribute
|
|
1104
|
-
TYPE = 20
|
|
1105
|
-
NAME = :"rx_hw_gro_bytes"
|
|
1106
|
-
# @private
|
|
1107
|
-
ORDER = 16
|
|
1108
|
-
# @private
|
|
1109
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1110
|
-
end
|
|
1111
|
-
# Number of packets that were coalesced to bigger packetss with the
|
|
1112
|
-
# HW-GRO netdevice feature. LRO-coalesced packets are not counted.
|
|
1113
|
-
class RxHwGroWirePackets < Attribute
|
|
1114
|
-
TYPE = 21
|
|
1115
|
-
NAME = :"rx_hw_gro_wire_packets"
|
|
1116
|
-
# @private
|
|
1117
|
-
ORDER = 17
|
|
1118
|
-
# @private
|
|
1119
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1120
|
-
end
|
|
1121
|
-
# See `rx-hw-gro-wire-packets`.
|
|
1122
|
-
class RxHwGroWireBytes < Attribute
|
|
1123
|
-
TYPE = 22
|
|
1124
|
-
NAME = :"rx_hw_gro_wire_bytes"
|
|
1125
|
-
# @private
|
|
1126
|
-
ORDER = 18
|
|
1127
|
-
# @private
|
|
1128
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1129
|
-
end
|
|
1130
|
-
# Number of the packets dropped by the device due to the received
|
|
1131
|
-
# packets bitrate exceeding the device rate limit.
|
|
1132
|
-
class RxHwDropRatelimits < Attribute
|
|
1133
|
-
TYPE = 23
|
|
1134
|
-
NAME = :"rx_hw_drop_ratelimits"
|
|
1135
|
-
# @private
|
|
1136
|
-
ORDER = 19
|
|
1137
|
-
# @private
|
|
1138
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1139
|
-
end
|
|
1140
|
-
# Number of packets that arrived at the device but never left it,
|
|
1141
|
-
# encompassing packets dropped for reasons such as processing errors, as
|
|
1142
|
-
# well as those affected by explicitly defined policies and packet
|
|
1143
|
-
# filtering criteria.
|
|
1144
|
-
class TxHwDrops < Attribute
|
|
1145
|
-
TYPE = 24
|
|
1146
|
-
NAME = :"tx_hw_drops"
|
|
1147
|
-
# @private
|
|
1148
|
-
ORDER = 20
|
|
1149
|
-
# @private
|
|
1150
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1151
|
-
end
|
|
1152
|
-
# Number of packets dropped because they were invalid or malformed.
|
|
1153
|
-
class TxHwDropErrors < Attribute
|
|
1154
|
-
TYPE = 25
|
|
1155
|
-
NAME = :"tx_hw_drop_errors"
|
|
1156
|
-
# @private
|
|
1157
|
-
ORDER = 21
|
|
1158
|
-
# @private
|
|
1159
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1160
|
-
end
|
|
1161
|
-
# Number of packets that did not require the device to calculate the
|
|
1162
|
-
# checksum.
|
|
1163
|
-
class TxCsumNone < Attribute
|
|
1164
|
-
TYPE = 26
|
|
1165
|
-
NAME = :"tx_csum_none"
|
|
1166
|
-
# @private
|
|
1167
|
-
ORDER = 22
|
|
1168
|
-
# @private
|
|
1169
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1170
|
-
end
|
|
1171
|
-
# Number of packets that required the device to calculate the checksum.
|
|
1172
|
-
# This counter includes the number of GSO wire packets for which device
|
|
1173
|
-
# calculated the L4 checksum.
|
|
1174
|
-
class TxNeedsCsum < Attribute
|
|
1175
|
-
TYPE = 27
|
|
1176
|
-
NAME = :"tx_needs_csum"
|
|
1177
|
-
# @private
|
|
1178
|
-
ORDER = 23
|
|
1179
|
-
# @private
|
|
1180
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1181
|
-
end
|
|
1182
|
-
# Number of packets that necessitated segmentation into smaller packets
|
|
1183
|
-
# by the device.
|
|
1184
|
-
class TxHwGsoPackets < Attribute
|
|
1185
|
-
TYPE = 28
|
|
1186
|
-
NAME = :"tx_hw_gso_packets"
|
|
1187
|
-
# @private
|
|
1188
|
-
ORDER = 24
|
|
1189
|
-
# @private
|
|
1190
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1191
|
-
end
|
|
1192
|
-
# See `tx-hw-gso-packets`.
|
|
1193
|
-
class TxHwGsoBytes < Attribute
|
|
1194
|
-
TYPE = 29
|
|
1195
|
-
NAME = :"tx_hw_gso_bytes"
|
|
1196
|
-
# @private
|
|
1197
|
-
ORDER = 25
|
|
1198
|
-
# @private
|
|
1199
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1200
|
-
end
|
|
1201
|
-
# Number of wire-sized packets generated by processing
|
|
1202
|
-
# `tx-hw-gso-packets`
|
|
1203
|
-
class TxHwGsoWirePackets < Attribute
|
|
1204
|
-
TYPE = 30
|
|
1205
|
-
NAME = :"tx_hw_gso_wire_packets"
|
|
1206
|
-
# @private
|
|
1207
|
-
ORDER = 26
|
|
1208
|
-
# @private
|
|
1209
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1210
|
-
end
|
|
1211
|
-
# See `tx-hw-gso-wire-packets`.
|
|
1212
|
-
class TxHwGsoWireBytes < Attribute
|
|
1213
|
-
TYPE = 31
|
|
1214
|
-
NAME = :"tx_hw_gso_wire_bytes"
|
|
1215
|
-
# @private
|
|
1216
|
-
ORDER = 27
|
|
1217
|
-
# @private
|
|
1218
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1219
|
-
end
|
|
1220
|
-
# Number of the packets dropped by the device due to the transmit
|
|
1221
|
-
# packets bitrate exceeding the device rate limit.
|
|
1222
|
-
class TxHwDropRatelimits < Attribute
|
|
1223
|
-
TYPE = 32
|
|
1224
|
-
NAME = :"tx_hw_drop_ratelimits"
|
|
1225
|
-
# @private
|
|
1226
|
-
ORDER = 28
|
|
1227
|
-
# @private
|
|
1228
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1229
|
-
end
|
|
1230
|
-
# Number of times driver paused accepting new tx packets
|
|
1231
|
-
# from the stack to this queue, because the queue was full.
|
|
1232
|
-
# Note that if BQL is supported and enabled on the device
|
|
1233
|
-
# the networking stack will avoid queuing a lot of data at once.
|
|
1234
|
-
class TxStop < Attribute
|
|
1235
|
-
TYPE = 33
|
|
1236
|
-
NAME = :"tx_stop"
|
|
1237
|
-
# @private
|
|
1238
|
-
ORDER = 29
|
|
1239
|
-
# @private
|
|
1240
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1241
|
-
end
|
|
1242
|
-
# Number of times driver re-started accepting send
|
|
1243
|
-
# requests to this queue from the stack.
|
|
1244
|
-
class TxWake < Attribute
|
|
1245
|
-
TYPE = 34
|
|
1246
|
-
NAME = :"tx_wake"
|
|
1247
|
-
# @private
|
|
1248
|
-
ORDER = 30
|
|
1249
|
-
# @private
|
|
1250
|
-
DATATYPE = ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false, check: nil)
|
|
1251
|
-
end
|
|
1252
|
-
# @private
|
|
1253
|
-
BY_NAME = Ractor.make_shareable({:"ifindex" => Ifindex, :"queue_type" => QueueType, :"queue_id" => QueueId, :"scope" => Scope, :"rx_packets" => RxPackets, :"rx_bytes" => RxBytes, :"tx_packets" => TxPackets, :"tx_bytes" => TxBytes, :"rx_alloc_fail" => RxAllocFail, :"rx_hw_drops" => RxHwDrops, :"rx_hw_drop_overruns" => RxHwDropOverruns, :"rx_csum_complete" => RxCsumComplete, :"rx_csum_unnecessary" => RxCsumUnnecessary, :"rx_csum_none" => RxCsumNone, :"rx_csum_bad" => RxCsumBad, :"rx_hw_gro_packets" => RxHwGroPackets, :"rx_hw_gro_bytes" => RxHwGroBytes, :"rx_hw_gro_wire_packets" => RxHwGroWirePackets, :"rx_hw_gro_wire_bytes" => RxHwGroWireBytes, :"rx_hw_drop_ratelimits" => RxHwDropRatelimits, :"tx_hw_drops" => TxHwDrops, :"tx_hw_drop_errors" => TxHwDropErrors, :"tx_csum_none" => TxCsumNone, :"tx_needs_csum" => TxNeedsCsum, :"tx_hw_gso_packets" => TxHwGsoPackets, :"tx_hw_gso_bytes" => TxHwGsoBytes, :"tx_hw_gso_wire_packets" => TxHwGsoWirePackets, :"tx_hw_gso_wire_bytes" => TxHwGsoWireBytes, :"tx_hw_drop_ratelimits" => TxHwDropRatelimits, :"tx_stop" => TxStop, :"tx_wake" => TxWake}) #: Hash[::Symbol, Attribute]
|
|
1254
|
-
# @private
|
|
1255
|
-
BY_TYPE = Ractor.make_shareable({1 => Ifindex, 2 => QueueType, 3 => QueueId, 4 => Scope, 8 => RxPackets, 9 => RxBytes, 10 => TxPackets, 11 => TxBytes, 12 => RxAllocFail, 13 => RxHwDrops, 14 => RxHwDropOverruns, 15 => RxCsumComplete, 16 => RxCsumUnnecessary, 17 => RxCsumNone, 18 => RxCsumBad, 19 => RxHwGroPackets, 20 => RxHwGroBytes, 21 => RxHwGroWirePackets, 22 => RxHwGroWireBytes, 23 => RxHwDropRatelimits, 24 => TxHwDrops, 25 => TxHwDropErrors, 26 => TxCsumNone, 27 => TxNeedsCsum, 28 => TxHwGsoPackets, 29 => TxHwGsoBytes, 30 => TxHwGsoWirePackets, 31 => TxHwGsoWireBytes, 32 => TxHwDropRatelimits, 33 => TxStop, 34 => TxWake}) #: Hash[::Integer, Attribute]
|
|
1256
|
-
# ifindex of the netdevice to which stats belong.
|
|
1257
|
-
# @rbs return: ::Integer
|
|
1258
|
-
# @return [Integer]
|
|
1259
|
-
# @see Ifindex
|
|
1260
|
-
def ifindex; self[:"ifindex"]&.value; end
|
|
1261
|
-
# Queue type as rx, tx, for queue-id.
|
|
1262
|
-
#
|
|
1263
|
-
# Known enum values are defined in {Enums::QueueType}.
|
|
1264
|
-
# @rbs return: ::Integer
|
|
1265
|
-
# @return [Integer]
|
|
1266
|
-
# @see QueueType
|
|
1267
|
-
def queue_type; self[:"queue_type"]&.value; end
|
|
1268
|
-
# Queue ID, if stats are scoped to a single queue instance.
|
|
1269
|
-
# @rbs return: ::Integer
|
|
1270
|
-
# @return [Integer]
|
|
1271
|
-
# @see QueueId
|
|
1272
|
-
def queue_id; self[:"queue_id"]&.value; end
|
|
1273
|
-
# What object type should be used to iterate over the stats.
|
|
1274
|
-
#
|
|
1275
|
-
#
|
|
1276
|
-
# Known flags are defined in {Flags::QstatsScope}.
|
|
1277
|
-
# @rbs return: ::Integer
|
|
1278
|
-
# @return [Integer]
|
|
1279
|
-
# @see Scope
|
|
1280
|
-
def scope; self[:"scope"]&.value; end
|
|
1281
|
-
# Number of wire packets successfully received and passed to the stack.
|
|
1282
|
-
# For drivers supporting XDP, XDP is considered the first layer
|
|
1283
|
-
# of the stack, so packets consumed by XDP are still counted here.
|
|
1284
|
-
# @rbs return: ::Integer
|
|
1285
|
-
# @return [Integer]
|
|
1286
|
-
# @see RxPackets
|
|
1287
|
-
def rx_packets; self[:"rx_packets"]&.value; end
|
|
1288
|
-
# Successfully received bytes, see `rx-packets`.
|
|
1289
|
-
# @rbs return: ::Integer
|
|
1290
|
-
# @return [Integer]
|
|
1291
|
-
# @see RxBytes
|
|
1292
|
-
def rx_bytes; self[:"rx_bytes"]&.value; end
|
|
1293
|
-
# Number of wire packets successfully sent. Packet is considered to be
|
|
1294
|
-
# successfully sent once it is in device memory (usually this means
|
|
1295
|
-
# the device has issued a DMA completion for the packet).
|
|
1296
|
-
# @rbs return: ::Integer
|
|
1297
|
-
# @return [Integer]
|
|
1298
|
-
# @see TxPackets
|
|
1299
|
-
def tx_packets; self[:"tx_packets"]&.value; end
|
|
1300
|
-
# Successfully sent bytes, see `tx-packets`.
|
|
1301
|
-
# @rbs return: ::Integer
|
|
1302
|
-
# @return [Integer]
|
|
1303
|
-
# @see TxBytes
|
|
1304
|
-
def tx_bytes; self[:"tx_bytes"]&.value; end
|
|
1305
|
-
# Number of times skb or buffer allocation failed on the Rx datapath.
|
|
1306
|
-
# Allocation failure may, or may not result in a packet drop, depending
|
|
1307
|
-
# on driver implementation and whether system recovers quickly.
|
|
1308
|
-
# @rbs return: ::Integer
|
|
1309
|
-
# @return [Integer]
|
|
1310
|
-
# @see RxAllocFail
|
|
1311
|
-
def rx_alloc_fail; self[:"rx_alloc_fail"]&.value; end
|
|
1312
|
-
# Number of all packets which entered the device, but never left it,
|
|
1313
|
-
# including but not limited to: packets dropped due to lack of buffer
|
|
1314
|
-
# space, processing errors, explicit or implicit policies and packet
|
|
1315
|
-
# filters.
|
|
1316
|
-
# @rbs return: ::Integer
|
|
1317
|
-
# @return [Integer]
|
|
1318
|
-
# @see RxHwDrops
|
|
1319
|
-
def rx_hw_drops; self[:"rx_hw_drops"]&.value; end
|
|
1320
|
-
# Number of packets dropped due to transient lack of resources, such as
|
|
1321
|
-
# buffer space, host descriptors etc.
|
|
1322
|
-
# @rbs return: ::Integer
|
|
1323
|
-
# @return [Integer]
|
|
1324
|
-
# @see RxHwDropOverruns
|
|
1325
|
-
def rx_hw_drop_overruns; self[:"rx_hw_drop_overruns"]&.value; end
|
|
1326
|
-
# Number of packets that were marked as CHECKSUM_COMPLETE.
|
|
1327
|
-
# @rbs return: ::Integer
|
|
1328
|
-
# @return [Integer]
|
|
1329
|
-
# @see RxCsumComplete
|
|
1330
|
-
def rx_csum_complete; self[:"rx_csum_complete"]&.value; end
|
|
1331
|
-
# Number of packets that were marked as CHECKSUM_UNNECESSARY.
|
|
1332
|
-
# @rbs return: ::Integer
|
|
1333
|
-
# @return [Integer]
|
|
1334
|
-
# @see RxCsumUnnecessary
|
|
1335
|
-
def rx_csum_unnecessary; self[:"rx_csum_unnecessary"]&.value; end
|
|
1336
|
-
# Number of packets that were not checksummed by device.
|
|
1337
|
-
# @rbs return: ::Integer
|
|
1338
|
-
# @return [Integer]
|
|
1339
|
-
# @see RxCsumNone
|
|
1340
|
-
def rx_csum_none; self[:"rx_csum_none"]&.value; end
|
|
1341
|
-
# Number of packets with bad checksum. The packets are not discarded,
|
|
1342
|
-
# but still delivered to the stack.
|
|
1343
|
-
# @rbs return: ::Integer
|
|
1344
|
-
# @return [Integer]
|
|
1345
|
-
# @see RxCsumBad
|
|
1346
|
-
def rx_csum_bad; self[:"rx_csum_bad"]&.value; end
|
|
1347
|
-
# Number of packets that were coalesced from smaller packets by the
|
|
1348
|
-
# device. Counts only packets coalesced with the HW-GRO netdevice
|
|
1349
|
-
# feature, LRO-coalesced packets are not counted.
|
|
1350
|
-
# @rbs return: ::Integer
|
|
1351
|
-
# @return [Integer]
|
|
1352
|
-
# @see RxHwGroPackets
|
|
1353
|
-
def rx_hw_gro_packets; self[:"rx_hw_gro_packets"]&.value; end
|
|
1354
|
-
# See `rx-hw-gro-packets`.
|
|
1355
|
-
# @rbs return: ::Integer
|
|
1356
|
-
# @return [Integer]
|
|
1357
|
-
# @see RxHwGroBytes
|
|
1358
|
-
def rx_hw_gro_bytes; self[:"rx_hw_gro_bytes"]&.value; end
|
|
1359
|
-
# Number of packets that were coalesced to bigger packetss with the
|
|
1360
|
-
# HW-GRO netdevice feature. LRO-coalesced packets are not counted.
|
|
1361
|
-
# @rbs return: ::Integer
|
|
1362
|
-
# @return [Integer]
|
|
1363
|
-
# @see RxHwGroWirePackets
|
|
1364
|
-
def rx_hw_gro_wire_packets; self[:"rx_hw_gro_wire_packets"]&.value; end
|
|
1365
|
-
# See `rx-hw-gro-wire-packets`.
|
|
1366
|
-
# @rbs return: ::Integer
|
|
1367
|
-
# @return [Integer]
|
|
1368
|
-
# @see RxHwGroWireBytes
|
|
1369
|
-
def rx_hw_gro_wire_bytes; self[:"rx_hw_gro_wire_bytes"]&.value; end
|
|
1370
|
-
# Number of the packets dropped by the device due to the received
|
|
1371
|
-
# packets bitrate exceeding the device rate limit.
|
|
1372
|
-
# @rbs return: ::Integer
|
|
1373
|
-
# @return [Integer]
|
|
1374
|
-
# @see RxHwDropRatelimits
|
|
1375
|
-
def rx_hw_drop_ratelimits; self[:"rx_hw_drop_ratelimits"]&.value; end
|
|
1376
|
-
# Number of packets that arrived at the device but never left it,
|
|
1377
|
-
# encompassing packets dropped for reasons such as processing errors, as
|
|
1378
|
-
# well as those affected by explicitly defined policies and packet
|
|
1379
|
-
# filtering criteria.
|
|
1380
|
-
# @rbs return: ::Integer
|
|
1381
|
-
# @return [Integer]
|
|
1382
|
-
# @see TxHwDrops
|
|
1383
|
-
def tx_hw_drops; self[:"tx_hw_drops"]&.value; end
|
|
1384
|
-
# Number of packets dropped because they were invalid or malformed.
|
|
1385
|
-
# @rbs return: ::Integer
|
|
1386
|
-
# @return [Integer]
|
|
1387
|
-
# @see TxHwDropErrors
|
|
1388
|
-
def tx_hw_drop_errors; self[:"tx_hw_drop_errors"]&.value; end
|
|
1389
|
-
# Number of packets that did not require the device to calculate the
|
|
1390
|
-
# checksum.
|
|
1391
|
-
# @rbs return: ::Integer
|
|
1392
|
-
# @return [Integer]
|
|
1393
|
-
# @see TxCsumNone
|
|
1394
|
-
def tx_csum_none; self[:"tx_csum_none"]&.value; end
|
|
1395
|
-
# Number of packets that required the device to calculate the checksum.
|
|
1396
|
-
# This counter includes the number of GSO wire packets for which device
|
|
1397
|
-
# calculated the L4 checksum.
|
|
1398
|
-
# @rbs return: ::Integer
|
|
1399
|
-
# @return [Integer]
|
|
1400
|
-
# @see TxNeedsCsum
|
|
1401
|
-
def tx_needs_csum; self[:"tx_needs_csum"]&.value; end
|
|
1402
|
-
# Number of packets that necessitated segmentation into smaller packets
|
|
1403
|
-
# by the device.
|
|
1404
|
-
# @rbs return: ::Integer
|
|
1405
|
-
# @return [Integer]
|
|
1406
|
-
# @see TxHwGsoPackets
|
|
1407
|
-
def tx_hw_gso_packets; self[:"tx_hw_gso_packets"]&.value; end
|
|
1408
|
-
# See `tx-hw-gso-packets`.
|
|
1409
|
-
# @rbs return: ::Integer
|
|
1410
|
-
# @return [Integer]
|
|
1411
|
-
# @see TxHwGsoBytes
|
|
1412
|
-
def tx_hw_gso_bytes; self[:"tx_hw_gso_bytes"]&.value; end
|
|
1413
|
-
# Number of wire-sized packets generated by processing
|
|
1414
|
-
# `tx-hw-gso-packets`
|
|
1415
|
-
# @rbs return: ::Integer
|
|
1416
|
-
# @return [Integer]
|
|
1417
|
-
# @see TxHwGsoWirePackets
|
|
1418
|
-
def tx_hw_gso_wire_packets; self[:"tx_hw_gso_wire_packets"]&.value; end
|
|
1419
|
-
# See `tx-hw-gso-wire-packets`.
|
|
1420
|
-
# @rbs return: ::Integer
|
|
1421
|
-
# @return [Integer]
|
|
1422
|
-
# @see TxHwGsoWireBytes
|
|
1423
|
-
def tx_hw_gso_wire_bytes; self[:"tx_hw_gso_wire_bytes"]&.value; end
|
|
1424
|
-
# Number of the packets dropped by the device due to the transmit
|
|
1425
|
-
# packets bitrate exceeding the device rate limit.
|
|
1426
|
-
# @rbs return: ::Integer
|
|
1427
|
-
# @return [Integer]
|
|
1428
|
-
# @see TxHwDropRatelimits
|
|
1429
|
-
def tx_hw_drop_ratelimits; self[:"tx_hw_drop_ratelimits"]&.value; end
|
|
1430
|
-
# Number of times driver paused accepting new tx packets
|
|
1431
|
-
# from the stack to this queue, because the queue was full.
|
|
1432
|
-
# Note that if BQL is supported and enabled on the device
|
|
1433
|
-
# the networking stack will avoid queuing a lot of data at once.
|
|
1434
|
-
# @rbs return: ::Integer
|
|
1435
|
-
# @return [Integer]
|
|
1436
|
-
# @see TxStop
|
|
1437
|
-
def tx_stop; self[:"tx_stop"]&.value; end
|
|
1438
|
-
# Number of times driver re-started accepting send
|
|
1439
|
-
# requests to this queue from the stack.
|
|
1440
|
-
# @rbs return: ::Integer
|
|
1441
|
-
# @return [Integer]
|
|
1442
|
-
# @see TxWake
|
|
1443
|
-
def tx_wake; self[:"tx_wake"]&.value; end
|
|
1444
|
-
class << self
|
|
1445
|
-
# Looks up Attribute class by name.
|
|
1446
|
-
# @rbs name: Symbol
|
|
1447
|
-
# @rbs return: Attribute
|
|
1448
|
-
# @param [Symbol] name
|
|
1449
|
-
# @return [Attribute]
|
|
1450
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
1451
|
-
# Looks up Attribute class by type value.
|
|
1452
|
-
# @rbs type: Integer
|
|
1453
|
-
# @rbs return: Attribute
|
|
1454
|
-
# @param [Integer] type
|
|
1455
|
-
# @return [Attribute]
|
|
1456
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
1457
|
-
end
|
|
1458
|
-
end
|
|
1459
|
-
class QueueId < ::Nl::AttributeSet
|
|
1460
|
-
# Abstract class
|
|
1461
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
1462
|
-
end
|
|
1463
|
-
# Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.
|
|
1464
|
-
class Id < Attribute
|
|
1465
|
-
TYPE = 1
|
|
1466
|
-
NAME = :"id"
|
|
1467
|
-
# @private
|
|
1468
|
-
ORDER = 0
|
|
1469
|
-
# @private
|
|
1470
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
1471
|
-
end
|
|
1472
|
-
# Queue type as rx, tx. Each queue type defines a separate ID space. XDP TX queues allocated in the kernel are not linked to NAPIs and thus not listed. AF_XDP queues will have more information set in the xsk attribute.
|
|
1473
|
-
#
|
|
1474
|
-
# Known enum values are defined in {Enums::QueueType}.
|
|
1475
|
-
class Type < Attribute
|
|
1476
|
-
TYPE = 3
|
|
1477
|
-
NAME = :"type"
|
|
1478
|
-
# @private
|
|
1479
|
-
ORDER = 1
|
|
1480
|
-
# @private
|
|
1481
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
216
|
+
# Page pool statistics, see docs for struct page_pool_stats
|
|
217
|
+
# for information about individual statistics.
|
|
218
|
+
class PagePoolStats < ::Nl::AttributeSet
|
|
219
|
+
module Definitions
|
|
220
|
+
# Page pool identifying information.
|
|
221
|
+
# @rbs return: AttributeSets::PagePoolInfo
|
|
222
|
+
# @return [AttributeSets::PagePoolInfo]
|
|
223
|
+
def info; self[:"info"]; end
|
|
224
|
+
# @rbs return: ::Integer
|
|
225
|
+
# @return [Integer]
|
|
226
|
+
def alloc_fast; self[:"alloc_fast"]; end
|
|
227
|
+
# @rbs return: ::Integer
|
|
228
|
+
# @return [Integer]
|
|
229
|
+
def alloc_slow; self[:"alloc_slow"]; end
|
|
230
|
+
# @rbs return: ::Integer
|
|
231
|
+
# @return [Integer]
|
|
232
|
+
def alloc_slow_high_order; self[:"alloc_slow_high_order"]; end
|
|
233
|
+
# @rbs return: ::Integer
|
|
234
|
+
# @return [Integer]
|
|
235
|
+
def alloc_empty; self[:"alloc_empty"]; end
|
|
236
|
+
# @rbs return: ::Integer
|
|
237
|
+
# @return [Integer]
|
|
238
|
+
def alloc_refill; self[:"alloc_refill"]; end
|
|
239
|
+
# @rbs return: ::Integer
|
|
240
|
+
# @return [Integer]
|
|
241
|
+
def alloc_waive; self[:"alloc_waive"]; end
|
|
242
|
+
# @rbs return: ::Integer
|
|
243
|
+
# @return [Integer]
|
|
244
|
+
def recycle_cached; self[:"recycle_cached"]; end
|
|
245
|
+
# @rbs return: ::Integer
|
|
246
|
+
# @return [Integer]
|
|
247
|
+
def recycle_cache_full; self[:"recycle_cache_full"]; end
|
|
248
|
+
# @rbs return: ::Integer
|
|
249
|
+
# @return [Integer]
|
|
250
|
+
def recycle_ring; self[:"recycle_ring"]; end
|
|
251
|
+
# @rbs return: ::Integer
|
|
252
|
+
# @return [Integer]
|
|
253
|
+
def recycle_ring_full; self[:"recycle_ring_full"]; end
|
|
254
|
+
# @rbs return: ::Integer
|
|
255
|
+
# @return [Integer]
|
|
256
|
+
def recycle_released_refcnt; self[:"recycle_released_refcnt"]; end
|
|
257
|
+
end
|
|
258
|
+
include Definitions
|
|
259
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
260
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
261
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
262
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1482
263
|
end
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
#
|
|
1501
|
-
|
|
1502
|
-
#
|
|
1503
|
-
# @
|
|
1504
|
-
# @return [
|
|
1505
|
-
def
|
|
1506
|
-
#
|
|
1507
|
-
# @rbs
|
|
1508
|
-
# @
|
|
1509
|
-
|
|
1510
|
-
#
|
|
1511
|
-
|
|
264
|
+
end
|
|
265
|
+
class Napi < ::Nl::AttributeSet
|
|
266
|
+
module Definitions
|
|
267
|
+
# ifindex of the netdevice to which NAPI instance belongs.
|
|
268
|
+
# @rbs return: ::Integer
|
|
269
|
+
# @return [Integer]
|
|
270
|
+
def ifindex; self[:"ifindex"]; end
|
|
271
|
+
# ID of the NAPI instance.
|
|
272
|
+
# @rbs return: ::Integer
|
|
273
|
+
# @return [Integer]
|
|
274
|
+
def id; self[:"id"]; end
|
|
275
|
+
# The associated interrupt vector number for the napi
|
|
276
|
+
# @rbs return: ::Integer
|
|
277
|
+
# @return [Integer]
|
|
278
|
+
def irq; self[:"irq"]; end
|
|
279
|
+
# PID of the napi thread, if NAPI is configured to operate in threaded mode. If NAPI is not in threaded mode (i.e. uses normal softirq context), the attribute will be absent.
|
|
280
|
+
# @rbs return: ::Integer
|
|
281
|
+
# @return [Integer]
|
|
282
|
+
def pid; self[:"pid"]; end
|
|
283
|
+
# The number of consecutive empty polls before IRQ deferral ends and hardware IRQs are re-enabled.
|
|
284
|
+
# @rbs return: ::Integer
|
|
285
|
+
# @return [Integer]
|
|
286
|
+
def defer_hard_irqs; self[:"defer_hard_irqs"]; end
|
|
287
|
+
# The timeout, in nanoseconds, of when to trigger the NAPI watchdog timer which schedules NAPI processing. Additionally, a non-zero value will also prevent GRO from flushing recent super-frames at the end of a NAPI cycle. This may add receive latency in exchange for reducing the number of frames processed by the network stack.
|
|
288
|
+
# @rbs return: ::Integer
|
|
289
|
+
# @return [Integer]
|
|
290
|
+
def gro_flush_timeout; self[:"gro_flush_timeout"]; end
|
|
291
|
+
# The timeout, in nanoseconds, of how long to suspend irq processing, if event polling finds events
|
|
292
|
+
# @rbs return: ::Integer
|
|
293
|
+
# @return [Integer]
|
|
294
|
+
def irq_suspend_timeout; self[:"irq_suspend_timeout"]; end
|
|
295
|
+
# Whether the NAPI is configured to operate in threaded polling mode. If this is set to enabled then the NAPI context operates in threaded polling mode. If this is set to busy-poll, then the threaded polling mode also busy polls.
|
|
296
|
+
#
|
|
297
|
+
# Known enum values are defined in {Enums::NapiThreaded}.
|
|
298
|
+
# @rbs return: ::Integer
|
|
299
|
+
# @return [Integer]
|
|
300
|
+
def threaded; self[:"threaded"]; end
|
|
301
|
+
end
|
|
302
|
+
include Definitions
|
|
303
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
304
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
305
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
306
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1512
307
|
end
|
|
1513
308
|
end
|
|
1514
|
-
class
|
|
1515
|
-
|
|
1516
|
-
class Attribute < ::Nl::AttributeSet::Attribute
|
|
309
|
+
class XskInfo < ::Nl::AttributeSet
|
|
310
|
+
module Definitions
|
|
1517
311
|
end
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
ORDER = 0
|
|
1524
|
-
# @private
|
|
1525
|
-
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 })
|
|
312
|
+
include Definitions
|
|
313
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
314
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
315
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
316
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1526
317
|
end
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
# @
|
|
1532
|
-
|
|
318
|
+
end
|
|
319
|
+
class Queue < ::Nl::AttributeSet
|
|
320
|
+
module Definitions
|
|
321
|
+
# Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.
|
|
322
|
+
# @rbs return: ::Integer
|
|
323
|
+
# @return [Integer]
|
|
324
|
+
def id; self[:"id"]; end
|
|
325
|
+
# ifindex of the netdevice to which the queue belongs.
|
|
326
|
+
# @rbs return: ::Integer
|
|
327
|
+
# @return [Integer]
|
|
328
|
+
def ifindex; self[:"ifindex"]; end
|
|
329
|
+
# Queue type as rx, tx. Each queue type defines a separate ID space. XDP TX queues allocated in the kernel are not linked to NAPIs and thus not listed. AF_XDP queues will have more information set in the xsk attribute.
|
|
330
|
+
#
|
|
331
|
+
# Known enum values are defined in {Enums::QueueType}.
|
|
332
|
+
# @rbs return: ::Integer
|
|
333
|
+
# @return [Integer]
|
|
334
|
+
def type; self[:"type"]; end
|
|
335
|
+
# ID of the NAPI instance which services this queue.
|
|
336
|
+
# @rbs return: ::Integer
|
|
337
|
+
# @return [Integer]
|
|
338
|
+
def napi_id; self[:"napi_id"]; end
|
|
339
|
+
# ID of the dmabuf attached to this queue, if any.
|
|
340
|
+
# @rbs return: ::Integer
|
|
341
|
+
# @return [Integer]
|
|
342
|
+
def dmabuf; self[:"dmabuf"]; end
|
|
343
|
+
# io_uring memory provider information.
|
|
344
|
+
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
345
|
+
# @return [AttributeSets::IoUringProviderInfo]
|
|
346
|
+
def io_uring; self[:"io_uring"]; end
|
|
347
|
+
# XSK information for this queue, if any.
|
|
348
|
+
# @rbs return: AttributeSets::XskInfo
|
|
349
|
+
# @return [AttributeSets::XskInfo]
|
|
350
|
+
def xsk; self[:"xsk"]; end
|
|
351
|
+
# A queue from a virtual device can have a lease which refers to
|
|
352
|
+
# another queue from a physical device. This is useful for memory
|
|
353
|
+
# providers and AF_XDP operations which take an ifindex and queue id
|
|
354
|
+
# to allow applications to bind against virtual devices in containers.
|
|
355
|
+
# @rbs return: AttributeSets::Lease
|
|
356
|
+
# @return [AttributeSets::Lease]
|
|
357
|
+
def lease; self[:"lease"]; end
|
|
358
|
+
end
|
|
359
|
+
include Definitions
|
|
360
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
361
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
362
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
363
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1533
364
|
end
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
365
|
+
end
|
|
366
|
+
# Get device statistics, scoped to a device or a queue.
|
|
367
|
+
# These statistics extend (and partially duplicate) statistics available
|
|
368
|
+
# in struct rtnl_link_stats64.
|
|
369
|
+
# Value of the `scope` attribute determines how statistics are
|
|
370
|
+
# aggregated. When aggregated for the entire device the statistics
|
|
371
|
+
# represent the total number of events since last explicit reset of
|
|
372
|
+
# the device (i.e. not a reconfiguration like changing queue count).
|
|
373
|
+
# When reported per-queue, however, the statistics may not add
|
|
374
|
+
# up to the total number of events, will only be reported for currently
|
|
375
|
+
# active objects, and will likely report the number of events since last
|
|
376
|
+
# reconfiguration.
|
|
377
|
+
class Qstats < ::Nl::AttributeSet
|
|
378
|
+
module Definitions
|
|
379
|
+
# ifindex of the netdevice to which stats belong.
|
|
380
|
+
# @rbs return: ::Integer
|
|
381
|
+
# @return [Integer]
|
|
382
|
+
def ifindex; self[:"ifindex"]; end
|
|
383
|
+
# Queue type as rx, tx, for queue-id.
|
|
384
|
+
#
|
|
385
|
+
# Known enum values are defined in {Enums::QueueType}.
|
|
386
|
+
# @rbs return: ::Integer
|
|
387
|
+
# @return [Integer]
|
|
388
|
+
def queue_type; self[:"queue_type"]; end
|
|
389
|
+
# Queue ID, if stats are scoped to a single queue instance.
|
|
390
|
+
# @rbs return: ::Integer
|
|
391
|
+
# @return [Integer]
|
|
392
|
+
def queue_id; self[:"queue_id"]; end
|
|
393
|
+
# What object type should be used to iterate over the stats.
|
|
394
|
+
#
|
|
395
|
+
#
|
|
396
|
+
# Known flags are defined in {Flags::QstatsScope}.
|
|
397
|
+
# @rbs return: ::Integer
|
|
398
|
+
# @return [Integer]
|
|
399
|
+
def scope; self[:"scope"]; end
|
|
400
|
+
# Number of wire packets successfully received and passed to the stack.
|
|
401
|
+
# For drivers supporting XDP, XDP is considered the first layer
|
|
402
|
+
# of the stack, so packets consumed by XDP are still counted here.
|
|
403
|
+
# @rbs return: ::Integer
|
|
404
|
+
# @return [Integer]
|
|
405
|
+
def rx_packets; self[:"rx_packets"]; end
|
|
406
|
+
# Successfully received bytes, see `rx-packets`.
|
|
407
|
+
# @rbs return: ::Integer
|
|
408
|
+
# @return [Integer]
|
|
409
|
+
def rx_bytes; self[:"rx_bytes"]; end
|
|
410
|
+
# Number of wire packets successfully sent. Packet is considered to be
|
|
411
|
+
# successfully sent once it is in device memory (usually this means
|
|
412
|
+
# the device has issued a DMA completion for the packet).
|
|
413
|
+
# @rbs return: ::Integer
|
|
414
|
+
# @return [Integer]
|
|
415
|
+
def tx_packets; self[:"tx_packets"]; end
|
|
416
|
+
# Successfully sent bytes, see `tx-packets`.
|
|
417
|
+
# @rbs return: ::Integer
|
|
418
|
+
# @return [Integer]
|
|
419
|
+
def tx_bytes; self[:"tx_bytes"]; end
|
|
420
|
+
# Number of times skb or buffer allocation failed on the Rx datapath.
|
|
421
|
+
# Allocation failure may, or may not result in a packet drop, depending
|
|
422
|
+
# on driver implementation and whether system recovers quickly.
|
|
423
|
+
# @rbs return: ::Integer
|
|
424
|
+
# @return [Integer]
|
|
425
|
+
def rx_alloc_fail; self[:"rx_alloc_fail"]; end
|
|
426
|
+
# Number of all packets which entered the device, but never left it,
|
|
427
|
+
# including but not limited to: packets dropped due to lack of buffer
|
|
428
|
+
# space, processing errors, explicit or implicit policies and packet
|
|
429
|
+
# filters.
|
|
430
|
+
# @rbs return: ::Integer
|
|
431
|
+
# @return [Integer]
|
|
432
|
+
def rx_hw_drops; self[:"rx_hw_drops"]; end
|
|
433
|
+
# Number of packets dropped due to transient lack of resources, such as
|
|
434
|
+
# buffer space, host descriptors etc.
|
|
435
|
+
# @rbs return: ::Integer
|
|
436
|
+
# @return [Integer]
|
|
437
|
+
def rx_hw_drop_overruns; self[:"rx_hw_drop_overruns"]; end
|
|
438
|
+
# Number of packets that were marked as CHECKSUM_COMPLETE.
|
|
439
|
+
# @rbs return: ::Integer
|
|
440
|
+
# @return [Integer]
|
|
441
|
+
def rx_csum_complete; self[:"rx_csum_complete"]; end
|
|
442
|
+
# Number of packets that were marked as CHECKSUM_UNNECESSARY.
|
|
443
|
+
# @rbs return: ::Integer
|
|
444
|
+
# @return [Integer]
|
|
445
|
+
def rx_csum_unnecessary; self[:"rx_csum_unnecessary"]; end
|
|
446
|
+
# Number of packets that were not checksummed by device.
|
|
447
|
+
# @rbs return: ::Integer
|
|
448
|
+
# @return [Integer]
|
|
449
|
+
def rx_csum_none; self[:"rx_csum_none"]; end
|
|
450
|
+
# Number of packets with bad checksum. The packets are not discarded,
|
|
451
|
+
# but still delivered to the stack.
|
|
452
|
+
# @rbs return: ::Integer
|
|
453
|
+
# @return [Integer]
|
|
454
|
+
def rx_csum_bad; self[:"rx_csum_bad"]; end
|
|
455
|
+
# Number of packets that were coalesced from smaller packets by the
|
|
456
|
+
# device. Counts only packets coalesced with the HW-GRO netdevice
|
|
457
|
+
# feature, LRO-coalesced packets are not counted.
|
|
458
|
+
# @rbs return: ::Integer
|
|
459
|
+
# @return [Integer]
|
|
460
|
+
def rx_hw_gro_packets; self[:"rx_hw_gro_packets"]; end
|
|
461
|
+
# See `rx-hw-gro-packets`.
|
|
462
|
+
# @rbs return: ::Integer
|
|
463
|
+
# @return [Integer]
|
|
464
|
+
def rx_hw_gro_bytes; self[:"rx_hw_gro_bytes"]; end
|
|
465
|
+
# Number of packets that were coalesced to bigger packetss with the
|
|
466
|
+
# HW-GRO netdevice feature. LRO-coalesced packets are not counted.
|
|
467
|
+
# @rbs return: ::Integer
|
|
468
|
+
# @return [Integer]
|
|
469
|
+
def rx_hw_gro_wire_packets; self[:"rx_hw_gro_wire_packets"]; end
|
|
470
|
+
# See `rx-hw-gro-wire-packets`.
|
|
471
|
+
# @rbs return: ::Integer
|
|
472
|
+
# @return [Integer]
|
|
473
|
+
def rx_hw_gro_wire_bytes; self[:"rx_hw_gro_wire_bytes"]; end
|
|
474
|
+
# Number of the packets dropped by the device due to the received
|
|
475
|
+
# packets bitrate exceeding the device rate limit.
|
|
476
|
+
# @rbs return: ::Integer
|
|
477
|
+
# @return [Integer]
|
|
478
|
+
def rx_hw_drop_ratelimits; self[:"rx_hw_drop_ratelimits"]; end
|
|
479
|
+
# Number of packets that arrived at the device but never left it,
|
|
480
|
+
# encompassing packets dropped for reasons such as processing errors, as
|
|
481
|
+
# well as those affected by explicitly defined policies and packet
|
|
482
|
+
# filtering criteria.
|
|
483
|
+
# @rbs return: ::Integer
|
|
484
|
+
# @return [Integer]
|
|
485
|
+
def tx_hw_drops; self[:"tx_hw_drops"]; end
|
|
486
|
+
# Number of packets dropped because they were invalid or malformed.
|
|
487
|
+
# @rbs return: ::Integer
|
|
488
|
+
# @return [Integer]
|
|
489
|
+
def tx_hw_drop_errors; self[:"tx_hw_drop_errors"]; end
|
|
490
|
+
# Number of packets that did not require the device to calculate the
|
|
491
|
+
# checksum.
|
|
492
|
+
# @rbs return: ::Integer
|
|
493
|
+
# @return [Integer]
|
|
494
|
+
def tx_csum_none; self[:"tx_csum_none"]; end
|
|
495
|
+
# Number of packets that required the device to calculate the checksum.
|
|
496
|
+
# This counter includes the number of GSO wire packets for which device
|
|
497
|
+
# calculated the L4 checksum.
|
|
498
|
+
# @rbs return: ::Integer
|
|
499
|
+
# @return [Integer]
|
|
500
|
+
def tx_needs_csum; self[:"tx_needs_csum"]; end
|
|
501
|
+
# Number of packets that necessitated segmentation into smaller packets
|
|
502
|
+
# by the device.
|
|
503
|
+
# @rbs return: ::Integer
|
|
504
|
+
# @return [Integer]
|
|
505
|
+
def tx_hw_gso_packets; self[:"tx_hw_gso_packets"]; end
|
|
506
|
+
# See `tx-hw-gso-packets`.
|
|
507
|
+
# @rbs return: ::Integer
|
|
508
|
+
# @return [Integer]
|
|
509
|
+
def tx_hw_gso_bytes; self[:"tx_hw_gso_bytes"]; end
|
|
510
|
+
# Number of wire-sized packets generated by processing
|
|
511
|
+
# `tx-hw-gso-packets`
|
|
512
|
+
# @rbs return: ::Integer
|
|
513
|
+
# @return [Integer]
|
|
514
|
+
def tx_hw_gso_wire_packets; self[:"tx_hw_gso_wire_packets"]; end
|
|
515
|
+
# See `tx-hw-gso-wire-packets`.
|
|
516
|
+
# @rbs return: ::Integer
|
|
517
|
+
# @return [Integer]
|
|
518
|
+
def tx_hw_gso_wire_bytes; self[:"tx_hw_gso_wire_bytes"]; end
|
|
519
|
+
# Number of the packets dropped by the device due to the transmit
|
|
520
|
+
# packets bitrate exceeding the device rate limit.
|
|
521
|
+
# @rbs return: ::Integer
|
|
522
|
+
# @return [Integer]
|
|
523
|
+
def tx_hw_drop_ratelimits; self[:"tx_hw_drop_ratelimits"]; end
|
|
524
|
+
# Number of times driver paused accepting new tx packets
|
|
525
|
+
# from the stack to this queue, because the queue was full.
|
|
526
|
+
# Note that if BQL is supported and enabled on the device
|
|
527
|
+
# the networking stack will avoid queuing a lot of data at once.
|
|
528
|
+
# @rbs return: ::Integer
|
|
529
|
+
# @return [Integer]
|
|
530
|
+
def tx_stop; self[:"tx_stop"]; end
|
|
531
|
+
# Number of times driver re-started accepting send
|
|
532
|
+
# requests to this queue from the stack.
|
|
533
|
+
# @rbs return: ::Integer
|
|
534
|
+
# @return [Integer]
|
|
535
|
+
def tx_wake; self[:"tx_wake"]; end
|
|
536
|
+
end
|
|
537
|
+
include Definitions
|
|
538
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
539
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
540
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
541
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1542
542
|
end
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
#
|
|
1559
|
-
# @
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
class << self
|
|
1563
|
-
# Looks up Attribute class by name.
|
|
1564
|
-
# @rbs name: Symbol
|
|
1565
|
-
# @rbs return: Attribute
|
|
1566
|
-
# @param [Symbol] name
|
|
1567
|
-
# @return [Attribute]
|
|
1568
|
-
def by_name(name); BY_NAME.fetch(name); end
|
|
1569
|
-
# Looks up Attribute class by type value.
|
|
1570
|
-
# @rbs type: Integer
|
|
1571
|
-
# @rbs return: Attribute
|
|
1572
|
-
# @param [Integer] type
|
|
1573
|
-
# @return [Attribute]
|
|
1574
|
-
def by_type(type); BY_TYPE.fetch(type); end
|
|
543
|
+
end
|
|
544
|
+
class QueueId < ::Nl::AttributeSet
|
|
545
|
+
module Definitions
|
|
546
|
+
# Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.
|
|
547
|
+
# @rbs return: ::Integer
|
|
548
|
+
# @return [Integer]
|
|
549
|
+
def id; self[:"id"]; end
|
|
550
|
+
# Queue type as rx, tx. Each queue type defines a separate ID space. XDP TX queues allocated in the kernel are not linked to NAPIs and thus not listed. AF_XDP queues will have more information set in the xsk attribute.
|
|
551
|
+
#
|
|
552
|
+
# Known enum values are defined in {Enums::QueueType}.
|
|
553
|
+
# @rbs return: ::Integer
|
|
554
|
+
# @return [Integer]
|
|
555
|
+
def type; self[:"type"]; end
|
|
556
|
+
end
|
|
557
|
+
include Definitions
|
|
558
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
559
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
560
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
561
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1575
562
|
end
|
|
1576
563
|
end
|
|
1577
|
-
class
|
|
1578
|
-
|
|
1579
|
-
|
|
564
|
+
class Lease < ::Nl::AttributeSet
|
|
565
|
+
module Definitions
|
|
566
|
+
# The netdev ifindex to lease the queue from.
|
|
567
|
+
# @rbs return: ::Integer
|
|
568
|
+
# @return [Integer]
|
|
569
|
+
def ifindex; self[:"ifindex"]; end
|
|
570
|
+
# The netdev queue to lease from.
|
|
571
|
+
# @rbs return: AttributeSets::QueueId
|
|
572
|
+
# @return [AttributeSets::QueueId]
|
|
573
|
+
def queue; self[:"queue"]; end
|
|
574
|
+
# The network namespace id of the netdev.
|
|
575
|
+
# @rbs return: ::Integer
|
|
576
|
+
# @return [Integer]
|
|
577
|
+
def netns_id; self[:"netns_id"]; end
|
|
578
|
+
end
|
|
579
|
+
include Definitions
|
|
580
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
581
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
582
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
583
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1580
584
|
end
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
# @
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
585
|
+
end
|
|
586
|
+
class Dmabuf < ::Nl::AttributeSet
|
|
587
|
+
module Definitions
|
|
588
|
+
# netdev ifindex to bind the dmabuf to.
|
|
589
|
+
# @rbs return: ::Integer
|
|
590
|
+
# @return [Integer]
|
|
591
|
+
def ifindex; self[:"ifindex"]; end
|
|
592
|
+
# receive queues to bind the dmabuf to.
|
|
593
|
+
# @rbs return: ::Array[AttributeSets::QueueId]
|
|
594
|
+
# @return [Array<AttributeSets::QueueId>]
|
|
595
|
+
def queues; self[:"queues"]; end
|
|
596
|
+
# dmabuf file descriptor to bind.
|
|
597
|
+
# @rbs return: ::Integer
|
|
598
|
+
# @return [Integer]
|
|
599
|
+
def fd; self[:"fd"]; end
|
|
600
|
+
# id of the dmabuf binding
|
|
601
|
+
# @rbs return: ::Integer
|
|
602
|
+
# @return [Integer]
|
|
603
|
+
def id; self[:"id"]; end
|
|
604
|
+
# Size in bytes of each device page the NIC writes into from the bound
|
|
605
|
+
# dmabuf. Must be a power of two and >= PAGE_SIZE; defaults to
|
|
606
|
+
# PAGE_SIZE.
|
|
607
|
+
# @rbs return: ::Integer
|
|
608
|
+
# @return [Integer]
|
|
609
|
+
def rx_page_size; self[:"rx_page_size"]; end
|
|
610
|
+
end
|
|
611
|
+
include Definitions
|
|
612
|
+
# Decodes attributes from the decoder into a new attribute set.
|
|
613
|
+
# @rbs (::Nl::Decoder decoder, ?external_selectors: ::Array[untyped]) -> instance
|
|
614
|
+
def self.decode(decoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
615
|
+
super(decoder, BY_TYPE, 0, external_selectors)
|
|
1589
616
|
end
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
617
|
+
end
|
|
618
|
+
end
|
|
619
|
+
module AttributeSets
|
|
620
|
+
class Dev
|
|
621
|
+
module Definitions
|
|
1594
622
|
# @private
|
|
1595
|
-
|
|
623
|
+
BY_TYPE = ::Array.new(7).tap do |definitions|
|
|
624
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"ifindex", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 } }), multi: false, order: 0, selector_slot: nil)
|
|
625
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"pad", datatype: ::Nl::DataTypes::Pad.new(), multi: false, order: 1, selector_slot: nil)
|
|
626
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"xdp_features", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 2, selector_slot: nil)
|
|
627
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"xdp_zc_max_segs", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 } }), multi: false, order: 3, selector_slot: nil)
|
|
628
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"xdp_rx_metadata_features", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 4, selector_slot: nil)
|
|
629
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"xsk_features", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U64].new, multi: false, order: 5, selector_slot: nil)
|
|
630
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
631
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
1596
632
|
# @private
|
|
1597
|
-
|
|
633
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1598
634
|
end
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
NAME = :"fd"
|
|
635
|
+
end
|
|
636
|
+
class IoUringProviderInfo
|
|
637
|
+
module Definitions
|
|
1603
638
|
# @private
|
|
1604
|
-
|
|
639
|
+
BY_TYPE = ::Array.new(2).tap do |definitions|
|
|
640
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"rx_buf_len", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 0, selector_slot: nil)
|
|
641
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
642
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
1605
643
|
# @private
|
|
1606
|
-
|
|
644
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1607
645
|
end
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
NAME = :"id"
|
|
1612
|
-
# @private
|
|
1613
|
-
ORDER = 3
|
|
646
|
+
end
|
|
647
|
+
class PagePool
|
|
648
|
+
module Definitions
|
|
1614
649
|
# @private
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
# @
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
650
|
+
BY_TYPE = ::Array.new(9).tap do |definitions|
|
|
651
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"id", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1; raise ArgumentError, "Value #{it.inspect} is greater than maximum 4294967295" unless it <= 4294967295 } }), multi: false, order: 0, selector_slot: nil)
|
|
652
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"ifindex", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1; raise ArgumentError, "Value #{it.inspect} is greater than maximum 2147483647" unless it <= 2147483647 } }), multi: false, order: 1, selector_slot: nil)
|
|
653
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"napi_id", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1; raise ArgumentError, "Value #{it.inspect} is greater than maximum 4294967295" unless it <= 4294967295 } }), multi: false, order: 2, selector_slot: nil)
|
|
654
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"inflight", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 3, selector_slot: nil)
|
|
655
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"inflight_mem", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 4, selector_slot: nil)
|
|
656
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"detach_time", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 5, selector_slot: nil)
|
|
657
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"dmabuf", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 6, selector_slot: nil)
|
|
658
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"io_uring", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::IoUringProviderInfo, selector_bindings: []), multi: false, order: 7, selector_slot: nil)
|
|
659
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
660
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
661
|
+
# @private
|
|
662
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
663
|
+
end
|
|
664
|
+
end
|
|
665
|
+
class PagePoolInfo
|
|
666
|
+
module Definitions
|
|
667
|
+
# @private
|
|
668
|
+
BY_TYPE = ::Array.new(3).tap do |definitions|
|
|
669
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"id", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1; raise ArgumentError, "Value #{it.inspect} is greater than maximum 4294967295" unless it <= 4294967295 } }), multi: false, order: 0, selector_slot: nil)
|
|
670
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"ifindex", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1; raise ArgumentError, "Value #{it.inspect} is greater than maximum 2147483647" unless it <= 2147483647 } }), multi: false, order: 1, selector_slot: nil)
|
|
671
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
672
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
673
|
+
# @private
|
|
674
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
675
|
+
end
|
|
676
|
+
end
|
|
677
|
+
class PagePoolStats
|
|
678
|
+
module Definitions
|
|
679
|
+
# @private
|
|
680
|
+
BY_TYPE = ::Array.new(19).tap do |definitions|
|
|
681
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"info", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::PagePoolInfo, selector_bindings: []), multi: false, order: 0, selector_slot: nil)
|
|
682
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"alloc_fast", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 1, selector_slot: nil)
|
|
683
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"alloc_slow", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 2, selector_slot: nil)
|
|
684
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"alloc_slow_high_order", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 3, selector_slot: nil)
|
|
685
|
+
definitions[11] = ::Nl::AttributeSet::Definition.new(id: 11, name: :"alloc_empty", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 4, selector_slot: nil)
|
|
686
|
+
definitions[12] = ::Nl::AttributeSet::Definition.new(id: 12, name: :"alloc_refill", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 5, selector_slot: nil)
|
|
687
|
+
definitions[13] = ::Nl::AttributeSet::Definition.new(id: 13, name: :"alloc_waive", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 6, selector_slot: nil)
|
|
688
|
+
definitions[14] = ::Nl::AttributeSet::Definition.new(id: 14, name: :"recycle_cached", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 7, selector_slot: nil)
|
|
689
|
+
definitions[15] = ::Nl::AttributeSet::Definition.new(id: 15, name: :"recycle_cache_full", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 8, selector_slot: nil)
|
|
690
|
+
definitions[16] = ::Nl::AttributeSet::Definition.new(id: 16, name: :"recycle_ring", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 9, selector_slot: nil)
|
|
691
|
+
definitions[17] = ::Nl::AttributeSet::Definition.new(id: 17, name: :"recycle_ring_full", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 10, selector_slot: nil)
|
|
692
|
+
definitions[18] = ::Nl::AttributeSet::Definition.new(id: 18, name: :"recycle_released_refcnt", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 11, selector_slot: nil)
|
|
693
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
694
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
695
|
+
# @private
|
|
696
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
697
|
+
end
|
|
698
|
+
end
|
|
699
|
+
class Napi
|
|
700
|
+
module Definitions
|
|
701
|
+
# @private
|
|
702
|
+
BY_TYPE = ::Array.new(9).tap do |definitions|
|
|
703
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"ifindex", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 } }), multi: false, order: 0, selector_slot: nil)
|
|
704
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
705
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"irq", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
706
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"pid", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 3, selector_slot: nil)
|
|
707
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"defer_hard_irqs", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is greater than maximum 2147483647" unless it <= 2147483647 } }), multi: false, order: 4, selector_slot: nil)
|
|
708
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"gro_flush_timeout", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 5, selector_slot: nil)
|
|
709
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"irq_suspend_timeout", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 6, selector_slot: nil)
|
|
710
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"threaded", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 7, selector_slot: nil)
|
|
711
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
712
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
713
|
+
# @private
|
|
714
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
715
|
+
end
|
|
716
|
+
end
|
|
717
|
+
class XskInfo
|
|
718
|
+
module Definitions
|
|
719
|
+
# @private
|
|
720
|
+
BY_TYPE = ::Array.new(0).tap do |definitions|
|
|
721
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
722
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
723
|
+
# @private
|
|
724
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
725
|
+
end
|
|
726
|
+
end
|
|
727
|
+
class Queue
|
|
728
|
+
module Definitions
|
|
729
|
+
# @private
|
|
730
|
+
BY_TYPE = ::Array.new(9).tap do |definitions|
|
|
731
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
732
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"ifindex", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 } }), multi: false, order: 1, selector_slot: nil)
|
|
733
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"type", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
734
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"napi_id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 3, selector_slot: nil)
|
|
735
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"dmabuf", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 4, selector_slot: nil)
|
|
736
|
+
definitions[6] = ::Nl::AttributeSet::Definition.new(id: 6, name: :"io_uring", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::IoUringProviderInfo, selector_bindings: []), multi: false, order: 5, selector_slot: nil)
|
|
737
|
+
definitions[7] = ::Nl::AttributeSet::Definition.new(id: 7, name: :"xsk", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::XskInfo, selector_bindings: []), multi: false, order: 6, selector_slot: nil)
|
|
738
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"lease", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::Lease, selector_bindings: []), multi: false, order: 7, selector_slot: nil)
|
|
739
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
740
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
741
|
+
# @private
|
|
742
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
743
|
+
end
|
|
744
|
+
end
|
|
745
|
+
class Qstats
|
|
746
|
+
module Definitions
|
|
747
|
+
# @private
|
|
748
|
+
BY_TYPE = ::Array.new(35).tap do |definitions|
|
|
749
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"ifindex", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 } }), multi: false, order: 0, selector_slot: nil)
|
|
750
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"queue_type", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
751
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"queue_id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
752
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"scope", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 3, selector_slot: nil)
|
|
753
|
+
definitions[8] = ::Nl::AttributeSet::Definition.new(id: 8, name: :"rx_packets", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 4, selector_slot: nil)
|
|
754
|
+
definitions[9] = ::Nl::AttributeSet::Definition.new(id: 9, name: :"rx_bytes", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 5, selector_slot: nil)
|
|
755
|
+
definitions[10] = ::Nl::AttributeSet::Definition.new(id: 10, name: :"tx_packets", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 6, selector_slot: nil)
|
|
756
|
+
definitions[11] = ::Nl::AttributeSet::Definition.new(id: 11, name: :"tx_bytes", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 7, selector_slot: nil)
|
|
757
|
+
definitions[12] = ::Nl::AttributeSet::Definition.new(id: 12, name: :"rx_alloc_fail", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 8, selector_slot: nil)
|
|
758
|
+
definitions[13] = ::Nl::AttributeSet::Definition.new(id: 13, name: :"rx_hw_drops", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 9, selector_slot: nil)
|
|
759
|
+
definitions[14] = ::Nl::AttributeSet::Definition.new(id: 14, name: :"rx_hw_drop_overruns", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 10, selector_slot: nil)
|
|
760
|
+
definitions[15] = ::Nl::AttributeSet::Definition.new(id: 15, name: :"rx_csum_complete", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 11, selector_slot: nil)
|
|
761
|
+
definitions[16] = ::Nl::AttributeSet::Definition.new(id: 16, name: :"rx_csum_unnecessary", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 12, selector_slot: nil)
|
|
762
|
+
definitions[17] = ::Nl::AttributeSet::Definition.new(id: 17, name: :"rx_csum_none", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 13, selector_slot: nil)
|
|
763
|
+
definitions[18] = ::Nl::AttributeSet::Definition.new(id: 18, name: :"rx_csum_bad", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 14, selector_slot: nil)
|
|
764
|
+
definitions[19] = ::Nl::AttributeSet::Definition.new(id: 19, name: :"rx_hw_gro_packets", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 15, selector_slot: nil)
|
|
765
|
+
definitions[20] = ::Nl::AttributeSet::Definition.new(id: 20, name: :"rx_hw_gro_bytes", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 16, selector_slot: nil)
|
|
766
|
+
definitions[21] = ::Nl::AttributeSet::Definition.new(id: 21, name: :"rx_hw_gro_wire_packets", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 17, selector_slot: nil)
|
|
767
|
+
definitions[22] = ::Nl::AttributeSet::Definition.new(id: 22, name: :"rx_hw_gro_wire_bytes", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 18, selector_slot: nil)
|
|
768
|
+
definitions[23] = ::Nl::AttributeSet::Definition.new(id: 23, name: :"rx_hw_drop_ratelimits", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 19, selector_slot: nil)
|
|
769
|
+
definitions[24] = ::Nl::AttributeSet::Definition.new(id: 24, name: :"tx_hw_drops", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 20, selector_slot: nil)
|
|
770
|
+
definitions[25] = ::Nl::AttributeSet::Definition.new(id: 25, name: :"tx_hw_drop_errors", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 21, selector_slot: nil)
|
|
771
|
+
definitions[26] = ::Nl::AttributeSet::Definition.new(id: 26, name: :"tx_csum_none", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 22, selector_slot: nil)
|
|
772
|
+
definitions[27] = ::Nl::AttributeSet::Definition.new(id: 27, name: :"tx_needs_csum", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 23, selector_slot: nil)
|
|
773
|
+
definitions[28] = ::Nl::AttributeSet::Definition.new(id: 28, name: :"tx_hw_gso_packets", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 24, selector_slot: nil)
|
|
774
|
+
definitions[29] = ::Nl::AttributeSet::Definition.new(id: 29, name: :"tx_hw_gso_bytes", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 25, selector_slot: nil)
|
|
775
|
+
definitions[30] = ::Nl::AttributeSet::Definition.new(id: 30, name: :"tx_hw_gso_wire_packets", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 26, selector_slot: nil)
|
|
776
|
+
definitions[31] = ::Nl::AttributeSet::Definition.new(id: 31, name: :"tx_hw_gso_wire_bytes", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 27, selector_slot: nil)
|
|
777
|
+
definitions[32] = ::Nl::AttributeSet::Definition.new(id: 32, name: :"tx_hw_drop_ratelimits", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 28, selector_slot: nil)
|
|
778
|
+
definitions[33] = ::Nl::AttributeSet::Definition.new(id: 33, name: :"tx_stop", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 29, selector_slot: nil)
|
|
779
|
+
definitions[34] = ::Nl::AttributeSet::Definition.new(id: 34, name: :"tx_wake", datatype: ::Nl::DataTypes::VariableInteger.new(::Nl::Endian::Host, signed: false), multi: false, order: 30, selector_slot: nil)
|
|
780
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
781
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
782
|
+
# @private
|
|
783
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
784
|
+
end
|
|
785
|
+
end
|
|
786
|
+
class QueueId
|
|
787
|
+
module Definitions
|
|
788
|
+
# @private
|
|
789
|
+
BY_TYPE = ::Array.new(4).tap do |definitions|
|
|
790
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"id", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 0, selector_slot: nil)
|
|
791
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"type", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 1, selector_slot: nil)
|
|
792
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
793
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
794
|
+
# @private
|
|
795
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
796
|
+
end
|
|
797
|
+
end
|
|
798
|
+
class Lease
|
|
799
|
+
module Definitions
|
|
800
|
+
# @private
|
|
801
|
+
BY_TYPE = ::Array.new(4).tap do |definitions|
|
|
802
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"ifindex", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 } }), multi: false, order: 0, selector_slot: nil)
|
|
803
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"queue", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::QueueId, selector_bindings: []), multi: false, order: 1, selector_slot: nil)
|
|
804
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"netns_id", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::S32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 0" unless it >= 0 } }), multi: false, order: 2, selector_slot: nil)
|
|
805
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
806
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
807
|
+
# @private
|
|
808
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
809
|
+
end
|
|
810
|
+
end
|
|
811
|
+
class Dmabuf
|
|
812
|
+
module Definitions
|
|
813
|
+
# @private
|
|
814
|
+
BY_TYPE = ::Array.new(6).tap do |definitions|
|
|
815
|
+
definitions[1] = ::Nl::AttributeSet::Definition.new(id: 1, name: :"ifindex", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 } }), multi: false, order: 0, selector_slot: nil)
|
|
816
|
+
definitions[2] = ::Nl::AttributeSet::Definition.new(id: 2, name: :"queues", datatype: ::Nl::DataTypes::NestedAttributes.new(AttributeSets::QueueId, selector_bindings: []), multi: true, order: 1, selector_slot: nil)
|
|
817
|
+
definitions[3] = ::Nl::AttributeSet::Definition.new(id: 3, name: :"fd", datatype: ::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, multi: false, order: 2, selector_slot: nil)
|
|
818
|
+
definitions[4] = ::Nl::AttributeSet::Definition.new(id: 4, name: :"id", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum 1" unless it >= 1 } }), multi: false, order: 3, selector_slot: nil)
|
|
819
|
+
definitions[5] = ::Nl::AttributeSet::Definition.new(id: 5, name: :"rx_page_size", datatype: ::Nl::DataTypes::Checked.new(::Nl::DataTypes::Scalar[::Nl::Endian::Host::U32].new, check: nil.instance_exec { -> { raise ArgumentError, "Value #{it.inspect} is less than minimum #{Constants::PAGE_SIZE}" unless it >= Constants::PAGE_SIZE; raise ArgumentError, "Value #{it.inspect} is greater than maximum 4294967295" unless it <= 4294967295 } }), multi: false, order: 4, selector_slot: nil)
|
|
820
|
+
end.freeze #: Array[::Nl::AttributeSet::Definition?]
|
|
821
|
+
Ractor.make_shareable(BY_TYPE) if defined?(Ractor)
|
|
822
|
+
# @private
|
|
823
|
+
BY_NAME = BY_TYPE.compact.to_h { [it.name, it] }.freeze #: Hash[::Symbol, ::Nl::AttributeSet::Definition]
|
|
1654
824
|
end
|
|
1655
825
|
end
|
|
1656
|
-
# @private
|
|
1657
|
-
PagePool::IoUring::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::IoUringProviderInfo, selector_bindings: Ractor.make_shareable([]))
|
|
1658
|
-
# @private
|
|
1659
|
-
PagePoolStats::Info::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::PagePoolInfo, selector_bindings: Ractor.make_shareable([]))
|
|
1660
|
-
# @private
|
|
1661
|
-
Queue::IoUring::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::IoUringProviderInfo, selector_bindings: Ractor.make_shareable([]))
|
|
1662
|
-
# @private
|
|
1663
|
-
Queue::Xsk::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::XskInfo, selector_bindings: Ractor.make_shareable([]))
|
|
1664
|
-
# @private
|
|
1665
|
-
Queue::Lease::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::Lease, selector_bindings: Ractor.make_shareable([]))
|
|
1666
|
-
# @private
|
|
1667
|
-
Lease::Queue::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::QueueId, selector_bindings: Ractor.make_shareable([]))
|
|
1668
|
-
# @private
|
|
1669
|
-
Dmabuf::Queues::DATATYPE = ::Nl::DataTypes::NestedAttributes.new(AttributeSets::QueueId, selector_bindings: Ractor.make_shareable([]))
|
|
1670
826
|
end
|
|
1671
827
|
module Messages
|
|
1672
828
|
# Get / dump information about a netdev.
|
|
1673
|
-
class DoDevGetRequest < ::Nl::
|
|
829
|
+
class DoDevGetRequest < ::Nl::Message
|
|
1674
830
|
TYPE = 1
|
|
1675
831
|
FIXED_HEADER = nil
|
|
1676
832
|
ATTRIBUTE_SET = AttributeSets::Dev
|
|
1677
|
-
ATTRIBUTES =
|
|
833
|
+
ATTRIBUTES = %i[ifindex].freeze
|
|
834
|
+
include ATTRIBUTE_SET::Definitions
|
|
835
|
+
def initialize(attributes = [])
|
|
836
|
+
@attributes = attributes
|
|
837
|
+
end
|
|
838
|
+
# @private
|
|
839
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
840
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
841
|
+
new(
|
|
842
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
843
|
+
)
|
|
844
|
+
end
|
|
845
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
846
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
847
|
+
def self.decode(decoder)
|
|
848
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
849
|
+
end
|
|
850
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
851
|
+
encode_attributes(encoder, external_selectors:)
|
|
852
|
+
end
|
|
1678
853
|
# netdev ifindex
|
|
1679
854
|
# @rbs return: ::Integer
|
|
1680
855
|
# @return [Integer]
|
|
1681
|
-
|
|
1682
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
856
|
+
def ifindex; self[:"ifindex"]; end
|
|
1683
857
|
end
|
|
1684
858
|
# Get / dump information about a netdev.
|
|
1685
|
-
class DoDevGetReply < ::Nl::
|
|
859
|
+
class DoDevGetReply < ::Nl::Message
|
|
1686
860
|
TYPE = 1
|
|
1687
861
|
FIXED_HEADER = nil
|
|
1688
862
|
ATTRIBUTE_SET = AttributeSets::Dev
|
|
1689
|
-
ATTRIBUTES =
|
|
863
|
+
ATTRIBUTES = %i[ifindex xdp_features xdp_zc_max_segs xdp_rx_metadata_features xsk_features].freeze
|
|
864
|
+
include ATTRIBUTE_SET::Definitions
|
|
865
|
+
def initialize(attributes = [])
|
|
866
|
+
@attributes = attributes
|
|
867
|
+
end
|
|
868
|
+
# @private
|
|
869
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
870
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
871
|
+
new(
|
|
872
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
873
|
+
)
|
|
874
|
+
end
|
|
875
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
876
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
877
|
+
def self.decode(decoder)
|
|
878
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
879
|
+
end
|
|
880
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
881
|
+
encode_attributes(encoder, external_selectors:)
|
|
882
|
+
end
|
|
1690
883
|
# netdev ifindex
|
|
1691
884
|
# @rbs return: ::Integer
|
|
1692
885
|
# @return [Integer]
|
|
1693
|
-
|
|
1694
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
886
|
+
def ifindex; self[:"ifindex"]; end
|
|
1695
887
|
# Bitmask of enabled xdp-features.
|
|
1696
888
|
#
|
|
1697
889
|
# Known flags are defined in {Flags::XdpAct}.
|
|
1698
890
|
# @rbs return: ::Integer
|
|
1699
891
|
# @return [Integer]
|
|
1700
|
-
|
|
1701
|
-
def xdp_features; attributes[:"xdp_features"]&.value; end
|
|
892
|
+
def xdp_features; self[:"xdp_features"]; end
|
|
1702
893
|
# max fragment count supported by ZC driver
|
|
1703
894
|
# @rbs return: ::Integer
|
|
1704
895
|
# @return [Integer]
|
|
1705
|
-
|
|
1706
|
-
def xdp_zc_max_segs; attributes[:"xdp_zc_max_segs"]&.value; end
|
|
896
|
+
def xdp_zc_max_segs; self[:"xdp_zc_max_segs"]; end
|
|
1707
897
|
# Bitmask of supported XDP receive metadata features. See {https://docs.kernel.org/networking/xdp-rx-metadata.html Documentation/networking/xdp-rx-metadata.rst} for more details.
|
|
1708
898
|
#
|
|
1709
899
|
# Known flags are defined in {Flags::XdpRxMetadata}.
|
|
1710
900
|
# @rbs return: ::Integer
|
|
1711
901
|
# @return [Integer]
|
|
1712
|
-
|
|
1713
|
-
def xdp_rx_metadata_features; attributes[:"xdp_rx_metadata_features"]&.value; end
|
|
902
|
+
def xdp_rx_metadata_features; self[:"xdp_rx_metadata_features"]; end
|
|
1714
903
|
# Bitmask of enabled AF_XDP features.
|
|
1715
904
|
#
|
|
1716
905
|
# Known flags are defined in {Flags::XskFlags}.
|
|
1717
906
|
# @rbs return: ::Integer
|
|
1718
907
|
# @return [Integer]
|
|
1719
|
-
|
|
1720
|
-
def xsk_features; attributes[:"xsk_features"]&.value; end
|
|
908
|
+
def xsk_features; self[:"xsk_features"]; end
|
|
1721
909
|
end
|
|
1722
910
|
# Get / dump information about a netdev.
|
|
1723
|
-
class DumpDevGetRequest < ::Nl::
|
|
911
|
+
class DumpDevGetRequest < ::Nl::Message
|
|
1724
912
|
TYPE = 1
|
|
1725
913
|
FIXED_HEADER = nil
|
|
1726
914
|
ATTRIBUTE_SET = AttributeSets::Dev
|
|
1727
|
-
ATTRIBUTES =
|
|
915
|
+
ATTRIBUTES = %i[].freeze
|
|
916
|
+
include ATTRIBUTE_SET::Definitions
|
|
917
|
+
def initialize(attributes = [])
|
|
918
|
+
@attributes = attributes
|
|
919
|
+
end
|
|
920
|
+
# @private
|
|
921
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
922
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
923
|
+
new(
|
|
924
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
925
|
+
)
|
|
926
|
+
end
|
|
927
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
928
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
929
|
+
def self.decode(decoder)
|
|
930
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
931
|
+
end
|
|
932
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
933
|
+
encode_attributes(encoder, external_selectors:)
|
|
934
|
+
end
|
|
1728
935
|
end
|
|
1729
936
|
# Get / dump information about a netdev.
|
|
1730
|
-
class DumpDevGetReply < ::Nl::
|
|
937
|
+
class DumpDevGetReply < ::Nl::Message
|
|
1731
938
|
TYPE = 1
|
|
1732
939
|
FIXED_HEADER = nil
|
|
1733
940
|
ATTRIBUTE_SET = AttributeSets::Dev
|
|
1734
|
-
ATTRIBUTES =
|
|
941
|
+
ATTRIBUTES = %i[ifindex xdp_features xdp_zc_max_segs xdp_rx_metadata_features xsk_features].freeze
|
|
942
|
+
include ATTRIBUTE_SET::Definitions
|
|
943
|
+
def initialize(attributes = [])
|
|
944
|
+
@attributes = attributes
|
|
945
|
+
end
|
|
946
|
+
# @private
|
|
947
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
948
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
949
|
+
new(
|
|
950
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
951
|
+
)
|
|
952
|
+
end
|
|
953
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
954
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
955
|
+
def self.decode(decoder)
|
|
956
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
957
|
+
end
|
|
958
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
959
|
+
encode_attributes(encoder, external_selectors:)
|
|
960
|
+
end
|
|
1735
961
|
# netdev ifindex
|
|
1736
962
|
# @rbs return: ::Integer
|
|
1737
963
|
# @return [Integer]
|
|
1738
|
-
|
|
1739
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
964
|
+
def ifindex; self[:"ifindex"]; end
|
|
1740
965
|
# Bitmask of enabled xdp-features.
|
|
1741
966
|
#
|
|
1742
967
|
# Known flags are defined in {Flags::XdpAct}.
|
|
1743
968
|
# @rbs return: ::Integer
|
|
1744
969
|
# @return [Integer]
|
|
1745
|
-
|
|
1746
|
-
def xdp_features; attributes[:"xdp_features"]&.value; end
|
|
970
|
+
def xdp_features; self[:"xdp_features"]; end
|
|
1747
971
|
# max fragment count supported by ZC driver
|
|
1748
972
|
# @rbs return: ::Integer
|
|
1749
973
|
# @return [Integer]
|
|
1750
|
-
|
|
1751
|
-
def xdp_zc_max_segs; attributes[:"xdp_zc_max_segs"]&.value; end
|
|
974
|
+
def xdp_zc_max_segs; self[:"xdp_zc_max_segs"]; end
|
|
1752
975
|
# Bitmask of supported XDP receive metadata features. See {https://docs.kernel.org/networking/xdp-rx-metadata.html Documentation/networking/xdp-rx-metadata.rst} for more details.
|
|
1753
976
|
#
|
|
1754
977
|
# Known flags are defined in {Flags::XdpRxMetadata}.
|
|
1755
978
|
# @rbs return: ::Integer
|
|
1756
979
|
# @return [Integer]
|
|
1757
|
-
|
|
1758
|
-
def xdp_rx_metadata_features; attributes[:"xdp_rx_metadata_features"]&.value; end
|
|
980
|
+
def xdp_rx_metadata_features; self[:"xdp_rx_metadata_features"]; end
|
|
1759
981
|
# Bitmask of enabled AF_XDP features.
|
|
1760
982
|
#
|
|
1761
983
|
# Known flags are defined in {Flags::XskFlags}.
|
|
1762
984
|
# @rbs return: ::Integer
|
|
1763
985
|
# @return [Integer]
|
|
1764
|
-
|
|
1765
|
-
def xsk_features; attributes[:"xsk_features"]&.value; end
|
|
986
|
+
def xsk_features; self[:"xsk_features"]; end
|
|
1766
987
|
end
|
|
1767
988
|
# Get / dump information about Page Pools.
|
|
1768
989
|
# Only Page Pools associated by the driver with a net_device
|
|
1769
990
|
# can be listed. ifindex will not be reported if the net_device
|
|
1770
991
|
# no longer exists.
|
|
1771
|
-
class DoPagePoolGetRequest < ::Nl::
|
|
992
|
+
class DoPagePoolGetRequest < ::Nl::Message
|
|
1772
993
|
TYPE = 5
|
|
1773
994
|
FIXED_HEADER = nil
|
|
1774
995
|
ATTRIBUTE_SET = AttributeSets::PagePool
|
|
1775
|
-
ATTRIBUTES =
|
|
996
|
+
ATTRIBUTES = %i[id].freeze
|
|
997
|
+
include ATTRIBUTE_SET::Definitions
|
|
998
|
+
def initialize(attributes = [])
|
|
999
|
+
@attributes = attributes
|
|
1000
|
+
end
|
|
1001
|
+
# @private
|
|
1002
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1003
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1004
|
+
new(
|
|
1005
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1006
|
+
)
|
|
1007
|
+
end
|
|
1008
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1009
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1010
|
+
def self.decode(decoder)
|
|
1011
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1012
|
+
end
|
|
1013
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1014
|
+
encode_attributes(encoder, external_selectors:)
|
|
1015
|
+
end
|
|
1776
1016
|
# Unique ID of a Page Pool instance.
|
|
1777
1017
|
# @rbs return: ::Integer
|
|
1778
1018
|
# @return [Integer]
|
|
1779
|
-
|
|
1780
|
-
def id; attributes[:"id"]&.value; end
|
|
1019
|
+
def id; self[:"id"]; end
|
|
1781
1020
|
end
|
|
1782
1021
|
# Get / dump information about Page Pools.
|
|
1783
1022
|
# Only Page Pools associated by the driver with a net_device
|
|
1784
1023
|
# can be listed. ifindex will not be reported if the net_device
|
|
1785
1024
|
# no longer exists.
|
|
1786
|
-
class DoPagePoolGetReply < ::Nl::
|
|
1025
|
+
class DoPagePoolGetReply < ::Nl::Message
|
|
1787
1026
|
TYPE = 5
|
|
1788
1027
|
FIXED_HEADER = nil
|
|
1789
1028
|
ATTRIBUTE_SET = AttributeSets::PagePool
|
|
1790
|
-
ATTRIBUTES =
|
|
1029
|
+
ATTRIBUTES = %i[id ifindex napi_id inflight inflight_mem detach_time dmabuf io_uring].freeze
|
|
1030
|
+
include ATTRIBUTE_SET::Definitions
|
|
1031
|
+
def initialize(attributes = [])
|
|
1032
|
+
@attributes = attributes
|
|
1033
|
+
end
|
|
1034
|
+
# @private
|
|
1035
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1036
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1037
|
+
new(
|
|
1038
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1039
|
+
)
|
|
1040
|
+
end
|
|
1041
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1042
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1043
|
+
def self.decode(decoder)
|
|
1044
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1045
|
+
end
|
|
1046
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1047
|
+
encode_attributes(encoder, external_selectors:)
|
|
1048
|
+
end
|
|
1791
1049
|
# Unique ID of a Page Pool instance.
|
|
1792
1050
|
# @rbs return: ::Integer
|
|
1793
1051
|
# @return [Integer]
|
|
1794
|
-
|
|
1795
|
-
def id; attributes[:"id"]&.value; end
|
|
1052
|
+
def id; self[:"id"]; end
|
|
1796
1053
|
# ifindex of the netdev to which the pool belongs.
|
|
1797
1054
|
# May not be reported if the page pool was allocated for a netdev
|
|
1798
1055
|
# which got destroyed already (page pools may outlast their netdevs
|
|
1799
1056
|
# because they wait for all memory to be returned).
|
|
1800
1057
|
# @rbs return: ::Integer
|
|
1801
1058
|
# @return [Integer]
|
|
1802
|
-
|
|
1803
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1059
|
+
def ifindex; self[:"ifindex"]; end
|
|
1804
1060
|
# Id of NAPI using this Page Pool instance.
|
|
1805
1061
|
# @rbs return: ::Integer
|
|
1806
1062
|
# @return [Integer]
|
|
1807
|
-
|
|
1808
|
-
def napi_id; attributes[:"napi_id"]&.value; end
|
|
1063
|
+
def napi_id; self[:"napi_id"]; end
|
|
1809
1064
|
# Number of outstanding references to this page pool (allocated
|
|
1810
1065
|
# but yet to be freed pages). Allocated pages may be held in
|
|
1811
1066
|
# socket receive queues, driver receive ring, page pool recycling
|
|
1812
1067
|
# ring, the page pool cache, etc.
|
|
1813
1068
|
# @rbs return: ::Integer
|
|
1814
1069
|
# @return [Integer]
|
|
1815
|
-
|
|
1816
|
-
def inflight; attributes[:"inflight"]&.value; end
|
|
1070
|
+
def inflight; self[:"inflight"]; end
|
|
1817
1071
|
# Amount of memory held by inflight pages.
|
|
1818
1072
|
# @rbs return: ::Integer
|
|
1819
1073
|
# @return [Integer]
|
|
1820
|
-
|
|
1821
|
-
def inflight_mem; attributes[:"inflight_mem"]&.value; end
|
|
1074
|
+
def inflight_mem; self[:"inflight_mem"]; end
|
|
1822
1075
|
# Seconds in CLOCK_BOOTTIME of when Page Pool was detached by
|
|
1823
1076
|
# the driver. Once detached Page Pool can no longer be used to
|
|
1824
1077
|
# allocate memory.
|
|
@@ -1829,77 +1082,106 @@ class Netdev < ::Nl::Genl::Family
|
|
|
1829
1082
|
# can still be used to allocate new memory.
|
|
1830
1083
|
# @rbs return: ::Integer
|
|
1831
1084
|
# @return [Integer]
|
|
1832
|
-
|
|
1833
|
-
def detach_time; attributes[:"detach_time"]&.value; end
|
|
1085
|
+
def detach_time; self[:"detach_time"]; end
|
|
1834
1086
|
# ID of the dmabuf this page-pool is attached to.
|
|
1835
1087
|
# @rbs return: ::Integer
|
|
1836
1088
|
# @return [Integer]
|
|
1837
|
-
|
|
1838
|
-
def dmabuf; attributes[:"dmabuf"]&.value; end
|
|
1089
|
+
def dmabuf; self[:"dmabuf"]; end
|
|
1839
1090
|
# io-uring memory provider information.
|
|
1840
1091
|
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
1841
1092
|
# @return [AttributeSets::IoUringProviderInfo]
|
|
1842
|
-
|
|
1843
|
-
def io_uring; attributes[:"io_uring"]&.value; end
|
|
1093
|
+
def io_uring; self[:"io_uring"]; end
|
|
1844
1094
|
end
|
|
1845
1095
|
# Get / dump information about Page Pools.
|
|
1846
1096
|
# Only Page Pools associated by the driver with a net_device
|
|
1847
1097
|
# can be listed. ifindex will not be reported if the net_device
|
|
1848
1098
|
# no longer exists.
|
|
1849
|
-
class DumpPagePoolGetRequest < ::Nl::
|
|
1099
|
+
class DumpPagePoolGetRequest < ::Nl::Message
|
|
1850
1100
|
TYPE = 5
|
|
1851
1101
|
FIXED_HEADER = nil
|
|
1852
1102
|
ATTRIBUTE_SET = AttributeSets::PagePool
|
|
1853
|
-
ATTRIBUTES =
|
|
1103
|
+
ATTRIBUTES = %i[ifindex].freeze
|
|
1104
|
+
include ATTRIBUTE_SET::Definitions
|
|
1105
|
+
def initialize(attributes = [])
|
|
1106
|
+
@attributes = attributes
|
|
1107
|
+
end
|
|
1108
|
+
# @private
|
|
1109
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1110
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1111
|
+
new(
|
|
1112
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1113
|
+
)
|
|
1114
|
+
end
|
|
1115
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1116
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1117
|
+
def self.decode(decoder)
|
|
1118
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1119
|
+
end
|
|
1120
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1121
|
+
encode_attributes(encoder, external_selectors:)
|
|
1122
|
+
end
|
|
1854
1123
|
# ifindex of the netdev to which the pool belongs.
|
|
1855
1124
|
# May not be reported if the page pool was allocated for a netdev
|
|
1856
1125
|
# which got destroyed already (page pools may outlast their netdevs
|
|
1857
1126
|
# because they wait for all memory to be returned).
|
|
1858
1127
|
# @rbs return: ::Integer
|
|
1859
1128
|
# @return [Integer]
|
|
1860
|
-
|
|
1861
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1129
|
+
def ifindex; self[:"ifindex"]; end
|
|
1862
1130
|
end
|
|
1863
1131
|
# Get / dump information about Page Pools.
|
|
1864
1132
|
# Only Page Pools associated by the driver with a net_device
|
|
1865
1133
|
# can be listed. ifindex will not be reported if the net_device
|
|
1866
1134
|
# no longer exists.
|
|
1867
|
-
class DumpPagePoolGetReply < ::Nl::
|
|
1135
|
+
class DumpPagePoolGetReply < ::Nl::Message
|
|
1868
1136
|
TYPE = 5
|
|
1869
1137
|
FIXED_HEADER = nil
|
|
1870
1138
|
ATTRIBUTE_SET = AttributeSets::PagePool
|
|
1871
|
-
ATTRIBUTES =
|
|
1139
|
+
ATTRIBUTES = %i[id ifindex napi_id inflight inflight_mem detach_time dmabuf io_uring].freeze
|
|
1140
|
+
include ATTRIBUTE_SET::Definitions
|
|
1141
|
+
def initialize(attributes = [])
|
|
1142
|
+
@attributes = attributes
|
|
1143
|
+
end
|
|
1144
|
+
# @private
|
|
1145
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1146
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1147
|
+
new(
|
|
1148
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1149
|
+
)
|
|
1150
|
+
end
|
|
1151
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1152
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1153
|
+
def self.decode(decoder)
|
|
1154
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1155
|
+
end
|
|
1156
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1157
|
+
encode_attributes(encoder, external_selectors:)
|
|
1158
|
+
end
|
|
1872
1159
|
# Unique ID of a Page Pool instance.
|
|
1873
1160
|
# @rbs return: ::Integer
|
|
1874
1161
|
# @return [Integer]
|
|
1875
|
-
|
|
1876
|
-
def id; attributes[:"id"]&.value; end
|
|
1162
|
+
def id; self[:"id"]; end
|
|
1877
1163
|
# ifindex of the netdev to which the pool belongs.
|
|
1878
1164
|
# May not be reported if the page pool was allocated for a netdev
|
|
1879
1165
|
# which got destroyed already (page pools may outlast their netdevs
|
|
1880
1166
|
# because they wait for all memory to be returned).
|
|
1881
1167
|
# @rbs return: ::Integer
|
|
1882
1168
|
# @return [Integer]
|
|
1883
|
-
|
|
1884
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1169
|
+
def ifindex; self[:"ifindex"]; end
|
|
1885
1170
|
# Id of NAPI using this Page Pool instance.
|
|
1886
1171
|
# @rbs return: ::Integer
|
|
1887
1172
|
# @return [Integer]
|
|
1888
|
-
|
|
1889
|
-
def napi_id; attributes[:"napi_id"]&.value; end
|
|
1173
|
+
def napi_id; self[:"napi_id"]; end
|
|
1890
1174
|
# Number of outstanding references to this page pool (allocated
|
|
1891
1175
|
# but yet to be freed pages). Allocated pages may be held in
|
|
1892
1176
|
# socket receive queues, driver receive ring, page pool recycling
|
|
1893
1177
|
# ring, the page pool cache, etc.
|
|
1894
1178
|
# @rbs return: ::Integer
|
|
1895
1179
|
# @return [Integer]
|
|
1896
|
-
|
|
1897
|
-
def inflight; attributes[:"inflight"]&.value; end
|
|
1180
|
+
def inflight; self[:"inflight"]; end
|
|
1898
1181
|
# Amount of memory held by inflight pages.
|
|
1899
1182
|
# @rbs return: ::Integer
|
|
1900
1183
|
# @return [Integer]
|
|
1901
|
-
|
|
1902
|
-
def inflight_mem; attributes[:"inflight_mem"]&.value; end
|
|
1184
|
+
def inflight_mem; self[:"inflight_mem"]; end
|
|
1903
1185
|
# Seconds in CLOCK_BOOTTIME of when Page Pool was detached by
|
|
1904
1186
|
# the driver. Once detached Page Pool can no longer be used to
|
|
1905
1187
|
# allocate memory.
|
|
@@ -1910,939 +1192,1285 @@ class Netdev < ::Nl::Genl::Family
|
|
|
1910
1192
|
# can still be used to allocate new memory.
|
|
1911
1193
|
# @rbs return: ::Integer
|
|
1912
1194
|
# @return [Integer]
|
|
1913
|
-
|
|
1914
|
-
def detach_time; attributes[:"detach_time"]&.value; end
|
|
1195
|
+
def detach_time; self[:"detach_time"]; end
|
|
1915
1196
|
# ID of the dmabuf this page-pool is attached to.
|
|
1916
1197
|
# @rbs return: ::Integer
|
|
1917
1198
|
# @return [Integer]
|
|
1918
|
-
|
|
1919
|
-
def dmabuf; attributes[:"dmabuf"]&.value; end
|
|
1199
|
+
def dmabuf; self[:"dmabuf"]; end
|
|
1920
1200
|
# io-uring memory provider information.
|
|
1921
1201
|
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
1922
1202
|
# @return [AttributeSets::IoUringProviderInfo]
|
|
1923
|
-
|
|
1924
|
-
def io_uring; attributes[:"io_uring"]&.value; end
|
|
1203
|
+
def io_uring; self[:"io_uring"]; end
|
|
1925
1204
|
end
|
|
1926
1205
|
# Get page pool statistics.
|
|
1927
|
-
class DoPagePoolStatsGetRequest < ::Nl::
|
|
1206
|
+
class DoPagePoolStatsGetRequest < ::Nl::Message
|
|
1928
1207
|
TYPE = 9
|
|
1929
1208
|
FIXED_HEADER = nil
|
|
1930
1209
|
ATTRIBUTE_SET = AttributeSets::PagePoolStats
|
|
1931
|
-
ATTRIBUTES =
|
|
1210
|
+
ATTRIBUTES = %i[info].freeze
|
|
1211
|
+
include ATTRIBUTE_SET::Definitions
|
|
1212
|
+
def initialize(attributes = [])
|
|
1213
|
+
@attributes = attributes
|
|
1214
|
+
end
|
|
1215
|
+
# @private
|
|
1216
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1217
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1218
|
+
new(
|
|
1219
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1220
|
+
)
|
|
1221
|
+
end
|
|
1222
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1223
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1224
|
+
def self.decode(decoder)
|
|
1225
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1226
|
+
end
|
|
1227
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1228
|
+
encode_attributes(encoder, external_selectors:)
|
|
1229
|
+
end
|
|
1932
1230
|
# Page pool identifying information.
|
|
1933
1231
|
# @rbs return: AttributeSets::PagePoolInfo
|
|
1934
1232
|
# @return [AttributeSets::PagePoolInfo]
|
|
1935
|
-
|
|
1936
|
-
def info; attributes[:"info"]&.value; end
|
|
1233
|
+
def info; self[:"info"]; end
|
|
1937
1234
|
end
|
|
1938
1235
|
# Get page pool statistics.
|
|
1939
|
-
class DoPagePoolStatsGetReply < ::Nl::
|
|
1236
|
+
class DoPagePoolStatsGetReply < ::Nl::Message
|
|
1940
1237
|
TYPE = 9
|
|
1941
1238
|
FIXED_HEADER = nil
|
|
1942
1239
|
ATTRIBUTE_SET = AttributeSets::PagePoolStats
|
|
1943
|
-
ATTRIBUTES =
|
|
1240
|
+
ATTRIBUTES = %i[info alloc_fast alloc_slow alloc_slow_high_order alloc_empty alloc_refill alloc_waive recycle_cached recycle_cache_full recycle_ring recycle_ring_full recycle_released_refcnt].freeze
|
|
1241
|
+
include ATTRIBUTE_SET::Definitions
|
|
1242
|
+
def initialize(attributes = [])
|
|
1243
|
+
@attributes = attributes
|
|
1244
|
+
end
|
|
1245
|
+
# @private
|
|
1246
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1247
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1248
|
+
new(
|
|
1249
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1250
|
+
)
|
|
1251
|
+
end
|
|
1252
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1253
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1254
|
+
def self.decode(decoder)
|
|
1255
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1256
|
+
end
|
|
1257
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1258
|
+
encode_attributes(encoder, external_selectors:)
|
|
1259
|
+
end
|
|
1944
1260
|
# Page pool identifying information.
|
|
1945
1261
|
# @rbs return: AttributeSets::PagePoolInfo
|
|
1946
1262
|
# @return [AttributeSets::PagePoolInfo]
|
|
1947
|
-
|
|
1948
|
-
def info; attributes[:"info"]&.value; end
|
|
1263
|
+
def info; self[:"info"]; end
|
|
1949
1264
|
# @rbs return: ::Integer
|
|
1950
1265
|
# @return [Integer]
|
|
1951
|
-
|
|
1952
|
-
def alloc_fast; attributes[:"alloc_fast"]&.value; end
|
|
1266
|
+
def alloc_fast; self[:"alloc_fast"]; end
|
|
1953
1267
|
# @rbs return: ::Integer
|
|
1954
1268
|
# @return [Integer]
|
|
1955
|
-
|
|
1956
|
-
def alloc_slow; attributes[:"alloc_slow"]&.value; end
|
|
1269
|
+
def alloc_slow; self[:"alloc_slow"]; end
|
|
1957
1270
|
# @rbs return: ::Integer
|
|
1958
1271
|
# @return [Integer]
|
|
1959
|
-
|
|
1960
|
-
def alloc_slow_high_order; attributes[:"alloc_slow_high_order"]&.value; end
|
|
1272
|
+
def alloc_slow_high_order; self[:"alloc_slow_high_order"]; end
|
|
1961
1273
|
# @rbs return: ::Integer
|
|
1962
1274
|
# @return [Integer]
|
|
1963
|
-
|
|
1964
|
-
def alloc_empty; attributes[:"alloc_empty"]&.value; end
|
|
1275
|
+
def alloc_empty; self[:"alloc_empty"]; end
|
|
1965
1276
|
# @rbs return: ::Integer
|
|
1966
1277
|
# @return [Integer]
|
|
1967
|
-
|
|
1968
|
-
def alloc_refill; attributes[:"alloc_refill"]&.value; end
|
|
1278
|
+
def alloc_refill; self[:"alloc_refill"]; end
|
|
1969
1279
|
# @rbs return: ::Integer
|
|
1970
1280
|
# @return [Integer]
|
|
1971
|
-
|
|
1972
|
-
def alloc_waive; attributes[:"alloc_waive"]&.value; end
|
|
1281
|
+
def alloc_waive; self[:"alloc_waive"]; end
|
|
1973
1282
|
# @rbs return: ::Integer
|
|
1974
1283
|
# @return [Integer]
|
|
1975
|
-
|
|
1976
|
-
def recycle_cached; attributes[:"recycle_cached"]&.value; end
|
|
1284
|
+
def recycle_cached; self[:"recycle_cached"]; end
|
|
1977
1285
|
# @rbs return: ::Integer
|
|
1978
1286
|
# @return [Integer]
|
|
1979
|
-
|
|
1980
|
-
def recycle_cache_full; attributes[:"recycle_cache_full"]&.value; end
|
|
1287
|
+
def recycle_cache_full; self[:"recycle_cache_full"]; end
|
|
1981
1288
|
# @rbs return: ::Integer
|
|
1982
1289
|
# @return [Integer]
|
|
1983
|
-
|
|
1984
|
-
def recycle_ring; attributes[:"recycle_ring"]&.value; end
|
|
1290
|
+
def recycle_ring; self[:"recycle_ring"]; end
|
|
1985
1291
|
# @rbs return: ::Integer
|
|
1986
1292
|
# @return [Integer]
|
|
1987
|
-
|
|
1988
|
-
def recycle_ring_full; attributes[:"recycle_ring_full"]&.value; end
|
|
1293
|
+
def recycle_ring_full; self[:"recycle_ring_full"]; end
|
|
1989
1294
|
# @rbs return: ::Integer
|
|
1990
1295
|
# @return [Integer]
|
|
1991
|
-
|
|
1992
|
-
def recycle_released_refcnt; attributes[:"recycle_released_refcnt"]&.value; end
|
|
1296
|
+
def recycle_released_refcnt; self[:"recycle_released_refcnt"]; end
|
|
1993
1297
|
end
|
|
1994
1298
|
# Get page pool statistics.
|
|
1995
|
-
class DumpPagePoolStatsGetRequest < ::Nl::
|
|
1299
|
+
class DumpPagePoolStatsGetRequest < ::Nl::Message
|
|
1996
1300
|
TYPE = 9
|
|
1997
1301
|
FIXED_HEADER = nil
|
|
1998
1302
|
ATTRIBUTE_SET = AttributeSets::PagePoolStats
|
|
1999
|
-
ATTRIBUTES =
|
|
1303
|
+
ATTRIBUTES = %i[info].freeze
|
|
1304
|
+
include ATTRIBUTE_SET::Definitions
|
|
1305
|
+
def initialize(attributes = [])
|
|
1306
|
+
@attributes = attributes
|
|
1307
|
+
end
|
|
1308
|
+
# @private
|
|
1309
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1310
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1311
|
+
new(
|
|
1312
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1313
|
+
)
|
|
1314
|
+
end
|
|
1315
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1316
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1317
|
+
def self.decode(decoder)
|
|
1318
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1319
|
+
end
|
|
1320
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1321
|
+
encode_attributes(encoder, external_selectors:)
|
|
1322
|
+
end
|
|
2000
1323
|
# Page pool identifying information.
|
|
2001
1324
|
# @rbs return: AttributeSets::PagePoolInfo
|
|
2002
1325
|
# @return [AttributeSets::PagePoolInfo]
|
|
2003
|
-
|
|
2004
|
-
def info; attributes[:"info"]&.value; end
|
|
1326
|
+
def info; self[:"info"]; end
|
|
2005
1327
|
end
|
|
2006
1328
|
# Get page pool statistics.
|
|
2007
|
-
class DumpPagePoolStatsGetReply < ::Nl::
|
|
1329
|
+
class DumpPagePoolStatsGetReply < ::Nl::Message
|
|
2008
1330
|
TYPE = 9
|
|
2009
1331
|
FIXED_HEADER = nil
|
|
2010
1332
|
ATTRIBUTE_SET = AttributeSets::PagePoolStats
|
|
2011
|
-
ATTRIBUTES =
|
|
1333
|
+
ATTRIBUTES = %i[info alloc_fast alloc_slow alloc_slow_high_order alloc_empty alloc_refill alloc_waive recycle_cached recycle_cache_full recycle_ring recycle_ring_full recycle_released_refcnt].freeze
|
|
1334
|
+
include ATTRIBUTE_SET::Definitions
|
|
1335
|
+
def initialize(attributes = [])
|
|
1336
|
+
@attributes = attributes
|
|
1337
|
+
end
|
|
1338
|
+
# @private
|
|
1339
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1340
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1341
|
+
new(
|
|
1342
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1343
|
+
)
|
|
1344
|
+
end
|
|
1345
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1346
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1347
|
+
def self.decode(decoder)
|
|
1348
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1349
|
+
end
|
|
1350
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1351
|
+
encode_attributes(encoder, external_selectors:)
|
|
1352
|
+
end
|
|
2012
1353
|
# Page pool identifying information.
|
|
2013
1354
|
# @rbs return: AttributeSets::PagePoolInfo
|
|
2014
1355
|
# @return [AttributeSets::PagePoolInfo]
|
|
2015
|
-
|
|
2016
|
-
def info; attributes[:"info"]&.value; end
|
|
1356
|
+
def info; self[:"info"]; end
|
|
2017
1357
|
# @rbs return: ::Integer
|
|
2018
1358
|
# @return [Integer]
|
|
2019
|
-
|
|
2020
|
-
def alloc_fast; attributes[:"alloc_fast"]&.value; end
|
|
1359
|
+
def alloc_fast; self[:"alloc_fast"]; end
|
|
2021
1360
|
# @rbs return: ::Integer
|
|
2022
1361
|
# @return [Integer]
|
|
2023
|
-
|
|
2024
|
-
def alloc_slow; attributes[:"alloc_slow"]&.value; end
|
|
1362
|
+
def alloc_slow; self[:"alloc_slow"]; end
|
|
2025
1363
|
# @rbs return: ::Integer
|
|
2026
1364
|
# @return [Integer]
|
|
2027
|
-
|
|
2028
|
-
def alloc_slow_high_order; attributes[:"alloc_slow_high_order"]&.value; end
|
|
1365
|
+
def alloc_slow_high_order; self[:"alloc_slow_high_order"]; end
|
|
2029
1366
|
# @rbs return: ::Integer
|
|
2030
1367
|
# @return [Integer]
|
|
2031
|
-
|
|
2032
|
-
def alloc_empty; attributes[:"alloc_empty"]&.value; end
|
|
1368
|
+
def alloc_empty; self[:"alloc_empty"]; end
|
|
2033
1369
|
# @rbs return: ::Integer
|
|
2034
1370
|
# @return [Integer]
|
|
2035
|
-
|
|
2036
|
-
def alloc_refill; attributes[:"alloc_refill"]&.value; end
|
|
1371
|
+
def alloc_refill; self[:"alloc_refill"]; end
|
|
2037
1372
|
# @rbs return: ::Integer
|
|
2038
1373
|
# @return [Integer]
|
|
2039
|
-
|
|
2040
|
-
def alloc_waive; attributes[:"alloc_waive"]&.value; end
|
|
1374
|
+
def alloc_waive; self[:"alloc_waive"]; end
|
|
2041
1375
|
# @rbs return: ::Integer
|
|
2042
1376
|
# @return [Integer]
|
|
2043
|
-
|
|
2044
|
-
def recycle_cached; attributes[:"recycle_cached"]&.value; end
|
|
1377
|
+
def recycle_cached; self[:"recycle_cached"]; end
|
|
2045
1378
|
# @rbs return: ::Integer
|
|
2046
1379
|
# @return [Integer]
|
|
2047
|
-
|
|
2048
|
-
def recycle_cache_full; attributes[:"recycle_cache_full"]&.value; end
|
|
1380
|
+
def recycle_cache_full; self[:"recycle_cache_full"]; end
|
|
2049
1381
|
# @rbs return: ::Integer
|
|
2050
1382
|
# @return [Integer]
|
|
2051
|
-
|
|
2052
|
-
def recycle_ring; attributes[:"recycle_ring"]&.value; end
|
|
1383
|
+
def recycle_ring; self[:"recycle_ring"]; end
|
|
2053
1384
|
# @rbs return: ::Integer
|
|
2054
1385
|
# @return [Integer]
|
|
2055
|
-
|
|
2056
|
-
def recycle_ring_full; attributes[:"recycle_ring_full"]&.value; end
|
|
1386
|
+
def recycle_ring_full; self[:"recycle_ring_full"]; end
|
|
2057
1387
|
# @rbs return: ::Integer
|
|
2058
1388
|
# @return [Integer]
|
|
2059
|
-
|
|
2060
|
-
def recycle_released_refcnt; attributes[:"recycle_released_refcnt"]&.value; end
|
|
1389
|
+
def recycle_released_refcnt; self[:"recycle_released_refcnt"]; end
|
|
2061
1390
|
end
|
|
2062
1391
|
# Get queue information from the kernel. Only configured queues will be reported (as opposed to all available hardware queues).
|
|
2063
|
-
class DoQueueGetRequest < ::Nl::
|
|
1392
|
+
class DoQueueGetRequest < ::Nl::Message
|
|
2064
1393
|
TYPE = 10
|
|
2065
1394
|
FIXED_HEADER = nil
|
|
2066
1395
|
ATTRIBUTE_SET = AttributeSets::Queue
|
|
2067
|
-
ATTRIBUTES =
|
|
1396
|
+
ATTRIBUTES = %i[id ifindex type].freeze
|
|
1397
|
+
include ATTRIBUTE_SET::Definitions
|
|
1398
|
+
def initialize(attributes = [])
|
|
1399
|
+
@attributes = attributes
|
|
1400
|
+
end
|
|
1401
|
+
# @private
|
|
1402
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1403
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1404
|
+
new(
|
|
1405
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1406
|
+
)
|
|
1407
|
+
end
|
|
1408
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1409
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1410
|
+
def self.decode(decoder)
|
|
1411
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1412
|
+
end
|
|
1413
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1414
|
+
encode_attributes(encoder, external_selectors:)
|
|
1415
|
+
end
|
|
2068
1416
|
# Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.
|
|
2069
1417
|
# @rbs return: ::Integer
|
|
2070
1418
|
# @return [Integer]
|
|
2071
|
-
|
|
2072
|
-
def id; attributes[:"id"]&.value; end
|
|
1419
|
+
def id; self[:"id"]; end
|
|
2073
1420
|
# ifindex of the netdevice to which the queue belongs.
|
|
2074
1421
|
# @rbs return: ::Integer
|
|
2075
1422
|
# @return [Integer]
|
|
2076
|
-
|
|
2077
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1423
|
+
def ifindex; self[:"ifindex"]; end
|
|
2078
1424
|
# Queue type as rx, tx. Each queue type defines a separate ID space. XDP TX queues allocated in the kernel are not linked to NAPIs and thus not listed. AF_XDP queues will have more information set in the xsk attribute.
|
|
2079
1425
|
#
|
|
2080
1426
|
# Known enum values are defined in {Enums::QueueType}.
|
|
2081
1427
|
# @rbs return: ::Integer
|
|
2082
1428
|
# @return [Integer]
|
|
2083
|
-
|
|
2084
|
-
def type; attributes[:"type"]&.value; end
|
|
1429
|
+
def type; self[:"type"]; end
|
|
2085
1430
|
end
|
|
2086
1431
|
# Get queue information from the kernel. Only configured queues will be reported (as opposed to all available hardware queues).
|
|
2087
|
-
class DoQueueGetReply < ::Nl::
|
|
1432
|
+
class DoQueueGetReply < ::Nl::Message
|
|
2088
1433
|
TYPE = 10
|
|
2089
1434
|
FIXED_HEADER = nil
|
|
2090
1435
|
ATTRIBUTE_SET = AttributeSets::Queue
|
|
2091
|
-
ATTRIBUTES =
|
|
1436
|
+
ATTRIBUTES = %i[id ifindex type napi_id dmabuf io_uring xsk lease].freeze
|
|
1437
|
+
include ATTRIBUTE_SET::Definitions
|
|
1438
|
+
def initialize(attributes = [])
|
|
1439
|
+
@attributes = attributes
|
|
1440
|
+
end
|
|
1441
|
+
# @private
|
|
1442
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1443
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1444
|
+
new(
|
|
1445
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1446
|
+
)
|
|
1447
|
+
end
|
|
1448
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1449
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1450
|
+
def self.decode(decoder)
|
|
1451
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1452
|
+
end
|
|
1453
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1454
|
+
encode_attributes(encoder, external_selectors:)
|
|
1455
|
+
end
|
|
2092
1456
|
# Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.
|
|
2093
1457
|
# @rbs return: ::Integer
|
|
2094
1458
|
# @return [Integer]
|
|
2095
|
-
|
|
2096
|
-
def id; attributes[:"id"]&.value; end
|
|
1459
|
+
def id; self[:"id"]; end
|
|
2097
1460
|
# ifindex of the netdevice to which the queue belongs.
|
|
2098
1461
|
# @rbs return: ::Integer
|
|
2099
1462
|
# @return [Integer]
|
|
2100
|
-
|
|
2101
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1463
|
+
def ifindex; self[:"ifindex"]; end
|
|
2102
1464
|
# Queue type as rx, tx. Each queue type defines a separate ID space. XDP TX queues allocated in the kernel are not linked to NAPIs and thus not listed. AF_XDP queues will have more information set in the xsk attribute.
|
|
2103
1465
|
#
|
|
2104
1466
|
# Known enum values are defined in {Enums::QueueType}.
|
|
2105
1467
|
# @rbs return: ::Integer
|
|
2106
1468
|
# @return [Integer]
|
|
2107
|
-
|
|
2108
|
-
def type; attributes[:"type"]&.value; end
|
|
1469
|
+
def type; self[:"type"]; end
|
|
2109
1470
|
# ID of the NAPI instance which services this queue.
|
|
2110
1471
|
# @rbs return: ::Integer
|
|
2111
1472
|
# @return [Integer]
|
|
2112
|
-
|
|
2113
|
-
def napi_id; attributes[:"napi_id"]&.value; end
|
|
1473
|
+
def napi_id; self[:"napi_id"]; end
|
|
2114
1474
|
# ID of the dmabuf attached to this queue, if any.
|
|
2115
1475
|
# @rbs return: ::Integer
|
|
2116
1476
|
# @return [Integer]
|
|
2117
|
-
|
|
2118
|
-
def dmabuf; attributes[:"dmabuf"]&.value; end
|
|
1477
|
+
def dmabuf; self[:"dmabuf"]; end
|
|
2119
1478
|
# io_uring memory provider information.
|
|
2120
1479
|
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
2121
1480
|
# @return [AttributeSets::IoUringProviderInfo]
|
|
2122
|
-
|
|
2123
|
-
def io_uring; attributes[:"io_uring"]&.value; end
|
|
1481
|
+
def io_uring; self[:"io_uring"]; end
|
|
2124
1482
|
# XSK information for this queue, if any.
|
|
2125
1483
|
# @rbs return: AttributeSets::XskInfo
|
|
2126
1484
|
# @return [AttributeSets::XskInfo]
|
|
2127
|
-
|
|
2128
|
-
def xsk; attributes[:"xsk"]&.value; end
|
|
1485
|
+
def xsk; self[:"xsk"]; end
|
|
2129
1486
|
# A queue from a virtual device can have a lease which refers to
|
|
2130
1487
|
# another queue from a physical device. This is useful for memory
|
|
2131
1488
|
# providers and AF_XDP operations which take an ifindex and queue id
|
|
2132
1489
|
# to allow applications to bind against virtual devices in containers.
|
|
2133
1490
|
# @rbs return: AttributeSets::Lease
|
|
2134
1491
|
# @return [AttributeSets::Lease]
|
|
2135
|
-
|
|
2136
|
-
def lease; attributes[:"lease"]&.value; end
|
|
1492
|
+
def lease; self[:"lease"]; end
|
|
2137
1493
|
end
|
|
2138
1494
|
# Get queue information from the kernel. Only configured queues will be reported (as opposed to all available hardware queues).
|
|
2139
|
-
class DumpQueueGetRequest < ::Nl::
|
|
1495
|
+
class DumpQueueGetRequest < ::Nl::Message
|
|
2140
1496
|
TYPE = 10
|
|
2141
1497
|
FIXED_HEADER = nil
|
|
2142
1498
|
ATTRIBUTE_SET = AttributeSets::Queue
|
|
2143
|
-
ATTRIBUTES =
|
|
1499
|
+
ATTRIBUTES = %i[ifindex].freeze
|
|
1500
|
+
include ATTRIBUTE_SET::Definitions
|
|
1501
|
+
def initialize(attributes = [])
|
|
1502
|
+
@attributes = attributes
|
|
1503
|
+
end
|
|
1504
|
+
# @private
|
|
1505
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1506
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1507
|
+
new(
|
|
1508
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1509
|
+
)
|
|
1510
|
+
end
|
|
1511
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1512
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1513
|
+
def self.decode(decoder)
|
|
1514
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1515
|
+
end
|
|
1516
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1517
|
+
encode_attributes(encoder, external_selectors:)
|
|
1518
|
+
end
|
|
2144
1519
|
# ifindex of the netdevice to which the queue belongs.
|
|
2145
1520
|
# @rbs return: ::Integer
|
|
2146
1521
|
# @return [Integer]
|
|
2147
|
-
|
|
2148
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1522
|
+
def ifindex; self[:"ifindex"]; end
|
|
2149
1523
|
end
|
|
2150
1524
|
# Get queue information from the kernel. Only configured queues will be reported (as opposed to all available hardware queues).
|
|
2151
|
-
class DumpQueueGetReply < ::Nl::
|
|
1525
|
+
class DumpQueueGetReply < ::Nl::Message
|
|
2152
1526
|
TYPE = 10
|
|
2153
1527
|
FIXED_HEADER = nil
|
|
2154
1528
|
ATTRIBUTE_SET = AttributeSets::Queue
|
|
2155
|
-
ATTRIBUTES =
|
|
1529
|
+
ATTRIBUTES = %i[id ifindex type napi_id dmabuf io_uring xsk lease].freeze
|
|
1530
|
+
include ATTRIBUTE_SET::Definitions
|
|
1531
|
+
def initialize(attributes = [])
|
|
1532
|
+
@attributes = attributes
|
|
1533
|
+
end
|
|
1534
|
+
# @private
|
|
1535
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1536
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1537
|
+
new(
|
|
1538
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1539
|
+
)
|
|
1540
|
+
end
|
|
1541
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1542
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1543
|
+
def self.decode(decoder)
|
|
1544
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1545
|
+
end
|
|
1546
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1547
|
+
encode_attributes(encoder, external_selectors:)
|
|
1548
|
+
end
|
|
2156
1549
|
# Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.
|
|
2157
1550
|
# @rbs return: ::Integer
|
|
2158
1551
|
# @return [Integer]
|
|
2159
|
-
|
|
2160
|
-
def id; attributes[:"id"]&.value; end
|
|
1552
|
+
def id; self[:"id"]; end
|
|
2161
1553
|
# ifindex of the netdevice to which the queue belongs.
|
|
2162
1554
|
# @rbs return: ::Integer
|
|
2163
1555
|
# @return [Integer]
|
|
2164
|
-
|
|
2165
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1556
|
+
def ifindex; self[:"ifindex"]; end
|
|
2166
1557
|
# Queue type as rx, tx. Each queue type defines a separate ID space. XDP TX queues allocated in the kernel are not linked to NAPIs and thus not listed. AF_XDP queues will have more information set in the xsk attribute.
|
|
2167
1558
|
#
|
|
2168
1559
|
# Known enum values are defined in {Enums::QueueType}.
|
|
2169
1560
|
# @rbs return: ::Integer
|
|
2170
1561
|
# @return [Integer]
|
|
2171
|
-
|
|
2172
|
-
def type; attributes[:"type"]&.value; end
|
|
1562
|
+
def type; self[:"type"]; end
|
|
2173
1563
|
# ID of the NAPI instance which services this queue.
|
|
2174
1564
|
# @rbs return: ::Integer
|
|
2175
1565
|
# @return [Integer]
|
|
2176
|
-
|
|
2177
|
-
def napi_id; attributes[:"napi_id"]&.value; end
|
|
1566
|
+
def napi_id; self[:"napi_id"]; end
|
|
2178
1567
|
# ID of the dmabuf attached to this queue, if any.
|
|
2179
1568
|
# @rbs return: ::Integer
|
|
2180
1569
|
# @return [Integer]
|
|
2181
|
-
|
|
2182
|
-
def dmabuf; attributes[:"dmabuf"]&.value; end
|
|
1570
|
+
def dmabuf; self[:"dmabuf"]; end
|
|
2183
1571
|
# io_uring memory provider information.
|
|
2184
1572
|
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
2185
1573
|
# @return [AttributeSets::IoUringProviderInfo]
|
|
2186
|
-
|
|
2187
|
-
def io_uring; attributes[:"io_uring"]&.value; end
|
|
1574
|
+
def io_uring; self[:"io_uring"]; end
|
|
2188
1575
|
# XSK information for this queue, if any.
|
|
2189
1576
|
# @rbs return: AttributeSets::XskInfo
|
|
2190
1577
|
# @return [AttributeSets::XskInfo]
|
|
2191
|
-
|
|
2192
|
-
def xsk; attributes[:"xsk"]&.value; end
|
|
1578
|
+
def xsk; self[:"xsk"]; end
|
|
2193
1579
|
# A queue from a virtual device can have a lease which refers to
|
|
2194
1580
|
# another queue from a physical device. This is useful for memory
|
|
2195
1581
|
# providers and AF_XDP operations which take an ifindex and queue id
|
|
2196
1582
|
# to allow applications to bind against virtual devices in containers.
|
|
2197
1583
|
# @rbs return: AttributeSets::Lease
|
|
2198
1584
|
# @return [AttributeSets::Lease]
|
|
2199
|
-
|
|
2200
|
-
def lease; attributes[:"lease"]&.value; end
|
|
1585
|
+
def lease; self[:"lease"]; end
|
|
2201
1586
|
end
|
|
2202
1587
|
# Get information about NAPI instances configured on the system.
|
|
2203
|
-
class DoNapiGetRequest < ::Nl::
|
|
1588
|
+
class DoNapiGetRequest < ::Nl::Message
|
|
2204
1589
|
TYPE = 11
|
|
2205
1590
|
FIXED_HEADER = nil
|
|
2206
1591
|
ATTRIBUTE_SET = AttributeSets::Napi
|
|
2207
|
-
ATTRIBUTES =
|
|
1592
|
+
ATTRIBUTES = %i[id].freeze
|
|
1593
|
+
include ATTRIBUTE_SET::Definitions
|
|
1594
|
+
def initialize(attributes = [])
|
|
1595
|
+
@attributes = attributes
|
|
1596
|
+
end
|
|
1597
|
+
# @private
|
|
1598
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1599
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1600
|
+
new(
|
|
1601
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1602
|
+
)
|
|
1603
|
+
end
|
|
1604
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1605
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1606
|
+
def self.decode(decoder)
|
|
1607
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1608
|
+
end
|
|
1609
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1610
|
+
encode_attributes(encoder, external_selectors:)
|
|
1611
|
+
end
|
|
2208
1612
|
# ID of the NAPI instance.
|
|
2209
1613
|
# @rbs return: ::Integer
|
|
2210
1614
|
# @return [Integer]
|
|
2211
|
-
|
|
2212
|
-
def id; attributes[:"id"]&.value; end
|
|
1615
|
+
def id; self[:"id"]; end
|
|
2213
1616
|
end
|
|
2214
1617
|
# Get information about NAPI instances configured on the system.
|
|
2215
|
-
class DoNapiGetReply < ::Nl::
|
|
1618
|
+
class DoNapiGetReply < ::Nl::Message
|
|
2216
1619
|
TYPE = 11
|
|
2217
1620
|
FIXED_HEADER = nil
|
|
2218
1621
|
ATTRIBUTE_SET = AttributeSets::Napi
|
|
2219
|
-
ATTRIBUTES =
|
|
1622
|
+
ATTRIBUTES = %i[ifindex id irq pid defer_hard_irqs gro_flush_timeout irq_suspend_timeout threaded].freeze
|
|
1623
|
+
include ATTRIBUTE_SET::Definitions
|
|
1624
|
+
def initialize(attributes = [])
|
|
1625
|
+
@attributes = attributes
|
|
1626
|
+
end
|
|
1627
|
+
# @private
|
|
1628
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1629
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1630
|
+
new(
|
|
1631
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1632
|
+
)
|
|
1633
|
+
end
|
|
1634
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1635
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1636
|
+
def self.decode(decoder)
|
|
1637
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1638
|
+
end
|
|
1639
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1640
|
+
encode_attributes(encoder, external_selectors:)
|
|
1641
|
+
end
|
|
2220
1642
|
# ifindex of the netdevice to which NAPI instance belongs.
|
|
2221
1643
|
# @rbs return: ::Integer
|
|
2222
1644
|
# @return [Integer]
|
|
2223
|
-
|
|
2224
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1645
|
+
def ifindex; self[:"ifindex"]; end
|
|
2225
1646
|
# ID of the NAPI instance.
|
|
2226
1647
|
# @rbs return: ::Integer
|
|
2227
1648
|
# @return [Integer]
|
|
2228
|
-
|
|
2229
|
-
def id; attributes[:"id"]&.value; end
|
|
1649
|
+
def id; self[:"id"]; end
|
|
2230
1650
|
# The associated interrupt vector number for the napi
|
|
2231
1651
|
# @rbs return: ::Integer
|
|
2232
1652
|
# @return [Integer]
|
|
2233
|
-
|
|
2234
|
-
def irq; attributes[:"irq"]&.value; end
|
|
1653
|
+
def irq; self[:"irq"]; end
|
|
2235
1654
|
# PID of the napi thread, if NAPI is configured to operate in threaded mode. If NAPI is not in threaded mode (i.e. uses normal softirq context), the attribute will be absent.
|
|
2236
1655
|
# @rbs return: ::Integer
|
|
2237
1656
|
# @return [Integer]
|
|
2238
|
-
|
|
2239
|
-
def pid; attributes[:"pid"]&.value; end
|
|
1657
|
+
def pid; self[:"pid"]; end
|
|
2240
1658
|
# The number of consecutive empty polls before IRQ deferral ends and hardware IRQs are re-enabled.
|
|
2241
1659
|
# @rbs return: ::Integer
|
|
2242
1660
|
# @return [Integer]
|
|
2243
|
-
|
|
2244
|
-
def defer_hard_irqs; attributes[:"defer_hard_irqs"]&.value; end
|
|
1661
|
+
def defer_hard_irqs; self[:"defer_hard_irqs"]; end
|
|
2245
1662
|
# The timeout, in nanoseconds, of when to trigger the NAPI watchdog timer which schedules NAPI processing. Additionally, a non-zero value will also prevent GRO from flushing recent super-frames at the end of a NAPI cycle. This may add receive latency in exchange for reducing the number of frames processed by the network stack.
|
|
2246
1663
|
# @rbs return: ::Integer
|
|
2247
1664
|
# @return [Integer]
|
|
2248
|
-
|
|
2249
|
-
def gro_flush_timeout; attributes[:"gro_flush_timeout"]&.value; end
|
|
1665
|
+
def gro_flush_timeout; self[:"gro_flush_timeout"]; end
|
|
2250
1666
|
# The timeout, in nanoseconds, of how long to suspend irq processing, if event polling finds events
|
|
2251
1667
|
# @rbs return: ::Integer
|
|
2252
1668
|
# @return [Integer]
|
|
2253
|
-
|
|
2254
|
-
def irq_suspend_timeout; attributes[:"irq_suspend_timeout"]&.value; end
|
|
1669
|
+
def irq_suspend_timeout; self[:"irq_suspend_timeout"]; end
|
|
2255
1670
|
# Whether the NAPI is configured to operate in threaded polling mode. If this is set to enabled then the NAPI context operates in threaded polling mode. If this is set to busy-poll, then the threaded polling mode also busy polls.
|
|
2256
1671
|
#
|
|
2257
1672
|
# Known enum values are defined in {Enums::NapiThreaded}.
|
|
2258
1673
|
# @rbs return: ::Integer
|
|
2259
1674
|
# @return [Integer]
|
|
2260
|
-
|
|
2261
|
-
def threaded; attributes[:"threaded"]&.value; end
|
|
1675
|
+
def threaded; self[:"threaded"]; end
|
|
2262
1676
|
end
|
|
2263
1677
|
# Get information about NAPI instances configured on the system.
|
|
2264
|
-
class DumpNapiGetRequest < ::Nl::
|
|
1678
|
+
class DumpNapiGetRequest < ::Nl::Message
|
|
2265
1679
|
TYPE = 11
|
|
2266
1680
|
FIXED_HEADER = nil
|
|
2267
1681
|
ATTRIBUTE_SET = AttributeSets::Napi
|
|
2268
|
-
ATTRIBUTES =
|
|
1682
|
+
ATTRIBUTES = %i[ifindex].freeze
|
|
1683
|
+
include ATTRIBUTE_SET::Definitions
|
|
1684
|
+
def initialize(attributes = [])
|
|
1685
|
+
@attributes = attributes
|
|
1686
|
+
end
|
|
1687
|
+
# @private
|
|
1688
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1689
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1690
|
+
new(
|
|
1691
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1692
|
+
)
|
|
1693
|
+
end
|
|
1694
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1695
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1696
|
+
def self.decode(decoder)
|
|
1697
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1698
|
+
end
|
|
1699
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1700
|
+
encode_attributes(encoder, external_selectors:)
|
|
1701
|
+
end
|
|
2269
1702
|
# ifindex of the netdevice to which NAPI instance belongs.
|
|
2270
1703
|
# @rbs return: ::Integer
|
|
2271
1704
|
# @return [Integer]
|
|
2272
|
-
|
|
2273
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1705
|
+
def ifindex; self[:"ifindex"]; end
|
|
2274
1706
|
end
|
|
2275
1707
|
# Get information about NAPI instances configured on the system.
|
|
2276
|
-
class DumpNapiGetReply < ::Nl::
|
|
1708
|
+
class DumpNapiGetReply < ::Nl::Message
|
|
2277
1709
|
TYPE = 11
|
|
2278
1710
|
FIXED_HEADER = nil
|
|
2279
1711
|
ATTRIBUTE_SET = AttributeSets::Napi
|
|
2280
|
-
ATTRIBUTES =
|
|
1712
|
+
ATTRIBUTES = %i[ifindex id irq pid defer_hard_irqs gro_flush_timeout irq_suspend_timeout threaded].freeze
|
|
1713
|
+
include ATTRIBUTE_SET::Definitions
|
|
1714
|
+
def initialize(attributes = [])
|
|
1715
|
+
@attributes = attributes
|
|
1716
|
+
end
|
|
1717
|
+
# @private
|
|
1718
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1719
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1720
|
+
new(
|
|
1721
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1722
|
+
)
|
|
1723
|
+
end
|
|
1724
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1725
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1726
|
+
def self.decode(decoder)
|
|
1727
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1728
|
+
end
|
|
1729
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1730
|
+
encode_attributes(encoder, external_selectors:)
|
|
1731
|
+
end
|
|
2281
1732
|
# ifindex of the netdevice to which NAPI instance belongs.
|
|
2282
1733
|
# @rbs return: ::Integer
|
|
2283
1734
|
# @return [Integer]
|
|
2284
|
-
|
|
2285
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1735
|
+
def ifindex; self[:"ifindex"]; end
|
|
2286
1736
|
# ID of the NAPI instance.
|
|
2287
1737
|
# @rbs return: ::Integer
|
|
2288
1738
|
# @return [Integer]
|
|
2289
|
-
|
|
2290
|
-
def id; attributes[:"id"]&.value; end
|
|
1739
|
+
def id; self[:"id"]; end
|
|
2291
1740
|
# The associated interrupt vector number for the napi
|
|
2292
1741
|
# @rbs return: ::Integer
|
|
2293
1742
|
# @return [Integer]
|
|
2294
|
-
|
|
2295
|
-
def irq; attributes[:"irq"]&.value; end
|
|
1743
|
+
def irq; self[:"irq"]; end
|
|
2296
1744
|
# PID of the napi thread, if NAPI is configured to operate in threaded mode. If NAPI is not in threaded mode (i.e. uses normal softirq context), the attribute will be absent.
|
|
2297
1745
|
# @rbs return: ::Integer
|
|
2298
1746
|
# @return [Integer]
|
|
2299
|
-
|
|
2300
|
-
def pid; attributes[:"pid"]&.value; end
|
|
1747
|
+
def pid; self[:"pid"]; end
|
|
2301
1748
|
# The number of consecutive empty polls before IRQ deferral ends and hardware IRQs are re-enabled.
|
|
2302
1749
|
# @rbs return: ::Integer
|
|
2303
1750
|
# @return [Integer]
|
|
2304
|
-
|
|
2305
|
-
def defer_hard_irqs; attributes[:"defer_hard_irqs"]&.value; end
|
|
1751
|
+
def defer_hard_irqs; self[:"defer_hard_irqs"]; end
|
|
2306
1752
|
# The timeout, in nanoseconds, of when to trigger the NAPI watchdog timer which schedules NAPI processing. Additionally, a non-zero value will also prevent GRO from flushing recent super-frames at the end of a NAPI cycle. This may add receive latency in exchange for reducing the number of frames processed by the network stack.
|
|
2307
1753
|
# @rbs return: ::Integer
|
|
2308
1754
|
# @return [Integer]
|
|
2309
|
-
|
|
2310
|
-
def gro_flush_timeout; attributes[:"gro_flush_timeout"]&.value; end
|
|
1755
|
+
def gro_flush_timeout; self[:"gro_flush_timeout"]; end
|
|
2311
1756
|
# The timeout, in nanoseconds, of how long to suspend irq processing, if event polling finds events
|
|
2312
1757
|
# @rbs return: ::Integer
|
|
2313
1758
|
# @return [Integer]
|
|
2314
|
-
|
|
2315
|
-
def irq_suspend_timeout; attributes[:"irq_suspend_timeout"]&.value; end
|
|
1759
|
+
def irq_suspend_timeout; self[:"irq_suspend_timeout"]; end
|
|
2316
1760
|
# Whether the NAPI is configured to operate in threaded polling mode. If this is set to enabled then the NAPI context operates in threaded polling mode. If this is set to busy-poll, then the threaded polling mode also busy polls.
|
|
2317
1761
|
#
|
|
2318
1762
|
# Known enum values are defined in {Enums::NapiThreaded}.
|
|
2319
1763
|
# @rbs return: ::Integer
|
|
2320
1764
|
# @return [Integer]
|
|
2321
|
-
|
|
2322
|
-
def threaded; attributes[:"threaded"]&.value; end
|
|
1765
|
+
def threaded; self[:"threaded"]; end
|
|
2323
1766
|
end
|
|
2324
1767
|
# Get / dump fine grained statistics. Which statistics are reported
|
|
2325
1768
|
# depends on the device and the driver, and whether the driver stores
|
|
2326
1769
|
# software counters per-queue.
|
|
2327
|
-
class DumpQstatsGetRequest < ::Nl::
|
|
1770
|
+
class DumpQstatsGetRequest < ::Nl::Message
|
|
2328
1771
|
TYPE = 12
|
|
2329
1772
|
FIXED_HEADER = nil
|
|
2330
1773
|
ATTRIBUTE_SET = AttributeSets::Qstats
|
|
2331
|
-
ATTRIBUTES =
|
|
1774
|
+
ATTRIBUTES = %i[ifindex scope].freeze
|
|
1775
|
+
include ATTRIBUTE_SET::Definitions
|
|
1776
|
+
def initialize(attributes = [])
|
|
1777
|
+
@attributes = attributes
|
|
1778
|
+
end
|
|
1779
|
+
# @private
|
|
1780
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1781
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1782
|
+
new(
|
|
1783
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1784
|
+
)
|
|
1785
|
+
end
|
|
1786
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1787
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1788
|
+
def self.decode(decoder)
|
|
1789
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1790
|
+
end
|
|
1791
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1792
|
+
encode_attributes(encoder, external_selectors:)
|
|
1793
|
+
end
|
|
2332
1794
|
# ifindex of the netdevice to which stats belong.
|
|
2333
1795
|
# @rbs return: ::Integer
|
|
2334
1796
|
# @return [Integer]
|
|
2335
|
-
|
|
2336
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1797
|
+
def ifindex; self[:"ifindex"]; end
|
|
2337
1798
|
# What object type should be used to iterate over the stats.
|
|
2338
1799
|
#
|
|
2339
1800
|
#
|
|
2340
1801
|
# Known flags are defined in {Flags::QstatsScope}.
|
|
2341
1802
|
# @rbs return: ::Integer
|
|
2342
1803
|
# @return [Integer]
|
|
2343
|
-
|
|
2344
|
-
def scope; attributes[:"scope"]&.value; end
|
|
1804
|
+
def scope; self[:"scope"]; end
|
|
2345
1805
|
end
|
|
2346
1806
|
# Get / dump fine grained statistics. Which statistics are reported
|
|
2347
1807
|
# depends on the device and the driver, and whether the driver stores
|
|
2348
1808
|
# software counters per-queue.
|
|
2349
|
-
class DumpQstatsGetReply < ::Nl::
|
|
1809
|
+
class DumpQstatsGetReply < ::Nl::Message
|
|
2350
1810
|
TYPE = 12
|
|
2351
1811
|
FIXED_HEADER = nil
|
|
2352
1812
|
ATTRIBUTE_SET = AttributeSets::Qstats
|
|
2353
|
-
ATTRIBUTES =
|
|
1813
|
+
ATTRIBUTES = %i[ifindex queue_type queue_id rx_packets rx_bytes tx_packets tx_bytes rx_alloc_fail rx_hw_drops rx_hw_drop_overruns rx_csum_complete rx_csum_unnecessary rx_csum_none rx_csum_bad rx_hw_gro_packets rx_hw_gro_bytes rx_hw_gro_wire_packets rx_hw_gro_wire_bytes rx_hw_drop_ratelimits tx_hw_drops tx_hw_drop_errors tx_csum_none tx_needs_csum tx_hw_gso_packets tx_hw_gso_bytes tx_hw_gso_wire_packets tx_hw_gso_wire_bytes tx_hw_drop_ratelimits tx_stop tx_wake].freeze
|
|
1814
|
+
include ATTRIBUTE_SET::Definitions
|
|
1815
|
+
def initialize(attributes = [])
|
|
1816
|
+
@attributes = attributes
|
|
1817
|
+
end
|
|
1818
|
+
# @private
|
|
1819
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1820
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1821
|
+
new(
|
|
1822
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
1823
|
+
)
|
|
1824
|
+
end
|
|
1825
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
1826
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
1827
|
+
def self.decode(decoder)
|
|
1828
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
1829
|
+
end
|
|
1830
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1831
|
+
encode_attributes(encoder, external_selectors:)
|
|
1832
|
+
end
|
|
2354
1833
|
# ifindex of the netdevice to which stats belong.
|
|
2355
1834
|
# @rbs return: ::Integer
|
|
2356
1835
|
# @return [Integer]
|
|
2357
|
-
|
|
2358
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1836
|
+
def ifindex; self[:"ifindex"]; end
|
|
2359
1837
|
# Queue type as rx, tx, for queue-id.
|
|
2360
1838
|
#
|
|
2361
1839
|
# Known enum values are defined in {Enums::QueueType}.
|
|
2362
1840
|
# @rbs return: ::Integer
|
|
2363
1841
|
# @return [Integer]
|
|
2364
|
-
|
|
2365
|
-
def queue_type; attributes[:"queue_type"]&.value; end
|
|
1842
|
+
def queue_type; self[:"queue_type"]; end
|
|
2366
1843
|
# Queue ID, if stats are scoped to a single queue instance.
|
|
2367
1844
|
# @rbs return: ::Integer
|
|
2368
1845
|
# @return [Integer]
|
|
2369
|
-
|
|
2370
|
-
def queue_id; attributes[:"queue_id"]&.value; end
|
|
1846
|
+
def queue_id; self[:"queue_id"]; end
|
|
2371
1847
|
# Number of wire packets successfully received and passed to the stack.
|
|
2372
1848
|
# For drivers supporting XDP, XDP is considered the first layer
|
|
2373
1849
|
# of the stack, so packets consumed by XDP are still counted here.
|
|
2374
1850
|
# @rbs return: ::Integer
|
|
2375
1851
|
# @return [Integer]
|
|
2376
|
-
|
|
2377
|
-
def rx_packets; attributes[:"rx_packets"]&.value; end
|
|
1852
|
+
def rx_packets; self[:"rx_packets"]; end
|
|
2378
1853
|
# Successfully received bytes, see `rx-packets`.
|
|
2379
1854
|
# @rbs return: ::Integer
|
|
2380
1855
|
# @return [Integer]
|
|
2381
|
-
|
|
2382
|
-
def rx_bytes; attributes[:"rx_bytes"]&.value; end
|
|
1856
|
+
def rx_bytes; self[:"rx_bytes"]; end
|
|
2383
1857
|
# Number of wire packets successfully sent. Packet is considered to be
|
|
2384
1858
|
# successfully sent once it is in device memory (usually this means
|
|
2385
1859
|
# the device has issued a DMA completion for the packet).
|
|
2386
1860
|
# @rbs return: ::Integer
|
|
2387
1861
|
# @return [Integer]
|
|
2388
|
-
|
|
2389
|
-
def tx_packets; attributes[:"tx_packets"]&.value; end
|
|
1862
|
+
def tx_packets; self[:"tx_packets"]; end
|
|
2390
1863
|
# Successfully sent bytes, see `tx-packets`.
|
|
2391
1864
|
# @rbs return: ::Integer
|
|
2392
1865
|
# @return [Integer]
|
|
2393
|
-
|
|
2394
|
-
def tx_bytes; attributes[:"tx_bytes"]&.value; end
|
|
1866
|
+
def tx_bytes; self[:"tx_bytes"]; end
|
|
2395
1867
|
# Number of times skb or buffer allocation failed on the Rx datapath.
|
|
2396
1868
|
# Allocation failure may, or may not result in a packet drop, depending
|
|
2397
1869
|
# on driver implementation and whether system recovers quickly.
|
|
2398
1870
|
# @rbs return: ::Integer
|
|
2399
1871
|
# @return [Integer]
|
|
2400
|
-
|
|
2401
|
-
def rx_alloc_fail; attributes[:"rx_alloc_fail"]&.value; end
|
|
1872
|
+
def rx_alloc_fail; self[:"rx_alloc_fail"]; end
|
|
2402
1873
|
# Number of all packets which entered the device, but never left it,
|
|
2403
1874
|
# including but not limited to: packets dropped due to lack of buffer
|
|
2404
1875
|
# space, processing errors, explicit or implicit policies and packet
|
|
2405
1876
|
# filters.
|
|
2406
1877
|
# @rbs return: ::Integer
|
|
2407
1878
|
# @return [Integer]
|
|
2408
|
-
|
|
2409
|
-
def rx_hw_drops; attributes[:"rx_hw_drops"]&.value; end
|
|
1879
|
+
def rx_hw_drops; self[:"rx_hw_drops"]; end
|
|
2410
1880
|
# Number of packets dropped due to transient lack of resources, such as
|
|
2411
1881
|
# buffer space, host descriptors etc.
|
|
2412
1882
|
# @rbs return: ::Integer
|
|
2413
1883
|
# @return [Integer]
|
|
2414
|
-
|
|
2415
|
-
def rx_hw_drop_overruns; attributes[:"rx_hw_drop_overruns"]&.value; end
|
|
1884
|
+
def rx_hw_drop_overruns; self[:"rx_hw_drop_overruns"]; end
|
|
2416
1885
|
# Number of packets that were marked as CHECKSUM_COMPLETE.
|
|
2417
1886
|
# @rbs return: ::Integer
|
|
2418
1887
|
# @return [Integer]
|
|
2419
|
-
|
|
2420
|
-
def rx_csum_complete; attributes[:"rx_csum_complete"]&.value; end
|
|
1888
|
+
def rx_csum_complete; self[:"rx_csum_complete"]; end
|
|
2421
1889
|
# Number of packets that were marked as CHECKSUM_UNNECESSARY.
|
|
2422
1890
|
# @rbs return: ::Integer
|
|
2423
1891
|
# @return [Integer]
|
|
2424
|
-
|
|
2425
|
-
def rx_csum_unnecessary; attributes[:"rx_csum_unnecessary"]&.value; end
|
|
1892
|
+
def rx_csum_unnecessary; self[:"rx_csum_unnecessary"]; end
|
|
2426
1893
|
# Number of packets that were not checksummed by device.
|
|
2427
1894
|
# @rbs return: ::Integer
|
|
2428
1895
|
# @return [Integer]
|
|
2429
|
-
|
|
2430
|
-
def rx_csum_none; attributes[:"rx_csum_none"]&.value; end
|
|
1896
|
+
def rx_csum_none; self[:"rx_csum_none"]; end
|
|
2431
1897
|
# Number of packets with bad checksum. The packets are not discarded,
|
|
2432
1898
|
# but still delivered to the stack.
|
|
2433
1899
|
# @rbs return: ::Integer
|
|
2434
1900
|
# @return [Integer]
|
|
2435
|
-
|
|
2436
|
-
def rx_csum_bad; attributes[:"rx_csum_bad"]&.value; end
|
|
1901
|
+
def rx_csum_bad; self[:"rx_csum_bad"]; end
|
|
2437
1902
|
# Number of packets that were coalesced from smaller packets by the
|
|
2438
1903
|
# device. Counts only packets coalesced with the HW-GRO netdevice
|
|
2439
1904
|
# feature, LRO-coalesced packets are not counted.
|
|
2440
1905
|
# @rbs return: ::Integer
|
|
2441
1906
|
# @return [Integer]
|
|
2442
|
-
|
|
2443
|
-
def rx_hw_gro_packets; attributes[:"rx_hw_gro_packets"]&.value; end
|
|
1907
|
+
def rx_hw_gro_packets; self[:"rx_hw_gro_packets"]; end
|
|
2444
1908
|
# See `rx-hw-gro-packets`.
|
|
2445
1909
|
# @rbs return: ::Integer
|
|
2446
1910
|
# @return [Integer]
|
|
2447
|
-
|
|
2448
|
-
def rx_hw_gro_bytes; attributes[:"rx_hw_gro_bytes"]&.value; end
|
|
1911
|
+
def rx_hw_gro_bytes; self[:"rx_hw_gro_bytes"]; end
|
|
2449
1912
|
# Number of packets that were coalesced to bigger packetss with the
|
|
2450
1913
|
# HW-GRO netdevice feature. LRO-coalesced packets are not counted.
|
|
2451
1914
|
# @rbs return: ::Integer
|
|
2452
1915
|
# @return [Integer]
|
|
2453
|
-
|
|
2454
|
-
def rx_hw_gro_wire_packets; attributes[:"rx_hw_gro_wire_packets"]&.value; end
|
|
1916
|
+
def rx_hw_gro_wire_packets; self[:"rx_hw_gro_wire_packets"]; end
|
|
2455
1917
|
# See `rx-hw-gro-wire-packets`.
|
|
2456
1918
|
# @rbs return: ::Integer
|
|
2457
1919
|
# @return [Integer]
|
|
2458
|
-
|
|
2459
|
-
def rx_hw_gro_wire_bytes; attributes[:"rx_hw_gro_wire_bytes"]&.value; end
|
|
1920
|
+
def rx_hw_gro_wire_bytes; self[:"rx_hw_gro_wire_bytes"]; end
|
|
2460
1921
|
# Number of the packets dropped by the device due to the received
|
|
2461
1922
|
# packets bitrate exceeding the device rate limit.
|
|
2462
1923
|
# @rbs return: ::Integer
|
|
2463
1924
|
# @return [Integer]
|
|
2464
|
-
|
|
2465
|
-
def rx_hw_drop_ratelimits; attributes[:"rx_hw_drop_ratelimits"]&.value; end
|
|
1925
|
+
def rx_hw_drop_ratelimits; self[:"rx_hw_drop_ratelimits"]; end
|
|
2466
1926
|
# Number of packets that arrived at the device but never left it,
|
|
2467
1927
|
# encompassing packets dropped for reasons such as processing errors, as
|
|
2468
1928
|
# well as those affected by explicitly defined policies and packet
|
|
2469
1929
|
# filtering criteria.
|
|
2470
1930
|
# @rbs return: ::Integer
|
|
2471
1931
|
# @return [Integer]
|
|
2472
|
-
|
|
2473
|
-
def tx_hw_drops; attributes[:"tx_hw_drops"]&.value; end
|
|
1932
|
+
def tx_hw_drops; self[:"tx_hw_drops"]; end
|
|
2474
1933
|
# Number of packets dropped because they were invalid or malformed.
|
|
2475
1934
|
# @rbs return: ::Integer
|
|
2476
1935
|
# @return [Integer]
|
|
2477
|
-
|
|
2478
|
-
def tx_hw_drop_errors; attributes[:"tx_hw_drop_errors"]&.value; end
|
|
1936
|
+
def tx_hw_drop_errors; self[:"tx_hw_drop_errors"]; end
|
|
2479
1937
|
# Number of packets that did not require the device to calculate the
|
|
2480
1938
|
# checksum.
|
|
2481
1939
|
# @rbs return: ::Integer
|
|
2482
1940
|
# @return [Integer]
|
|
2483
|
-
|
|
2484
|
-
def tx_csum_none; attributes[:"tx_csum_none"]&.value; end
|
|
1941
|
+
def tx_csum_none; self[:"tx_csum_none"]; end
|
|
2485
1942
|
# Number of packets that required the device to calculate the checksum.
|
|
2486
1943
|
# This counter includes the number of GSO wire packets for which device
|
|
2487
1944
|
# calculated the L4 checksum.
|
|
2488
1945
|
# @rbs return: ::Integer
|
|
2489
1946
|
# @return [Integer]
|
|
2490
|
-
|
|
2491
|
-
def tx_needs_csum; attributes[:"tx_needs_csum"]&.value; end
|
|
1947
|
+
def tx_needs_csum; self[:"tx_needs_csum"]; end
|
|
2492
1948
|
# Number of packets that necessitated segmentation into smaller packets
|
|
2493
1949
|
# by the device.
|
|
2494
1950
|
# @rbs return: ::Integer
|
|
2495
1951
|
# @return [Integer]
|
|
2496
|
-
|
|
2497
|
-
def tx_hw_gso_packets; attributes[:"tx_hw_gso_packets"]&.value; end
|
|
1952
|
+
def tx_hw_gso_packets; self[:"tx_hw_gso_packets"]; end
|
|
2498
1953
|
# See `tx-hw-gso-packets`.
|
|
2499
1954
|
# @rbs return: ::Integer
|
|
2500
1955
|
# @return [Integer]
|
|
2501
|
-
|
|
2502
|
-
def tx_hw_gso_bytes; attributes[:"tx_hw_gso_bytes"]&.value; end
|
|
1956
|
+
def tx_hw_gso_bytes; self[:"tx_hw_gso_bytes"]; end
|
|
2503
1957
|
# Number of wire-sized packets generated by processing
|
|
2504
1958
|
# `tx-hw-gso-packets`
|
|
2505
1959
|
# @rbs return: ::Integer
|
|
2506
1960
|
# @return [Integer]
|
|
2507
|
-
|
|
2508
|
-
def tx_hw_gso_wire_packets; attributes[:"tx_hw_gso_wire_packets"]&.value; end
|
|
1961
|
+
def tx_hw_gso_wire_packets; self[:"tx_hw_gso_wire_packets"]; end
|
|
2509
1962
|
# See `tx-hw-gso-wire-packets`.
|
|
2510
1963
|
# @rbs return: ::Integer
|
|
2511
1964
|
# @return [Integer]
|
|
2512
|
-
|
|
2513
|
-
def tx_hw_gso_wire_bytes; attributes[:"tx_hw_gso_wire_bytes"]&.value; end
|
|
1965
|
+
def tx_hw_gso_wire_bytes; self[:"tx_hw_gso_wire_bytes"]; end
|
|
2514
1966
|
# Number of the packets dropped by the device due to the transmit
|
|
2515
1967
|
# packets bitrate exceeding the device rate limit.
|
|
2516
1968
|
# @rbs return: ::Integer
|
|
2517
1969
|
# @return [Integer]
|
|
2518
|
-
|
|
2519
|
-
def tx_hw_drop_ratelimits; attributes[:"tx_hw_drop_ratelimits"]&.value; end
|
|
1970
|
+
def tx_hw_drop_ratelimits; self[:"tx_hw_drop_ratelimits"]; end
|
|
2520
1971
|
# Number of times driver paused accepting new tx packets
|
|
2521
1972
|
# from the stack to this queue, because the queue was full.
|
|
2522
1973
|
# Note that if BQL is supported and enabled on the device
|
|
2523
1974
|
# the networking stack will avoid queuing a lot of data at once.
|
|
2524
1975
|
# @rbs return: ::Integer
|
|
2525
1976
|
# @return [Integer]
|
|
2526
|
-
|
|
2527
|
-
def tx_stop; attributes[:"tx_stop"]&.value; end
|
|
1977
|
+
def tx_stop; self[:"tx_stop"]; end
|
|
2528
1978
|
# Number of times driver re-started accepting send
|
|
2529
1979
|
# requests to this queue from the stack.
|
|
2530
1980
|
# @rbs return: ::Integer
|
|
2531
1981
|
# @return [Integer]
|
|
2532
|
-
|
|
2533
|
-
def tx_wake; attributes[:"tx_wake"]&.value; end
|
|
1982
|
+
def tx_wake; self[:"tx_wake"]; end
|
|
2534
1983
|
end
|
|
2535
1984
|
# Bind dmabuf to netdev
|
|
2536
1985
|
#
|
|
2537
1986
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
2538
|
-
class DoBindRxRequest < ::Nl::
|
|
1987
|
+
class DoBindRxRequest < ::Nl::Message
|
|
2539
1988
|
TYPE = 13
|
|
2540
1989
|
FIXED_HEADER = nil
|
|
2541
1990
|
ATTRIBUTE_SET = AttributeSets::Dmabuf
|
|
2542
|
-
ATTRIBUTES =
|
|
1991
|
+
ATTRIBUTES = %i[ifindex queues fd rx_page_size].freeze
|
|
1992
|
+
include ATTRIBUTE_SET::Definitions
|
|
1993
|
+
def initialize(attributes = [])
|
|
1994
|
+
@attributes = attributes
|
|
1995
|
+
end
|
|
1996
|
+
# @private
|
|
1997
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
1998
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
1999
|
+
new(
|
|
2000
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2001
|
+
)
|
|
2002
|
+
end
|
|
2003
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2004
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2005
|
+
def self.decode(decoder)
|
|
2006
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2007
|
+
end
|
|
2008
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2009
|
+
encode_attributes(encoder, external_selectors:)
|
|
2010
|
+
end
|
|
2543
2011
|
# netdev ifindex to bind the dmabuf to.
|
|
2544
2012
|
# @rbs return: ::Integer
|
|
2545
2013
|
# @return [Integer]
|
|
2546
|
-
|
|
2547
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
2014
|
+
def ifindex; self[:"ifindex"]; end
|
|
2548
2015
|
# receive queues to bind the dmabuf to.
|
|
2549
2016
|
# @rbs return: ::Array[AttributeSets::QueueId]
|
|
2550
2017
|
# @return [Array<AttributeSets::QueueId>]
|
|
2551
|
-
|
|
2552
|
-
def queues; attributes[:"queues"].map(&:value); end
|
|
2018
|
+
def queues; self[:"queues"]; end
|
|
2553
2019
|
# dmabuf file descriptor to bind.
|
|
2554
2020
|
# @rbs return: ::Integer
|
|
2555
2021
|
# @return [Integer]
|
|
2556
|
-
|
|
2557
|
-
|
|
2022
|
+
def fd; self[:"fd"]; end
|
|
2023
|
+
# Size in bytes of each device page the NIC writes into from the bound
|
|
2024
|
+
# dmabuf. Must be a power of two and >= PAGE_SIZE; defaults to
|
|
2025
|
+
# PAGE_SIZE.
|
|
2026
|
+
# @rbs return: ::Integer
|
|
2027
|
+
# @return [Integer]
|
|
2028
|
+
def rx_page_size; self[:"rx_page_size"]; end
|
|
2558
2029
|
end
|
|
2559
2030
|
# Bind dmabuf to netdev
|
|
2560
2031
|
#
|
|
2561
2032
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
2562
|
-
class DoBindRxReply < ::Nl::
|
|
2033
|
+
class DoBindRxReply < ::Nl::Message
|
|
2563
2034
|
TYPE = 13
|
|
2564
2035
|
FIXED_HEADER = nil
|
|
2565
2036
|
ATTRIBUTE_SET = AttributeSets::Dmabuf
|
|
2566
|
-
ATTRIBUTES =
|
|
2037
|
+
ATTRIBUTES = %i[id].freeze
|
|
2038
|
+
include ATTRIBUTE_SET::Definitions
|
|
2039
|
+
def initialize(attributes = [])
|
|
2040
|
+
@attributes = attributes
|
|
2041
|
+
end
|
|
2042
|
+
# @private
|
|
2043
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2044
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2045
|
+
new(
|
|
2046
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2047
|
+
)
|
|
2048
|
+
end
|
|
2049
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2050
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2051
|
+
def self.decode(decoder)
|
|
2052
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2053
|
+
end
|
|
2054
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2055
|
+
encode_attributes(encoder, external_selectors:)
|
|
2056
|
+
end
|
|
2567
2057
|
# id of the dmabuf binding
|
|
2568
2058
|
# @rbs return: ::Integer
|
|
2569
2059
|
# @return [Integer]
|
|
2570
|
-
|
|
2571
|
-
def id; attributes[:"id"]&.value; end
|
|
2060
|
+
def id; self[:"id"]; end
|
|
2572
2061
|
end
|
|
2573
2062
|
# Set configurable NAPI instance settings.
|
|
2574
2063
|
#
|
|
2575
2064
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
2576
|
-
class DoNapiSetRequest < ::Nl::
|
|
2065
|
+
class DoNapiSetRequest < ::Nl::Message
|
|
2577
2066
|
TYPE = 14
|
|
2578
2067
|
FIXED_HEADER = nil
|
|
2579
2068
|
ATTRIBUTE_SET = AttributeSets::Napi
|
|
2580
|
-
ATTRIBUTES =
|
|
2069
|
+
ATTRIBUTES = %i[id defer_hard_irqs gro_flush_timeout irq_suspend_timeout threaded].freeze
|
|
2070
|
+
include ATTRIBUTE_SET::Definitions
|
|
2071
|
+
def initialize(attributes = [])
|
|
2072
|
+
@attributes = attributes
|
|
2073
|
+
end
|
|
2074
|
+
# @private
|
|
2075
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2076
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2077
|
+
new(
|
|
2078
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2079
|
+
)
|
|
2080
|
+
end
|
|
2081
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2082
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2083
|
+
def self.decode(decoder)
|
|
2084
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2085
|
+
end
|
|
2086
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2087
|
+
encode_attributes(encoder, external_selectors:)
|
|
2088
|
+
end
|
|
2581
2089
|
# ID of the NAPI instance.
|
|
2582
2090
|
# @rbs return: ::Integer
|
|
2583
2091
|
# @return [Integer]
|
|
2584
|
-
|
|
2585
|
-
def id; attributes[:"id"]&.value; end
|
|
2092
|
+
def id; self[:"id"]; end
|
|
2586
2093
|
# The number of consecutive empty polls before IRQ deferral ends and hardware IRQs are re-enabled.
|
|
2587
2094
|
# @rbs return: ::Integer
|
|
2588
2095
|
# @return [Integer]
|
|
2589
|
-
|
|
2590
|
-
def defer_hard_irqs; attributes[:"defer_hard_irqs"]&.value; end
|
|
2096
|
+
def defer_hard_irqs; self[:"defer_hard_irqs"]; end
|
|
2591
2097
|
# The timeout, in nanoseconds, of when to trigger the NAPI watchdog timer which schedules NAPI processing. Additionally, a non-zero value will also prevent GRO from flushing recent super-frames at the end of a NAPI cycle. This may add receive latency in exchange for reducing the number of frames processed by the network stack.
|
|
2592
2098
|
# @rbs return: ::Integer
|
|
2593
2099
|
# @return [Integer]
|
|
2594
|
-
|
|
2595
|
-
def gro_flush_timeout; attributes[:"gro_flush_timeout"]&.value; end
|
|
2100
|
+
def gro_flush_timeout; self[:"gro_flush_timeout"]; end
|
|
2596
2101
|
# The timeout, in nanoseconds, of how long to suspend irq processing, if event polling finds events
|
|
2597
2102
|
# @rbs return: ::Integer
|
|
2598
2103
|
# @return [Integer]
|
|
2599
|
-
|
|
2600
|
-
def irq_suspend_timeout; attributes[:"irq_suspend_timeout"]&.value; end
|
|
2104
|
+
def irq_suspend_timeout; self[:"irq_suspend_timeout"]; end
|
|
2601
2105
|
# Whether the NAPI is configured to operate in threaded polling mode. If this is set to enabled then the NAPI context operates in threaded polling mode. If this is set to busy-poll, then the threaded polling mode also busy polls.
|
|
2602
2106
|
#
|
|
2603
2107
|
# Known enum values are defined in {Enums::NapiThreaded}.
|
|
2604
2108
|
# @rbs return: ::Integer
|
|
2605
2109
|
# @return [Integer]
|
|
2606
|
-
|
|
2607
|
-
def threaded; attributes[:"threaded"]&.value; end
|
|
2110
|
+
def threaded; self[:"threaded"]; end
|
|
2608
2111
|
end
|
|
2609
2112
|
# Bind dmabuf to netdev for TX
|
|
2610
|
-
class DoBindTxRequest < ::Nl::
|
|
2113
|
+
class DoBindTxRequest < ::Nl::Message
|
|
2611
2114
|
TYPE = 15
|
|
2612
2115
|
FIXED_HEADER = nil
|
|
2613
2116
|
ATTRIBUTE_SET = AttributeSets::Dmabuf
|
|
2614
|
-
ATTRIBUTES =
|
|
2117
|
+
ATTRIBUTES = %i[ifindex fd].freeze
|
|
2118
|
+
include ATTRIBUTE_SET::Definitions
|
|
2119
|
+
def initialize(attributes = [])
|
|
2120
|
+
@attributes = attributes
|
|
2121
|
+
end
|
|
2122
|
+
# @private
|
|
2123
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2124
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2125
|
+
new(
|
|
2126
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2127
|
+
)
|
|
2128
|
+
end
|
|
2129
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2130
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2131
|
+
def self.decode(decoder)
|
|
2132
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2133
|
+
end
|
|
2134
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2135
|
+
encode_attributes(encoder, external_selectors:)
|
|
2136
|
+
end
|
|
2615
2137
|
# netdev ifindex to bind the dmabuf to.
|
|
2616
2138
|
# @rbs return: ::Integer
|
|
2617
2139
|
# @return [Integer]
|
|
2618
|
-
|
|
2619
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
2140
|
+
def ifindex; self[:"ifindex"]; end
|
|
2620
2141
|
# dmabuf file descriptor to bind.
|
|
2621
2142
|
# @rbs return: ::Integer
|
|
2622
2143
|
# @return [Integer]
|
|
2623
|
-
|
|
2624
|
-
def fd; attributes[:"fd"]&.value; end
|
|
2144
|
+
def fd; self[:"fd"]; end
|
|
2625
2145
|
end
|
|
2626
2146
|
# Bind dmabuf to netdev for TX
|
|
2627
|
-
class DoBindTxReply < ::Nl::
|
|
2147
|
+
class DoBindTxReply < ::Nl::Message
|
|
2628
2148
|
TYPE = 15
|
|
2629
2149
|
FIXED_HEADER = nil
|
|
2630
2150
|
ATTRIBUTE_SET = AttributeSets::Dmabuf
|
|
2631
|
-
ATTRIBUTES =
|
|
2151
|
+
ATTRIBUTES = %i[id].freeze
|
|
2152
|
+
include ATTRIBUTE_SET::Definitions
|
|
2153
|
+
def initialize(attributes = [])
|
|
2154
|
+
@attributes = attributes
|
|
2155
|
+
end
|
|
2156
|
+
# @private
|
|
2157
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2158
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2159
|
+
new(
|
|
2160
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2161
|
+
)
|
|
2162
|
+
end
|
|
2163
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2164
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2165
|
+
def self.decode(decoder)
|
|
2166
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2167
|
+
end
|
|
2168
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2169
|
+
encode_attributes(encoder, external_selectors:)
|
|
2170
|
+
end
|
|
2632
2171
|
# id of the dmabuf binding
|
|
2633
2172
|
# @rbs return: ::Integer
|
|
2634
2173
|
# @return [Integer]
|
|
2635
|
-
|
|
2636
|
-
def id; attributes[:"id"]&.value; end
|
|
2174
|
+
def id; self[:"id"]; end
|
|
2637
2175
|
end
|
|
2638
2176
|
# Create a new queue for the given netdevice. Whether this operation
|
|
2639
2177
|
# is supported depends on the device and the driver.
|
|
2640
2178
|
#
|
|
2641
2179
|
#
|
|
2642
2180
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
2643
|
-
class DoQueueCreateRequest < ::Nl::
|
|
2181
|
+
class DoQueueCreateRequest < ::Nl::Message
|
|
2644
2182
|
TYPE = 16
|
|
2645
2183
|
FIXED_HEADER = nil
|
|
2646
2184
|
ATTRIBUTE_SET = AttributeSets::Queue
|
|
2647
|
-
ATTRIBUTES =
|
|
2185
|
+
ATTRIBUTES = %i[ifindex type lease].freeze
|
|
2186
|
+
include ATTRIBUTE_SET::Definitions
|
|
2187
|
+
def initialize(attributes = [])
|
|
2188
|
+
@attributes = attributes
|
|
2189
|
+
end
|
|
2190
|
+
# @private
|
|
2191
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2192
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2193
|
+
new(
|
|
2194
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2195
|
+
)
|
|
2196
|
+
end
|
|
2197
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2198
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2199
|
+
def self.decode(decoder)
|
|
2200
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2201
|
+
end
|
|
2202
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2203
|
+
encode_attributes(encoder, external_selectors:)
|
|
2204
|
+
end
|
|
2648
2205
|
# ifindex of the netdevice to which the queue belongs.
|
|
2649
2206
|
# @rbs return: ::Integer
|
|
2650
2207
|
# @return [Integer]
|
|
2651
|
-
|
|
2652
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
2208
|
+
def ifindex; self[:"ifindex"]; end
|
|
2653
2209
|
# Queue type as rx, tx. Each queue type defines a separate ID space. XDP TX queues allocated in the kernel are not linked to NAPIs and thus not listed. AF_XDP queues will have more information set in the xsk attribute.
|
|
2654
2210
|
#
|
|
2655
2211
|
# Known enum values are defined in {Enums::QueueType}.
|
|
2656
2212
|
# @rbs return: ::Integer
|
|
2657
2213
|
# @return [Integer]
|
|
2658
|
-
|
|
2659
|
-
def type; attributes[:"type"]&.value; end
|
|
2214
|
+
def type; self[:"type"]; end
|
|
2660
2215
|
# A queue from a virtual device can have a lease which refers to
|
|
2661
2216
|
# another queue from a physical device. This is useful for memory
|
|
2662
2217
|
# providers and AF_XDP operations which take an ifindex and queue id
|
|
2663
2218
|
# to allow applications to bind against virtual devices in containers.
|
|
2664
2219
|
# @rbs return: AttributeSets::Lease
|
|
2665
2220
|
# @return [AttributeSets::Lease]
|
|
2666
|
-
|
|
2667
|
-
def lease; attributes[:"lease"]&.value; end
|
|
2221
|
+
def lease; self[:"lease"]; end
|
|
2668
2222
|
end
|
|
2669
2223
|
# Create a new queue for the given netdevice. Whether this operation
|
|
2670
2224
|
# is supported depends on the device and the driver.
|
|
2671
2225
|
#
|
|
2672
2226
|
#
|
|
2673
2227
|
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
2674
|
-
class DoQueueCreateReply < ::Nl::
|
|
2228
|
+
class DoQueueCreateReply < ::Nl::Message
|
|
2675
2229
|
TYPE = 16
|
|
2676
2230
|
FIXED_HEADER = nil
|
|
2677
2231
|
ATTRIBUTE_SET = AttributeSets::Queue
|
|
2678
|
-
ATTRIBUTES =
|
|
2232
|
+
ATTRIBUTES = %i[id].freeze
|
|
2233
|
+
include ATTRIBUTE_SET::Definitions
|
|
2234
|
+
def initialize(attributes = [])
|
|
2235
|
+
@attributes = attributes
|
|
2236
|
+
end
|
|
2237
|
+
# @private
|
|
2238
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2239
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2240
|
+
new(
|
|
2241
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2242
|
+
)
|
|
2243
|
+
end
|
|
2244
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2245
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2246
|
+
def self.decode(decoder)
|
|
2247
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2248
|
+
end
|
|
2249
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2250
|
+
encode_attributes(encoder, external_selectors:)
|
|
2251
|
+
end
|
|
2679
2252
|
# Queue index; most queue types are indexed like a C array, with indexes starting at 0 and ending at queue count - 1. Queue indexes are scoped to an interface and queue type.
|
|
2680
2253
|
# @rbs return: ::Integer
|
|
2681
2254
|
# @return [Integer]
|
|
2682
|
-
|
|
2683
|
-
def id; attributes[:"id"]&.value; end
|
|
2255
|
+
def id; self[:"id"]; end
|
|
2684
2256
|
end
|
|
2685
2257
|
end
|
|
2686
2258
|
module Notifications
|
|
2687
2259
|
# Notification about device appearing.
|
|
2688
2260
|
#
|
|
2689
2261
|
# Multicast group: `mgmt`.
|
|
2690
|
-
class DevAddNtf < ::Nl::
|
|
2262
|
+
class DevAddNtf < ::Nl::Message
|
|
2691
2263
|
TYPE = 2
|
|
2692
2264
|
FIXED_HEADER = nil
|
|
2693
2265
|
ATTRIBUTE_SET = AttributeSets::Dev
|
|
2694
|
-
ATTRIBUTES =
|
|
2266
|
+
ATTRIBUTES = %i[ifindex xdp_features xdp_zc_max_segs xdp_rx_metadata_features xsk_features].freeze
|
|
2267
|
+
include ATTRIBUTE_SET::Definitions
|
|
2268
|
+
def initialize(attributes = [])
|
|
2269
|
+
@attributes = attributes
|
|
2270
|
+
end
|
|
2271
|
+
# @private
|
|
2272
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2273
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2274
|
+
new(
|
|
2275
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2276
|
+
)
|
|
2277
|
+
end
|
|
2278
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2279
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2280
|
+
def self.decode(decoder)
|
|
2281
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2282
|
+
end
|
|
2283
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2284
|
+
encode_attributes(encoder, external_selectors:)
|
|
2285
|
+
end
|
|
2695
2286
|
# netdev ifindex
|
|
2696
2287
|
# @rbs return: ::Integer
|
|
2697
2288
|
# @return [Integer]
|
|
2698
|
-
|
|
2699
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
2289
|
+
def ifindex; self[:"ifindex"]; end
|
|
2700
2290
|
# Bitmask of enabled xdp-features.
|
|
2701
2291
|
#
|
|
2702
2292
|
# Known flags are defined in {Flags::XdpAct}.
|
|
2703
2293
|
# @rbs return: ::Integer
|
|
2704
2294
|
# @return [Integer]
|
|
2705
|
-
|
|
2706
|
-
def xdp_features; attributes[:"xdp_features"]&.value; end
|
|
2295
|
+
def xdp_features; self[:"xdp_features"]; end
|
|
2707
2296
|
# max fragment count supported by ZC driver
|
|
2708
2297
|
# @rbs return: ::Integer
|
|
2709
2298
|
# @return [Integer]
|
|
2710
|
-
|
|
2711
|
-
def xdp_zc_max_segs; attributes[:"xdp_zc_max_segs"]&.value; end
|
|
2299
|
+
def xdp_zc_max_segs; self[:"xdp_zc_max_segs"]; end
|
|
2712
2300
|
# Bitmask of supported XDP receive metadata features. See {https://docs.kernel.org/networking/xdp-rx-metadata.html Documentation/networking/xdp-rx-metadata.rst} for more details.
|
|
2713
2301
|
#
|
|
2714
2302
|
# Known flags are defined in {Flags::XdpRxMetadata}.
|
|
2715
2303
|
# @rbs return: ::Integer
|
|
2716
2304
|
# @return [Integer]
|
|
2717
|
-
|
|
2718
|
-
def xdp_rx_metadata_features; attributes[:"xdp_rx_metadata_features"]&.value; end
|
|
2305
|
+
def xdp_rx_metadata_features; self[:"xdp_rx_metadata_features"]; end
|
|
2719
2306
|
# Bitmask of enabled AF_XDP features.
|
|
2720
2307
|
#
|
|
2721
2308
|
# Known flags are defined in {Flags::XskFlags}.
|
|
2722
2309
|
# @rbs return: ::Integer
|
|
2723
2310
|
# @return [Integer]
|
|
2724
|
-
|
|
2725
|
-
def xsk_features; attributes[:"xsk_features"]&.value; end
|
|
2311
|
+
def xsk_features; self[:"xsk_features"]; end
|
|
2726
2312
|
end
|
|
2727
2313
|
# Notification about device disappearing.
|
|
2728
2314
|
#
|
|
2729
2315
|
# Multicast group: `mgmt`.
|
|
2730
|
-
class DevDelNtf < ::Nl::
|
|
2316
|
+
class DevDelNtf < ::Nl::Message
|
|
2731
2317
|
TYPE = 3
|
|
2732
2318
|
FIXED_HEADER = nil
|
|
2733
2319
|
ATTRIBUTE_SET = AttributeSets::Dev
|
|
2734
|
-
ATTRIBUTES =
|
|
2320
|
+
ATTRIBUTES = %i[ifindex xdp_features xdp_zc_max_segs xdp_rx_metadata_features xsk_features].freeze
|
|
2321
|
+
include ATTRIBUTE_SET::Definitions
|
|
2322
|
+
def initialize(attributes = [])
|
|
2323
|
+
@attributes = attributes
|
|
2324
|
+
end
|
|
2325
|
+
# @private
|
|
2326
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2327
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2328
|
+
new(
|
|
2329
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2330
|
+
)
|
|
2331
|
+
end
|
|
2332
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2333
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2334
|
+
def self.decode(decoder)
|
|
2335
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2336
|
+
end
|
|
2337
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2338
|
+
encode_attributes(encoder, external_selectors:)
|
|
2339
|
+
end
|
|
2735
2340
|
# netdev ifindex
|
|
2736
2341
|
# @rbs return: ::Integer
|
|
2737
2342
|
# @return [Integer]
|
|
2738
|
-
|
|
2739
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
2343
|
+
def ifindex; self[:"ifindex"]; end
|
|
2740
2344
|
# Bitmask of enabled xdp-features.
|
|
2741
2345
|
#
|
|
2742
2346
|
# Known flags are defined in {Flags::XdpAct}.
|
|
2743
2347
|
# @rbs return: ::Integer
|
|
2744
2348
|
# @return [Integer]
|
|
2745
|
-
|
|
2746
|
-
def xdp_features; attributes[:"xdp_features"]&.value; end
|
|
2349
|
+
def xdp_features; self[:"xdp_features"]; end
|
|
2747
2350
|
# max fragment count supported by ZC driver
|
|
2748
2351
|
# @rbs return: ::Integer
|
|
2749
2352
|
# @return [Integer]
|
|
2750
|
-
|
|
2751
|
-
def xdp_zc_max_segs; attributes[:"xdp_zc_max_segs"]&.value; end
|
|
2353
|
+
def xdp_zc_max_segs; self[:"xdp_zc_max_segs"]; end
|
|
2752
2354
|
# Bitmask of supported XDP receive metadata features. See {https://docs.kernel.org/networking/xdp-rx-metadata.html Documentation/networking/xdp-rx-metadata.rst} for more details.
|
|
2753
2355
|
#
|
|
2754
2356
|
# Known flags are defined in {Flags::XdpRxMetadata}.
|
|
2755
2357
|
# @rbs return: ::Integer
|
|
2756
2358
|
# @return [Integer]
|
|
2757
|
-
|
|
2758
|
-
def xdp_rx_metadata_features; attributes[:"xdp_rx_metadata_features"]&.value; end
|
|
2359
|
+
def xdp_rx_metadata_features; self[:"xdp_rx_metadata_features"]; end
|
|
2759
2360
|
# Bitmask of enabled AF_XDP features.
|
|
2760
2361
|
#
|
|
2761
2362
|
# Known flags are defined in {Flags::XskFlags}.
|
|
2762
2363
|
# @rbs return: ::Integer
|
|
2763
2364
|
# @return [Integer]
|
|
2764
|
-
|
|
2765
|
-
def xsk_features; attributes[:"xsk_features"]&.value; end
|
|
2365
|
+
def xsk_features; self[:"xsk_features"]; end
|
|
2766
2366
|
end
|
|
2767
2367
|
# Notification about device configuration being changed.
|
|
2768
2368
|
#
|
|
2769
2369
|
# Multicast group: `mgmt`.
|
|
2770
|
-
class DevChangeNtf < ::Nl::
|
|
2370
|
+
class DevChangeNtf < ::Nl::Message
|
|
2771
2371
|
TYPE = 4
|
|
2772
2372
|
FIXED_HEADER = nil
|
|
2773
2373
|
ATTRIBUTE_SET = AttributeSets::Dev
|
|
2774
|
-
ATTRIBUTES =
|
|
2374
|
+
ATTRIBUTES = %i[ifindex xdp_features xdp_zc_max_segs xdp_rx_metadata_features xsk_features].freeze
|
|
2375
|
+
include ATTRIBUTE_SET::Definitions
|
|
2376
|
+
def initialize(attributes = [])
|
|
2377
|
+
@attributes = attributes
|
|
2378
|
+
end
|
|
2379
|
+
# @private
|
|
2380
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2381
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2382
|
+
new(
|
|
2383
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2384
|
+
)
|
|
2385
|
+
end
|
|
2386
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2387
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2388
|
+
def self.decode(decoder)
|
|
2389
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2390
|
+
end
|
|
2391
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2392
|
+
encode_attributes(encoder, external_selectors:)
|
|
2393
|
+
end
|
|
2775
2394
|
# netdev ifindex
|
|
2776
2395
|
# @rbs return: ::Integer
|
|
2777
2396
|
# @return [Integer]
|
|
2778
|
-
|
|
2779
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
2397
|
+
def ifindex; self[:"ifindex"]; end
|
|
2780
2398
|
# Bitmask of enabled xdp-features.
|
|
2781
2399
|
#
|
|
2782
2400
|
# Known flags are defined in {Flags::XdpAct}.
|
|
2783
2401
|
# @rbs return: ::Integer
|
|
2784
2402
|
# @return [Integer]
|
|
2785
|
-
|
|
2786
|
-
def xdp_features; attributes[:"xdp_features"]&.value; end
|
|
2403
|
+
def xdp_features; self[:"xdp_features"]; end
|
|
2787
2404
|
# max fragment count supported by ZC driver
|
|
2788
2405
|
# @rbs return: ::Integer
|
|
2789
2406
|
# @return [Integer]
|
|
2790
|
-
|
|
2791
|
-
def xdp_zc_max_segs; attributes[:"xdp_zc_max_segs"]&.value; end
|
|
2407
|
+
def xdp_zc_max_segs; self[:"xdp_zc_max_segs"]; end
|
|
2792
2408
|
# Bitmask of supported XDP receive metadata features. See {https://docs.kernel.org/networking/xdp-rx-metadata.html Documentation/networking/xdp-rx-metadata.rst} for more details.
|
|
2793
2409
|
#
|
|
2794
2410
|
# Known flags are defined in {Flags::XdpRxMetadata}.
|
|
2795
2411
|
# @rbs return: ::Integer
|
|
2796
2412
|
# @return [Integer]
|
|
2797
|
-
|
|
2798
|
-
def xdp_rx_metadata_features; attributes[:"xdp_rx_metadata_features"]&.value; end
|
|
2413
|
+
def xdp_rx_metadata_features; self[:"xdp_rx_metadata_features"]; end
|
|
2799
2414
|
# Bitmask of enabled AF_XDP features.
|
|
2800
2415
|
#
|
|
2801
2416
|
# Known flags are defined in {Flags::XskFlags}.
|
|
2802
2417
|
# @rbs return: ::Integer
|
|
2803
2418
|
# @return [Integer]
|
|
2804
|
-
|
|
2805
|
-
def xsk_features; attributes[:"xsk_features"]&.value; end
|
|
2419
|
+
def xsk_features; self[:"xsk_features"]; end
|
|
2806
2420
|
end
|
|
2807
2421
|
# Notification about page pool appearing.
|
|
2808
2422
|
#
|
|
2809
2423
|
# Multicast group: `page-pool`.
|
|
2810
|
-
class PagePoolAddNtf < ::Nl::
|
|
2424
|
+
class PagePoolAddNtf < ::Nl::Message
|
|
2811
2425
|
TYPE = 6
|
|
2812
2426
|
FIXED_HEADER = nil
|
|
2813
2427
|
ATTRIBUTE_SET = AttributeSets::PagePool
|
|
2814
|
-
ATTRIBUTES =
|
|
2428
|
+
ATTRIBUTES = %i[id ifindex napi_id inflight inflight_mem detach_time dmabuf io_uring].freeze
|
|
2429
|
+
include ATTRIBUTE_SET::Definitions
|
|
2430
|
+
def initialize(attributes = [])
|
|
2431
|
+
@attributes = attributes
|
|
2432
|
+
end
|
|
2433
|
+
# @private
|
|
2434
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2435
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2436
|
+
new(
|
|
2437
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2438
|
+
)
|
|
2439
|
+
end
|
|
2440
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2441
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2442
|
+
def self.decode(decoder)
|
|
2443
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2444
|
+
end
|
|
2445
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2446
|
+
encode_attributes(encoder, external_selectors:)
|
|
2447
|
+
end
|
|
2815
2448
|
# Unique ID of a Page Pool instance.
|
|
2816
2449
|
# @rbs return: ::Integer
|
|
2817
2450
|
# @return [Integer]
|
|
2818
|
-
|
|
2819
|
-
def id; attributes[:"id"]&.value; end
|
|
2451
|
+
def id; self[:"id"]; end
|
|
2820
2452
|
# ifindex of the netdev to which the pool belongs.
|
|
2821
2453
|
# May not be reported if the page pool was allocated for a netdev
|
|
2822
2454
|
# which got destroyed already (page pools may outlast their netdevs
|
|
2823
2455
|
# because they wait for all memory to be returned).
|
|
2824
2456
|
# @rbs return: ::Integer
|
|
2825
2457
|
# @return [Integer]
|
|
2826
|
-
|
|
2827
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
2458
|
+
def ifindex; self[:"ifindex"]; end
|
|
2828
2459
|
# Id of NAPI using this Page Pool instance.
|
|
2829
2460
|
# @rbs return: ::Integer
|
|
2830
2461
|
# @return [Integer]
|
|
2831
|
-
|
|
2832
|
-
def napi_id; attributes[:"napi_id"]&.value; end
|
|
2462
|
+
def napi_id; self[:"napi_id"]; end
|
|
2833
2463
|
# Number of outstanding references to this page pool (allocated
|
|
2834
2464
|
# but yet to be freed pages). Allocated pages may be held in
|
|
2835
2465
|
# socket receive queues, driver receive ring, page pool recycling
|
|
2836
2466
|
# ring, the page pool cache, etc.
|
|
2837
2467
|
# @rbs return: ::Integer
|
|
2838
2468
|
# @return [Integer]
|
|
2839
|
-
|
|
2840
|
-
def inflight; attributes[:"inflight"]&.value; end
|
|
2469
|
+
def inflight; self[:"inflight"]; end
|
|
2841
2470
|
# Amount of memory held by inflight pages.
|
|
2842
2471
|
# @rbs return: ::Integer
|
|
2843
2472
|
# @return [Integer]
|
|
2844
|
-
|
|
2845
|
-
def inflight_mem; attributes[:"inflight_mem"]&.value; end
|
|
2473
|
+
def inflight_mem; self[:"inflight_mem"]; end
|
|
2846
2474
|
# Seconds in CLOCK_BOOTTIME of when Page Pool was detached by
|
|
2847
2475
|
# the driver. Once detached Page Pool can no longer be used to
|
|
2848
2476
|
# allocate memory.
|
|
@@ -2853,58 +2481,69 @@ class Netdev < ::Nl::Genl::Family
|
|
|
2853
2481
|
# can still be used to allocate new memory.
|
|
2854
2482
|
# @rbs return: ::Integer
|
|
2855
2483
|
# @return [Integer]
|
|
2856
|
-
|
|
2857
|
-
def detach_time; attributes[:"detach_time"]&.value; end
|
|
2484
|
+
def detach_time; self[:"detach_time"]; end
|
|
2858
2485
|
# ID of the dmabuf this page-pool is attached to.
|
|
2859
2486
|
# @rbs return: ::Integer
|
|
2860
2487
|
# @return [Integer]
|
|
2861
|
-
|
|
2862
|
-
def dmabuf; attributes[:"dmabuf"]&.value; end
|
|
2488
|
+
def dmabuf; self[:"dmabuf"]; end
|
|
2863
2489
|
# io-uring memory provider information.
|
|
2864
2490
|
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
2865
2491
|
# @return [AttributeSets::IoUringProviderInfo]
|
|
2866
|
-
|
|
2867
|
-
def io_uring; attributes[:"io_uring"]&.value; end
|
|
2492
|
+
def io_uring; self[:"io_uring"]; end
|
|
2868
2493
|
end
|
|
2869
2494
|
# Notification about page pool disappearing.
|
|
2870
2495
|
#
|
|
2871
2496
|
# Multicast group: `page-pool`.
|
|
2872
|
-
class PagePoolDelNtf < ::Nl::
|
|
2497
|
+
class PagePoolDelNtf < ::Nl::Message
|
|
2873
2498
|
TYPE = 7
|
|
2874
2499
|
FIXED_HEADER = nil
|
|
2875
2500
|
ATTRIBUTE_SET = AttributeSets::PagePool
|
|
2876
|
-
ATTRIBUTES =
|
|
2501
|
+
ATTRIBUTES = %i[id ifindex napi_id inflight inflight_mem detach_time dmabuf io_uring].freeze
|
|
2502
|
+
include ATTRIBUTE_SET::Definitions
|
|
2503
|
+
def initialize(attributes = [])
|
|
2504
|
+
@attributes = attributes
|
|
2505
|
+
end
|
|
2506
|
+
# @private
|
|
2507
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2508
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2509
|
+
new(
|
|
2510
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2511
|
+
)
|
|
2512
|
+
end
|
|
2513
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2514
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2515
|
+
def self.decode(decoder)
|
|
2516
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2517
|
+
end
|
|
2518
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2519
|
+
encode_attributes(encoder, external_selectors:)
|
|
2520
|
+
end
|
|
2877
2521
|
# Unique ID of a Page Pool instance.
|
|
2878
2522
|
# @rbs return: ::Integer
|
|
2879
2523
|
# @return [Integer]
|
|
2880
|
-
|
|
2881
|
-
def id; attributes[:"id"]&.value; end
|
|
2524
|
+
def id; self[:"id"]; end
|
|
2882
2525
|
# ifindex of the netdev to which the pool belongs.
|
|
2883
2526
|
# May not be reported if the page pool was allocated for a netdev
|
|
2884
2527
|
# which got destroyed already (page pools may outlast their netdevs
|
|
2885
2528
|
# because they wait for all memory to be returned).
|
|
2886
2529
|
# @rbs return: ::Integer
|
|
2887
2530
|
# @return [Integer]
|
|
2888
|
-
|
|
2889
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
2531
|
+
def ifindex; self[:"ifindex"]; end
|
|
2890
2532
|
# Id of NAPI using this Page Pool instance.
|
|
2891
2533
|
# @rbs return: ::Integer
|
|
2892
2534
|
# @return [Integer]
|
|
2893
|
-
|
|
2894
|
-
def napi_id; attributes[:"napi_id"]&.value; end
|
|
2535
|
+
def napi_id; self[:"napi_id"]; end
|
|
2895
2536
|
# Number of outstanding references to this page pool (allocated
|
|
2896
2537
|
# but yet to be freed pages). Allocated pages may be held in
|
|
2897
2538
|
# socket receive queues, driver receive ring, page pool recycling
|
|
2898
2539
|
# ring, the page pool cache, etc.
|
|
2899
2540
|
# @rbs return: ::Integer
|
|
2900
2541
|
# @return [Integer]
|
|
2901
|
-
|
|
2902
|
-
def inflight; attributes[:"inflight"]&.value; end
|
|
2542
|
+
def inflight; self[:"inflight"]; end
|
|
2903
2543
|
# Amount of memory held by inflight pages.
|
|
2904
2544
|
# @rbs return: ::Integer
|
|
2905
2545
|
# @return [Integer]
|
|
2906
|
-
|
|
2907
|
-
def inflight_mem; attributes[:"inflight_mem"]&.value; end
|
|
2546
|
+
def inflight_mem; self[:"inflight_mem"]; end
|
|
2908
2547
|
# Seconds in CLOCK_BOOTTIME of when Page Pool was detached by
|
|
2909
2548
|
# the driver. Once detached Page Pool can no longer be used to
|
|
2910
2549
|
# allocate memory.
|
|
@@ -2915,58 +2554,69 @@ class Netdev < ::Nl::Genl::Family
|
|
|
2915
2554
|
# can still be used to allocate new memory.
|
|
2916
2555
|
# @rbs return: ::Integer
|
|
2917
2556
|
# @return [Integer]
|
|
2918
|
-
|
|
2919
|
-
def detach_time; attributes[:"detach_time"]&.value; end
|
|
2557
|
+
def detach_time; self[:"detach_time"]; end
|
|
2920
2558
|
# ID of the dmabuf this page-pool is attached to.
|
|
2921
2559
|
# @rbs return: ::Integer
|
|
2922
2560
|
# @return [Integer]
|
|
2923
|
-
|
|
2924
|
-
def dmabuf; attributes[:"dmabuf"]&.value; end
|
|
2561
|
+
def dmabuf; self[:"dmabuf"]; end
|
|
2925
2562
|
# io-uring memory provider information.
|
|
2926
2563
|
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
2927
2564
|
# @return [AttributeSets::IoUringProviderInfo]
|
|
2928
|
-
|
|
2929
|
-
def io_uring; attributes[:"io_uring"]&.value; end
|
|
2565
|
+
def io_uring; self[:"io_uring"]; end
|
|
2930
2566
|
end
|
|
2931
2567
|
# Notification about page pool configuration being changed.
|
|
2932
2568
|
#
|
|
2933
2569
|
# Multicast group: `page-pool`.
|
|
2934
|
-
class PagePoolChangeNtf < ::Nl::
|
|
2570
|
+
class PagePoolChangeNtf < ::Nl::Message
|
|
2935
2571
|
TYPE = 8
|
|
2936
2572
|
FIXED_HEADER = nil
|
|
2937
2573
|
ATTRIBUTE_SET = AttributeSets::PagePool
|
|
2938
|
-
ATTRIBUTES =
|
|
2574
|
+
ATTRIBUTES = %i[id ifindex napi_id inflight inflight_mem detach_time dmabuf io_uring].freeze
|
|
2575
|
+
include ATTRIBUTE_SET::Definitions
|
|
2576
|
+
def initialize(attributes = [])
|
|
2577
|
+
@attributes = attributes
|
|
2578
|
+
end
|
|
2579
|
+
# @private
|
|
2580
|
+
def self.build_instance(params, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2581
|
+
validate_params(params, ::Nl::Message::EMPTY_FIELD_NAMES, ATTRIBUTES)
|
|
2582
|
+
new(
|
|
2583
|
+
build_attributes(params.slice(*ATTRIBUTES), external_selectors:),
|
|
2584
|
+
)
|
|
2585
|
+
end
|
|
2586
|
+
# Decodes a message payload from the decoder into a new instance.
|
|
2587
|
+
# @rbs (::Nl::Decoder decoder) -> instance
|
|
2588
|
+
def self.decode(decoder)
|
|
2589
|
+
new(decode_attributes(decoder, BY_TYPE, 0))
|
|
2590
|
+
end
|
|
2591
|
+
def encode(encoder, external_selectors: ::Nl::Selector::EMPTY_VALUES)
|
|
2592
|
+
encode_attributes(encoder, external_selectors:)
|
|
2593
|
+
end
|
|
2939
2594
|
# Unique ID of a Page Pool instance.
|
|
2940
2595
|
# @rbs return: ::Integer
|
|
2941
2596
|
# @return [Integer]
|
|
2942
|
-
|
|
2943
|
-
def id; attributes[:"id"]&.value; end
|
|
2597
|
+
def id; self[:"id"]; end
|
|
2944
2598
|
# ifindex of the netdev to which the pool belongs.
|
|
2945
2599
|
# May not be reported if the page pool was allocated for a netdev
|
|
2946
2600
|
# which got destroyed already (page pools may outlast their netdevs
|
|
2947
2601
|
# because they wait for all memory to be returned).
|
|
2948
2602
|
# @rbs return: ::Integer
|
|
2949
2603
|
# @return [Integer]
|
|
2950
|
-
|
|
2951
|
-
def ifindex; attributes[:"ifindex"]&.value; end
|
|
2604
|
+
def ifindex; self[:"ifindex"]; end
|
|
2952
2605
|
# Id of NAPI using this Page Pool instance.
|
|
2953
2606
|
# @rbs return: ::Integer
|
|
2954
2607
|
# @return [Integer]
|
|
2955
|
-
|
|
2956
|
-
def napi_id; attributes[:"napi_id"]&.value; end
|
|
2608
|
+
def napi_id; self[:"napi_id"]; end
|
|
2957
2609
|
# Number of outstanding references to this page pool (allocated
|
|
2958
2610
|
# but yet to be freed pages). Allocated pages may be held in
|
|
2959
2611
|
# socket receive queues, driver receive ring, page pool recycling
|
|
2960
2612
|
# ring, the page pool cache, etc.
|
|
2961
2613
|
# @rbs return: ::Integer
|
|
2962
2614
|
# @return [Integer]
|
|
2963
|
-
|
|
2964
|
-
def inflight; attributes[:"inflight"]&.value; end
|
|
2615
|
+
def inflight; self[:"inflight"]; end
|
|
2965
2616
|
# Amount of memory held by inflight pages.
|
|
2966
2617
|
# @rbs return: ::Integer
|
|
2967
2618
|
# @return [Integer]
|
|
2968
|
-
|
|
2969
|
-
def inflight_mem; attributes[:"inflight_mem"]&.value; end
|
|
2619
|
+
def inflight_mem; self[:"inflight_mem"]; end
|
|
2970
2620
|
# Seconds in CLOCK_BOOTTIME of when Page Pool was detached by
|
|
2971
2621
|
# the driver. Once detached Page Pool can no longer be used to
|
|
2972
2622
|
# allocate memory.
|
|
@@ -2977,22 +2627,19 @@ class Netdev < ::Nl::Genl::Family
|
|
|
2977
2627
|
# can still be used to allocate new memory.
|
|
2978
2628
|
# @rbs return: ::Integer
|
|
2979
2629
|
# @return [Integer]
|
|
2980
|
-
|
|
2981
|
-
def detach_time; attributes[:"detach_time"]&.value; end
|
|
2630
|
+
def detach_time; self[:"detach_time"]; end
|
|
2982
2631
|
# ID of the dmabuf this page-pool is attached to.
|
|
2983
2632
|
# @rbs return: ::Integer
|
|
2984
2633
|
# @return [Integer]
|
|
2985
|
-
|
|
2986
|
-
def dmabuf; attributes[:"dmabuf"]&.value; end
|
|
2634
|
+
def dmabuf; self[:"dmabuf"]; end
|
|
2987
2635
|
# io-uring memory provider information.
|
|
2988
2636
|
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
2989
2637
|
# @return [AttributeSets::IoUringProviderInfo]
|
|
2990
|
-
|
|
2991
|
-
def io_uring; attributes[:"io_uring"]&.value; end
|
|
2638
|
+
def io_uring; self[:"io_uring"]; end
|
|
2992
2639
|
end
|
|
2993
2640
|
end
|
|
2994
2641
|
# @private
|
|
2995
|
-
NOTIFICATIONS =
|
|
2642
|
+
NOTIFICATIONS = {2 => Notifications::DevAddNtf, 3 => Notifications::DevDelNtf, 4 => Notifications::DevChangeNtf, 6 => Notifications::PagePoolAddNtf, 7 => Notifications::PagePoolDelNtf, 8 => Notifications::PagePoolChangeNtf}.freeze #: Hash[::Integer, ::Class]
|
|
2996
2643
|
# Get / dump information about a netdev.
|
|
2997
2644
|
# @rbs (?ifindex: ::Integer) -> Messages::DoDevGetReply
|
|
2998
2645
|
# @param [Hash] args
|
|
@@ -3173,11 +2820,14 @@ class Netdev < ::Nl::Genl::Family
|
|
|
3173
2820
|
# Bind dmabuf to netdev
|
|
3174
2821
|
#
|
|
3175
2822
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
3176
|
-
# @rbs (?ifindex: ::Integer, ?queues: ::Array[(AttributeSets::QueueId | ::Hash[::Symbol, untyped])], ?fd: ::Integer) -> Messages::DoBindRxReply
|
|
2823
|
+
# @rbs (?ifindex: ::Integer, ?queues: ::Array[(AttributeSets::QueueId | ::Hash[::Symbol, untyped])], ?fd: ::Integer, ?rx_page_size: ::Integer) -> Messages::DoBindRxReply
|
|
3177
2824
|
# @param [Hash] args
|
|
3178
2825
|
# @option args [Integer] ifindex netdev ifindex to bind the dmabuf to.
|
|
3179
2826
|
# @option args [Array<AttributeSets::QueueId, Hash<Symbol, Object>>] queues receive queues to bind the dmabuf to.
|
|
3180
2827
|
# @option args [Integer] fd dmabuf file descriptor to bind.
|
|
2828
|
+
# @option args [Integer] rx_page_size Size in bytes of each device page the NIC writes into from the bound
|
|
2829
|
+
# dmabuf. Must be a power of two and >= PAGE_SIZE; defaults to
|
|
2830
|
+
# PAGE_SIZE.
|
|
3181
2831
|
# @return [Messages::DoBindRxReply]
|
|
3182
2832
|
# @see Messages::DoBindRxRequest
|
|
3183
2833
|
def do_bind_rx(**args)
|
|
@@ -3355,11 +3005,14 @@ class Netdev < ::Nl::Genl::Family
|
|
|
3355
3005
|
# Bind dmabuf to netdev
|
|
3356
3006
|
#
|
|
3357
3007
|
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
3358
|
-
# @rbs (?ifindex: ::Integer, ?queues: ::Array[(AttributeSets::QueueId | ::Hash[::Symbol, untyped])], ?fd: ::Integer) -> ::Nl::Async::Future[Messages::DoBindRxReply]
|
|
3008
|
+
# @rbs (?ifindex: ::Integer, ?queues: ::Array[(AttributeSets::QueueId | ::Hash[::Symbol, untyped])], ?fd: ::Integer, ?rx_page_size: ::Integer) -> ::Nl::Async::Future[Messages::DoBindRxReply]
|
|
3359
3009
|
# @param [Hash] args
|
|
3360
3010
|
# @option args [Integer] ifindex netdev ifindex to bind the dmabuf to.
|
|
3361
3011
|
# @option args [Array<AttributeSets::QueueId, Hash<Symbol, Object>>] queues receive queues to bind the dmabuf to.
|
|
3362
3012
|
# @option args [Integer] fd dmabuf file descriptor to bind.
|
|
3013
|
+
# @option args [Integer] rx_page_size Size in bytes of each device page the NIC writes into from the bound
|
|
3014
|
+
# dmabuf. Must be a power of two and >= PAGE_SIZE; defaults to
|
|
3015
|
+
# PAGE_SIZE.
|
|
3363
3016
|
# @return [Nl::Async::Future<Messages::DoBindRxReply>]
|
|
3364
3017
|
# @see Messages::DoBindRxRequest
|
|
3365
3018
|
def do_bind_rx(**args)
|