]>
Commit | Line | Data |
---|---|---|
9ee03516 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
af6f0d42 | 2 | %{ |
4831981d SL |
3 | #if __GNUC__ >= 7 |
4 | _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") | |
5 | #endif | |
af6f0d42 TG |
6 | #include <stddef.h> |
7 | #include "conf-parser.h" | |
5fde13d7 | 8 | #include "ethtool-util.h" |
0fbddd04 | 9 | #include "link-config.h" |
7e19cc54 | 10 | #include "net-condition.h" |
2313524a | 11 | #include "socket-util.h" |
af6f0d42 TG |
12 | %} |
13 | struct ConfigPerfItem; | |
14 | %null_strings | |
15 | %language=ANSI-C | |
16 | %define slot-name section_and_lvalue | |
17 | %define hash-function-name link_config_gperf_hash | |
18 | %define lookup-function-name link_config_gperf_lookup | |
19 | %readonly-tables | |
20 | %omit-struct-type | |
21 | %struct-type | |
22 | %includes | |
23 | %% | |
6c35ea5e DDM |
24 | Match.MACAddress, config_parse_hwaddrs, 0, offsetof(LinkConfig, match.mac) |
25 | Match.PermanentMACAddress, config_parse_hwaddrs, 0, offsetof(LinkConfig, match.permanent_mac) | |
26 | Match.OriginalName, config_parse_match_ifnames, 0, offsetof(LinkConfig, match.ifname) | |
27 | Match.Path, config_parse_match_strv, 0, offsetof(LinkConfig, match.path) | |
28 | Match.Driver, config_parse_match_strv, 0, offsetof(LinkConfig, match.driver) | |
29 | Match.Type, config_parse_match_strv, 0, offsetof(LinkConfig, match.iftype) | |
30 | Match.Property, config_parse_match_property, 0, offsetof(LinkConfig, match.property) | |
31 | Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(LinkConfig, conditions) | |
32 | Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(LinkConfig, conditions) | |
33 | Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(LinkConfig, conditions) | |
34 | Match.KernelVersion, config_parse_net_condition, CONDITION_KERNEL_VERSION, offsetof(LinkConfig, conditions) | |
35 | Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(LinkConfig, conditions) | |
36 | Link.Description, config_parse_string, 0, offsetof(LinkConfig, description) | |
37 | Link.MACAddressPolicy, config_parse_mac_address_policy, 0, offsetof(LinkConfig, mac_address_policy) | |
38 | Link.MACAddress, config_parse_hwaddr, 0, offsetof(LinkConfig, mac) | |
39 | Link.NamePolicy, config_parse_name_policy, 0, offsetof(LinkConfig, name_policy) | |
40 | Link.Name, config_parse_ifname, 0, offsetof(LinkConfig, name) | |
41 | Link.AlternativeName, config_parse_ifnames, IFNAME_VALID_ALTERNATIVE, offsetof(LinkConfig, alternative_names) | |
42 | Link.AlternativeNamesPolicy, config_parse_alternative_names_policy, 0, offsetof(LinkConfig, alternative_names_policy) | |
43 | Link.Alias, config_parse_ifalias, 0, offsetof(LinkConfig, alias) | |
44 | Link.TransmitQueues, config_parse_rx_tx_queues, 0, offsetof(LinkConfig, txqueues) | |
45 | Link.ReceiveQueues, config_parse_rx_tx_queues, 0, offsetof(LinkConfig, rxqueues) | |
46 | Link.TransmitQueueLength, config_parse_txqueuelen, 0, offsetof(LinkConfig, txqueuelen) | |
47 | Link.MTUBytes, config_parse_mtu, AF_UNSPEC, offsetof(LinkConfig, mtu) | |
48 | Link.BitsPerSecond, config_parse_si_uint64, 0, offsetof(LinkConfig, speed) | |
49 | Link.Duplex, config_parse_duplex, 0, offsetof(LinkConfig, duplex) | |
50 | Link.AutoNegotiation, config_parse_tristate, 0, offsetof(LinkConfig, autonegotiation) | |
51 | Link.WakeOnLan, config_parse_wol, 0, offsetof(LinkConfig, wol) | |
52 | Link.Port, config_parse_port, 0, offsetof(LinkConfig, port) | |
53 | Link.ReceiveChecksumOffload, config_parse_tristate, 0, offsetof(LinkConfig, features[NET_DEV_FEAT_RX]) | |
54 | Link.TransmitChecksumOffload, config_parse_tristate, 0, offsetof(LinkConfig, features[NET_DEV_FEAT_TX]) | |
55 | Link.GenericSegmentationOffload, config_parse_tristate, 0, offsetof(LinkConfig, features[NET_DEV_FEAT_GSO]) | |
56 | Link.TCPSegmentationOffload, config_parse_tristate, 0, offsetof(LinkConfig, features[NET_DEV_FEAT_TSO]) | |
57 | Link.TCP6SegmentationOffload, config_parse_tristate, 0, offsetof(LinkConfig, features[NET_DEV_FEAT_TSO6]) | |
58 | Link.UDPSegmentationOffload, config_parse_warn_compat, DISABLED_LEGACY, 0 | |
59 | Link.GenericReceiveOffload, config_parse_tristate, 0, offsetof(LinkConfig, features[NET_DEV_FEAT_GRO]) | |
60 | Link.LargeReceiveOffload, config_parse_tristate, 0, offsetof(LinkConfig, features[NET_DEV_FEAT_LRO]) | |
61 | Link.RxChannels, config_parse_ring_buffer_or_channel, 0, offsetof(LinkConfig, channels.rx) | |
62 | Link.TxChannels, config_parse_ring_buffer_or_channel, 0, offsetof(LinkConfig, channels.tx) | |
63 | Link.OtherChannels, config_parse_ring_buffer_or_channel, 0, offsetof(LinkConfig, channels.other) | |
64 | Link.CombinedChannels, config_parse_ring_buffer_or_channel, 0, offsetof(LinkConfig, channels.combined) | |
65 | Link.Advertise, config_parse_advertise, 0, offsetof(LinkConfig, advertise) | |
66 | Link.RxBufferSize, config_parse_ring_buffer_or_channel, 0, offsetof(LinkConfig, ring.rx) | |
67 | Link.RxMiniBufferSize, config_parse_ring_buffer_or_channel, 0, offsetof(LinkConfig, ring.rx_mini) | |
68 | Link.RxJumboBufferSize, config_parse_ring_buffer_or_channel, 0, offsetof(LinkConfig, ring.rx_jumbo) | |
69 | Link.TxBufferSize, config_parse_ring_buffer_or_channel, 0, offsetof(LinkConfig, ring.tx) | |
70 | Link.RxFlowControl, config_parse_tristate, 0, offsetof(LinkConfig, rx_flow_control) | |
71 | Link.TxFlowControl, config_parse_tristate, 0, offsetof(LinkConfig, tx_flow_control) | |
72 | Link.AutoNegotiationFlowControl, config_parse_tristate, 0, offsetof(LinkConfig, autoneg_flow_control) | |
73 | Link.GenericSegmentOffloadMaxBytes, config_parse_iec_size, 0, offsetof(LinkConfig, gso_max_size) | |
74 | Link.GenericSegmentOffloadMaxSegments, config_parse_uint32, 0, offsetof(LinkConfig, gso_max_segments) | |
75 | Link.RxCoalesceSec, config_parse_coalesce_sec, 0, offsetof(LinkConfig, coalesce.rx_coalesce_usecs) | |
76 | Link.RxMaxCoalescedFrames, config_parse_coalesce_u32, 0, offsetof(LinkConfig, coalesce.rx_max_coalesced_frames) | |
77 | Link.RxCoalesceIrqSec, config_parse_coalesce_sec, 0, offsetof(LinkConfig, coalesce.rx_coalesce_usecs_irq) | |
78 | Link.RxMaxCoalescedIrqFrames, config_parse_coalesce_u32, 0, offsetof(LinkConfig, coalesce.rx_max_coalesced_frames_irq) | |
79 | Link.TxCoalesceSec, config_parse_coalesce_sec, 0, offsetof(LinkConfig, coalesce.tx_coalesce_usecs) | |
80 | Link.TxMaxCoalescedFrames, config_parse_coalesce_u32, 0, offsetof(LinkConfig, coalesce.tx_max_coalesced_frames) | |
81 | Link.TxCoalesceIrqSec, config_parse_coalesce_sec, 0, offsetof(LinkConfig, coalesce.tx_coalesce_usecs_irq) | |
82 | Link.TxMaxCoalescedIrqFrames, config_parse_coalesce_u32, 0, offsetof(LinkConfig, coalesce.tx_max_coalesced_frames_irq) | |
83 | Link.StatisticsBlockCoalesceSec, config_parse_coalesce_sec, 0, offsetof(LinkConfig, coalesce.stats_block_coalesce_usecs) | |
84 | Link.UseAdaptiveRxCoalesce, config_parse_tristate, 0, offsetof(LinkConfig, coalesce.use_adaptive_rx_coalesce) | |
85 | Link.UseAdaptiveTxCoalesce, config_parse_tristate, 0, offsetof(LinkConfig, coalesce.use_adaptive_tx_coalesce) | |
86 | Link.CoalescePacketRateLow, config_parse_coalesce_u32, 0, offsetof(LinkConfig, coalesce.pkt_rate_low) | |
87 | Link.RxCoalesceLowSec, config_parse_coalesce_sec, 0, offsetof(LinkConfig, coalesce.rx_coalesce_usecs_low) | |
88 | Link.RxMaxCoalescedLowFrames, config_parse_coalesce_u32, 0, offsetof(LinkConfig, coalesce.rx_max_coalesced_frames_low) | |
89 | Link.TxCoalesceLowSec, config_parse_coalesce_sec, 0, offsetof(LinkConfig, coalesce.tx_coalesce_usecs_low) | |
90 | Link.TxMaxCoalescedLowFrames, config_parse_coalesce_u32, 0, offsetof(LinkConfig, coalesce.tx_max_coalesced_frames_low) | |
91 | Link.CoalescePacketRateHigh, config_parse_coalesce_u32, 0, offsetof(LinkConfig, coalesce.pkt_rate_high) | |
92 | Link.RxCoalesceHighSec, config_parse_coalesce_sec, 0, offsetof(LinkConfig, coalesce.rx_coalesce_usecs_high) | |
93 | Link.RxMaxCoalescedHighFrames, config_parse_coalesce_u32, 0, offsetof(LinkConfig, coalesce.rx_max_coalesced_frames_high) | |
94 | Link.TxCoalesceHighSec, config_parse_coalesce_sec, 0, offsetof(LinkConfig, coalesce.tx_coalesce_usecs_high) | |
95 | Link.TxMaxCoalescedHighFrames, config_parse_coalesce_u32, 0, offsetof(LinkConfig, coalesce.tx_max_coalesced_frames_high) | |
96 | Link.CoalescePacketRateSampleIntervalSec, config_parse_coalesce_sec, 0, offsetof(LinkConfig, coalesce.rate_sample_interval) |