netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: wei.fang@nxp.com, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: fec: change the default rx copybreak length to 1518
Date: Fri, 19 Aug 2022 15:04:43 -0700	[thread overview]
Message-ID: <20220819150443.537904dc@kernel.org> (raw)
In-Reply-To: <Yv+y0x6MzVmShWL9@lunn.ch>

On Fri, 19 Aug 2022 17:57:07 +0200 Andrew Lunn wrote:
> On Fri, Aug 19, 2022 at 05:00:41PM +0800, wei.fang@nxp.com wrote:
> > Set the default rx copybreak value to 1518 so that improve the
> > performance when SMMU is enabled. User can change the copybreak
> > length in dynamically by ethtool.  
> 
> Please provide some benchmark for this. And include a range of SoCs
> which include the FEC. Maybe this helps for the platform you are
> testing on, but is bad for imx25, Vybrid etc?
> 
> > + * The driver support .set_tunable() interface for ethtool, user
> > + * can dynamicly change the copybreak value.
> > + */  
> 
> Which also means you could change it for your platform. So a patch
> like this needs justifying.

Fully agreed, perhaps if the DMA mapping on the platform is extremely
slow we're better off making the platform use bounce buffers for
everything.

Another though is that you can try to manually sync only the parts 
of the buffers that the device actually touched instead of full 2kB,
and tell the DMA core to skip the sync of the full buffer.

      reply	other threads:[~2022-08-19 22:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  9:00 [PATCH net] net: fec: change the default rx copybreak length to 1518 wei.fang
2022-08-19 15:57 ` Andrew Lunn
2022-08-19 22:04   ` Jakub Kicinski [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=20220819150443.537904dc@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=wei.fang@nxp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).