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