Re: [PATCH 54/64] ipv6: Use struct_group() to zero rt6_info

2021-07-29 Thread Jakub Kicinski
On Tue, 27 Jul 2021 13:58:45 -0700 Kees Cook wrote: > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memset(), avoid intentionally writing across > neighboring fields. > > Add struct_group() to mark region of struct rt6_info that should be > init

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-23 Thread Jakub Kicinski
On Mon, 23 Nov 2020 17:32:51 -0800 Nick Desaulniers wrote: > On Sun, Nov 22, 2020 at 8:17 AM Kees Cook wrote: > > On Fri, Nov 20, 2020 at 11:51:42AM -0800, Jakub Kicinski wrote: > > > If none of the 140 patches here fix a real bug, and there is no change > > > to mac

Re: [Intel-wired-lan] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-25 Thread Jakub Kicinski
On Wed, 25 Nov 2020 04:24:27 -0800 Nick Desaulniers wrote: > I even agree that most of the churn comes from > > case 0: > ++x; > default: > break; And just to spell it out, case ENUM_VALUE1: bla(); break; case ENUM_VALUE2: bla(); default: break; is a fairly i

Re: [PATCH v4 00/27]Fix several bad kernel-doc markups

2020-11-17 Thread Jakub Kicinski
On Mon, 16 Nov 2020 11:17:56 +0100 Mauro Carvalho Chehab wrote: > Kernel-doc has always be limited to a probably bad documented > rule: > > The kernel-doc markups should appear *imediatelly before* the > function or data structure that it documents. Applied 1-3 to net-next, thanks! __

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Jakub Kicinski
On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: > This series aims to fix almost all remaining fall-through warnings in > order to enable -Wimplicit-fallthrough for Clang. > > In preparation to enable -Wimplicit-fallthrough for Clang, explicitly > add multiple break/goto/return/fallt

