Skip to content

Commit

Permalink
nvme: allocate aligned payloads for all nvme commands
Browse files Browse the repository at this point in the history
The kernel supports since v5.2 direct mapped DMA buffers to userspace.
Up to this point a bounce buffer was involved. Because the buffers are
now directly accessed by the device, the rules of alignment also apply
for the payloads.

Use the newly introduced nvme_alloc helper to allocate correctly aligned
payloads for all nvme commands.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
  • Loading branch information
igaw committed Sep 20, 2023
1 parent fe24b9e commit 1a8bd30
Show file tree
Hide file tree
Showing 3 changed files with 610 additions and 334 deletions.
2 changes: 1 addition & 1 deletion nvme-print.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include <ccan/list/list.h>

typedef struct nvme_effects_log_node {
struct nvme_cmd_effects_log effects; /* needs to be first member because of alignment requirement. */
enum nvme_csi csi;
struct nvme_cmd_effects_log effects;
struct list_node node;
} nvme_effects_log_node_t;

Expand Down

0 comments on commit 1a8bd30

Please sign in to comment.