Re: [PATCH net-next v10 11/14] tcp: RX path for devmem TCP

2024-06-04 Thread Paolo Abeni
On Thu, 2024-05-30 at 20:16 +, Mina Almasry wrote: > @@ -2317,6 +2318,213 @@ static int tcp_inq_hint(struct sock *sk) > return inq; > } > > +/* batch __xa_alloc() calls and reduce xa_lock()/xa_unlock() overhead. */ > +struct tcp_xa_pool { > + u8 max; /* max <= MAX_SKB_

[PATCH net-next v10 11/14] tcp: RX path for devmem TCP

2024-05-30 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