History

net: datagram: introduce datagram_poll_queue for custom receive queues

Some protocols using TCP encapsulation (e.g., espintcp, openvpn) deliver userspace-bound packets through a custom skb queue rather than the standard sk_receive_queue. Introduce datagram_poll_queue that accepts an explicit receive queue, and convert datagram_poll into a wrapper around datagram_poll_queue. This allows protocols with custom skb queues to reuse the core polling logic without relying on sk_receive_queue.

Ralf Lici committed 1 year ago

Commit f6ceec61 parent 10843e12 files · +37 −10Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/skbuff.h+3−0
@@ -4204,6 +4204,9 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, · 4203 unmodified lines
4204 struct sk_buff_head *sk_queue,4204 struct sk_buff_head *sk_queue,
4205 unsigned int flags, int *off, int *err);4205 unsigned int flags, int *off, int *err);
4206struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned int flags, int *err);4206struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned int flags, int *err);
4207__poll_t datagram_poll_queue(struct file *file, struct socket *sock,
4208 struct poll_table_struct *wait,
4209 struct sk_buff_head *rcv_queue);
4207__poll_t datagram_poll(struct file *file, struct socket *sock,4210__poll_t datagram_poll(struct file *file, struct socket *sock,
4208 struct poll_table_struct *wait);4211 struct poll_table_struct *wait);
4209int skb_copy_datagram_iter(const struct sk_buff *from, int offset,4212int skb_copy_datagram_iter(const struct sk_buff *from, int offset,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t