]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: default enable tx bounce buffer when smmu enabled
authorJijie Shao <shaojijie@huawei.com>
Tue, 22 Jul 2025 12:54:23 +0000 (20:54 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 24 Jul 2025 09:27:22 +0000 (11:27 +0200)
commit49ade8630f36e9dca2395592cfb0b7deeb07e746
tree7becd17f22064fabe91cb458bf91d54fd0873855
parentb3e75c0bcc53f647311960bc1b0970b9b480ca5a
net: hns3: default enable tx bounce buffer when smmu enabled

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")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20250722125423.1270673-5-shaojijie@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h