From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (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 6986647D934 for ; Tue, 9 Jun 2026 17:22:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781025734; cv=none; b=tWI0thBdBxU4UUrFhj2G/vs9XhN7BQkAW7GfsQ6vK5xiy6f3L4NPYIMcp2TJzVN0aewhYFwCsor2WrEr5e16wWr7IVR3tIzbX8JKVLKrdZhNeqso4UKrOY0z59F16zYOx7eKGICvxXkN/qf2f1j1RQqb6wmed4yvXpm2b3VnE/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781025734; c=relaxed/simple; bh=EAoIaV9pNUjobuXUO1ePSeJoEsKaKZUvgUq0xCcWJwI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AyIvFWy/QgvLF9wt1KhW004hy2pjIty16m3ookViggiKkT1Xyq3SDxy1DjlvpN68tumfrMM6b5zZY4jPyMyy3+pEiVYBC6snQoCwFYYCoRJAyu1PxpExGCLiFL2MCs6RcQ7kV8zOALKk4McXhx/448xxddvQ8/3D1LWS44iV7YU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dama.to; spf=none smtp.mailfrom=dama.to; dkim=pass (2048-bit key) header.d=dama-to.20251104.gappssmtp.com header.i=@dama-to.20251104.gappssmtp.com header.b=Q2XumI+s; arc=none smtp.client-ip=209.85.216.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dama.to Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=dama.to Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=dama-to.20251104.gappssmtp.com header.i=@dama-to.20251104.gappssmtp.com header.b="Q2XumI+s" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-36bb3551f6eso5151430a91.1 for ; Tue, 09 Jun 2026 10:22:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dama-to.20251104.gappssmtp.com; s=20251104; t=1781025733; x=1781630533; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:from:to:cc:subject:date:message-id:reply-to; bh=ce4y9KqIyAjhQ6PxfVsDJXSaJXhk3BB5Jl2BkdFmxQk=; b=Q2XumI+s7PiJcVemIXJ1aONkvFkfaHnVplgbOxj4xZ0iLYzpqf+A/RoRuHAHdTJTR1 6XNdxdOmCljF+crs5Actzofs2AxmZvdcMWPMrCYBjfW2awBus3MGZxABreZ4YPdsE1WZ TT9++opAPgypJXOpmzi58g0i2qBLwdh2dGvGr0uAQ2hJX0F/92CxdCTJddxPAppWo79j fkJ7wYUeAV7c5I26wK5/Lof6mmHqqVBq9iIGaUSI7BWy9UQPHTjfdMoGq22ivNADOXkn fJAiwRHvzMiieIbA8R+rAQv6MgtWKMGFxKJcI8W57pOG1iobm78fk3f0cjvQKoyDEIkz S69g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781025733; x=1781630533; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ce4y9KqIyAjhQ6PxfVsDJXSaJXhk3BB5Jl2BkdFmxQk=; b=aSVEgKnwBntIGMwR2PKxqvnSJc1KO9jTy/Drj/yhT4gFvOyfT4qIEianDkwHAH8G3n rTlDR++jku+934cOxBYlfQOgnKKVXvk8R4AFw+He0k8QuaouG4nSHoJSh4V9JQkH8GrR vKTOEwgs9fIGOuOiQgLKjJHsjYLwCrSux3iVn7kgV8YqPg48sv9GtB5HSB/XBYhefacF VAQFw31zBPIWVgOY8JaqPGv0VtiZwSAcnXhZWlZXGhLCTNYW65QnzKMe9yISkFxTRW50 /z5u3wTEANCpN6CMCw59Q3jsKfY/3LETIqCh3AqYmdLgvFQ/ALX/ZdyxNkkZxAapTVb1 PHBg== X-Forwarded-Encrypted: i=1; AFNElJ9wiaoNupuqOlUMAMa6hHK5S+VeSXfvDT3W7WniUNVivNCB8UbLn1xUGDsiQyjUCA0KNwwh3p45Mjl5IAc=@vger.kernel.org X-Gm-Message-State: AOJu0YwzbkkX71aaxa8+szwGJJmJEfR9WndMcU1VevjvyIif8kSs+7Wn HF3WmHQTx79R1UpdawlT7LIHvouY/u2vd2/Keer93tMUYsltRI7o3iiNcANeXw2raJk= X-Gm-Gg: Acq92OFm/MsrMCkNfBVBrNccgnBtiRh2gcqhQ5hJl+G7CCM5j4AII5YsarHRgAdBpNk lI2agfmIsOn2cCwCHbrTGmGCURKut/CXddjKj0t3vbdiravPfK1s3eDF78M5QOvUCeN58XPqlwC oiUUWSNZPLiKwcXJJXs1uUf7Vd/cJvMsZv1hDOVb2Xi/MDKtI9pBP2IGmAJvbDc+sZ0fQt0XAs/ i08FzvHCKdoYBO7y0dlj9aTSBYL54fhXck5ncKSagAq388c7woQqDEG0piqhdXoJHhnaG5vJFdk ra0HECALLtBaxCyxssZ1Z8tOiaSgTlV5TpzzPvzjplOyfqbn3/4Em+tgAr7I79F4jOSTU9Rltm+ xHgHFF74vFDoJhQhWi1S0lhwso8/PiBlUc2Mlsy6rur2tUy03XPv5xQalSUf3WFXqWw6v66iIbh DtyG+bd/66+zSdM1mpKA21u2ptvg== X-Received: by 2002:a17:90b:3d01:b0:36b:b3f4:d578 with SMTP id 98e67ed59e1d1-370f0095c8emr22699988a91.15.1781025732705; Tue, 09 Jun 2026 10:22:12 -0700 (PDT) Received: from localhost ([2a03:2880:2ff:4d::]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36f6bf830b2sm18483208a91.4.2026.06.09.10.22.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2026 10:22:12 -0700 (PDT) Date: Tue, 9 Jun 2026 10:22:11 -0700 From: Joe Damato To: Michael Chan Cc: netdev@vger.kernel.org, Pavan Chebbi , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , Somnath Kotur , Andy Gospodarek , horms@kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH net] bnxt: fix head underflow on XDP head-grow Message-ID: Mail-Followup-To: Joe Damato , Michael Chan , netdev@vger.kernel.org, Pavan Chebbi , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , Somnath Kotur , Andy Gospodarek , horms@kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org References: <20260608203129.920104-1-joe@dama.to> 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: On Tue, Jun 09, 2026 at 09:44:17AM -0700, Michael Chan wrote: > On Tue, Jun 9, 2026 at 7:51 AM Joe Damato wrote: > > > > On Mon, Jun 08, 2026 at 09:22:07PM -0700, Michael Chan wrote: > > > On Mon, Jun 8, 2026 at 1:31 PM Joe Damato wrote: > > > > > > > > To fix this, we need to do a bit of math to recover the offset if this > > > > is a page fragment since it is not passed into rx_skb_func > > > > (bnxt_rx_multi_page_skb, in this case). > > > > > > I wonder if we should add an offset field to struct bnxt_sw_rx_bd to > > > simplify things for page mode. Struct bnxt_sw_rx_agg_bd has the > > > offset field for a similar purpose. Thanks. > > > > I don't mind doing that, but I wonder if that's better material for net-next? > > > > In other words, we get the minimal fix in (this patch?) and then do the > > cleanup and struct tweaking as a follow-up in net-next? > > > > I could definitely be wrong; I had just assumed patches for net were supposed > > to be as minimal as possible. > > I think some minor refactoring/struct changes to make the fix > cleaner/simpler should be fine for -net. I think the total number of > line changes should be about the same either way. OK. Are you OK with changing the signature of rx_skb_func? I was going to add offset as an argument so it can be passed through.