nl-linux 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/CHANGELOG.md +2 -0
- data/Rakefile +13 -3
- data/generated/nl/linux/binder.rb +80 -0
- data/generated/nl/linux/conntrack.rb +39 -2
- data/generated/nl/linux/dev_energymodel.rb +106 -0
- data/generated/nl/linux/devlink.rb +751 -0
- data/generated/nl/linux/dpll.rb +712 -55
- data/generated/nl/linux/drm_ras.rb +87 -0
- data/generated/nl/linux/ethtool.rb +1569 -259
- data/generated/nl/linux/fou.rb +82 -13
- data/generated/nl/linux/handshake.rb +92 -0
- data/generated/nl/linux/lockd.rb +50 -0
- data/generated/nl/linux/mptcp_pm.rb +159 -0
- data/generated/nl/linux/net_shaper.rb +123 -0
- data/generated/nl/linux/netdev.rb +374 -0
- data/generated/nl/linux/nfsd.rb +316 -6
- data/generated/nl/linux/nftables.rb +414 -25
- data/generated/nl/linux/nl80211.rb +81 -22
- data/generated/nl/linux/nlctrl.rb +59 -8
- data/generated/nl/linux/ovpn.rb +180 -0
- data/generated/nl/linux/ovs_datapath.rb +55 -6
- data/generated/nl/linux/ovs_flow.rb +63 -20
- data/generated/nl/linux/ovs_packet.rb +115 -4
- data/generated/nl/linux/ovs_vport.rb +55 -6
- data/generated/nl/linux/psp.rb +257 -0
- data/generated/nl/linux/rt_addr.rb +69 -14
- data/generated/nl/linux/rt_link.rb +381 -47
- data/generated/nl/linux/rt_neigh.rb +227 -16
- data/generated/nl/linux/rt_route.rb +92 -49
- data/generated/nl/linux/rt_rule.rb +300 -11
- data/generated/nl/linux/sunrpc_cache.rb +130 -0
- data/generated/nl/linux/tc.rb +161 -52
- data/generated/nl/linux/tcp_metrics.rb +69 -12
- data/generated/nl/linux/team.rb +80 -0
- data/generated/nl/linux/wireguard.rb +99 -7
- data/lib/nl/linux/version.rb +1 -1
- metadata +11 -9
|
@@ -1,4 +1,6 @@
|
|
|
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
6
|
# rbs_inline: enabled
|
|
@@ -9,6 +11,7 @@ module Nl; module Linux
|
|
|
9
11
|
class Netdev < ::Nl::Family
|
|
10
12
|
NAME = "netdev"
|
|
11
13
|
PROTOCOL = Ractor.make_shareable(::Nl::Protocols::Genl.new("netdev"))
|
|
14
|
+
MCAST_GROUPS = Ractor.make_shareable({:"mgmt" => ::Nl::McastGroup.new("mgmt", nil), :"page_pool" => ::Nl::McastGroup.new("page-pool", nil)}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
12
15
|
module Structs
|
|
13
16
|
end
|
|
14
17
|
module AttributeSets
|
|
@@ -743,6 +746,13 @@ class Netdev < ::Nl::Family
|
|
|
743
746
|
def xsk_features; attributes[:"xsk_features"]&.value; end
|
|
744
747
|
end
|
|
745
748
|
# Get / dump information about a netdev.
|
|
749
|
+
class DumpDevGetRequest < ::Nl::Protocols::Genl::Message
|
|
750
|
+
TYPE = 1
|
|
751
|
+
FIXED_HEADER = nil
|
|
752
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
753
|
+
ATTRIBUTES = Ractor.make_shareable(%i[])
|
|
754
|
+
end
|
|
755
|
+
# Get / dump information about a netdev.
|
|
746
756
|
class DumpDevGetReply < ::Nl::Protocols::Genl::Message
|
|
747
757
|
TYPE = 1
|
|
748
758
|
FIXED_HEADER = nil
|
|
@@ -1368,6 +1378,8 @@ class Netdev < ::Nl::Family
|
|
|
1368
1378
|
def tx_wake; attributes[:"tx_wake"]&.value; end
|
|
1369
1379
|
end
|
|
1370
1380
|
# Bind dmabuf to netdev
|
|
1381
|
+
#
|
|
1382
|
+
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
1371
1383
|
class DoBindRxRequest < ::Nl::Protocols::Genl::Message
|
|
1372
1384
|
TYPE = 13
|
|
1373
1385
|
FIXED_HEADER = nil
|
|
@@ -1387,6 +1399,8 @@ class Netdev < ::Nl::Family
|
|
|
1387
1399
|
def fd; attributes[:"fd"]&.value; end
|
|
1388
1400
|
end
|
|
1389
1401
|
# Bind dmabuf to netdev
|
|
1402
|
+
#
|
|
1403
|
+
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
1390
1404
|
class DoBindRxReply < ::Nl::Protocols::Genl::Message
|
|
1391
1405
|
TYPE = 13
|
|
1392
1406
|
FIXED_HEADER = nil
|
|
@@ -1398,6 +1412,8 @@ class Netdev < ::Nl::Family
|
|
|
1398
1412
|
def id; attributes[:"id"]&.value; end
|
|
1399
1413
|
end
|
|
1400
1414
|
# Set configurable NAPI instance settings.
|
|
1415
|
+
#
|
|
1416
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1401
1417
|
class DoNapiSetRequest < ::Nl::Protocols::Genl::Message
|
|
1402
1418
|
TYPE = 14
|
|
1403
1419
|
FIXED_HEADER = nil
|
|
@@ -1452,6 +1468,9 @@ class Netdev < ::Nl::Family
|
|
|
1452
1468
|
end
|
|
1453
1469
|
# Create a new queue for the given netdevice. Whether this operation
|
|
1454
1470
|
# is supported depends on the device and the driver.
|
|
1471
|
+
#
|
|
1472
|
+
#
|
|
1473
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1455
1474
|
class DoQueueCreateRequest < ::Nl::Protocols::Genl::Message
|
|
1456
1475
|
TYPE = 16
|
|
1457
1476
|
FIXED_HEADER = nil
|
|
@@ -1472,6 +1491,9 @@ class Netdev < ::Nl::Family
|
|
|
1472
1491
|
end
|
|
1473
1492
|
# Create a new queue for the given netdevice. Whether this operation
|
|
1474
1493
|
# is supported depends on the device and the driver.
|
|
1494
|
+
#
|
|
1495
|
+
#
|
|
1496
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1475
1497
|
class DoQueueCreateReply < ::Nl::Protocols::Genl::Message
|
|
1476
1498
|
TYPE = 16
|
|
1477
1499
|
FIXED_HEADER = nil
|
|
@@ -1483,12 +1505,232 @@ class Netdev < ::Nl::Family
|
|
|
1483
1505
|
def id; attributes[:"id"]&.value; end
|
|
1484
1506
|
end
|
|
1485
1507
|
end
|
|
1508
|
+
module Notifications
|
|
1509
|
+
# Notification about device appearing.
|
|
1510
|
+
#
|
|
1511
|
+
# Multicast group: `mgmt`.
|
|
1512
|
+
class DevAddNtf < ::Nl::Protocols::Genl::Message
|
|
1513
|
+
TYPE = 2
|
|
1514
|
+
FIXED_HEADER = nil
|
|
1515
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
1516
|
+
ATTRIBUTES = Ractor.make_shareable(%i[ifindex xdp_features xdp_zc_max_segs xdp_rx_metadata_features xsk_features])
|
|
1517
|
+
# Gets the value of `ifindex` attribute in the message.
|
|
1518
|
+
#--
|
|
1519
|
+
# @rbs return: ::Integer
|
|
1520
|
+
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1521
|
+
# Gets the value of `xdp-features` attribute in the message.
|
|
1522
|
+
#--
|
|
1523
|
+
# @rbs return: ::Integer
|
|
1524
|
+
def xdp_features; attributes[:"xdp_features"]&.value; end
|
|
1525
|
+
# Gets the value of `xdp-zc-max-segs` attribute in the message.
|
|
1526
|
+
#--
|
|
1527
|
+
# @rbs return: ::Integer
|
|
1528
|
+
def xdp_zc_max_segs; attributes[:"xdp_zc_max_segs"]&.value; end
|
|
1529
|
+
# Gets the value of `xdp-rx-metadata-features` attribute in the message.
|
|
1530
|
+
#--
|
|
1531
|
+
# @rbs return: ::Integer
|
|
1532
|
+
def xdp_rx_metadata_features; attributes[:"xdp_rx_metadata_features"]&.value; end
|
|
1533
|
+
# Gets the value of `xsk-features` attribute in the message.
|
|
1534
|
+
#--
|
|
1535
|
+
# @rbs return: ::Integer
|
|
1536
|
+
def xsk_features; attributes[:"xsk_features"]&.value; end
|
|
1537
|
+
end
|
|
1538
|
+
# Notification about device disappearing.
|
|
1539
|
+
#
|
|
1540
|
+
# Multicast group: `mgmt`.
|
|
1541
|
+
class DevDelNtf < ::Nl::Protocols::Genl::Message
|
|
1542
|
+
TYPE = 3
|
|
1543
|
+
FIXED_HEADER = nil
|
|
1544
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
1545
|
+
ATTRIBUTES = Ractor.make_shareable(%i[ifindex xdp_features xdp_zc_max_segs xdp_rx_metadata_features xsk_features])
|
|
1546
|
+
# Gets the value of `ifindex` attribute in the message.
|
|
1547
|
+
#--
|
|
1548
|
+
# @rbs return: ::Integer
|
|
1549
|
+
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1550
|
+
# Gets the value of `xdp-features` attribute in the message.
|
|
1551
|
+
#--
|
|
1552
|
+
# @rbs return: ::Integer
|
|
1553
|
+
def xdp_features; attributes[:"xdp_features"]&.value; end
|
|
1554
|
+
# Gets the value of `xdp-zc-max-segs` attribute in the message.
|
|
1555
|
+
#--
|
|
1556
|
+
# @rbs return: ::Integer
|
|
1557
|
+
def xdp_zc_max_segs; attributes[:"xdp_zc_max_segs"]&.value; end
|
|
1558
|
+
# Gets the value of `xdp-rx-metadata-features` attribute in the message.
|
|
1559
|
+
#--
|
|
1560
|
+
# @rbs return: ::Integer
|
|
1561
|
+
def xdp_rx_metadata_features; attributes[:"xdp_rx_metadata_features"]&.value; end
|
|
1562
|
+
# Gets the value of `xsk-features` attribute in the message.
|
|
1563
|
+
#--
|
|
1564
|
+
# @rbs return: ::Integer
|
|
1565
|
+
def xsk_features; attributes[:"xsk_features"]&.value; end
|
|
1566
|
+
end
|
|
1567
|
+
# Notification about device configuration being changed.
|
|
1568
|
+
#
|
|
1569
|
+
# Multicast group: `mgmt`.
|
|
1570
|
+
class DevChangeNtf < ::Nl::Protocols::Genl::Message
|
|
1571
|
+
TYPE = 4
|
|
1572
|
+
FIXED_HEADER = nil
|
|
1573
|
+
ATTRIBUTE_SET = AttributeSets::Dev
|
|
1574
|
+
ATTRIBUTES = Ractor.make_shareable(%i[ifindex xdp_features xdp_zc_max_segs xdp_rx_metadata_features xsk_features])
|
|
1575
|
+
# Gets the value of `ifindex` attribute in the message.
|
|
1576
|
+
#--
|
|
1577
|
+
# @rbs return: ::Integer
|
|
1578
|
+
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1579
|
+
# Gets the value of `xdp-features` attribute in the message.
|
|
1580
|
+
#--
|
|
1581
|
+
# @rbs return: ::Integer
|
|
1582
|
+
def xdp_features; attributes[:"xdp_features"]&.value; end
|
|
1583
|
+
# Gets the value of `xdp-zc-max-segs` attribute in the message.
|
|
1584
|
+
#--
|
|
1585
|
+
# @rbs return: ::Integer
|
|
1586
|
+
def xdp_zc_max_segs; attributes[:"xdp_zc_max_segs"]&.value; end
|
|
1587
|
+
# Gets the value of `xdp-rx-metadata-features` attribute in the message.
|
|
1588
|
+
#--
|
|
1589
|
+
# @rbs return: ::Integer
|
|
1590
|
+
def xdp_rx_metadata_features; attributes[:"xdp_rx_metadata_features"]&.value; end
|
|
1591
|
+
# Gets the value of `xsk-features` attribute in the message.
|
|
1592
|
+
#--
|
|
1593
|
+
# @rbs return: ::Integer
|
|
1594
|
+
def xsk_features; attributes[:"xsk_features"]&.value; end
|
|
1595
|
+
end
|
|
1596
|
+
# Notification about page pool appearing.
|
|
1597
|
+
#
|
|
1598
|
+
# Multicast group: `page-pool`.
|
|
1599
|
+
class PagePoolAddNtf < ::Nl::Protocols::Genl::Message
|
|
1600
|
+
TYPE = 6
|
|
1601
|
+
FIXED_HEADER = nil
|
|
1602
|
+
ATTRIBUTE_SET = AttributeSets::PagePool
|
|
1603
|
+
ATTRIBUTES = Ractor.make_shareable(%i[id ifindex napi_id inflight inflight_mem detach_time dmabuf io_uring])
|
|
1604
|
+
# Gets the value of `id` attribute in the message.
|
|
1605
|
+
#--
|
|
1606
|
+
# @rbs return: ::Integer
|
|
1607
|
+
def id; attributes[:"id"]&.value; end
|
|
1608
|
+
# Gets the value of `ifindex` attribute in the message.
|
|
1609
|
+
#--
|
|
1610
|
+
# @rbs return: ::Integer
|
|
1611
|
+
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1612
|
+
# Gets the value of `napi-id` attribute in the message.
|
|
1613
|
+
#--
|
|
1614
|
+
# @rbs return: ::Integer
|
|
1615
|
+
def napi_id; attributes[:"napi_id"]&.value; end
|
|
1616
|
+
# Gets the value of `inflight` attribute in the message.
|
|
1617
|
+
#--
|
|
1618
|
+
# @rbs return: ::Integer
|
|
1619
|
+
def inflight; attributes[:"inflight"]&.value; end
|
|
1620
|
+
# Gets the value of `inflight-mem` attribute in the message.
|
|
1621
|
+
#--
|
|
1622
|
+
# @rbs return: ::Integer
|
|
1623
|
+
def inflight_mem; attributes[:"inflight_mem"]&.value; end
|
|
1624
|
+
# Gets the value of `detach-time` attribute in the message.
|
|
1625
|
+
#--
|
|
1626
|
+
# @rbs return: ::Integer
|
|
1627
|
+
def detach_time; attributes[:"detach_time"]&.value; end
|
|
1628
|
+
# Gets the value of `dmabuf` attribute in the message.
|
|
1629
|
+
#--
|
|
1630
|
+
# @rbs return: ::Integer
|
|
1631
|
+
def dmabuf; attributes[:"dmabuf"]&.value; end
|
|
1632
|
+
# Gets the value of `io-uring` attribute in the message.
|
|
1633
|
+
#--
|
|
1634
|
+
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
1635
|
+
def io_uring; attributes[:"io_uring"]&.value; end
|
|
1636
|
+
end
|
|
1637
|
+
# Notification about page pool disappearing.
|
|
1638
|
+
#
|
|
1639
|
+
# Multicast group: `page-pool`.
|
|
1640
|
+
class PagePoolDelNtf < ::Nl::Protocols::Genl::Message
|
|
1641
|
+
TYPE = 7
|
|
1642
|
+
FIXED_HEADER = nil
|
|
1643
|
+
ATTRIBUTE_SET = AttributeSets::PagePool
|
|
1644
|
+
ATTRIBUTES = Ractor.make_shareable(%i[id ifindex napi_id inflight inflight_mem detach_time dmabuf io_uring])
|
|
1645
|
+
# Gets the value of `id` attribute in the message.
|
|
1646
|
+
#--
|
|
1647
|
+
# @rbs return: ::Integer
|
|
1648
|
+
def id; attributes[:"id"]&.value; end
|
|
1649
|
+
# Gets the value of `ifindex` attribute in the message.
|
|
1650
|
+
#--
|
|
1651
|
+
# @rbs return: ::Integer
|
|
1652
|
+
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1653
|
+
# Gets the value of `napi-id` attribute in the message.
|
|
1654
|
+
#--
|
|
1655
|
+
# @rbs return: ::Integer
|
|
1656
|
+
def napi_id; attributes[:"napi_id"]&.value; end
|
|
1657
|
+
# Gets the value of `inflight` attribute in the message.
|
|
1658
|
+
#--
|
|
1659
|
+
# @rbs return: ::Integer
|
|
1660
|
+
def inflight; attributes[:"inflight"]&.value; end
|
|
1661
|
+
# Gets the value of `inflight-mem` attribute in the message.
|
|
1662
|
+
#--
|
|
1663
|
+
# @rbs return: ::Integer
|
|
1664
|
+
def inflight_mem; attributes[:"inflight_mem"]&.value; end
|
|
1665
|
+
# Gets the value of `detach-time` attribute in the message.
|
|
1666
|
+
#--
|
|
1667
|
+
# @rbs return: ::Integer
|
|
1668
|
+
def detach_time; attributes[:"detach_time"]&.value; end
|
|
1669
|
+
# Gets the value of `dmabuf` attribute in the message.
|
|
1670
|
+
#--
|
|
1671
|
+
# @rbs return: ::Integer
|
|
1672
|
+
def dmabuf; attributes[:"dmabuf"]&.value; end
|
|
1673
|
+
# Gets the value of `io-uring` attribute in the message.
|
|
1674
|
+
#--
|
|
1675
|
+
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
1676
|
+
def io_uring; attributes[:"io_uring"]&.value; end
|
|
1677
|
+
end
|
|
1678
|
+
# Notification about page pool configuration being changed.
|
|
1679
|
+
#
|
|
1680
|
+
# Multicast group: `page-pool`.
|
|
1681
|
+
class PagePoolChangeNtf < ::Nl::Protocols::Genl::Message
|
|
1682
|
+
TYPE = 8
|
|
1683
|
+
FIXED_HEADER = nil
|
|
1684
|
+
ATTRIBUTE_SET = AttributeSets::PagePool
|
|
1685
|
+
ATTRIBUTES = Ractor.make_shareable(%i[id ifindex napi_id inflight inflight_mem detach_time dmabuf io_uring])
|
|
1686
|
+
# Gets the value of `id` attribute in the message.
|
|
1687
|
+
#--
|
|
1688
|
+
# @rbs return: ::Integer
|
|
1689
|
+
def id; attributes[:"id"]&.value; end
|
|
1690
|
+
# Gets the value of `ifindex` attribute in the message.
|
|
1691
|
+
#--
|
|
1692
|
+
# @rbs return: ::Integer
|
|
1693
|
+
def ifindex; attributes[:"ifindex"]&.value; end
|
|
1694
|
+
# Gets the value of `napi-id` attribute in the message.
|
|
1695
|
+
#--
|
|
1696
|
+
# @rbs return: ::Integer
|
|
1697
|
+
def napi_id; attributes[:"napi_id"]&.value; end
|
|
1698
|
+
# Gets the value of `inflight` attribute in the message.
|
|
1699
|
+
#--
|
|
1700
|
+
# @rbs return: ::Integer
|
|
1701
|
+
def inflight; attributes[:"inflight"]&.value; end
|
|
1702
|
+
# Gets the value of `inflight-mem` attribute in the message.
|
|
1703
|
+
#--
|
|
1704
|
+
# @rbs return: ::Integer
|
|
1705
|
+
def inflight_mem; attributes[:"inflight_mem"]&.value; end
|
|
1706
|
+
# Gets the value of `detach-time` attribute in the message.
|
|
1707
|
+
#--
|
|
1708
|
+
# @rbs return: ::Integer
|
|
1709
|
+
def detach_time; attributes[:"detach_time"]&.value; end
|
|
1710
|
+
# Gets the value of `dmabuf` attribute in the message.
|
|
1711
|
+
#--
|
|
1712
|
+
# @rbs return: ::Integer
|
|
1713
|
+
def dmabuf; attributes[:"dmabuf"]&.value; end
|
|
1714
|
+
# Gets the value of `io-uring` attribute in the message.
|
|
1715
|
+
#--
|
|
1716
|
+
# @rbs return: AttributeSets::IoUringProviderInfo
|
|
1717
|
+
def io_uring; attributes[:"io_uring"]&.value; end
|
|
1718
|
+
end
|
|
1719
|
+
end
|
|
1720
|
+
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
1721
|
# Get / dump information about a netdev.
|
|
1487
1722
|
#--
|
|
1488
1723
|
# @rbs (?ifindex: ::Integer) -> Messages::DoDevGetReply
|
|
1489
1724
|
def do_dev_get(**args)
|
|
1490
1725
|
exchange_message(:"do", Messages::DoDevGetRequest, Messages::DoDevGetReply, args)
|
|
1491
1726
|
end
|
|
1727
|
+
# Get / dump information about a netdev.
|
|
1728
|
+
#--
|
|
1729
|
+
# @rbs () -> Enumerable[Messages::DumpDevGetReply]
|
|
1730
|
+
# | () { (Messages::DumpDevGetReply) -> void } -> void
|
|
1731
|
+
def dump_dev_get(**args, &block)
|
|
1732
|
+
exchange_message(:"dump", Messages::DumpDevGetRequest, Messages::DumpDevGetReply, args, &block)
|
|
1733
|
+
end
|
|
1492
1734
|
# Get / dump information about Page Pools.
|
|
1493
1735
|
# Only Page Pools associated by the driver with a net_device
|
|
1494
1736
|
# can be listed. ifindex will not be reported if the net_device
|
|
@@ -1557,12 +1799,16 @@ class Netdev < ::Nl::Family
|
|
|
1557
1799
|
exchange_message(:"dump", Messages::DumpQstatsGetRequest, Messages::DumpQstatsGetReply, args, &block)
|
|
1558
1800
|
end
|
|
1559
1801
|
# Bind dmabuf to netdev
|
|
1802
|
+
#
|
|
1803
|
+
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
1560
1804
|
#--
|
|
1561
1805
|
# @rbs (?ifindex: ::Integer, ?queues: AttributeSets::QueueId, ?fd: ::Integer) -> Messages::DoBindRxReply
|
|
1562
1806
|
def do_bind_rx(**args)
|
|
1563
1807
|
exchange_message(:"do", Messages::DoBindRxRequest, Messages::DoBindRxReply, args)
|
|
1564
1808
|
end
|
|
1565
1809
|
# Set configurable NAPI instance settings.
|
|
1810
|
+
#
|
|
1811
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1566
1812
|
#--
|
|
1567
1813
|
# @rbs (?id: ::Integer, ?defer_hard_irqs: ::Integer, ?gro_flush_timeout: ::Integer, ?irq_suspend_timeout: ::Integer, ?threaded: ::Integer) -> void
|
|
1568
1814
|
def do_napi_set(**args)
|
|
@@ -1576,10 +1822,138 @@ class Netdev < ::Nl::Family
|
|
|
1576
1822
|
end
|
|
1577
1823
|
# Create a new queue for the given netdevice. Whether this operation
|
|
1578
1824
|
# is supported depends on the device and the driver.
|
|
1825
|
+
#
|
|
1826
|
+
#
|
|
1827
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1579
1828
|
#--
|
|
1580
1829
|
# @rbs (?ifindex: ::Integer, ?type: ::Integer, ?lease: AttributeSets::Lease) -> Messages::DoQueueCreateReply
|
|
1581
1830
|
def do_queue_create(**args)
|
|
1582
1831
|
exchange_message(:"do", Messages::DoQueueCreateRequest, Messages::DoQueueCreateReply, args)
|
|
1583
1832
|
end
|
|
1833
|
+
class AsyncOperations
|
|
1834
|
+
# :nodoc:
|
|
1835
|
+
def initialize(&exchange)
|
|
1836
|
+
@exchange = exchange
|
|
1837
|
+
end
|
|
1838
|
+
# Get / dump information about a netdev.
|
|
1839
|
+
#--
|
|
1840
|
+
# @rbs (?ifindex: ::Integer) -> ::Nl::Async::Future[Messages::DoDevGetReply]
|
|
1841
|
+
def do_dev_get(**args)
|
|
1842
|
+
@exchange.call(:"do", Messages::DoDevGetRequest, Messages::DoDevGetReply, args)
|
|
1843
|
+
end
|
|
1844
|
+
# Get / dump information about a netdev.
|
|
1845
|
+
#--
|
|
1846
|
+
# @rbs () -> ::Nl::Async::Stream[Messages::DumpDevGetReply]
|
|
1847
|
+
def dump_dev_get(**args)
|
|
1848
|
+
@exchange.call(:"dump", Messages::DumpDevGetRequest, Messages::DumpDevGetReply, args)
|
|
1849
|
+
end
|
|
1850
|
+
# Get / dump information about Page Pools.
|
|
1851
|
+
# Only Page Pools associated by the driver with a net_device
|
|
1852
|
+
# can be listed. ifindex will not be reported if the net_device
|
|
1853
|
+
# no longer exists.
|
|
1854
|
+
#--
|
|
1855
|
+
# @rbs (?id: ::Integer) -> ::Nl::Async::Future[Messages::DoPagePoolGetReply]
|
|
1856
|
+
def do_page_pool_get(**args)
|
|
1857
|
+
@exchange.call(:"do", Messages::DoPagePoolGetRequest, Messages::DoPagePoolGetReply, args)
|
|
1858
|
+
end
|
|
1859
|
+
# Get / dump information about Page Pools.
|
|
1860
|
+
# Only Page Pools associated by the driver with a net_device
|
|
1861
|
+
# can be listed. ifindex will not be reported if the net_device
|
|
1862
|
+
# no longer exists.
|
|
1863
|
+
#--
|
|
1864
|
+
# @rbs (?ifindex: ::Integer) -> ::Nl::Async::Stream[Messages::DumpPagePoolGetReply]
|
|
1865
|
+
def dump_page_pool_get(**args)
|
|
1866
|
+
@exchange.call(:"dump", Messages::DumpPagePoolGetRequest, Messages::DumpPagePoolGetReply, args)
|
|
1867
|
+
end
|
|
1868
|
+
# Get page pool statistics.
|
|
1869
|
+
#--
|
|
1870
|
+
# @rbs (?info: AttributeSets::PagePoolInfo) -> ::Nl::Async::Future[Messages::DoPagePoolStatsGetReply]
|
|
1871
|
+
def do_page_pool_stats_get(**args)
|
|
1872
|
+
@exchange.call(:"do", Messages::DoPagePoolStatsGetRequest, Messages::DoPagePoolStatsGetReply, args)
|
|
1873
|
+
end
|
|
1874
|
+
# Get page pool statistics.
|
|
1875
|
+
#--
|
|
1876
|
+
# @rbs (?info: AttributeSets::PagePoolInfo) -> ::Nl::Async::Stream[Messages::DumpPagePoolStatsGetReply]
|
|
1877
|
+
def dump_page_pool_stats_get(**args)
|
|
1878
|
+
@exchange.call(:"dump", Messages::DumpPagePoolStatsGetRequest, Messages::DumpPagePoolStatsGetReply, args)
|
|
1879
|
+
end
|
|
1880
|
+
# Get queue information from the kernel. Only configured queues will be reported (as opposed to all available hardware queues).
|
|
1881
|
+
#--
|
|
1882
|
+
# @rbs (?id: ::Integer, ?ifindex: ::Integer, ?type: ::Integer) -> ::Nl::Async::Future[Messages::DoQueueGetReply]
|
|
1883
|
+
def do_queue_get(**args)
|
|
1884
|
+
@exchange.call(:"do", Messages::DoQueueGetRequest, Messages::DoQueueGetReply, args)
|
|
1885
|
+
end
|
|
1886
|
+
# Get queue information from the kernel. Only configured queues will be reported (as opposed to all available hardware queues).
|
|
1887
|
+
#--
|
|
1888
|
+
# @rbs (?ifindex: ::Integer) -> ::Nl::Async::Stream[Messages::DumpQueueGetReply]
|
|
1889
|
+
def dump_queue_get(**args)
|
|
1890
|
+
@exchange.call(:"dump", Messages::DumpQueueGetRequest, Messages::DumpQueueGetReply, args)
|
|
1891
|
+
end
|
|
1892
|
+
# Get information about NAPI instances configured on the system.
|
|
1893
|
+
#--
|
|
1894
|
+
# @rbs (?id: ::Integer) -> ::Nl::Async::Future[Messages::DoNapiGetReply]
|
|
1895
|
+
def do_napi_get(**args)
|
|
1896
|
+
@exchange.call(:"do", Messages::DoNapiGetRequest, Messages::DoNapiGetReply, args)
|
|
1897
|
+
end
|
|
1898
|
+
# Get information about NAPI instances configured on the system.
|
|
1899
|
+
#--
|
|
1900
|
+
# @rbs (?ifindex: ::Integer) -> ::Nl::Async::Stream[Messages::DumpNapiGetReply]
|
|
1901
|
+
def dump_napi_get(**args)
|
|
1902
|
+
@exchange.call(:"dump", Messages::DumpNapiGetRequest, Messages::DumpNapiGetReply, args)
|
|
1903
|
+
end
|
|
1904
|
+
# Get / dump fine grained statistics. Which statistics are reported
|
|
1905
|
+
# depends on the device and the driver, and whether the driver stores
|
|
1906
|
+
# software counters per-queue.
|
|
1907
|
+
#--
|
|
1908
|
+
# @rbs (?ifindex: ::Integer, ?scope: ::Integer) -> ::Nl::Async::Stream[Messages::DumpQstatsGetReply]
|
|
1909
|
+
def dump_qstats_get(**args)
|
|
1910
|
+
@exchange.call(:"dump", Messages::DumpQstatsGetRequest, Messages::DumpQstatsGetReply, args)
|
|
1911
|
+
end
|
|
1912
|
+
# Bind dmabuf to netdev
|
|
1913
|
+
#
|
|
1914
|
+
# Requires CAP_NET_ADMIN in the user namespace owning the network namespace.
|
|
1915
|
+
#--
|
|
1916
|
+
# @rbs (?ifindex: ::Integer, ?queues: AttributeSets::QueueId, ?fd: ::Integer) -> ::Nl::Async::Future[Messages::DoBindRxReply]
|
|
1917
|
+
def do_bind_rx(**args)
|
|
1918
|
+
@exchange.call(:"do", Messages::DoBindRxRequest, Messages::DoBindRxReply, args)
|
|
1919
|
+
end
|
|
1920
|
+
# Set configurable NAPI instance settings.
|
|
1921
|
+
#
|
|
1922
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1923
|
+
#--
|
|
1924
|
+
# @rbs (?id: ::Integer, ?defer_hard_irqs: ::Integer, ?gro_flush_timeout: ::Integer, ?irq_suspend_timeout: ::Integer, ?threaded: ::Integer) -> ::Nl::Async::Future[void]
|
|
1925
|
+
def do_napi_set(**args)
|
|
1926
|
+
@exchange.call(:"do", Messages::DoNapiSetRequest, nil, args)
|
|
1927
|
+
end
|
|
1928
|
+
# Bind dmabuf to netdev for TX
|
|
1929
|
+
#--
|
|
1930
|
+
# @rbs (?ifindex: ::Integer, ?fd: ::Integer) -> ::Nl::Async::Future[Messages::DoBindTxReply]
|
|
1931
|
+
def do_bind_tx(**args)
|
|
1932
|
+
@exchange.call(:"do", Messages::DoBindTxRequest, Messages::DoBindTxReply, args)
|
|
1933
|
+
end
|
|
1934
|
+
# Create a new queue for the given netdevice. Whether this operation
|
|
1935
|
+
# is supported depends on the device and the driver.
|
|
1936
|
+
#
|
|
1937
|
+
#
|
|
1938
|
+
# Requires CAP_NET_ADMIN in the initial user namespace.
|
|
1939
|
+
#--
|
|
1940
|
+
# @rbs (?ifindex: ::Integer, ?type: ::Integer, ?lease: AttributeSets::Lease) -> ::Nl::Async::Future[Messages::DoQueueCreateReply]
|
|
1941
|
+
def do_queue_create(**args)
|
|
1942
|
+
@exchange.call(:"do", Messages::DoQueueCreateRequest, Messages::DoQueueCreateReply, args)
|
|
1943
|
+
end
|
|
1944
|
+
end
|
|
1945
|
+
# Returns the asynchronous operation facade for this family.
|
|
1946
|
+
#--
|
|
1947
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
1948
|
+
def async(stream_capacity: nil)
|
|
1949
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
1950
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
1951
|
+
end
|
|
1952
|
+
#--
|
|
1953
|
+
# @rbs (*(:mgmt | :page_pool) groups) -> self
|
|
1954
|
+
def subscribe(*groups) = super
|
|
1955
|
+
#--
|
|
1956
|
+
# @rbs (*(:mgmt | :page_pool) groups) -> self
|
|
1957
|
+
def unsubscribe(*groups) = super
|
|
1584
1958
|
end
|
|
1585
1959
|
end; end
|