Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-07 Thread Stanislav Fomichev
On 11/07, Eric Dumazet wrote: > On Tue, Nov 7, 2023 at 10:05 PM Stanislav Fomichev wrote: > > > > > I don't understand. We require an elaborate setup to receive devmem cmsgs, > > why would some random application receive those? > > > A TCP socket can rece

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-07 Thread Stanislav Fomichev
On 11/07, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 5:06 PM Stanislav Fomichev wrote: > [..] > > > > > And the socket has to know this association; otherwise those tokens > > > > > are useless since they don't carry anything to identify the dmabuf. > &

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-07 Thread Stanislav Fomichev
On 11/07, Willem de Bruijn wrote: > On Tue, Nov 7, 2023 at 12:44 PM Stanislav Fomichev wrote: > > > > On 11/06, Willem de Bruijn wrote: > > > > > > > I think my other issue with MSG_SOCK_DEVMEM being on recvmsg is > > > > > > > th

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-07 Thread Stanislav Fomichev
On 11/06, Willem de Bruijn wrote: > > > > > I think my other issue with MSG_SOCK_DEVMEM being on recvmsg is that > > > > > it somehow implies that I have an option of passing or not passing it > > > > > for an individual system call. > > > > > If we know that we're going to use dmabuf with the

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/06, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 4:08 PM Willem de Bruijn > wrote: > > > > On Mon, Nov 6, 2023 at 3:55 PM Stanislav Fomichev wrote: > > > > > > On Mon, Nov 6, 2023 at 3:27 PM Mina Almasry > > > wrote: > > > >

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/06, Stanislav Fomichev wrote: > On 11/06, Willem de Bruijn wrote: > > On Mon, Nov 6, 2023 at 3:55 PM Stanislav Fomichev wrote: > > > > > > On Mon, Nov 6, 2023 at 3:27 PM Mina Almasry > > > wrote: > > > > > > > > On Mo

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/06, Willem de Bruijn wrote: > On Mon, Nov 6, 2023 at 3:55 PM Stanislav Fomichev wrote: > > > > On Mon, Nov 6, 2023 at 3:27 PM Mina Almasry wrote: > > > > > > On Mon, Nov 6, 2023 at 2:59 PM Stanislav Fomichev wrote: > > > > > > > &

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On Mon, Nov 6, 2023 at 3:27 PM Mina Almasry wrote: > > On Mon, Nov 6, 2023 at 2:59 PM Stanislav Fomichev wrote: > > > > On 11/06, Mina Almasry wrote: > > > On Mon, Nov 6, 2023 at 1:59 PM Stanislav Fomichev wrote: > > > > > > > > On 11/06, Mina

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-06 Thread Stanislav Fomichev
On Mon, Nov 6, 2023 at 2:56 PM Willem de Bruijn wrote: > > On Mon, Nov 6, 2023 at 2:34 PM Stanislav Fomichev wrote: > > > > On 11/06, Willem de Bruijn wrote: > > > > > IMHO, we need a better UAPI to receive the tokens and give them back > > > >

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/06, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 1:59 PM Stanislav Fomichev wrote: > > > > On 11/06, Mina Almasry wrote: > > > On Mon, Nov 6, 2023 at 11:34 AM David Ahern wrote: > > > > > > > > On 11/6/23 11:47 AM, Stanislav Fomich

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-06 Thread Stanislav Fomichev
On 11/06, Willem de Bruijn wrote: > > > IMHO, we need a better UAPI to receive the tokens and give them back to > > > the kernel. CMSG + setsockopt(SO_DEVMEM_DONTNEED) get the job done, > > > but look dated and hacky :-( > > > > > > We should either do some kind of user/kernel shared memory queue

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/06, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 11:34 AM David Ahern wrote: > > > > On 11/6/23 11:47 AM, Stanislav Fomichev wrote: > > > On 11/05, Mina Almasry wrote: > > >> For device memory TCP, we expect the skb headers to be available in host >

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-06 Thread Stanislav Fomichev
On 11/06, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 10:44 AM Stanislav Fomichev wrote: > > > > On 11/05, 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 provid

Re: [RFC PATCH v3 06/12] memory-provider: dmabuf devmem memory provider

2023-11-06 Thread Stanislav Fomichev
On 11/05, Mina Almasry wrote: > Implement a memory provider that allocates dmabuf devmem page_pool_iovs. > > Support of PP_FLAG_DMA_MAP and PP_FLAG_DMA_SYNC_DEV is omitted for > simplicity. > > The provider receives a reference to the struct netdev_dmabuf_binding > via the pool->mp_priv pointer.

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/05, Mina Almasry wrote: > For device memory TCP, we expect the skb headers to be available in host > memory for access, and we expect the skb frags to be in device memory > and unaccessible to the host. We expect there to be no mixing and > matching of device memory frags (unaccessible) with

Re: [RFC PATCH v3 09/12] net: add support for skbs with unreadable frags

2023-11-06 Thread Stanislav Fomichev
On 11/05, Mina Almasry wrote: > For device memory TCP, we expect the skb headers to be available in host > memory for access, and we expect the skb frags to be in device memory > and unaccessible to the host. We expect there to be no mixing and > matching of device memory frags (unaccessible) with

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-06 Thread Stanislav Fomichev
On 11/05, 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] drm_crtc: add kmalloc NULL handling

2011-02-07 Thread Stanislav Fomichev
try to add error handling to the callers of this functions. Compile tested only. Signed-off-by: Stanislav Fomichev ker...@fomichev.me --- drivers/gpu/drm/drm_crtc.c | 158 --- 1 files changed, 147 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm

[PATCH] drm_crtc: add kmalloc NULL handling

2011-02-06 Thread Stanislav Fomichev
try to add error handling to the callers of this functions. Compile tested only. Signed-off-by: Stanislav Fomichev --- drivers/gpu/drm/drm_crtc.c | 158 --- 1 files changed, 147 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b