Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp115438lqa; Fri, 26 Apr 2024 16:52:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUXIG/BS63eluORkFEGO87X0+v96ZsWkOM9NZ9v2pEirqvx5OJsGp6v25pXHKwdgijLGjQX7EANOLSnCrk5JxyCd0Niu2KWyN2/2GtQmA== X-Google-Smtp-Source: AGHT+IGYk2KofUBKEzbX2RQ49/lafnLli2d3Nk6jFqyveNftj8ijRafqxu88hVxazU7CJapGN4LZ X-Received: by 2002:a05:6a20:3206:b0:1ac:e379:542b with SMTP id hl6-20020a056a20320600b001ace379542bmr4046387pzc.3.1714175545811; Fri, 26 Apr 2024 16:52:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714175545; cv=pass; d=google.com; s=arc-20160816; b=Bc5tWFF5yTA1uSnPombqCZK89Ws7SmCvwMNVEzUiXitnIieUzehU/kfuCLn1QMEa/+ cCLlz5Rn795wtC/ci3Nj/OzLD1NmTc0+oOwpn+VeEl9QaggeiY+m3BCGDtHUgk/ceC95 GHpo19FHhNBv8VIdZRX/JR54Sp5PKx259NuE/dJMUiqOw87qYx/NVWe6cdCfSJjhDYf4 nlOyHQuPbjeaIqH5Op2+m3H8R5hPWZHYPZWlRSc0PqXmvBKxqqNigOKC6x8bjl5yRCgw dv6Va107Y8ify8rHn9rfkYr1xRNi3bxGb830xSp/HwhMrl9kpxUvDHyPrN+yfKiUtJzx bQag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=RlEeH0pJNVwW3iE7Lt6bQnMbDlbrH0ByYp8JsOYXb0g=; fh=c1dFFm7P5DnGlxoIcqtQ1zIpAKQkg3ZQZ7vjqDdk7sg=; b=Pbnhi1KL/odK6qtOk+h5jnerU0xVhX2z29MTD0aTI5LRYoinAm1HL+9+E26h7rNIYA ry4T4lRIwDFrrzMlu9ZG1vEU67wiHfTzUhESyI+kWlkpkSPzkq8XTq+DdZMMWFp9neiJ Gp1LcdoyyAaVMuM++AIpG3DM20rQ6WDb/6T+sfyJ4axu4klN+CZ92O+7UuYttgFVcLcv VfHBSB1E3g/KEM5YJoJ4FkquaaCP+LuzirN0SMfvrN3GR/zwbsdi02UOIWBdefhGfxwB qTDSe6eWCUT67zPilPOOJW1jvVRti2O9jIfHTJ08gaTSkglJmFv7+LHOgbKUKM0e9A79 Arcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jqsc11mz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160784-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160784-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ea15-20020a056a004c0f00b006ecf002e2e1si16241874pfb.109.2024.04.26.16.52.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 16:52:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160784-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jqsc11mz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-160784-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160784-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6A3E3283DF0 for ; Fri, 26 Apr 2024 23:52:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CE4E3D387; Fri, 26 Apr 2024 23:52:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Jqsc11mz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71E083BBC5; Fri, 26 Apr 2024 23:52:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714175535; cv=none; b=KjPpGYEQ9ggHPmYY09XI4FIpHX+1IuLHRPzbseQaS7jE2BtGIOD4tT1eBdcVvC/AmK3Gac1psyZGdVHD03001CbQFsbl0OE21hTX5l2DUhwJerP9fgc6d9p13sZvq89ZCmotGPXUFSX9zZ1gLNXSRvZm5iUw83VcIAfZDnl0BOU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714175535; c=relaxed/simple; bh=H/sLcQKdw9O29se32jTxTWE1RQxSOatw8x3g3EsaaCw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Yr8o2YUtiHQVjkz3haBakhphkAL3pRk9w9UtlInajDIXURF79WEBGLLA0ueikLFTM16n8VSyxG6KV9Xp52G0+eemgRKUqqhvPcibETzEHbyA+UN0uFvzySpPHrKlv04FLEMQaw7xG8xfHQlPt1Pm5ONQYUmYvgFZyqXClG4yNcw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Jqsc11mz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 618CFC113CD; Fri, 26 Apr 2024 23:52:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714175534; bh=H/sLcQKdw9O29se32jTxTWE1RQxSOatw8x3g3EsaaCw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Jqsc11mzcF+Ti0Cr1i/rzdC1wnB5utX0rXr6TsRCf2xyh2CeSl4WJPE4zLPqgyOtl RaevFikEgloO38h8pMH41z4Vy9IMVVDswj59pNLvhdXF/FSQajKyYqSPwqn0wUMvPM GmOBD/s2/UHsy5bpIVd7XMTF7iMSO0WPZOe/lJSsUKvPWsmip37yJNE7A5FhVACkei KJtxUo/4qoR+h+eb8nC+aw1CUU1qYTHX/6yJjKVvBTBkS2SN7xFJBUHl3jikTUUZ5z 9o3SZAOxOWCWfK3X+OfBxi4h/KbLE9+ZEeiBn8lUjQSrqCxUnfZrU3rNzNWcAzMyX9 m8kkVk9oXFk0A== Date: Fri, 26 Apr 2024 16:52:13 -0700 From: Jakub Kicinski To: Joe Damato Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, tariqt@nvidia.com, saeedm@nvidia.com, mkarsten@uwaterloo.ca, gal@nvidia.com, nalramli@fastly.com, "David S. Miller" , Eric Dumazet , Paolo Abeni , "open list:MELLANOX MLX4 core VPI driver" Subject: Re: [PATCH net-next v2 1/3] net/mlx4: Track RX allocation failures in a stat Message-ID: <20240426165213.298d8409@kernel.org> In-Reply-To: References: <20240426183355.500364-1-jdamato@fastly.com> <20240426183355.500364-2-jdamato@fastly.com> <20240426130017.6e38cd65@kernel.org> 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=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 26 Apr 2024 16:43:53 -0700 Joe Damato wrote: > > In case of mlx4 looks like the buffer refill is "async", the driver > > tries to refill the buffers to max, but if it fails the next NAPI poll > > will try again. Allocation failures are not directly tied to packet > > drops. In case of bnxt if "replacement" buffer can't be allocated - > > packet is dropped and old buffer gets returned to the ring (although > > if I'm 100% honest bnxt may be off by a couple, too, as the OOM stat > > gets incremented on ifup pre-fill failures). > > Yes, I see that now. I'll drop this patch entirely from v3 and just leave > the other two and remove alloc_fail from the queue stats patch. Up to you, but I'd keep alloc_fail itself. If mlx4 gets page pool support one day it will be useful to run this: https://lore.kernel.org/all/20240426232400.624864-1-kuba@kernel.org/ And I think it's useful to be able to check in case there are Rx discards whether the system was also under transient memory pressure or not.