Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3709362rdh; Thu, 28 Sep 2023 23:09:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEBnxBCAFeL1JSEKpNpzcU5ik28JYSwp3YkNKgHk4OMlkcqlmWOXM5anDBMPOGJm2fTHZi9 X-Received: by 2002:a17:902:e88e:b0:1c7:3156:ca48 with SMTP id w14-20020a170902e88e00b001c73156ca48mr3581047plg.47.1695967757633; Thu, 28 Sep 2023 23:09:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695967757; cv=none; d=google.com; s=arc-20160816; b=O4hLWWiWCP5nHFSFMsq6NzTLX0Qttlzgd6ZNetPC5xJbUOaE1IEWfNWCwYMWsmvg7z ozASnspqgfRE5EPoT7HEGxKOIPEVd/oLwLrq8CAsqw9Tdor3drdLiXXqchDIMdgnkbWa Ek//snY2mov+CtC/xef3cM8NVtMFSVNx2tWDRUIp4uH9UrLit7RmVQFPTQ8oG8Ds38BH JIs9q1lpKw6NvxSHz4LhIfM4vIALkFdbInFKuqy/PqCCh3suuQfmEVbYtXKEcEVMsRTS nrC6Xnc5ixUmdPk6CJOHzmx+XyCSVm1HTv9SDBvnUm+oQS3kH5kvjQS+W0jC+QZPK4gC Jq1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yl3C6dEKyqo7knsq38iiSxclxzPPN2aidaBvixWb6Oo=; fh=PmO+9LUjpTwLbO02I1WU8j0Xf5wXS8a2OHEFZrfmscM=; b=fFJSSaMJW8GpLDA/LXD0X67NbjAX4tMXfb9806VlQV7Q/B09yps5Z48oV8tIIVFKkg bKBRZV3bHbkrDPYsgnh7EtfC8ZuocnhOTLP2AXLFRgFc6Iy6MDLbBwleReXshU2X2gZU 0AjUZdQ7EzAhieyb7SczNuQxXDXbEeX3TbklpL3Xzw3B0rdu6mC4VCycsEmMvjFXmOC7 4QesTSCtb+oFrgVaRfA6CdmvbYvhwMzst5gTImIH3CyJiUs2Nz0YZdzJ8FOJ88POHEh/ tTvZssQUd+rTgtDFnUsLtDGCqS+w6K/hikYvbVJOc11+MDrVD98JETz97iSk8BM4QyuV h8Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YnzzezID; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id jx9-20020a170903138900b001bdcb1e2d91si18879281plb.88.2023.09.28.23.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 23:09:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YnzzezID; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 013ED8058B47; Thu, 28 Sep 2023 22:50:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232740AbjI2Fup (ORCPT + 99 others); Fri, 29 Sep 2023 01:50:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231894AbjI2Fuj (ORCPT ); Fri, 29 Sep 2023 01:50:39 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B0621A8; Thu, 28 Sep 2023 22:50:37 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F9D2C433C8; Fri, 29 Sep 2023 05:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695966637; bh=pus409fnjAN68UJYHzl/i9nvZInBE9bOy7rWmKfcZaQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YnzzezIDV9y9njBOBu4WEU7VXwGaet+GAqx5L40g+cE4ubMOgW1W9zPamQI6ooo/X 1rP88VI7RIAA2LDupyoDY+r1cCAl9GtirC+BaxaEWPC65/Tc8VJ2/19D4JkTzadQl9 ITHDQPpGwIvKBufT4z8R0trDM6IStlmmgbnRw0J8JWnFdMQCo3TaBeVsQXTw46gKGw a/By4+Xufq3qX90GtX7dZ1cePifaaxpjgE3I4eGtPdSzUNQPiL4dG+LaSOIx6U7u1S 5UV5kWwlfUG3fKkjtbDkpL4CJkduWXuxWVXv8vSseeaZc2EmbhbbsRYj0H6eLccC1I /MLjSnWhO1N0A== Date: Fri, 29 Sep 2023 07:50:30 +0200 From: Simon Horman To: Haiyang Zhang Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, decui@microsoft.com, kys@microsoft.com, paulros@microsoft.com, olaf@aepfle.de, vkuznets@redhat.com, davem@davemloft.net, wei.liu@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, leon@kernel.org, longli@microsoft.com, ssengar@linux.microsoft.com, linux-rdma@vger.kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, bpf@vger.kernel.org, ast@kernel.org, sharmaajay@microsoft.com, hawk@kernel.org, tglx@linutronix.de, shradhagupta@linux.microsoft.com, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH net, 1/3] net: mana: Fix TX CQE error handling Message-ID: <20230929055030.GS24230@kernel.org> References: <1695519107-24139-1-git-send-email-haiyangz@microsoft.com> <1695519107-24139-2-git-send-email-haiyangz@microsoft.com> <20230929054757.GQ24230@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230929054757.GQ24230@kernel.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 28 Sep 2023 22:50:59 -0700 (PDT) On Fri, Sep 29, 2023 at 07:47:57AM +0200, Simon Horman wrote: > On Sat, Sep 23, 2023 at 06:31:45PM -0700, Haiyang Zhang wrote: > > For an unknown TX CQE error type (probably from a newer hardware), > > still free the SKB, update the queue tail, etc., otherwise the > > accounting will be wrong. > > > > Also, TX errors can be triggered by injecting corrupted packets, so > > replace the WARN_ONCE to ratelimited error logging, because we don't > > need stack trace here. > > > > Cc: stable@vger.kernel.org > > Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)") > > Signed-off-by: Haiyang Zhang > > Reviewed-by: Simon Horman Sorry, one latent question. The patch replaces WARN_ONCE with a net_ratelimit()'d netdev_err(). But I do wonder if, as a fix, netdev_err_once() would be more appropriate.