From: Andrew Lunn <andrew@lunn.ch>
To: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Eric Gratorp <Eric.Gratorp@infinera.com>
Subject: Re: Ethernet TX buffer crossing 4K boundary?
Date: Thu, 21 Apr 2022 14:32:35 +0200 [thread overview]
Message-ID: <YmFO431VWIR7e2hi@lunn.ch> (raw)
In-Reply-To: <7e3fa36a3e16aca6fd7d00cadeeba8a8d71ceb0d.camel@infinera.com>
On Wed, Apr 20, 2022 at 09:09:58PM +0000, Joakim Tjernlund wrote:
> We have this custom Ethernet controller that cannot DMA a buffer if the buffer crosses 4K boundary.
> Any ideas how to deal with that limitation in the driver?
Does the DMA support scatter gather? You might be able to tweak the
generic scatter gather code to generate two blocks if it crosses the
boundary.
Otherwise, maybe look at the DMA bounce buffer code. It is normally
used when the DMA is limited in its address range, and the buffer
needs copying to another address. Maybe you can add a special mode
where it looks at if a 4K page is cross and then makes use of a bounce
buffer.
Andrew
next prev parent reply other threads:[~2022-04-21 12:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 21:09 Ethernet TX buffer crossing 4K boundary? Joakim Tjernlund
2022-04-21 12:32 ` Andrew Lunn [this message]
2022-04-21 13:39 ` David Laight
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=YmFO431VWIR7e2hi@lunn.ch \
--to=andrew@lunn.ch \
--cc=Eric.Gratorp@infinera.com \
--cc=Joakim.Tjernlund@infinera.com \
--cc=netdev@vger.kernel.org \
/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).