From: alex.nlnnfn@gmail.com (alexnln)
Subject: offest calculation from the dma_address
Date: Fri, 14 Apr 2017 13:54:51 +0300 [thread overview]
Message-ID: <20170414135451.515c3a53134384c388071989@gmail.com> (raw)
Hello,
In pci.c, in nvme_setup_prps() offset is calculated from the dma address:
int offset = dma_addr & (page_size - 1);
Why not to use sg->offset?
I mean, what if hypothetical dma allocator returns non-page aligned addresses?
In such case offset would be wrong.
Thanks,
Alex
next reply other threads:[~2017-04-14 10:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-14 10:54 alexnln [this message]
2017-04-14 14:00 ` offest calculation from the dma_address Keith Busch
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=20170414135451.515c3a53134384c388071989@gmail.com \
--to=alex.nlnnfn@gmail.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