Thread (11 messages) 11 messages, 4 authors, 2024-11-05
STALE610d

[PATCH net-next v2 0/2] support SO_PRIORITY cmsg

From: Anna Emese Nyiri <hidden>
Date: 2024-11-02 12:51:57

The changes introduce a new helper function,
`sk_set_prio_allowed`, which centralizes the logic for validating
priority settings. This series adds support for the `SO_PRIORITY`
control message, allowing user-space applications to set socket
priority via control messages (cmsg).

Patch Overview:
Patch 1/2: Introduces `sk_set_prio_allowed` helper function.
Patch 2/2: Implements support for setting `SO_PRIORITY` via control
messages.

v2:
- Suggested by Willem de Bruijn [off-list ref]
  introduce "sk_set_prio_allowed" helper to check priority setting
  capability
- drop new fields and change sockcm_cookie::priority from "char" to
  "u32" to match with sk_buff::priority
- cork->tos value check before priority setting
  moved from __ip_make_skb() to ip_setup_cork()
- rebased on net-next

v1:
https://lore.kernel.org/all/20241029144142.31382-1-annaemesenyiri@gmail.com/ (local)

Anna Emese Nyiri (2):
  Introduce sk_set_prio_allowed helper function
  support SO_PRIORITY cmsg

 include/net/inet_sock.h |  2 +-
 include/net/ip.h        |  3 ++-
 include/net/sock.h      |  4 +++-
 net/can/raw.c           |  2 +-
 net/core/sock.c         | 19 ++++++++++++++++---
 net/ipv4/ip_output.c    |  7 +++++--
 net/ipv4/raw.c          |  2 +-
 net/ipv6/ip6_output.c   |  3 ++-
 net/ipv6/raw.c          |  2 +-
 net/packet/af_packet.c  |  2 +-
 10 files changed, 33 insertions(+), 13 deletions(-)

-- 
2.43.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help