Skip to content

Conversation

saldru
Copy link
Contributor

@saldru saldru commented Aug 20, 2025

Description

This PR adds missing SOL_PACKET socket options constants (optname) for AF_PACKET sockets, as defined in <linux/if_packet.h>.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

Authority: include/uapi/linux/if_packet.h

Adds:
+ PACKET_COPY_THRESH                    (1da177e4c3f4)
+ PACKET_FANOUT_DATA                    (47dceb8ecdc1)
+ PACKET_FANOUT_FLAG_IGNORE_OUTGOING    (58ba426388d9)
+ PACKET_HDRLEN                         (bbd6ef87c544)
+ PACKET_ORIGDEV                        (80feaacb8a64)
+ PACKET_RECV_OUTPUT                    (1da177e4c3f4)
+ PACKET_ROLLOVER_STATS                 (a9b6391814d5)
+ PACKET_TX_HAS_OFF                     (5920cd3a41f1)
+ PACKET_TX_TIMESTAMP                   (ed85b565b825)
+ PACKET_VNET_HDR                       (bfd5f4a3d605)
+ PACKET_VNET_HDR_SZ                    (dfc39d4026fb)

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47dceb8ecdc1c3ad1818dfea3d659a05b74c3fc2
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=58ba426388d9fe56aa638f555b01d6e63cada88c
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbd6ef87c544d88c30e4b762b1b61ef267a7d279
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80feaacb8a6400a9540a961b6743c69a5896b937
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a9b6391814d5d6b8668fca2dace86949b7244e2e
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5920cd3a41f1aefc30e9ce86384fc2fe9f5fe0c0
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed85b565b825566da34e55eee9ad150ed93fdda0
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bfd5f4a3d605e0f6054df0b59fe0907ff7e696d3
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfc39d4026fb2432363c0f77543c4cf3adca4c7b

Signed-off-by: Alexandre Girard <github@salnet.wf>
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tgross35 tgross35 added this pull request to the merge queue Sep 1, 2025
Merged via the queue into rust-lang:main with commit 584b91e Sep 1, 2025
48 of 52 checks passed
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Sep 19, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 22, 2025
Authority: include/uapi/linux/if_packet.h

Adds:
+ PACKET_COPY_THRESH                    (1da177e4c3f4)
+ PACKET_FANOUT_DATA                    (47dceb8ecdc1)
+ PACKET_FANOUT_FLAG_IGNORE_OUTGOING    (58ba426388d9)
+ PACKET_HDRLEN                         (bbd6ef87c544)
+ PACKET_ORIGDEV                        (80feaacb8a64)
+ PACKET_RECV_OUTPUT                    (1da177e4c3f4)
+ PACKET_ROLLOVER_STATS                 (a9b6391814d5)
+ PACKET_TX_HAS_OFF                     (5920cd3a41f1)
+ PACKET_TX_TIMESTAMP                   (ed85b565b825)
+ PACKET_VNET_HDR                       (bfd5f4a3d605)
+ PACKET_VNET_HDR_SZ                    (dfc39d4026fb)

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47dceb8ecdc1c3ad1818dfea3d659a05b74c3fc2
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=58ba426388d9fe56aa638f555b01d6e63cada88c
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbd6ef87c544d88c30e4b762b1b61ef267a7d279
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80feaacb8a6400a9540a961b6743c69a5896b937
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a9b6391814d5d6b8668fca2dace86949b7244e2e
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5920cd3a41f1aefc30e9ce86384fc2fe9f5fe0c0
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed85b565b825566da34e55eee9ad150ed93fdda0
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bfd5f4a3d605e0f6054df0b59fe0907ff7e696d3
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfc39d4026fb2432363c0f77543c4cf3adca4c7b

Signed-off-by: Alexandre Girard <github@salnet.wf>

