Skip to content

Commit 2a21a93

Browse files
committed
add deprecation info to _v1 structs
1 parent 9e358a7 commit 2a21a93

File tree

1 file changed

+19
-1
lines changed
  • src/unix/linux_like/linux

1 file changed

+19
-1
lines changed

src/unix/linux_like/linux/mod.rs

+19-1
Original file line numberDiff line numberDiff line change
@@ -1236,12 +1236,21 @@ s! {
12361236
pub cr: xdp_ring_offset,
12371237
}
12381238

1239+
#[deprecated(
1240+
since = "0.2.167",
1241+
note = "We consider removing this as the newer version of this struct will work with older kernel versions. If you're using it, please comment on https://github.com/rust-lang/libc/issues/4168"
1242+
)]
12391243
pub struct xdp_ring_offset_v1 {
12401244
pub producer: crate::__u64,
12411245
pub consumer: crate::__u64,
12421246
pub desc: crate::__u64,
12431247
}
12441248

1249+
#[allow(deprecated)]
1250+
#[deprecated(
1251+
since = "0.2.167",
1252+
note = "We consider removing this as the newer version of this struct will work with older kernel versions. If you're using it, please comment on https://github.com/rust-lang/libc/issues/4168"
1253+
)]
12451254
pub struct xdp_mmap_offsets_v1 {
12461255
pub rx: xdp_ring_offset_v1,
12471256
pub tx: xdp_ring_offset_v1,
@@ -1258,6 +1267,10 @@ s! {
12581267
pub tx_metadata_len: crate::__u32,
12591268
}
12601269

1270+
#[deprecated(
1271+
since = "0.2.167",
1272+
note = "We consider removing this as the newer version of this struct will work with older kernel versions. If you're using it, please comment on https://github.com/rust-lang/libc/issues/4168"
1273+
)]
12611274
pub struct xdp_umem_reg_v1 {
12621275
pub addr: crate::__u64,
12631276
pub len: crate::__u64,
@@ -1274,6 +1287,10 @@ s! {
12741287
pub tx_ring_empty_descs: crate::__u64,
12751288
}
12761289

1290+
#[deprecated(
1291+
since = "0.2.167",
1292+
note = "We consider removing this as the newer version of this struct will work with older kernel versions. If you're using it, please comment on https://github.com/rust-lang/libc/issues/4168"
1293+
)]
12771294
pub struct xdp_statistics_v1 {
12781295
pub rx_dropped: crate::__u64,
12791296
pub rx_invalid_descs: crate::__u64,
@@ -5745,7 +5762,8 @@ pub const XDP_UMEM_PGOFF_FILL_RING: crate::c_ulonglong = 0x100000000;
57455762
pub const XDP_UMEM_PGOFF_COMPLETION_RING: crate::c_ulonglong = 0x180000000;
57465763

57475764
pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: crate::c_int = 48;
5748-
pub const XSK_UNALIGNED_BUF_ADDR_MASK: crate::c_ulonglong = (1 << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1;
5765+
pub const XSK_UNALIGNED_BUF_ADDR_MASK: crate::c_ulonglong =
5766+
(1 << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1;
57495767

57505768
pub const XDP_PKT_CONTD: crate::__u32 = 1 << 0;
57515769

0 commit comments

Comments
 (0)