@@ -28,16 +28,17 @@ const IFLA_MTU: u16 = 4;
28
28
const IFLA_LINK : u16 = 5 ;
29
29
const IFLA_QDISC : u16 = 6 ;
30
30
const IFLA_STATS : u16 = 7 ;
31
- // No kernel is using IFLA_COST
31
+ // No kernel code is using IFLA_COST
32
32
// const IFLA_COST: u16 = 8;
33
- // No kernel is using IFLA_PRIORITY
33
+ // No kernel code is using IFLA_PRIORITY
34
34
// const IFLA_PRIORITY: u16 = 9;
35
35
const IFLA_MASTER : u16 = 10 ;
36
36
const IFLA_WIRELESS : u16 = 11 ;
37
37
const IFLA_PROTINFO : u16 = 12 ;
38
38
const IFLA_TXQLEN : u16 = 13 ;
39
39
const IFLA_MAP : u16 = 14 ;
40
- const IFLA_WEIGHT : u16 = 15 ;
40
+ // No kernel code is using IFLA_WEIGHT
41
+ // const IFLA_WEIGHT: u16 = 15;
41
42
const IFLA_OPERSTATE : u16 = 16 ;
42
43
const IFLA_LINKMODE : u16 = 17 ;
43
44
const IFLA_LINKINFO : u16 = 18 ;
@@ -91,7 +92,6 @@ const IFLA_DEVLINK_PORT: u16 = 62;
91
92
#[ derive( Debug , PartialEq , Eq , Clone ) ]
92
93
#[ non_exhaustive]
93
94
pub enum LinkAttribute {
94
- Weight ( Vec < u8 > ) ,
95
95
VfInfoList ( Vec < u8 > ) ,
96
96
VfPorts ( Vec < u8 > ) ,
97
97
PortSelf ( Vec < u8 > ) ,
@@ -157,8 +157,7 @@ pub enum LinkAttribute {
157
157
impl Nla for LinkAttribute {
158
158
fn value_len ( & self ) -> usize {
159
159
match self {
160
- Self :: Weight ( bytes)
161
- | Self :: VfInfoList ( bytes)
160
+ Self :: VfInfoList ( bytes)
162
161
| Self :: VfPorts ( bytes)
163
162
| Self :: PortSelf ( bytes)
164
163
| Self :: PhysPortId ( bytes)
@@ -219,8 +218,7 @@ impl Nla for LinkAttribute {
219
218
220
219
fn emit_value ( & self , buffer : & mut [ u8 ] ) {
221
220
match self {
222
- Self :: Weight ( bytes)
223
- | Self :: VfInfoList ( bytes)
221
+ Self :: VfInfoList ( bytes)
224
222
| Self :: VfPorts ( bytes)
225
223
| Self :: PortSelf ( bytes)
226
224
| Self :: PhysPortId ( bytes)
@@ -289,7 +287,6 @@ impl Nla for LinkAttribute {
289
287
290
288
fn kind ( & self ) -> u16 {
291
289
match self {
292
- Self :: Weight ( _) => IFLA_WEIGHT ,
293
290
Self :: VfInfoList ( _) => IFLA_VFINFO_LIST ,
294
291
Self :: VfPorts ( _) => IFLA_VF_PORTS ,
295
292
Self :: PortSelf ( _) => IFLA_PORT_SELF ,
@@ -357,7 +354,6 @@ impl<'a, T: AsRef<[u8]> + ?Sized>
357
354
) -> Result < Self , DecodeError > {
358
355
let payload = buf. value ( ) ;
359
356
Ok ( match buf. kind ( ) {
360
- IFLA_WEIGHT => Self :: Weight ( payload. to_vec ( ) ) ,
361
357
IFLA_VFINFO_LIST => Self :: VfInfoList ( payload. to_vec ( ) ) ,
362
358
IFLA_VF_PORTS => Self :: VfPorts ( payload. to_vec ( ) ) ,
363
359
IFLA_PORT_SELF => Self :: PortSelf ( payload. to_vec ( ) ) ,
0 commit comments