Skip to content

Commit

Permalink
[API break] link: Remove LinkAttribute::Pad
Browse files Browse the repository at this point in the history
Unless we see it been used in real netlink packet for padding, let's remove it
first.

Signed-off-by: Gris Ge <[email protected]>
  • Loading branch information
cathay4t committed Dec 3, 2023
1 parent 14a4bb7 commit 70c2eee
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/link/attribute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const IFLA_PHYS_PORT_NAME: u16 = 38;
const IFLA_PROTO_DOWN: u16 = 39;
const IFLA_GSO_MAX_SEGS: u16 = 40;
const IFLA_GSO_MAX_SIZE: u16 = 41;
const IFLA_PAD: u16 = 42;
// const IFLA_PAD: u16 = 42;
const IFLA_XDP: u16 = 43;
const IFLA_EVENT: u16 = 44;
const IFLA_NEW_NETNSID: u16 = 45;
Expand Down Expand Up @@ -97,7 +97,6 @@ pub enum LinkAttribute {
PortSelf(Vec<u8>),
PhysPortId(Vec<u8>),
PhysSwitchId(Vec<u8>),
Pad(Vec<u8>),
Xdp(Vec<Xdp>),
Event(Vec<u8>),
NewNetnsId(Vec<u8>),
Expand Down Expand Up @@ -162,7 +161,6 @@ impl Nla for LinkAttribute {
| Self::PortSelf(bytes)
| Self::PhysPortId(bytes)
| Self::PhysSwitchId(bytes)
| Self::Pad(bytes)
| Self::Event(bytes)
| Self::NewNetnsId(bytes)
| Self::IfNetnsId(bytes)
Expand Down Expand Up @@ -225,7 +223,6 @@ impl Nla for LinkAttribute {
| Self::PhysSwitchId(bytes)
| Self::Wireless(bytes)
| Self::ProtoInfo(bytes)
| Self::Pad(bytes)
| Self::Event(bytes)
| Self::NewNetnsId(bytes)
| Self::IfNetnsId(bytes)
Expand Down Expand Up @@ -295,7 +292,6 @@ impl Nla for LinkAttribute {
Self::LinkInfo(_) => IFLA_LINKINFO,
Self::Wireless(_) => IFLA_WIRELESS,
Self::ProtoInfo(_) => IFLA_PROTINFO,
Self::Pad(_) => IFLA_PAD,
Self::Xdp(_) => IFLA_XDP,
Self::Event(_) => IFLA_EVENT,
Self::NewNetnsId(_) => IFLA_NEW_NETNSID,
Expand Down Expand Up @@ -361,7 +357,6 @@ impl<'a, T: AsRef<[u8]> + ?Sized>
IFLA_PHYS_SWITCH_ID => Self::PhysSwitchId(payload.to_vec()),
IFLA_WIRELESS => Self::Wireless(payload.to_vec()),
IFLA_PROTINFO => Self::ProtoInfo(payload.to_vec()),
IFLA_PAD => Self::Pad(payload.to_vec()),
IFLA_EVENT => Self::Event(payload.to_vec()),
IFLA_NEW_NETNSID => Self::NewNetnsId(payload.to_vec()),
IFLA_IF_NETNSID => Self::IfNetnsId(payload.to_vec()),
Expand Down

0 comments on commit 70c2eee

Please sign in to comment.