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