Re: [PATCH net-next v12 10/13] tcp: RX path for devmem TCP

2024-06-23 Thread Pavel Begunkov
On 6/21/24 21:31, Mina Almasry wrote: On Mon, Jun 17, 2024 at 9:36 AM Pavel Begunkov wrote: On 6/13/24 02:35, Mina Almasry wrote: The pages awaiting freeing are stored in the newly added sk->sk_user_frags, and each page passed to userspace is get_page()'d. This reference is dropped once the

Re: [PATCH net-next v12 10/13] tcp: RX path for devmem TCP

2024-06-21 Thread Mina Almasry
On Mon, Jun 17, 2024 at 9:36 AM Pavel Begunkov wrote: > > On 6/13/24 02:35, Mina Almasry wrote: > > > > The pages awaiting freeing are stored in the newly added > > sk->sk_user_frags, and each page passed to userspace is get_page()'d. > > This reference is dropped once the userspace indicates that

Re: [PATCH net-next v12 10/13] tcp: RX path for devmem TCP

2024-06-17 Thread Pavel Begunkov
On 6/13/24 02:35, Mina Almasry wrote: In tcp_recvmsg_locked(), detect if the skb being received by the user is a devmem skb. In this case - if the user provided the MSG_SOCK_DEVMEM flag - pass it to tcp_recvmsg_devmem() for custom handling. tcp_recvmsg_devmem() copies any data in the skb header

[PATCH net-next v12 10/13] tcp: RX path for devmem TCP

2024-06-12 Thread Mina Almasry
In tcp_recvmsg_locked(), detect if the skb being received by the user is a devmem skb. In this case - if the user provided the MSG_SOCK_DEVMEM flag - pass it to tcp_recvmsg_devmem() for custom handling. tcp_recvmsg_devmem() copies any data in the skb header to the linear buffer, and returns a cmsg