On Fri, Sep 29, 2023 at 03:51:48PM +0000, Haiyang Zhang wrote: > > > > -----Original Message----- > > From: Simon Horman <ho...@kernel.org> > > Sent: Friday, September 29, 2023 1:51 AM > > To: Haiyang Zhang <haiya...@microsoft.com> > > Cc: linux-hyperv@vger.kernel.org; net...@vger.kernel.org; Dexuan Cui > > <de...@microsoft.com>; KY Srinivasan <k...@microsoft.com>; Paul Rosswurm > > <paul...@microsoft.com>; o...@aepfle.de; vkuznets > > <vkuzn...@redhat.com>; da...@davemloft.net; wei....@kernel.org; > > eduma...@google.com; k...@kernel.org; pab...@redhat.com; > > l...@kernel.org; Long Li <lon...@microsoft.com>; > > ssen...@linux.microsoft.com; linux-r...@vger.kernel.org; > > dan...@iogearbox.net; john.fastab...@gmail.com; b...@vger.kernel.org; > > a...@kernel.org; Ajay Sharma <sharmaa...@microsoft.com>; > > h...@kernel.org; t...@linutronix.de; shradhagu...@linux.microsoft.com; > > linux-ker...@vger.kernel.org; sta...@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: sta...@vger.kernel.org > > > > Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure > > Network Adapter (MANA)") > > > > Signed-off-by: Haiyang Zhang <haiya...@microsoft.com> > > > > > > Reviewed-by: Simon Horman <ho...@kernel.org> > > > > 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.