linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/2] nvme: fix iod size calculation in nvme_probe()
@ 2020-07-09 23:40 Chaitanya Kulkarni
  2020-07-09 23:40 ` [PATCH V2 1/2] nvme-core: replace ctrl page size with a macro Chaitanya Kulkarni
  2020-07-09 23:40 ` [PATCH V2 2/2] nvme-pci: use max of PRP or SGL for iod size Chaitanya Kulkarni
  0 siblings, 2 replies; 10+ messages in thread
From: Chaitanya Kulkarni @ 2020-07-09 23:40 UTC (permalink / raw)
  To: hch, kbusch, sagi; +Cc: Chaitanya Kulkarni, linux-nvme

Hi,

This is a small patch series which fixes the IO size calulation in the
nvme_probe.

The first patch replaces the ctrl->page_size with a macro. The second
patch calculates the maximum value based on NVMe PRP and SGL size.

I've tested this patch with different block sizes 4k-128k on NVMe QEMU
and NVMe PCIe (non-SGL) controller.

Regards,
Chaitanya

* Changes from V1:-
-------------------

1. Remove the ctrl->page_size and use macro instead.
2. Get rid of the conditional operater and use max_t() for SGL vs PRP
   size calulation.

Chaitanya Kulkarni (2):
  nvme-core: replace ctrl page size with a macro
  nvme-pci: use max of PRP or SGL for iod size

 drivers/nvme/host/core.c | 19 +++++--------
 drivers/nvme/host/nvme.h |  9 ++++++-
 drivers/nvme/host/pci.c  | 58 +++++++++++++++++++---------------------
 3 files changed, 42 insertions(+), 44 deletions(-)

-- 
2.26.0


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-07-14 16:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 23:40 [PATCH V2 0/2] nvme: fix iod size calculation in nvme_probe() Chaitanya Kulkarni
2020-07-09 23:40 ` [PATCH V2 1/2] nvme-core: replace ctrl page size with a macro Chaitanya Kulkarni
2020-07-10 14:57   ` Keith Busch
2020-07-11 18:20     ` Chaitanya Kulkarni
2020-07-13  7:42   ` Christoph Hellwig
2020-07-14  0:02     ` Chaitanya Kulkarni
2020-07-14 16:44     ` Keith Busch
2020-07-09 23:40 ` [PATCH V2 2/2] nvme-pci: use max of PRP or SGL for iod size Chaitanya Kulkarni
2020-07-13  7:42   ` Christoph Hellwig
2020-07-13 23:59     ` Chaitanya Kulkarni

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).