From 473d5a8f149b324d6c3586ab356896ef2cb02043 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Tue, 5 Feb 2019 22:31:38 +0100 Subject: [PATCH] iscsi: don't store paddr in pdu buffers The physical addresses in iSCSI are completely unused as iSCSI does not perform any DMA on its own. Change-Id: I350037b708a9f36f423e6ca6f7c822d8b6b95116 Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.gerrithub.io/c/443482 Tested-by: SPDK CI Jenkins Reviewed-by: Paul Luse Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- lib/iscsi/iscsi_subsystem.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/iscsi/iscsi_subsystem.c b/lib/iscsi/iscsi_subsystem.c index 51bbca3a6f..85c16518ea 100644 --- a/lib/iscsi/iscsi_subsystem.c +++ b/lib/iscsi/iscsi_subsystem.c @@ -130,21 +130,11 @@ spdk_mobj_ctor(struct spdk_mempool *mp, __attribute__((unused)) void *arg, void *_m, __attribute__((unused)) unsigned i) { struct spdk_mobj *m = _m; - uint64_t *phys_addr; - ptrdiff_t off; m->mp = mp; m->buf = (uint8_t *)m + sizeof(struct spdk_mobj); m->buf = (void *)((unsigned long)((uint8_t *)m->buf + ISCSI_DATA_BUFFER_ALIGNMENT) & ~ISCSI_DATA_BUFFER_MASK); - off = (uint64_t)(uint8_t *)m->buf - (uint64_t)(uint8_t *)m; - - /* - * we store the physical address in a 64bit unsigned integer - * right before the 512B aligned buffer area. - */ - phys_addr = (uint64_t *)m->buf - 1; - *phys_addr = spdk_vtophys(m, NULL) + off; } #define NUM_PDU_PER_CONNECTION(iscsi) (2 * (iscsi->MaxQueueDepth + MAX_LARGE_DATAIN_PER_CONNECTION + 8))