Re: [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Jakub Kicinski
On Fri, 20 Nov 2020 11:30:40 -0800 Kees Cook wrote: > On Fri, Nov 20, 2020 at 10:53:44AM -0800, Jakub Kicinski wrote: > > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: > > > This series aims to fix almost all remaining fall-through warnings in > > >

Re: [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-02-28 Thread Jakub Kicinski
On Mon, 28 Feb 2022 16:41:04 -0800 Linus Torvalds wrote: > So yes, initially my idea had been to just move the iterator entirely > inside the macro. But specifying the type got so ugly that I think > that > > typeof (pos) pos > > trick inside the macro really ends up giving us the best of

Re: [PATCH] dt-bindings: Another pass removing cases of 'allOf' containing a '$ref'

2022-03-01 Thread Jakub Kicinski
ly). The correct > form was to put a '$ref' under an 'allOf'. This behavior is now changed > in the 2019-09 json-schema spec and '$ref' can be mixed with other > keywords. Acked-by: Jakub Kicinski

Re: [PATCH net-next 3/5] net: bcmasp: Add support for ASP2.0 Ethernet controller

2021-09-24 Thread Jakub Kicinski
On Fri, 24 Sep 2021 14:44:49 -0700 Justin Chen wrote: > Add support for the Broadcom ASP 2.0 Ethernet controller which is first > introduced with 72165. This controller features two distinct Ethernet > ports that can be independently operated. > > This patch supports: > > - Wake-on-LAN using magi

Re: [PATCH 2/2] MAINTAINERS: Mark VMware mailing list entries as private

2021-11-08 Thread Jakub Kicinski
On Mon, 08 Nov 2021 15:37:53 -0800 Joe Perches wrote: > > @@ -6134,8 +6134,8 @@ T:git git://anongit.freedesktop.org/drm/drm-misc > > F: drivers/gpu/drm/vboxvideo/ > > > > DRM DRIVER FOR VMWARE VIRTUAL GPU > > -M: "VMware Graphics" > > M: Zack Rusin > > +L: linux-graphics-maintai...@vmwar

Re: [PATCH v3 3/3] MAINTAINERS: Mark VMware mailing list entries as email aliases

2021-11-10 Thread Jakub Kicinski
On Wed, 10 Nov 2021 12:09:06 -0800 Srivatsa S. Bhat wrote: > DRM DRIVER FOR VMWARE VIRTUAL GPU > -M: "VMware Graphics" > M: Zack Rusin > +R: VMware Graphics Reviewers > L: dri-devel@lists.freedesktop.org > S: Supported > T: git git://anongit.freedesktop.org/drm/drm-misc It'd be

Re: [PATCH v3 3/3] MAINTAINERS: Mark VMware mailing list entries as email aliases

2021-11-12 Thread Jakub Kicinski
On Wed, 10 Nov 2021 21:19:53 -0800 Joe Perches wrote: > On Wed, 2021-11-10 at 17:39 -0800, Jakub Kicinski wrote: > > On Wed, 10 Nov 2021 12:09:06 -0800 Srivatsa S. Bhat wrote: > > > DRM DRIVER FOR VMWARE VIRTUAL GPU > > > -M: "VMware Graphics"

[PATCH bpf] treewide: add missing includes masked by cgroup -> bpf dependency

2021-11-19 Thread Jakub Kicinski
cgroup.h (therefore swap.h, therefore half of the universe) includes bpf.h which in turn includes module.h and slab.h. Since we're about to get rid of that dependency we need to clean things up. Signed-off-by: Jakub Kicinski --- CC: ax...@kernel.dk CC: maarten.lankho...@linux.intel.com CC:

Re: [PATCH bpf] treewide: add missing includes masked by cgroup -> bpf dependency

2021-11-20 Thread Jakub Kicinski
On Sat, 20 Nov 2021 15:30:11 +0800 Peter Chen wrote: > > diff --git a/drivers/usb/cdns3/host.c b/drivers/usb/cdns3/host.c > > index 84dadfa726aa..9643b905e2d8 100644 > > --- a/drivers/usb/cdns3/host.c > > +++ b/drivers/usb/cdns3/host.c > > @@ -10,6 +10,7 @@ > > */ > > > > #include > > +#inclu

[PATCH bpf v2] treewide: add missing includes masked by cgroup -> bpf dependency

2021-12-02 Thread Jakub Kicinski
d-by: Jani Nikula Signed-off-by: Jakub Kicinski --- CC: ax...@kernel.dk CC: maarten.lankho...@linux.intel.com CC: mrip...@kernel.org CC: tzimmerm...@suse.de CC: airl...@linux.ie CC: dan...@ffwll.ch CC: jani.nik...@linux.intel.com CC: joonas.lahti...@linux.intel.com CC: rodrigo.v...@intel.com CC: yuq...

Re: [PATCH 0/1] add support for enum module parameters

2022-04-22 Thread Jakub Kicinski
On Wed, 20 Apr 2022 08:13:47 +0300 Kalle Valo wrote: > Wireless drivers would also desperately need to pass device specific > parameters at (or before) probe time. And not only debug parameters but > also configuration parameters, for example firmware memory allocations > schemes (optimise for feat

Re: [linux-next:master] BUILD REGRESSION 1e1b28b936aed946122b4e0991e7144fdbbfd77e

2022-05-16 Thread Jakub Kicinski
On Sun, 15 May 2022 21:00:21 +0800 kernel test robot wrote: > tree/branch: > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > branch HEAD: 1e1b28b936aed946122b4e0991e7144fdbbfd77e Add linux-next > specific files for 20220513 > > Error/Warning reports: > > https://lo

Re: [PATCH 02/12] skbuff: Proactively round up to kmalloc bucket size

2022-09-22 Thread Jakub Kicinski
hw(data + size); I'd rename osize here to alloc_size for consistency but one could argue either way :) Acked-by: Jakub Kicinski

Re: [PATCH] dt-bindings: yamllint: Require a space after a comment '#'

2023-03-03 Thread Jakub Kicinski
'#'. A couple of cases with comments which were not intended to be > comments are revealed. Those were in ti,sa2ul.yaml, ti,cal.yaml, and > brcm,bcmgenet.yaml. > > Signed-off-by: Rob Herring Acked-by: Jakub Kicinski

Re: [PATCH v6 0/7] treewide cleanup of random integer usage

2022-10-11 Thread Jakub Kicinski
ay "non-uniform", because it doesn't do any rejection sampling or > divisions. Hence, it stays within the prandom_* namespace. Acked-by: Jakub Kicinski

Re: [PATCH 1/1] drm/shmem: Dual licence the files as GPL-2 and MIT

2022-11-14 Thread Jakub Kicinski
On Sat, 12 Nov 2022 19:42:10 + Robert Swindells wrote: > Contributors to these files are: > > Noralf Trønnes > Liu Zixian > Dave Airlie > Thomas Zimmermann > Lucas De Marchi > Gerd Hoffmann > Rob Herring > Jakub Kicinski > Marcel Ziswiler > Step

Re: [PATCH v2] net: ksz884x: Remove some unused functions

2022-12-13 Thread Jakub Kicinski
On Tue, 13 Dec 2022 11:57:07 +0800 Jiapeng Chong wrote: > These functions are defined in the ksz884x.c file, but not called > elsewhere, so delete these unused functions. > > drivers/net/ethernet/micrel/ksz884x.c:2212:20: warning: unused function > 'port_cfg_force_flow_ctrl'. > > Link: https://b

Re: [PATCH v7 0/7] drm/i915: use ref_tracker library for tracking wakerefs

2023-04-21 Thread Jakub Kicinski
On Fri, 21 Apr 2023 13:35:04 +0200 Andrzej Hajda wrote: > Gently ping for network developers, could you look at ref_tracker patches, > as the ref_tracker library was developed for network. Putting Eric in the To: field, I know email so hard and confusing...

Re: [PATCH net-next v8 03/11] net: bcmasp: Add support for ASP2.0 Ethernet controller

2023-06-20 Thread Jakub Kicinski
On Fri, 16 Jun 2023 15:14:16 -0700 Justin Chen wrote: > Add support for the Broadcom ASP 2.0 Ethernet controller which is first > introduced with 72165. This controller features two distinct Ethernet > ports that can be independently operated. First of all - thanks for splitting the patches up. Th

Re: [PATCH 00/10] Treewide GPL SPDX conversion (love letter to Didi)

2023-05-11 Thread Jakub Kicinski
On Thu, 11 May 2023 20:33:56 +0700 Bagas Sanjaya wrote: > I trigger this patch series because of Didi's GPL full name fixes > attempt [1], for which all of them had been NAKed. In many cases, the > appropriate correction is to use SPDX license identifier instead. > > Often, when replacing license

Re: [PATCH net-next v3 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

2023-05-19 Thread Jakub Kicinski
On Fri, 19 May 2023 14:19:41 -0700 Justin Chen wrote: > Add support for the Broadcom ASP 2.0 Ethernet controller which is first > introduced with 72165. This controller features two distinct Ethernet > ports that can be independently operated. > > This patch supports: > > - Wake-on-LAN using magi

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

2023-07-19 Thread Jakub Kicinski
On Wed, 19 Jul 2023 08:10:58 -0700 Mina Almasry wrote: > From Jakub and David's comments it sounds (if I understood correctly), > you'd like to tie the dma-buf bind/unbind functions to the lifetime of > a netlink socket, rather than a struct file like I was thinking. That > does sound cleaner, but

Re: Unexplainable packet drop starting at v6.4

2023-07-25 Thread Jakub Kicinski
On Wed, 26 Jul 2023 06:50:52 +0700 Bagas Sanjaya wrote: > This time, the bisection points out to v6.4 networking pull, so: > > #regzbot introduced: 6e98b09da931a0 Ask the reporter to test 9b78d919632b, i.e. the tip of net-next before the merge. It seems quite unlikely that the merge itself is the

Re: [PATCH net-next v5 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

2023-05-25 Thread Jakub Kicinski
On Wed, 24 May 2023 16:01:50 -0700 Justin Chen wrote: > Add support for the Broadcom ASP 2.0 Ethernet controller which is first > introduced with 72165. This controller features two distinct Ethernet > ports that can be independently operated. > > This patch supports: > > - Wake-on-LAN using magi

Re: [Intel-gfx] [PATCH v8 0/7] drm/i915: use ref_tracker library for tracking wakerefs

2023-06-01 Thread Jakub Kicinski
On Thu, 1 Jun 2023 19:14:50 +0200 Andrzej Hajda wrote: > Ping on the series, everything reviewed. > Eric, Dave, Jakub, could you take patches 1-4 via net tree? Sure thing, would you mind reposting them separately? Easier for us to apply and it's been over a month since posting, a fresh run of buil

Re: [PATCH net-next v6 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

2023-06-02 Thread Jakub Kicinski
On Thu, 1 Jun 2023 15:12:28 -0700 Justin Chen wrote: > + ports_node = of_find_node_by_name(dev->of_node, "ethernet-ports"); > + if (!ports_node) { > + dev_warn(dev, "No ports found\n"); > + return 0; > + } > + > + for_each_available_child_of_node(ports_node,

Re: [PATCH net-next v6 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

2023-06-02 Thread Jakub Kicinski
On Thu, 1 Jun 2023 15:12:28 -0700 Justin Chen wrote: > + /* general stats */ > + STAT_NETDEV(rx_packets), > + STAT_NETDEV(tx_packets), > + STAT_NETDEV(rx_bytes), > + STAT_NETDEV(tx_bytes), > + STAT_NETDEV(rx_errors), > + STAT_NETDEV(tx_errors), > + STAT_NETDEV(rx_dr

Re: [PATCH v9 0/4] drm/i915: use ref_tracker library for tracking wakerefs

2023-06-05 Thread Jakub Kicinski
On Fri, 02 Jun 2023 12:21:32 +0200 Andrzej Hajda wrote: > This is reviewed series of ref_tracker patches, ready to merge > via network tree, rebased on net-next/main. > i915 patches will be merged later via intel-gfx tree. FWIW I'll try to merge these on top of the -rc4 tag so with a bit of luck y

Re: [PATCH net-next v6 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

2023-06-06 Thread Jakub Kicinski
On Tue, 6 Jun 2023 15:58:21 -0700 Justin Chen wrote: > On 6/2/23 11:58 PM, Jakub Kicinski wrote: > > On Thu, 1 Jun 2023 15:12:28 -0700 Justin Chen wrote: > >> + /* general stats */ > >> + STAT_NETDEV(rx_packets), > >> + STAT_NETDEV(tx_pa

Re: [PATCH net-next v6 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

2023-06-06 Thread Jakub Kicinski
On Tue, 6 Jun 2023 18:35:51 -0700 Justin Chen wrote: > > Also - can you describe how you can have multiple netdevs for > > the same MAC? > > Not netdevs per se, but packets can be redirected to an offload > co-processor. How is the redirecting configured? Could you split this patch into basic

Re: [PATCH net-next v6 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

2023-06-06 Thread Jakub Kicinski
On Tue, 6 Jun 2023 19:33:13 -0700 Justin Chen wrote: > >> Not netdevs per se, but packets can be redirected to an offload > >> co-processor. > > > > How is the redirecting configured? > > Through filters that can be programmed by the Host cpu or co-processor. How are the filter programmed by t

Re: [PATCH net-next v6 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

2023-06-06 Thread Jakub Kicinski
On Tue, 6 Jun 2023 21:22:45 -0700 Justin Chen wrote: > >> Through filters that can be programmed by the Host cpu or co-processor. > > > > How are the filter programmed by the host (in terms of user API)? > > You are stumbling upon my next objective here. This patch set does not > support thi

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

2023-08-21 Thread Jakub Kicinski
On Sat, 19 Aug 2023 12:12:16 -0400 Willem de Bruijn wrote: > :-) For the record, there is a prior version that added a separate type. > > I did not like the churn it brought and asked for this. It does end up looking cleaner that I personally expected, FWIW. > > Use of the LSB (or bits depending

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

2023-07-18 Thread Jakub Kicinski
On Sun, 16 Jul 2023 19:41:28 -0700 Andy Lutomirski wrote: > I'm wondering if a more capable if somewhat higher latency model could > work where the NIC stores received packets in its own device memory. > Then userspace (or the kernel or a driver or whatever) could initiate a > separate DMA from

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

2023-07-18 Thread Jakub Kicinski
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 cycle of objects can be easily tied to a netlink soc

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

2023-07-18 Thread Jakub Kicinski
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 for that, in particular it would > >> be really wrong to some

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

2023-07-18 Thread Jakub Kicinski
On Tue, 18 Jul 2023 16:35:17 -0600 David Ahern wrote: > I do not see how 1 RSS context (or more specifically a h/w Rx queue) can > be used properly with memory from different processes (or dma-buf > references). When the process dies, that memory needs to be flushed from > the H/W queues. Queues wi

Re: WARNING in dma_map_page_attrs

2020-10-24 Thread Jakub Kicinski
CC: rdma, looks like rdma from the stack trace On Fri, 23 Oct 2020 20:07:17 -0700 syzbot wrote: > syzbot has found a reproducer for the following issue on: > > HEAD commit:3cb12d27 Merge tag 'net-5.10-rc1' of git://git.kernel.org/.. > git tree: net > console output: https://syzkaller.ap

Re: [PATCH v3 2/7] include: add setbits_leXX/clrbits_leXX/clrsetbits_leXX in linux/setbits.h

2018-10-24 Thread Jakub Kicinski
On Wed, 24 Oct 2018 07:35:48 +, Corentin Labbe wrote: > This patch adds setbits_le32/clrbits_le32/clrsetbits_le32 and > setbits_le64/clrbits_le64/clrsetbits_le64 in linux/setbits.h header. > > Signed-off-by: Corentin Labbe Did you have a look at all the functions defined in bitfield.h? (incl

Re: [PATCH net-next v19 03/13] netdev: support binding dma-buf to netdevice

2024-08-20 Thread Jakub Kicinski
On Tue, 20 Aug 2024 00:01:02 -0400 Mina Almasry wrote: > Took a bit of a look here. Forgive me, I'm not that familiar with XDP > and virtual interfaces, so I'm a bit unsure what to do here. > > For veth, it seems, the device behind the veth is stored in > veth_priv->peer, so it seems maybe a dev_g

Re: [PATCH net-next v19 03/13] netdev: support binding dma-buf to netdevice

2024-08-20 Thread Jakub Kicinski
On Tue, 20 Aug 2024 13:11:20 -0400 Mina Almasry wrote: > > Protecting the stack from unreadable memory is *the* challenge > > in this series. The rest is a fairly straightforward. > > Understandable. I pulled the trigger on v21 with the build fix last > night after reading your response on the o

Re: [PATCH net-next v19 03/13] netdev: support binding dma-buf to netdevice

2024-08-21 Thread Jakub Kicinski
On Wed, 21 Aug 2024 11:36:31 -0400 Mina Almasry wrote: > Additionally I'm wondering if we should disable adding mp-bound > devices as slaves completely, regardless of xdp. My concern is that if > the lower device is using unreadable memory, then the upper device may > see unreadable memory in its c

Re: [PATCH net-next v22 03/13] netdev: support binding dma-buf to netdevice

2024-08-27 Thread Jakub Kicinski
On Sun, 25 Aug 2024 04:15:01 + Mina Almasry wrote: > +u32 dev_get_min_mp_channel_count(const struct net_device *dev) > +{ > + u32 i, max = 0; > + > + ASSERT_RTNL(); > + > + for (i = 0; i < dev->real_num_rx_queues; i++) > + if (dev->_rx[i].mp_params.mp_priv) > +

Re: [PATCH net-next v22 04/13] netdev: netdevice devmem allocator

2024-08-27 Thread Jakub Kicinski
l_has_addr(binding->chunk_pool, dma_addr, PAGE_SIZE)) > + gen_pool_free(binding->chunk_pool, dma_addr, PAGE_SIZE); Is the check necessary for correctness? Should it perhaps be a WARN under DEBUG_NET instead? The rest LGTM: Reviewed-by: Jakub Kicinski

Re: [PATCH net-next v22 05/13] page_pool: devmem support

2024-08-27 Thread Jakub Kicinski
if we're allocating * system memory. Memory providers (which give us net_iovs) * choose for us. */ Some of the code moves could be a separate patch, but either way: Acked-by: Jakub Kicinski

Re: [PATCH net-next v22 04/13] netdev: netdevice devmem allocator

2024-08-28 Thread Jakub Kicinski
On Wed, 28 Aug 2024 00:20:23 -0700 Mina Almasry wrote: > > On Sun, 25 Aug 2024 04:15:02 + Mina Almasry wrote: > > > +void net_devmem_free_dmabuf(struct net_iov *niov) > > > +{ > > > + struct net_devmem_dmabuf_binding *binding = net_iov_binding(niov); > > > + unsigned long dma_addr = n

Re: [PATCH net-next v23 03/13] netdev: support binding dma-buf to netdevice

2024-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2024 06:01:16 + Mina Almasry wrote: > + err = genlmsg_reply(rsp, info); > + if (err) > + goto err_unbind; > + > return 0; > + > +err_unbind: rtnl_lock() > + net_devmem_unbind_dmabuf(binding); > +err_unlock: > + rtnl_unlock();

Re: [PATCH net-next v23 03/13] netdev: support binding dma-buf to netdevice

2024-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2024 06:01:16 + Mina Almasry wrote: > + if (dev_xdp_prog_count(netdev)) { > + NL_SET_ERR_MSG(info->extack, "netdevice has xdp program > attached"); > + return -EEXIST; > + } goto err_unlock

Re: [PATCH net-next v23 03/13] netdev: support binding dma-buf to netdevice

2024-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2024 06:01:16 + Mina Almasry wrote: > + if (NL_REQ_ATTR_CHECK(info->extack, attr, tb, > NETDEV_A_QUEUE_ID) || > + NL_REQ_ATTR_CHECK(info->extack, attr, tb, > NETDEV_A_QUEUE_TYPE) || > + nla_get_u32(tb[NETDEV_A_QUEUE_TYPE]) != > NETDE

Re: [PATCH net-next v23 03/13] netdev: support binding dma-buf to netdevice

2024-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2024 06:01:16 + Mina Almasry wrote: > @@ -9376,6 +9376,9 @@ int dev_xdp_propagate(struct net_device *dev, struct > netdev_bpf *bpf) > if (!dev->netdev_ops->ndo_bpf) > return -EOPNOTSUPP; > > + if (dev_get_min_mp_channel_count(dev)) there's an extack in

Re: [PATCH net-next v23 03/13] netdev: support binding dma-buf to netdevice

2024-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2024 12:38:13 -0700 Mina Almasry wrote: > BTW I submitted 2 iterations already this week, Sunday and Wednesday. > This is easily fixable and I can resend before the end of the week, > but if I'm stressing NIPA too much with reposts of this large series I > can wait until next week. S

Re: [PATCH net-next v23 13/13] netdev: add dmabuf introspection

2024-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2024 06:01:26 + Mina Almasry wrote: > + binding = (struct net_devmem_dmabuf_binding *) > + rxq->mp_params.mp_priv; > + if (binding) { > + if (nla_put_u32(rsp, NETDEV_A_QUEUE_DMABUF, > +

Re: [PATCH net-next v23 06/13] memory-provider: dmabuf devmem memory provider

2024-08-29 Thread Jakub Kicinski
On Thu, 29 Aug 2024 06:01:19 + Mina Almasry wrote: > + if (WARN_ON_ONCE(atomic_long_read(netmem_get_pp_ref_count_ref(netmem)) > != > + 1)) nit: temporary variable for this refcount, please

Re: [PATCH net-next v23 03/13] netdev: support binding dma-buf to netdevice

2024-08-30 Thread Jakub Kicinski
On Thu, 29 Aug 2024 22:41:17 -0700 Mina Almasry wrote: > Thank you, I think the right fix here is to reacquire rtnl_lock before > the `goto err_unbind;`, since err_unbind expects rtnl to be locked at > this point. FWIW it's best to keep the error path a mirror image of the success path, so I'd add

Re: [PATCH net-next v24 03/13] netdev: support binding dma-buf to netdevice

2024-09-03 Thread Jakub Kicinski
es an indicator in struct netdev_rx_queue > that the given queue is bound, and the binding is actuated by resetting > the rx queue using the queue API. > > The netdev_dmabuf_binding struct is refcounted, and releases its > resources only when all the refs are released. Reviewed-by: Jakub Kicinski

Re: [PATCH net-next v24 06/13] memory-provider: dmabuf devmem memory provider

2024-09-03 Thread Jakub Kicinski
On Sat, 31 Aug 2024 00:43:06 + Mina Almasry wrote: > diff --git a/include/net/mp_dmabuf_devmem.h b/include/net/mp_dmabuf_devmem.h > new file mode 100644 > index ..6d1cf2a77f6b > --- /dev/null > +++ b/include/net/mp_dmabuf_devmem.h this header can live under net/core/ like netmem_pr

Re: [PATCH net-next v24 07/13] net: support non paged skb frags

2024-09-03 Thread Jakub Kicinski
On Sat, 31 Aug 2024 00:43:07 + Mina Almasry wrote: > Make skb_frag_page() fail in the case where the frag is not backed > by a page, and fix its relevant callers to handle this case. > > Signed-off-by: Mina Almasry > Reviewed-by: Eric Dumazet Reviewed-by: Jakub Kicinski

Re: [PATCH net-next v24 08/13] net: add support for skbs with unreadable frags

2024-09-03 Thread Jakub Kicinski
On Sat, 31 Aug 2024 00:43:08 + Mina Almasry wrote: > static inline bool tcp_skb_can_collapse_to(const struct sk_buff *skb) > { > - return likely(!TCP_SKB_CB(skb)->eor); > + return likely(!TCP_SKB_CB(skb)->eor && skb_frags_readable(skb)); Do you remember why this is here? Both for Rx

Re: [PATCH net-next v24 11/13] net: add devmem TCP documentation

2024-09-03 Thread Jakub Kicinski
On Sat, 31 Aug 2024 00:43:11 + Mina Almasry wrote: > +The socket must be flow steered to the dmabuf bound RX queue:: > + > + ethtool -N eth1 flow-type tcp4 ... queue 15, nit: tailing comma here > +Devmem payloads are inaccessible to the kernel processing the packets. This > +results in a

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

2024-03-07 Thread Jakub Kicinski
On Mon, 4 Mar 2024 18:01:36 -0800 Mina Almasry wrote: > + * void *(*ndo_queue_mem_alloc)(struct net_device *dev, int idx); > + * Allocate memory for an RX queue. The memory returned in the form of > + * a void * can be passed to ndo_queue_mem_free() for freeing or to > + * ndo_queue_start to

Re: [RFC PATCH net-next v6 14/15] net: add devmem TCP documentation

2024-03-07 Thread Jakub Kicinski
On Mon, 4 Mar 2024 18:01:49 -0800 Mina Almasry wrote: > +Intro > += > + > +Device memory TCP (devmem TCP) enables receiving data directly into device > +memory (dmabuf). The feature is currently implemented for TCP sockets. > + > + > +Opportunity > +--- > + > +A large amount of data tr

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

2024-03-07 Thread Jakub Kicinski
On Thu, 7 Mar 2024 18:08:24 -0800 Mina Almasry wrote: > On Thu, Mar 7, 2024 at 5:30 PM Jakub Kicinski wrote: > > On Mon, 4 Mar 2024 18:01:36 -0800 Mina Almasry wrote: > > > + * void *(*ndo_queue_mem_alloc)(struct net_device *dev, int idx); > > > + * Allocate

Re: [RFC PATCH net-next v6 05/15] netdev: support binding dma-buf to netdevice

2024-03-07 Thread Jakub Kicinski
On Mon, 4 Mar 2024 18:01:40 -0800 Mina Almasry wrote: > + if (!dev || !dev->netdev_ops) > + return -EINVAL; too defensive > + if (!dev->netdev_ops->ndo_queue_stop || > + !dev->netdev_ops->ndo_queue_mem_free || > + !dev->netdev_ops->ndo_queue_mem_alloc || > +

Re: [RFC PATCH net-next v6 02/15] net: page_pool: create hooks for custom page providers

2024-03-22 Thread Jakub Kicinski
On Fri, 22 Mar 2024 10:40:26 -0700 Mina Almasry wrote: > Other designs for this hugepage use case are possible, I'm just > describing Jakub's idea for it as a potential use-case for these > hooks. I made it ops because I had 4 different implementations with different recycling algorithms. I think

Re: [PATCH net-next v15 01/14] netdev: add netdev_rx_queue_restart()

2024-07-02 Thread Jakub Kicinski
On Fri, 28 Jun 2024 00:32:38 + Mina Almasry wrote: > Add netdev_rx_queue_restart() function to netdev_rx_queue.h > > Signed-off-by: David Wei > Signed-off-by: Mina Almasry > Reviewed-by: Pavel Begunkov Reviewed-by: Jakub Kicinski

Re: [PATCH net-next v15 02/14] net: netdev netlink api to bind dma-buf to a net device

2024-07-02 Thread Jakub Kicinski
On Fri, 28 Jun 2024 00:32:39 + Mina Almasry wrote: > API takes the dma-buf fd as input, and binds it to the netdevice. The > user can specify the rx queues to bind the dma-buf to. > > Suggested-by: Stanislav Fomichev > Signed-off-by: Mina Almasry > diff --git a/Documentation/netlink/specs/n

Re: [PATCH net-next v15 03/14] netdev: support binding dma-buf to netdevice

2024-07-02 Thread Jakub Kicinski
On Fri, 28 Jun 2024 00:32:40 + Mina Almasry wrote: > +/* Protected by rtnl_lock() */ > +static DEFINE_XARRAY_FLAGS(net_devmem_dmabuf_bindings, XA_FLAGS_ALLOC1); > + > +void net_devmem_unbind_dmabuf(struct net_devmem_dmabuf_binding *binding) > +{ > + struct netdev_rx_queue *rxq; > + unsi

Re: [PATCH net-next v15 00/14] Device Memory TCP

2024-07-02 Thread Jakub Kicinski
On Fri, 28 Jun 2024 00:32:37 + Mina Almasry wrote: > v15: > https://patchwork.kernel.org/project/netdevbpf/list/?series=865481&state=* I'll pick up a couple of patches unlikely to change.

Re: [PATCH net-next v15 03/14] netdev: support binding dma-buf to netdevice

2024-07-03 Thread Jakub Kicinski
On Wed, 3 Jul 2024 09:56:45 -0700 Mina Almasry wrote: > > Is this really sufficient in terms of locking? @binding is not > > RCU-protected and neither is the reader guaranteed to be in > > an RCU critical section. Actually the "reader" tries to take a ref > > and use this struct so it's not even a

Re: [PATCH net-next v16 01/13] netdev: add netdev_rx_queue_restart()

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 00:17:34 + Mina Almasry wrote: > + DEBUG_NET_WARN_ON_ONCE(!rtnl_is_locked()); ASSERT_RTNL() ?

Re: [PATCH net-next v16 02/13] net: netdev netlink api to bind dma-buf to a net device

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 00:17:35 + Mina Almasry wrote: > API takes the dma-buf fd as input, and binds it to the netdevice. The > user can specify the rx queues to bind the dma-buf to. > > Suggested-by: Stanislav Fomichev > Signed-off-by: Mina Almasry Reviewed-by: Jakub Kicinski

Re: [PATCH net-next v16 03/13] netdev: support binding dma-buf to netdevice

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 00:17:36 + Mina Almasry wrote: > + err = gen_pool_add_owner(binding->chunk_pool, dma_addr, > + dma_addr, len, dev_to_node(&dev->dev), > + owner); > + if (err) { kfree(o

Re: [PATCH net-next v16 04/13] netdev: netdevice devmem allocator

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 00:17:37 + Mina Almasry wrote: > + net_devmem_dmabuf_binding_get(binding); Why does every iov need to hold a ref? pp holds a ref and does its own accounting, so it won't disappear unless all the pages are returned.

Re: [PATCH net-next v16 05/13] page_pool: devmem support

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 00:17:38 + Mina Almasry wrote: > @@ -68,17 +107,103 @@ static inline netmem_ref page_to_netmem(struct page > *page) > > static inline int netmem_ref_count(netmem_ref netmem) > { > + /* The non-pp refcount of net_iov is always 1. On net_iov, we only > + * suppor

Re: [PATCH net-next v16 04/13] netdev: netdevice devmem allocator

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 12:29:58 -0700 Mina Almasry wrote: > On Wed, Jul 10, 2024 at 9:37 AM Jakub Kicinski wrote: > > On Wed, 10 Jul 2024 00:17:37 + Mina Almasry wrote: > > > + net_devmem_dmabuf_binding_get(binding); > > > > Why does every iov need to hold

Re: [PATCH net-next v16 05/13] page_pool: devmem support

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 13:29:03 -0700 Mina Almasry wrote: > If we want to add __skb_frag_ref() support for net_iov I suggest something > like: > > diff --git a/include/linux/skbuff_ref.h b/include/linux/skbuff_ref.h > index 0f3c58007488a..02f7f4c7d4821 100644 > --- a/include/linux/skbuff_ref.h > +++

Re: [PATCH net-next v16 05/13] page_pool: devmem support

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 16:42:04 -0700 Mina Almasry wrote: > > > +static inline void netmem_set_pp(netmem_ref netmem, struct page_pool > > > *pool) > > > +{ > > > + __netmem_clear_lsb(netmem)->pp = pool; > > > +} > > > > Why is all this stuff in the main header? It's really low level. > > Please

Re: [PATCH net-next v16 13/13] netdev: add dmabuf introspection

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 00:17:46 + Mina Almasry wrote: > Add dmabuf information to page_pool stats: > > $ ./cli.py --spec ../netlink/specs/netdev.yaml --dump page-pool-get Aha, thanks! Reviewed-by: Jakub Kicinski

Re: [PATCH net-next v16 05/13] page_pool: devmem support

2024-07-11 Thread Jakub Kicinski
On Thu, 11 Jul 2024 13:57:01 -0700 Mina Almasry wrote: > > > Sorry none of those are only used by net/core/*. Pretty much all of > > > these are used by include/net/page_pool/helpers.h, and some have > > > callers in net/core/devmem.c or net/core/skbuff.c > > > > > > Would you like me to move these

Re: [PATCH net-next v18 03/14] netdev: support binding dma-buf to netdevice

2024-08-06 Thread Jakub Kicinski
On Mon, 5 Aug 2024 21:25:16 + Mina Almasry wrote: > +/* Protected by rtnl_lock() */ > +static DEFINE_XARRAY_FLAGS(net_devmem_dmabuf_bindings, XA_FLAGS_ALLOC1); nit: global variable declarations before any code > +void net_devmem_unbind_dmabuf(struct net_devmem_dmabuf_binding *binding) > +{ >

Re: [PATCH net-next v18 05/14] page_pool: move dmaddr helpers to .c file

2024-08-06 Thread Jakub Kicinski
On Mon, 5 Aug 2024 21:25:18 + Mina Almasry wrote: > +dma_addr_t page_pool_get_dma_addr_netmem(netmem_ref netmem) > +{ > + struct page *page = netmem_to_page(netmem); > + > + dma_addr_t ret = page->dma_addr; > + > + if (PAGE_POOL_32BIT_ARCH_WITH_64BIT_DMA) > + ret <<= PA

Re: [PATCH net-next v18 04/14] netdev: netdevice devmem allocator

2024-08-06 Thread Jakub Kicinski
On Mon, 5 Aug 2024 21:25:17 + Mina Almasry wrote: > +struct net_iov * > +net_devmem_alloc_dmabuf(struct net_devmem_dmabuf_binding *binding) > +{ > + struct dmabuf_genpool_chunk_owner *owner; > + unsigned long dma_addr; > + struct net_iov *niov; > + ssize_t offset; > + ssize

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-06 Thread Jakub Kicinski
On Mon, 5 Aug 2024 21:25:20 + Mina Almasry wrote: > + if (pool->p.queue) { > + /* We rely on rtnl_lock()ing to make sure netdev_rx_queue > + * configuration doesn't change while we're initializing the > + * page_pool. > + */ > +

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-08 Thread Jakub Kicinski
On Thu, 8 Aug 2024 16:36:24 -0400 Mina Almasry wrote: > > How do you know that the driver: > > - supports net_iov at all (let's not make implicit assumptions based > >on presence of queue API); > > - supports net_iov in current configuration (eg header-data split is > >enabled) > > - sup

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-09 Thread Jakub Kicinski
On Fri, 9 Aug 2024 16:45:50 +0100 Pavel Begunkov wrote: > > I think this is good, and it doesn't seem hacky to me, because we can > > check the page_pools of the netdev while we hold rtnl, so we can be > > sure nothing is messing with the pp configuration in the meantime. > > Like you say below it

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-12 Thread Jakub Kicinski
On Sun, 11 Aug 2024 22:51:13 +0100 Pavel Begunkov wrote: > > I think we're talking about 2 slightly different flags, AFAIU.> > > Pavel and I are suggesting the driver reports "I support memory > > providers" directly to core (via the queue-api or what not), and we > > check that flag directly in ne

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-12 Thread Jakub Kicinski
On Mon, 12 Aug 2024 20:10:39 +0100 Pavel Begunkov wrote: > > 1. Drivers need to be able to say "I support unreadable netmem". > > Failure to report unreadable netmem support should cause the netlink > > API to fail when the user tries to bind dmabuf/io uring memory. > > > > 2. Drivers need to be a

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-12 Thread Jakub Kicinski
On Mon, 12 Aug 2024 20:04:41 +0100 Pavel Begunkov wrote: > >> Also don't see the upside of the explicit "non-capable" flag, > >> but I haven't thought of that. Is there any use? > > Or maybe I don't get what you're asking, I explained > why to have that "PP_IGNORE_PROVIDERS" on top of the flag >

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-13 Thread Jakub Kicinski
On Tue, 13 Aug 2024 04:39:47 -0400 Mina Almasry wrote: > On Mon, Aug 12, 2024 at 8:15 PM Jakub Kicinski wrote: > > BTW, Mina, the core should probably also check that XDP isn't installed > > before / while the netmem is bound to a queue. > > Sorry if noob question, bu

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-13 Thread Jakub Kicinski
On Tue, 13 Aug 2024 03:31:13 +0100 Pavel Begunkov wrote: > I'm getting lost, so repeating myself a bit. What I think > would be a good approach is if we get an error back from > the driver if it doesn't support netiov / providers. > > netdev_rx_queue_restart() { > ... > err = dev->queu

Re: [PATCH net-next v18 07/14] memory-provider: dmabuf devmem memory provider

2024-08-13 Thread Jakub Kicinski
On Tue, 13 Aug 2024 16:11:15 +0100 Pavel Begunkov wrote: > On 8/13/24 15:39, Jakub Kicinski wrote: > > On Tue, 13 Aug 2024 03:31:13 +0100 Pavel Begunkov wrote: > >> I'm getting lost, so repeating myself a bit. What I think > >> would be a good approach is if we

Re: [PATCH net-next v19 00/13] Device Memory TCP

2024-08-14 Thread Jakub Kicinski
On Tue, 13 Aug 2024 21:13:02 + Mina Almasry wrote: > v18 got a thorough review (thanks!), and this iteration addresses the > feedback. > > Major changes: > - Prevent deactivating mp bound queues. > - Prevent installing xdp on mp bound netdevs, or installing mps on xdp > installed netdevs. >

Re: [PATCH net-next v19 03/13] netdev: support binding dma-buf to netdevice

2024-08-15 Thread Jakub Kicinski
On Tue, 13 Aug 2024 21:13:05 + Mina Almasry wrote: > +int dev_get_max_mp_channel(const struct net_device *dev) > +{ > + int i, max = -1; I presume the bug from yesterday is self evident once reported? :) > + ASSERT_RTNL(); > + > + for (i = 0; i < dev->real_num_rx_queues; i++) > +

Re: [PATCH net-next v19 03/13] netdev: support binding dma-buf to netdevice

2024-08-15 Thread Jakub Kicinski
On Tue, 13 Aug 2024 21:13:05 + Mina Almasry wrote: > + if (NL_REQ_ATTR_CHECK(info->extack, attr, tb, > + NETDEV_A_QUEUE_ID)) { > + err = -EINVAL; > + goto err_unlock; > + } > + > + if (

Re: [PATCH net-next v19 06/13] memory-provider: dmabuf devmem memory provider

2024-08-15 Thread Jakub Kicinski
On Tue, 13 Aug 2024 21:13:08 + Mina Almasry wrote: > +EXPORT_SYMBOL(page_pool_mem_providers); not sure if this export is needed, but it doesn't appear to be needed by this patch?

  1   2   >