bdev/nvme: do not split SGE callbacks on 2MB boundaries
An SGE could be for a payload that is greater than the NVMe devices MDTS (i.e. 128KB), but that SGE may not be aligned on a sector-size boundary. We can safely assume that each iov is individually physically contiguous - the DPDK mempools for example guarantee this. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I8143ed01814c3154d0a06b8bbc548484437c1e88
This commit is contained in:
parent
df8129fb39
commit
6d4ce17380
@ -791,10 +791,6 @@ queued_reset_sgl(void *ref, uint32_t sgl_offset)
|
||||
}
|
||||
}
|
||||
|
||||
#define min(a, b) (((a)<(b))?(a):(b))
|
||||
|
||||
#define _2MB_OFFSET(ptr) (((uintptr_t)ptr) & (0x200000 - 1))
|
||||
|
||||
static int
|
||||
queued_next_sge(void *ref, void **address, uint32_t *length)
|
||||
{
|
||||
@ -814,8 +810,6 @@ queued_next_sge(void *ref, void **address, uint32_t *length)
|
||||
*length -= bio->iov_offset;
|
||||
}
|
||||
|
||||
*length = min(*length, 0x200000 - _2MB_OFFSET(*address));
|
||||
|
||||
bio->iov_offset += *length;
|
||||
if (bio->iov_offset == iov->iov_len) {
|
||||
bio->iovpos++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user