@@ -46,12 +46,22 @@ impl BondAddRequest {
46
46
self
47
47
}
48
48
49
- /// Adds the `active_slave ` attribute to the bond, where `active_slave `
49
+ /// Adds the `active_port ` attribute to the bond, where `active_port `
50
50
/// is the ifindex of an interface attached to the bond.
51
- /// This is equivalent to `ip link add name NAME type bond active_slave
52
- /// ACTIVE_SLAVE_NAME`.
53
- pub fn active_slave ( mut self , active_slave : u32 ) -> Self {
54
- self . info_data . push ( InfoBond :: ActiveSlave ( active_slave) ) ;
51
+ /// This is equivalent to `ip link add name NAME type bond active_port
52
+ /// ACTIVE_PORT_NAME`.
53
+ pub fn active_port ( mut self , active_port : u32 ) -> Self {
54
+ self . info_data . push ( InfoBond :: ActivePort ( active_port) ) ;
55
+ self
56
+ }
57
+
58
+ /// Adds the `active_port` attribute to the bond, where `active_port`
59
+ /// is the ifindex of an interface attached to the bond.
60
+ /// This is equivalent to `ip link add name NAME type bond active_port
61
+ /// ACTIVE_PORT_NAME`.
62
+ #[ deprecated( since = "0.13.0" , note = "please use `active_port` instead" ) ]
63
+ pub fn active_slave ( mut self , active_port : u32 ) -> Self {
64
+ self . info_data . push ( InfoBond :: ActivePort ( active_port) ) ;
55
65
self
56
66
}
57
67
@@ -161,12 +171,22 @@ impl BondAddRequest {
161
171
self
162
172
}
163
173
164
- /// Adds the `all_slaves_active` attribute to the bond
165
- /// This is equivalent to `ip link add name NAME type bond all_slaves_active
166
- /// ALL_SLAVES_ACTIVE`.
167
- pub fn all_slaves_active ( mut self , all_slaves_active : u8 ) -> Self {
174
+ /// Adds the `all_ports_active` attribute to the bond
175
+ /// This is equivalent to `ip link add name NAME type bond all_ports_active
176
+ /// ALL_PORTS_ACTIVE`.
177
+ pub fn all_ports_active ( mut self , all_ports_active : u8 ) -> Self {
178
+ self . info_data
179
+ . push ( InfoBond :: AllPortsActive ( all_ports_active) ) ;
180
+ self
181
+ }
182
+ ///
183
+ /// Adds the `all_ports_active` attribute to the bond
184
+ /// This is equivalent to `ip link add name NAME type bond all_ports_active
185
+ /// ALL_PORTS_ACTIVE`.
186
+ #[ deprecated( since = "0.13.0" , note = "use `all_ports_active` instead" ) ]
187
+ pub fn all_slaves_active ( mut self , all_ports_active : u8 ) -> Self {
168
188
self . info_data
169
- . push ( InfoBond :: AllSlavesActive ( all_slaves_active ) ) ;
189
+ . push ( InfoBond :: AllPortsActive ( all_ports_active ) ) ;
170
190
self
171
191
}
172
192
@@ -186,12 +206,22 @@ impl BondAddRequest {
186
206
self
187
207
}
188
208
189
- /// Adds the `packets_per_slave` attribute to the bond
190
- /// This is equivalent to `ip link add name NAME type bond packets_per_slave
191
- /// PACKETS_PER_SLAVE`.
192
- pub fn packets_per_slave ( mut self , packets_per_slave : u32 ) -> Self {
209
+ /// Adds the `packets_per_port` attribute to the bond
210
+ /// This is equivalent to `ip link add name NAME type bond packets_per_port
211
+ /// PACKETS_PER_PORT`.
212
+ pub fn packets_per_port ( mut self , packets_per_port : u32 ) -> Self {
213
+ self . info_data
214
+ . push ( InfoBond :: PacketsPerPort ( packets_per_port) ) ;
215
+ self
216
+ }
217
+
218
+ /// Adds the `packets_per_port` attribute to the bond
219
+ /// This is equivalent to `ip link add name NAME type bond packets_per_port
220
+ /// PACKETS_PER_PORT`.
221
+ #[ deprecated( since = "0.13.0" , note = "use `packets_per_port` instead" ) ]
222
+ pub fn packets_per_slave ( mut self , packets_per_port : u32 ) -> Self {
193
223
self . info_data
194
- . push ( InfoBond :: PacketsPerSlave ( packets_per_slave ) ) ;
224
+ . push ( InfoBond :: PacketsPerPort ( packets_per_port ) ) ;
195
225
self
196
226
}
197
227
0 commit comments