Re: [RFC PATCH net-next v6 01/15] queue_api: define queue api

2024-03-10 Thread David Ahern
On 3/8/24 4:47 PM, David Wei wrote: > > I'm working to port bnxt over to using this API. What are your thoughts > on maybe pulling this out and use bnxt to drive it? > I would love to see a second nic implementation; this patch set and overall design is driven by GVE limitations.

Re: [net-next v1 08/16] memory-provider: dmabuf devmem memory provider

2023-12-12 Thread David Ahern
On 12/12/23 6:09 PM, Mina Almasry wrote: > OK, I imagine this is not that hard to implement - it's really whether > the change is acceptable to reviewers. > > I figure I can start by implementing a no-op abstraction to page*: > > typedef struct page netmem_t > > and replace the page* in the

Re: [net-next v1 06/16] netdev: support binding dma-buf to netdevice

2023-12-09 Thread David Ahern
On 12/8/23 12:22 PM, Mina Almasry wrote: > On Fri, Dec 8, 2023 at 9:48 AM David Ahern wrote: >> >> On 12/7/23 5:52 PM, Mina Almasry wrote: > ... >>> + >>> + xa_for_each(>bound_rxq_list, xa_idx, rxq) { >>> + if (rxq->binding

Re: [net-next v1 00/16] Device Memory TCP

2023-12-08 Thread David Ahern
On 12/7/23 5:52 PM, Mina Almasry wrote: > Major changes in v1: > -- > > 1. Implemented MVP queue API ndos to remove the userspace-visible >driver reset. > > 2. Fixed issues in the napi_pp_put_page() devmem frag unref path. > > 3. Removed RFC tag. > > Many smaller addressed

Re: [net-next v1 07/16] netdev: netdevice devmem allocator

2023-12-08 Thread David Ahern
On 12/7/23 5:52 PM, Mina Almasry wrote: > diff --git a/net/core/dev.c b/net/core/dev.c > index b8c8be5a912e..30667e4c3b95 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -2120,6 +2120,41 @@ static int netdev_restart_rx_queue(struct net_device > *dev, int rxq_idx) > return err; >

Re: [net-next v1 13/16] tcp: RX path for devmem TCP

2023-12-08 Thread David Ahern
On 12/7/23 5:52 PM, 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

Re: [net-next v1 06/16] netdev: support binding dma-buf to netdevice

2023-12-08 Thread David Ahern
On 12/7/23 5:52 PM, Mina Almasry wrote: > + > +static int netdev_restart_rx_queue(struct net_device *dev, int rxq_idx) > +{ > + void *new_mem; > + void *old_mem; > + int err; > + > + if (!dev || !dev->netdev_ops) > + return -EINVAL; > + > + if

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-11 Thread David Ahern
On 11/10/23 7:26 AM, Pavel Begunkov wrote: > On 11/7/23 23:03, Mina Almasry wrote: >> On Tue, Nov 7, 2023 at 2:55 PM David Ahern wrote: >>> >>> On 11/7/23 3:10 PM, Mina Almasry wrote: >>>> On Mon, Nov 6, 2023 at 3:44 PM David Ahern wrote: >>>

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

2023-11-07 Thread David Ahern
On 11/7/23 5:02 PM, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 1:02 PM Stanislav Fomichev wrote: >> >> On 11/05, Mina Almasry wrote: >>> +static inline bool page_is_page_pool_iov(const struct page *page) >>> +{ >>> + return (unsigned long)page & PP_DEVMEM; >>> +} >> >> Speaking of bpf: one

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

2023-11-07 Thread David Ahern
On 11/7/23 4:55 PM, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 4:03 PM Willem de Bruijn > wrote: >> >> On Mon, Nov 6, 2023 at 3:55 PM David Ahern wrote: >>> >>> On 11/6/23 4:32 PM, Stanislav Fomichev wrote: >>>>> The concise notification

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-07 Thread David Ahern
On 11/7/23 3:10 PM, Mina Almasry wrote: > On Mon, Nov 6, 2023 at 3:44 PM David Ahern wrote: >> >> On 11/5/23 7:44 PM, Mina Almasry wrote: >>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h >>> index eeeda849115c..1c351c138a5b 100644 &g

Re: [RFC PATCH v3 00/12] Device Memory TCP

2023-11-07 Thread David Ahern
Is there a policy about cc'ing moderated lists on patch sets? I thought there was, but not finding anything under Documentation/. Getting a 'needs moderator approval response' on every message is rather annoying.

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

2023-11-06 Thread David Ahern
On 11/6/23 5:20 PM, Mina Almasry wrote: > The user is free to modify or delete flow steering rules outside of the > lifetime of the socket. Technically it's possible for the user to > reconfigure flow steering while the socket is simultaneously receiving, > and the result will be packets switching

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

2023-11-06 Thread David Ahern
On 11/5/23 7:44 PM, Mina Almasry wrote: > diff --git a/net/core/datagram.c b/net/core/datagram.c > index 176eb5834746..cdd4fb129968 100644 > --- a/net/core/datagram.c > +++ b/net/core/datagram.c > @@ -425,6 +425,9 @@ static int __skb_datagram_iter(const struct sk_buff *skb, > int offset, >

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

2023-11-06 Thread David Ahern
On 11/6/23 4:32 PM, Stanislav Fomichev wrote: >> The concise notification API returns tokens as a range for >> compression, encoding as two 32-bit unsigned integers start + length. >> It allows for even further batching by returning multiple such ranges >> in a single call. > > Tangential: should

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

2023-11-06 Thread David Ahern
On 11/5/23 7:44 PM, Mina Almasry wrote: > diff --git a/include/net/page_pool/helpers.h b/include/net/page_pool/helpers.h > index 78cbb040af94..b93243c2a640 100644 > --- a/include/net/page_pool/helpers.h > +++ b/include/net/page_pool/helpers.h > @@ -111,6 +112,45 @@ page_pool_iov_binding(const

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-06 Thread David Ahern
On 11/5/23 7:44 PM, Mina Almasry wrote: > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index eeeda849115c..1c351c138a5b 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -843,6 +843,9 @@ struct netdev_dmabuf_binding { > }; > > #ifdef

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

2023-11-06 Thread David Ahern
On 11/6/23 3:18 PM, Mina Almasry wrote: >> @@ -991,7 +993,7 @@ struct sk_buff { >> #if IS_ENABLED(CONFIG_IP_SCTP) >> __u8csum_not_inet:1; >> #endif >> - >> +__u8devmem:1; >> #if defined(CONFIG_NET_SCHED) ||

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

2023-11-06 Thread David Ahern
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 >> 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

Re: [PATCH v2 10/15] vrf: Remove the now superfluous sentinel element from ctl_table array

2023-10-02 Thread David Ahern
n time > memory bloat by ~64 bytes per sentinel (further information Link : > https://lore.kernel.org/all/zo5yx5jfoggi%2f...@bombadil.infradead.org/) > > Remove sentinel from vrf_table > > Signed-off-by: Joel Granados > --- > drivers/net/vrf.c | 1 - > 1 file changed, 1 deletion(-) > Reviewed-by: David Ahern

Re: [RFC PATCH v2 00/11] Device Memory TCP

2023-08-23 Thread David Ahern
On 8/23/23 3:52 PM, David Wei wrote: > I'm also preparing a submission for NetDev conf. I wonder if you and others at > Google plan to present there as well? If so, then we may want to coordinate > our > submissions and talks (if accepted). personally, I see them as related but separate topics.

Re: [RFC PATCH v2 06/11] page-pool: add device memory support

2023-08-19 Thread David Ahern
On 8/19/23 9:22 AM, Jesper Dangaard Brouer wrote: > > I do see the problem of depending on having a struct page, as the > page_pool_iov isn't related to struct page.  Having "page" in the name > of "page_pool_iov" is also confusing (hardest problem is CS is naming, > as we all know). > > To

Re: [RFC PATCH v2 00/11] Device Memory TCP

2023-08-13 Thread David Ahern
On 8/9/23 7:57 PM, Mina Almasry wrote: > Changes in RFC v2: > -- > > The sticking point in RFC v1[1] was the dma-buf pages approach we used to > deliver the device memory to the TCP stack. RFC v2 is a proof-of-concept > that attempts to resolve this by implementing scatterlist

Re: [RFC PATCH v2 02/11] netdev: implement netlink api to bind dma-buf to netdevice

2023-08-13 Thread David Ahern
On 8/9/23 7:57 PM, Mina Almasry wrote: > diff --git a/net/core/dev.c b/net/core/dev.c > index 8e7d0cb540cd..02a25ccf771a 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -151,6 +151,8 @@ > #include > #include > #include > +#include > +#include > > #include "dev.h" > #include

Re: [RFC PATCH 00/10] Device Memory TCP

2023-07-18 Thread David Ahern
On 7/18/23 12:29 PM, Jakub Kicinski wrote: > On Tue, 18 Jul 2023 12:20:59 -0600 David Ahern wrote: >> On 7/18/23 12:15 PM, Jakub Kicinski wrote: >>> On Tue, 18 Jul 2023 15:06:29 -0300 Jason Gunthorpe wrote: >>>> netlink feels like a weird API choice fo

Re: [RFC PATCH 00/10] Device Memory TCP

2023-07-18 Thread David Ahern
On 7/18/23 12:15 PM, Jakub Kicinski wrote: > On Tue, 18 Jul 2023 15:06:29 -0300 Jason Gunthorpe wrote: >> netlink feels like a weird API choice for that, in particular it would >> be really wrong to somehow bind the lifecycle of a netlink object to a >> process. > > Netlink is the right API, life