@@ -24,6 +24,7 @@ use super::{
2424 af_spec:: VecAfSpecUnspec ,
2525 buffer_tool:: expand_buffer_if_small,
2626 devlink_port:: DevlinkPort ,
27+ dpll_pin:: DpllPin ,
2728 ext_mask:: VecLinkExtentMask ,
2829 link_info:: VecLinkInfo ,
2930 proto_info:: VecLinkProtoInfoInet6 ,
@@ -104,7 +105,7 @@ const IFLA_ALLMULTI: u16 = 61;
104105const IFLA_DEVLINK_PORT : u16 = 62 ;
105106const IFLA_GSO_IPV4_MAX_SIZE : u16 = 63 ;
106107const IFLA_GRO_IPV4_MAX_SIZE : u16 = 64 ;
107- // const IFLA_DPLL_PIN: u16 = 65;
108+ const IFLA_DPLL_PIN : u16 = 65 ;
108109// const IFLA_MAX_PACING_OFFLOAD_HORIZON: u16 = 66;
109110const IFLA_NETNS_IMMUTABLE : u16 = 67 ;
110111// const IFLA_HEADROOM: u16 = 68;
@@ -183,6 +184,7 @@ pub enum LinkAttribute {
183184 GroIpv4MaxSize ( u32 ) ,
184185 NetnsImmutable ( bool ) ,
185186 DevlinkPort ( Vec < DevlinkPort > ) ,
187+ DpllPin ( Vec < DpllPin > ) ,
186188 Other ( DefaultNla ) ,
187189}
188190
@@ -256,6 +258,7 @@ impl Nla for LinkAttribute {
256258 Self :: AfSpecUnspec ( nlas) => nlas. as_slice ( ) . buffer_len ( ) ,
257259 Self :: AfSpecBridge ( nlas) => nlas. as_slice ( ) . buffer_len ( ) ,
258260 Self :: DevlinkPort ( nlas) => nlas. as_slice ( ) . buffer_len ( ) ,
261+ Self :: DpllPin ( nlas) => nlas. as_slice ( ) . buffer_len ( ) ,
259262 Self :: ProtoInfoUnknown ( attr) => attr. value_len ( ) ,
260263 Self :: Wireless ( v) => v. buffer_len ( ) ,
261264 Self :: Other ( attr) => attr. value_len ( ) ,
@@ -339,6 +342,7 @@ impl Nla for LinkAttribute {
339342 Self :: AfSpecUnspec ( nlas) => nlas. as_slice ( ) . emit ( buffer) ,
340343 Self :: AfSpecBridge ( nlas) => nlas. as_slice ( ) . emit ( buffer) ,
341344 Self :: DevlinkPort ( nlas) => nlas. as_slice ( ) . emit ( buffer) ,
345+ Self :: DpllPin ( nlas) => nlas. as_slice ( ) . emit ( buffer) ,
342346 Self :: Wireless ( v) => v. emit ( buffer) ,
343347 Self :: ProtoInfoUnknown ( attr) | Self :: Other ( attr) => {
344348 attr. emit_value ( buffer)
@@ -411,6 +415,7 @@ impl Nla for LinkAttribute {
411415 Self :: GroIpv4MaxSize ( _) => IFLA_GRO_IPV4_MAX_SIZE ,
412416 Self :: NetnsImmutable ( _) => IFLA_NETNS_IMMUTABLE ,
413417 Self :: DevlinkPort ( _) => IFLA_DEVLINK_PORT | NLA_F_NESTED ,
418+ Self :: DpllPin ( _) => IFLA_DPLL_PIN | NLA_F_NESTED ,
414419 Self :: Other ( attr) => attr. kind ( ) ,
415420 }
416421 }
@@ -781,6 +786,16 @@ impl<'a, T: AsRef<[u8]> + ?Sized>
781786 }
782787 Self :: DevlinkPort ( nlas)
783788 }
789+ IFLA_DPLL_PIN => {
790+ let err = "invalid IFLA_DPLL_PIN value" ;
791+ let mut nlas = vec ! [ ] ;
792+ for nla in NlasIterator :: new ( payload) {
793+ let nla = & nla. context ( err) ?;
794+ let parsed = DpllPin :: parse ( nla) . context ( err) ?;
795+ nlas. push ( parsed) ;
796+ }
797+ Self :: DpllPin ( nlas)
798+ }
784799 kind => Self :: Other (
785800 DefaultNla :: parse ( buf)
786801 . context ( format ! ( "unknown NLA type {kind}" ) ) ?,
0 commit comments