lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250708163551.GU452973@horms.kernel.org>
Date: Tue, 8 Jul 2025 17:35:51 +0100
From: Simon Horman <horms@...nel.org>
To: Jijie Shao <shaojijie@...wei.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, andrew+netdev@...n.ch, shenjian15@...wei.com,
	liuyonglong@...wei.com, chenhao418@...wei.com,
	jonathan.cameron@...wei.com, shameerali.kolothum.thodi@...wei.com,
	salil.mehta@...wei.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 4/4] net: hns3: default enable tx bounce buffer when
 smmu enabled

On Tue, Jul 08, 2025 at 05:41:36PM +0800, Jijie Shao wrote:
> 
> on 2025/7/5 0:31, Simon Horman wrote:
> > On Wed, Jul 02, 2025 at 09:09:01PM +0800, Jijie Shao wrote:
> > > The SMMU engine on HIP09 chip has a hardware issue.
> > > SMMU pagetable prefetch features may prefetch and use a invalid PTE
> > > even the PTE is valid at that time. This will cause the device trigger
> > > fake pagefaults. The solution is to avoid prefetching by adding a
> > > SYNC command when smmu mapping a iova. But the performance of nic has a
> > > sharp drop. Then we do this workaround, always enable tx bounce buffer,
> > > avoid mapping/unmapping on TX path.
> > > 
> > > This issue only affects HNS3, so we always enable
> > > tx bounce buffer when smmu enabled to improve performance.
> > > 
> > > Fixes: 295ba232a8c3 ("net: hns3: add device version to replace pci revision")
> > The cited commit may be a pre-requisite for this patch
> > to check HNAE3_DEVICE_VERSION_V3. But it seems to me that the problem
> > being addressed existed before the cited commit. If so, I think a different
> > Fixes tag is appropriate.
> > 
> > > Signed-off-by: Jian Shen <shenjian15@...wei.com>
> > > Signed-off-by: Jijie Shao <shaojijie@...wei.com>
> > > ---
> > >   .../net/ethernet/hisilicon/hns3/hns3_enet.c   | 31 +++++++++++++++++
> > >   .../net/ethernet/hisilicon/hns3/hns3_enet.h   |  2 ++
> > >   .../ethernet/hisilicon/hns3/hns3_ethtool.c    | 33 +++++++++++++++++++
> > It seems to me that the hns3_ethtool.c changes a) are not a requirement
> > for the work-around introduced by this patch and b) may introduce
> > complex behaviour between the effect of ethtool copybreak settings
> > and the enablement/non-enablement of the work-around.
> > 
> > Would it be possible to make a more minimal fix for net, that
> > omits the ethtool changes. And then follow-up with them for net-next
> > once the fix is present there?
> 
> I will discuss your suggestion with my team.

Thanks, much appreciated.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