From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 05E7D35FF57 for ; Wed, 17 Dec 2025 13:11:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765977079; cv=none; b=X4OwEob/K2vIdeQsoeXfSCE/PS/ayVFiHvrBJBOTdbm28ki5Sbpu7sR2c3KfOtHcJ73z3zlwkmY1NmMMosmRVfPfCST+T/FPE+WIEICHczpq8IL11rXZhCLqE03z09DFsQ6mOMMTaJf+f3hf5fUA1mK5Wj+BtHjpK4R7rpoVHxY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765977079; c=relaxed/simple; bh=Om1TnknF8svFxwcbl4KqUtDFwkHFW/Rz+8ty3MLobM0=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=FzrxXRB6ue9Y1iCQhQ3SFCLYyH2a/y/g1HYF6rpueLT9isV6Uma46WPGCqvby2m6JfkshkqMWYopCW+BdINnaZ1x6MBwXF1/jGHXYkApiki6LnK/eoTR3O0qa3h41kLgOY/chehpKiRZf5AJPAv8A8X9L7hSJDbtPbNMAc6iU/E= 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=L7e8AreG; arc=none smtp.client-ip=209.85.221.42 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="L7e8AreG" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-42b3d7c1321so3484627f8f.3 for ; Wed, 17 Dec 2025 05:11:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765977076; x=1766581876; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=9Z4HSgH6g7AvwtCkEH+wMmW4znl93Jz3EGhls0Goj0M=; b=L7e8AreGtJc2dH2t39XXJenUCk3Iop8HIUMbw00TQT7A02YSjnr7pyPuYhlTdUEA5J S/sXnEm90OVTKPBPqH87asdqGxPDS5Bbg6FgSWoM1IjHIhBzdppLMYVfASxWigWvLxr1 CVUMkSMyMv7cBRY0zmMWaIgenojCMNvQG7LJAzumpaEUCSt7YNW6yTUvuniF3gxxh3nE EfM54uInq1mJ4hYW12WJ16ZAYN28OXM0rx2Bh9yUrlF4ZIv1jyGkr0x1tQ0OH2Y6tiOZ NcMuTcM7erVh2aFFcpRMNmeUgdocOBHxXTqm5HN/VRO6118w6WHNVegdM95OLHNK+H3S aMLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765977076; x=1766581876; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=9Z4HSgH6g7AvwtCkEH+wMmW4znl93Jz3EGhls0Goj0M=; b=WUwanUmj4/Vmj+hf5YaCpUstBoyC/iMd2BgWuhJvoiElJy7BXCKgenQ/2nJEpMzGEx AaW2Bk+yd7bWZw1SWvZdrCpOgfjf68KWxmFYLttvjct1rqP4SwpG0YIBIfkYLfZikFtU +RnSd1GTAiGrvgZEufL/TjRsyXdAYk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t0czr5vNAg03Rt65ew76snUH/SXqg== X-Received: by 2002:a05:6000:2083:b0:431:16d:63a3 with SMTP id ffacd0b85a97d-431016d695fmr10732866f8f.46.1765977076158; Wed, 17 Dec 2025 05:11:16 -0800 (PST) Received: from ?IPV6:2a01:4b00:bd21:4f00:7cc6:d3ca:494:116c? ([2a01:4b00:bd21:4f00:7cc6:d3ca:494:116c]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4310adeee0esm4849071f8f.29.2025.12.17.05.11.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Dec 2025 05:11:15 -0800 (PST) Message-ID: <37b642bd-9f26-477e-9fca-1e3c931c0efb@gmail.com> Date: Wed, 17 Dec 2025 13:11:28 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Pavel Begunkov Subject: Re: [PATCH net-next] ice: access @pp through netmem_desc instead of page To: Matthew Wilcox , Byungchul Park Cc: netdev@vger.kernel.org, kuba@kernel.org, linux-kernel@vger.kernel.org, kernel_team@skhynix.com, harry.yoo@oracle.com, david@redhat.com, toke@redhat.com, almasrymina@google.com, anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, intel-wired-lan@lists.osuosl.org References: <20251216040723.10545-1-byungchul@sk.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/16/25 04:20, Matthew Wilcox wrote: > On Tue, Dec 16, 2025 at 01:07:23PM +0900, Byungchul Park wrote: >> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c >> @@ -1251,7 +1251,7 @@ static int ice_lbtest_receive_frames(struct ice_rx_ring *rx_ring) >> rx_buf = &rx_ring->rx_fqes[i]; >> page = __netmem_to_page(rx_buf->netmem); >> received_buf = page_address(page) + rx_buf->offset + >> - page->pp->p.offset; >> + pp_page_to_nmdesc(page)->pp->p.offset; > > Shouldn't we rather use: > > nmdesc = __netmem_to_nmdesc(rx_buf->netmem); > received_buf = nmdesc_address(nmdesc) + rx_buf->offset + > nmdesc->pp->p_offset; > > (also. i think we're missing a nmdesc_address() function in our API). It wouldn't make sense as net_iov backed nmdescs don't have/expose host addresses (only dma addresses). nmdesc_address() would still need to rely on the caller knowing that it's a page. An explicit cast with *netmem_to_page() should be better. -- Pavel Begunkov