All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jijie Shao <shaojijie@huawei.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, andrew+netdev@lunn.ch, shenjian15@huawei.com,
	liuyonglong@huawei.com, chenhao418@huawei.com,
	jonathan.cameron@huawei.com,
	shameerali.kolothum.thodi@huawei.com, salil.mehta@huawei.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 4/4] net: hns3: default enable tx bounce buffer when smmu enabled
Date: Tue, 8 Jul 2025 17:35:51 +0100	[thread overview]
Message-ID: <20250708163551.GU452973@horms.kernel.org> (raw)
In-Reply-To: <21993e23-9ac6-4108-94e6-752fe32a11d2@huawei.com>

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@huawei.com>
> > > Signed-off-by: Jijie Shao <shaojijie@huawei.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.

      reply	other threads:[~2025-07-08 16:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 13:08 [PATCH net 0/4] There are some bugfix for the HNS3 ethernet driver Jijie Shao
2025-07-02 13:08 ` [PATCH net 1/4] net: hns3: fix concurrent setting vlan filter issue Jijie Shao
2025-07-04 15:52   ` Simon Horman
2025-07-08  9:30     ` Jijie Shao
2025-07-02 13:08 ` [PATCH net 2/4] net: hns3: disable interrupt when ptp init failed Jijie Shao
2025-07-04 15:55   ` Simon Horman
2025-07-02 13:09 ` [PATCH net 3/4] net: hns3: fixed vf get max channels bug Jijie Shao
2025-07-04 16:05   ` Simon Horman
2025-07-05  7:24     ` David Laight
2025-07-08  9:37       ` Jijie Shao
2025-07-08 16:35         ` Simon Horman
2025-07-02 13:09 ` [PATCH net 4/4] net: hns3: default enable tx bounce buffer when smmu enabled Jijie Shao
2025-07-04 16:31   ` Simon Horman
2025-07-08  9:41     ` Jijie Shao
2025-07-08 16:35       ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250708163551.GU452973@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=chenhao418@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liuyonglong@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=salil.mehta@huawei.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=shaojijie@huawei.com \
    --cc=shenjian15@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.