From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDAB73E4C87 for ; Wed, 8 Jul 2026 20:35:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783542955; cv=none; b=EXpMcXffXuDs3YOPlK+CqpEri8ORQhrCavjmgh7R3TpvcXDbwp+Kfw1ZXve6HxAnimk76WoKrlFPWPsbobTTisEGqPEfNdnw26HJuyO3fzYjLlPmKEWqX30YITIee7f5lWSZ4lMcbI5jFZK9e4op5ziN8KvRac/YBqeXryfHhks= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783542955; c=relaxed/simple; bh=3I3mp7KJKi0CVH2nIGOLczzk5TWZIUatXfsGuzb8OvI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dWYoG0bnNJmHUFdNaSvXCcbX4PfTRWFFJtWDmA1VP18bEk5lkbmVx14uRia2LhDCeJnpRuBcb1rJd2yDI+244efY/aY+x8nhLPVHG6rreXh3C3Fevfy3NfeObNpMKXv4ue9cBIQYJrgYOhKgg5S56+vsgzv+qg1EAE7KLgJiyG4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ip9XoIOX; arc=none smtp.client-ip=209.85.167.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ip9XoIOX" Received: by mail-oi1-f174.google.com with SMTP id 5614622812f47-49190e20a0cso95345b6e.1 for ; Wed, 08 Jul 2026 13:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783542952; x=1784147752; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=24xTmwwfHf8GGJ8ej4fMcb3MXrY9M9ELYMVJ6Iyw0KE=; b=ip9XoIOXuDEuy1U/8yUG9fQeLr/aaQuWlysRfx7lToefvfkhYNJivSwd1xNSjjl7hL clKp27SMWNTJuJijxX3seC5f5CETXySWxhrbnU7I+B08k5y2pJFSb9O2t4JpDHi2FXys M73WP5sC1BZigPbqC+7n+l++QsA54baGpliS1fJCymlKxIbsABlzNB/upmQKSMVbOQ7Z d0xdq247GSoaPXl3IRFZAsPej6qXUU4XMA7KWlE7LHlMT/PO2pLUtvv+daJOAns6HKZM 852GFl9wavYTn/WJKiiIiBveGigDrHXL1Gn/S5Nv5K31K7O7cgVkcg50PH4LPLVzk0d+ 108g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783542952; x=1784147752; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=24xTmwwfHf8GGJ8ej4fMcb3MXrY9M9ELYMVJ6Iyw0KE=; b=lcJygkjMgnnV8vji5BXwGz5dUTTQ97+/iM49kQ8YfLdjCuPbNTfczDGIQbhJZDn9eK u+btY2MQ02aQPMU0CRVHE/E1tULcRSYHVQQ8gHKvnH8ZbdbMR6mcj6lXkmHlai1WNLmy Xrk699gin0/HGU4/x10zGSQdQBzp5h+KRA4XgOz1FeuiNi7pPhxkdfHs7SXjq3tATfZ5 r6BoZwW93kD73ZOE8jR4pvRS8gsCr2cmYb2JZijG54Slci4jBgM1MDldlJd+9wQm+bl2 m6bAUPbbaFW1d01/YFQDr7oZZsGGl3r0e2g0HAqItPT1ibiFkfQ42QEf9BdXU1g8Jhp2 ulog== X-Forwarded-Encrypted: i=1; AFNElJ8EcGIPKcwb66hOKYUwoozmvbst3Ia62RfdLYeQlXRrWnsmjqk72hvZWSFQ/jp2fMVL49AYTNbZY4jws+k=@vger.kernel.org X-Gm-Message-State: AOJu0YxFkK0F8IxCYcUFsfh0beR838fs/1aVCCcLVmm89zrBaOU1PO3h qBHxVSFEZoMLN9l21cog3ofAYOEQhlSxJCQAkVkPAXWLVwM5Tab1t2Ct X-Gm-Gg: AfdE7cnZas4uXyFhGABWNbH3ig6JEYAtrGA0D79mXhYeIHmJQIkYaIfRNZnUuZjU0sa 2/KS6LhLyPKyuuvhHd1KrV7/f3As6trmKt+iPUqWHY9z9qiPOToL1o3DmceWaPuPFnRzFv24duw zoH5ak0gUiTWXjWS1tFt1pJERlzKi1jev1j/Rqo9bId92bty0/ABE8aAyMuukVIytfRLcyGKxLt x6dukyddUgcfstbDqNyC4dPNCXxgUWUNW36uVd5cS4yn1eQEAV3OOPO94N5lJHUnM/B2Ooy7Vg3 NQ9+AhJTPbWa7L9x30GhxcgWIm+QZaxusK2qNmndZOK6NcCCjbYpXMD17JskJBEXFHkr4LrA8Wo mzrMsYm484N1CSAu/HbrbAD2t3deq//yz6jtuGN/UuLvr7fIhTf5j6m4UB4FPnzcUZ+hk53MU81 TdMfngT+KnCOAQERF9RRiLEYjI3NMBbBdV X-Received: by 2002:a05:6808:6d8a:b0:486:4212:d728 with SMTP id 5614622812f47-4a206116affmr3560063b6e.43.1783542951653; Wed, 08 Jul 2026 13:35:51 -0700 (PDT) Received: from devvm29614.prn0.facebook.com ([2a03:2880:ff:a::]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4a1afde6cffsm2535573b6e.11.2026.07.08.13.35.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 13:35:49 -0700 (PDT) Date: Wed, 8 Jul 2026 13:35:44 -0700 From: Bobby Eshleman To: Paolo Abeni Cc: Mina Almasry , Donald Hunter , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Simon Horman , Andrew Lunn , Gerd Hoffmann , Vivek Kasireddy , Sumit Semwal , Christian =?iso-8859-1?Q?K=F6nig?= , Shuah Khan , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, linux-kselftest@vger.kernel.org, sdf@fomichev.me, razor@blackwall.org, daniel@iogearbox.net, matttbe@kernel.org, skhawaja@google.com, dw@davidwei.uk, Joe Damato , Bobby Eshleman Subject: Re: [PATCH net-next v4 1/3] net: devmem: allow rx-buf-size > PAGE_SIZE per dmabuf binding Message-ID: References: <20260701-tcpdm-large-niovs-v4-0-ca4654f37570@meta.com> <20260701-tcpdm-large-niovs-v4-1-ca4654f37570@meta.com> <15e72c82-ca99-481b-bd53-744fabd503b0@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <15e72c82-ca99-481b-bd53-744fabd503b0@redhat.com> On Wed, Jul 08, 2026 at 12:50:07PM +0200, Paolo Abeni wrote: > On 7/7/26 10:36 PM, Mina Almasry wrote: > > On Wed, Jul 1, 2026 at 12:22 PM Bobby Eshleman wrote: > >> > >> From: Bobby Eshleman > >> > >> Every devmem dmabuf binding today hands the page_pool PAGE_SIZE niovs. > >> This caps a single RX descriptor at PAGE_SIZE, burning CPU on buffer > >> churn for large flows. > >> > >> Add a bind-time netlink attribute, NETDEV_A_DMABUF_RX_BUF_SIZE, that > >> lets userspace request a larger niov size. The value must be a power of > >> two >= PAGE_SIZE. > >> > >> Measurements > >> ------------ > > Checkpatch complains about this separator usage: > > ERROR: Invalid commit separator - some tools may have problems applying this > #15: > ------------ > > Please replace or remove it in the next revision > > >> @@ -90,16 +90,17 @@ 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_t index; > >> + size_t offset; > >> + size_t index; > >> > > > > nit: I would keep this signed. Some of the most frustrating issues I > > ran into is some of the underflowing and then passing a > check or > > something. Although if the LLM is not complaining about this > > particular case, there is probably no issue with it. I also notice a > > lot of existing code that deals with indexes and offsets goes for > > signed. > > At very least the above change should go in a separate patch, as is > quite unrelated from the rest. > > /P > Sounds good, I'll drop the type change. Thanks, Bobby