Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp462038rdb; Sat, 30 Sep 2023 11:17:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFMMQ0+x1FM1fJeXIaPZKQPya3L8toZhKit3c0hBXyAh0ZwTVE1oZHtgiqHZtjLMeQjWW90 X-Received: by 2002:a05:6870:611f:b0:1be:e6d6:15c4 with SMTP id s31-20020a056870611f00b001bee6d615c4mr7954549oae.9.1696097842299; Sat, 30 Sep 2023 11:17:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696097842; cv=none; d=google.com; s=arc-20160816; b=pLxiEuTMsgthJYDQrlj4APp60gsMO6lQTX3iUBrgviuR48HFjhwpXCOYkGmBAwmpQ5 exkUEUDyLt6owLjJYdkg6zqj/NbuNpXbAw2OME1fjl48jsx2ntyCvolTI5YuA0hHBSTk P29mpdUmR3qLrzjnCUkbS4f32OvfvHt2aBvtfYS6l+ZM8nG0zPHXHeYqvAySUgf0OcZU 4YwnPmAH8b1gy8sLyxpezy6VYjPa7qWZdSmEVeYAdiUwo5APaqWLE6TOhKXVBsDyThnG NWQ09wJ50+B01C7q7VoVjhxH4uM8Q6y6CgUFXsB/Oms0mowoUdQBawccSUv6e46kzW/i JRlg== 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=U0o4JkkdhkYJSFLBaeqhr9RH6mvZLoFV0/Gf4MOle3I=; fh=dtQ50HN51kwyuAhcwWLMPFwLEx5ZQRfh1dwJdPQ0TMw=; b=XH699/J5F4hwRPN79yAtkaiXV+Fn/yY6BK1g0GElAOY0Vz7IOqGJf+SIIiCUcxK24N ROR5XQjwZJagwnJ46S1j6fBZA3bWmcraIs/qLxLVuPZo3gkU5oi/7wbqWkqg6OSe3cQp 8EtlcwoXIqplNXrE/0+C+kphc8Uv7WPV6Z36LVegvXPlz4ANv9Ze+rPn6pvsmVUSZwly ys6E68QM122DJMIl+9kX36kdpdklYTZyriLkpS59cD9z8R7mimK9bnV5ntzR2ZZAuYXC qRlB7enl99EW/8pW5DC4jBwn8n+j4Uesuj/rQXbWKiokkR6rIKZ+QteuNpB5US1BsJvp PAtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lJbU2vc+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id v189-20020a6389c6000000b00585527553a4si9483216pgd.130.2023.09.30.11.17.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 11:17:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lJbU2vc+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 73B8E80A90DC; Sat, 30 Sep 2023 11:16:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234697AbjI3SQd (ORCPT + 99 others); Sat, 30 Sep 2023 14:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233050AbjI3SQc (ORCPT ); Sat, 30 Sep 2023 14:16:32 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADA90D3; Sat, 30 Sep 2023 11:16:30 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 755A5C433C8; Sat, 30 Sep 2023 18:16:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696097790; bh=4KxrdWQII7ZMqg05ZoYUeAYx7P3qwGPcbUzEt9FXv8o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lJbU2vc+5yly5IaO2oXd/4pi4tBp5Ef08ulv77sXkiMk25ulICEZnnhOmlKpte9Bi QRNhWkE26HfPQzGpdmtyC5pb1nqnKk2Q+XKmopDUD5vaQwdZsPaqYk+YGgkZekdTNZ aSFYvSeG1gMDiG7FEvfsn/hBi5FYVnv3u0bQkL5jJbqyXQ6DiwkpqN5hacO0akhEDc O+MsPjfqEIC6oNtB1O1d5FeB2mlvGFs1FoEgcpefnUrUVlGlp8oBI60Br+ktff4xt3 kN/ZU1GnqufKENMcNBtG5uHe07IuxKYlgvyaTc8yS3u/8F4RN4/f4oGpUT1NswVAph i726jlQVEB7zQ== Date: Sat, 30 Sep 2023 20:16:23 +0200 From: Simon Horman To: Haiyang Zhang Cc: "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , Dexuan Cui , KY Srinivasan , Paul Rosswurm , "olaf@aepfle.de" , vkuznets , "davem@davemloft.net" , "wei.liu@kernel.org" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "leon@kernel.org" , Long Li , "ssengar@linux.microsoft.com" , "linux-rdma@vger.kernel.org" , "daniel@iogearbox.net" , "john.fastabend@gmail.com" , "bpf@vger.kernel.org" , "ast@kernel.org" , Ajay Sharma , "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: <20230930181623.GF92317@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> <20230929055030.GS24230@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 groat.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 (groat.vger.email [0.0.0.0]); Sat, 30 Sep 2023 11:16:54 -0700 (PDT) On Fri, Sep 29, 2023 at 03:51:48PM +0000, Haiyang Zhang wrote: > > > > -----Original Message----- > > From: Simon Horman > > Sent: Friday, September 29, 2023 1:51 AM > > To: Haiyang Zhang > > Cc: linux-hyperv@vger.kernel.org; netdev@vger.kernel.org; Dexuan Cui > > ; KY Srinivasan ; Paul Rosswurm > > ; olaf@aepfle.de; vkuznets > > ; davem@davemloft.net; wei.liu@kernel.org; > > edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; > > leon@kernel.org; Long Li ; > > ssengar@linux.microsoft.com; linux-rdma@vger.kernel.org; > > daniel@iogearbox.net; john.fastabend@gmail.com; bpf@vger.kernel.org; > > ast@kernel.org; Ajay Sharma ; > > 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 > > > > 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. > > This error may happen with different CQE error types, so I use netdev_err() > to display them, and added rate limit. Thanks for the clarification.