]> Git Repo - linux.git/commit
net: hns3: add sync command to sync io-pgtable
authorJian Shen <[email protected]>
Fri, 25 Oct 2024 09:29:31 +0000 (17:29 +0800)
committerPaolo Abeni <[email protected]>
Thu, 31 Oct 2024 10:15:42 +0000 (11:15 +0100)
commitf2c14899caba76da93ff3fff46b4d5a8f43ce07e
tree3235efa99e5f8f629d406294488f4d5a7e510a2f
parente6ab19443b36a45ebfb392775cb17d6a78dd07ea
net: hns3: add sync command to sync io-pgtable

To avoid errors in pgtable prefectch, add a sync command to sync
io-pagtable.

This is a supplement for the previous patch.
We want all the tx packet can be handled with tx bounce buffer path.
But it depends on the remain space of the spare buffer, checked by the
hns3_can_use_tx_bounce(). In most cases, maybe 99.99%, it returns true.
But once it return false by no available space, the packet will be handled
with the former path, which will map/unmap the skb buffer.
Then the driver will face the smmu prefetch risk again.

So add a sync command in this case to avoid smmu prefectch,
just protects corner scenes.

Fixes: 295ba232a8c3 ("net: hns3: add device version to replace pci revision")
Signed-off-by: Jian Shen <[email protected]>
Signed-off-by: Peiyang Wang <[email protected]>
Signed-off-by: Jijie Shao <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
This page took 0.050101 seconds and 4 git commands to generate.