(backport <rust-lang#4669>)
(cherry picked from commit 584b91e)
Signed-off-by: Trevor Gross <tmgross@umich.edu>
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 22, 2025
Authority: include/uapi/linux/if_packet.h

Adds:
+ PACKET_COPY_THRESH                    (1da177e4c3f4)
+ PACKET_FANOUT_DATA                    (47dceb8ecdc1)
+ PACKET_FANOUT_FLAG_IGNORE_OUTGOING    (58ba426388d9)
+ PACKET_HDRLEN                         (bbd6ef87c544)
+ PACKET_ORIGDEV                        (80feaacb8a64)
+ PACKET_RECV_OUTPUT                    (1da177e4c3f4)
+ PACKET_ROLLOVER_STATS                 (a9b6391814d5)
+ PACKET_TX_HAS_OFF                     (5920cd3a41f1)
+ PACKET_TX_TIMESTAMP                   (ed85b565b825)
+ PACKET_VNET_HDR                       (bfd5f4a3d605)
+ PACKET_VNET_HDR_SZ                    (dfc39d4026fb)

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47dceb8ecdc1c3ad1818dfea3d659a05b74c3fc2
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=58ba426388d9fe56aa638f555b01d6e63cada88c
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbd6ef87c544d88c30e4b762b1b61ef267a7d279
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80feaacb8a6400a9540a961b6743c69a5896b937
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a9b6391814d5d6b8668fca2dace86949b7244e2e
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5920cd3a41f1aefc30e9ce86384fc2fe9f5fe0c0
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed85b565b825566da34e55eee9ad150ed93fdda0
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bfd5f4a3d605e0f6054df0b59fe0907ff7e696d3
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfc39d4026fb2432363c0f77543c4cf3adca4c7b

Signed-off-by: Alexandre Girard <github@salnet.wf>

(backport <rust-lang#4669>)
(cherry picked from commit 584b91e)
Signed-off-by: Trevor Gross <tmgross@umich.edu>
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Sep 22, 2025
Authority: include/uapi/linux/if_packet.h

Adds:
+ PACKET_COPY_THRESH                    (1da177e4c3f4)
+ PACKET_FANOUT_DATA                    (47dceb8ecdc1)
+ PACKET_FANOUT_FLAG_IGNORE_OUTGOING    (58ba426388d9)
+ PACKET_HDRLEN                         (bbd6ef87c544)
+ PACKET_ORIGDEV                        (80feaacb8a64)
+ PACKET_RECV_OUTPUT                    (1da177e4c3f4)
+ PACKET_ROLLOVER_STATS                 (a9b6391814d5)
+ PACKET_TX_HAS_OFF                     (5920cd3a41f1)
+ PACKET_TX_TIMESTAMP                   (ed85b565b825)
+ PACKET_VNET_HDR                       (bfd5f4a3d605)
+ PACKET_VNET_HDR_SZ                    (dfc39d4026fb)

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47dceb8ecdc1c3ad1818dfea3d659a05b74c3fc2
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=58ba426388d9fe56aa638f555b01d6e63cada88c
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbd6ef87c544d88c30e4b762b1b61ef267a7d279
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80feaacb8a6400a9540a961b6743c69a5896b937
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a9b6391814d5d6b8668fca2dace86949b7244e2e
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5920cd3a41f1aefc30e9ce86384fc2fe9f5fe0c0
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed85b565b825566da34e55eee9ad150ed93fdda0
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bfd5f4a3d605e0f6054df0b59fe0907ff7e696d3
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfc39d4026fb2432363c0f77543c4cf3adca4c7b

Signed-off-by: Alexandre Girard <github@salnet.wf>

(backport <rust-lang#4669>)
(cherry picked from commit 584b91e)
Signed-off-by: Trevor Gross <tmgross@umich.edu>
@tgross35 tgross35 mentioned this pull request Sep 22, 2025
github-merge-queue bot pushed a commit that referenced this pull request Sep 22, 2025
Authority: include/uapi/linux/if_packet.h

Adds:
+ PACKET_COPY_THRESH                    (1da177e4c3f4)
+ PACKET_FANOUT_DATA                    (47dceb8ecdc1)
+ PACKET_FANOUT_FLAG_IGNORE_OUTGOING    (58ba426388d9)
+ PACKET_HDRLEN                         (bbd6ef87c544)
+ PACKET_ORIGDEV                        (80feaacb8a64)
+ PACKET_RECV_OUTPUT                    (1da177e4c3f4)
+ PACKET_ROLLOVER_STATS                 (a9b6391814d5)
+ PACKET_TX_HAS_OFF                     (5920cd3a41f1)
+ PACKET_TX_TIMESTAMP                   (ed85b565b825)
+ PACKET_VNET_HDR                       (bfd5f4a3d605)
+ PACKET_VNET_HDR_SZ                    (dfc39d4026fb)

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=47dceb8ecdc1c3ad1818dfea3d659a05b74c3fc2
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=58ba426388d9fe56aa638f555b01d6e63cada88c
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bbd6ef87c544d88c30e4b762b1b61ef267a7d279
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80feaacb8a6400a9540a961b6743c69a5896b937
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a9b6391814d5d6b8668fca2dace86949b7244e2e
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5920cd3a41f1aefc30e9ce86384fc2fe9f5fe0c0
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ed85b565b825566da34e55eee9ad150ed93fdda0
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bfd5f4a3d605e0f6054df0b59fe0907ff7e696d3
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dfc39d4026fb2432363c0f77543c4cf3adca4c7b

Signed-off-by: Alexandre Girard <github@salnet.wf>

(backport <#4669>)
(cherry picked from commit 584b91e)
Signed-off-by: Trevor Gross <tmgross@umich.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-linux O-unix stable-nominated This PR should be considered for cherry-pick to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants