Commit Graph

322 Commits

Author SHA1 Message Date
Daniel Verkamp
cc1146a8b5 iscsi: move iSCSI-specific SenseLength into PDU
This removes the 2 bytes of SenseLength from the beginning of the SCSI
sense_data buffer, so now the offsets within sense.data match up to the
expected values from the SCSI spec.

Change-Id: I9188560096a9ec5a8fcf83bec95201521b127494
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-02 14:15:09 -07:00
Piotr Pelplinski
a2d0fa5351 spdk: add support for readv and writev in scsi layer
This patch adds support for spdk_bdev_readv in scsi layer.
It also fixes write so that it uses multiple iov's instead of one.
Currently we should use only task->iov (for single vector operation)
or task->iovs (for multiple vector operations).

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ia3b2f6d18fd212b11d7b63b11dc46ec5bbc74788
2016-10-26 04:24:08 -07:00
Piotr Pelplinski
074b6d2430 spdk: remove iobuf from spdk_scsi_task
This patch removes reduntant field in spdk_scsi_task and
fixes all logic to use iov.iov_base

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ie2fa1e2357b6383c118d05aec9206d1c60537d40
2016-10-24 09:11:05 -07:00
Ben Walker
18a2cc11c1 env: Remove unused DPDK headers.
Remove #includes for all DPDK headers that weren't
necessary.

Change-Id: Ib02522e0f04e64a1c98afceb7508cc0e8d931a9d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-12 09:53:32 -07:00
Ben Walker
535827c559 env: Eliminate remaining usage of rte_memzone
This was only used for debugging. Everywhere else
used the spdk_memzone abstraction.

Change-Id: I8a828ea3c7abccb66c8a027cb13de43c560ff7a1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-12 09:53:32 -07:00
Ziye Yang
cc402a588e iscsi: change the type and name of data_ref in spdk_iscsi_pdu
Change the type from int to bool and change the name
from data_ref to data_from_mempool.

Change-Id: If1fc11761e63561443ed44d6a0860e416e424df8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-10-12 09:11:09 -07:00
Ben Walker
0aa2986475 Replace rte_get_tsc calls with spdk_get_ticks
Change-Id: I809b900321433693ff9f2498183ad0dcdbb15030
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-11 13:34:09 -07:00
Ben Walker
2224ff2162 env: Replace rte_malloc with spdk_zmalloc
Use the env library to perform all memory allocations
that previously called DPDK directly.

Change-Id: I6d33e85bde99796e0c85277d6d4880521c34f10d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-11 13:34:09 -07:00
Ben Walker
a17ad921e2 Replace RTE_VERIFY with assert
We already require the assert header from the C standard library,
so use that instead of RTE_VERIFY to further isolate DPDK
dependencies.

Change-Id: I4a718af858c88aff6080e33e6c3dd533c077b8f4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-09-28 10:15:56 -07:00
Cunyin Chang
b7a5c653e7 iscsi: optimization for read process.
This patch aimed at avoid run out of large rbuf for read commands

Change-Id: Ibc42b2216e929f8dfa59cba1b32ae8d52a1a345e
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-09-27 08:13:07 -07:00
Ziye Yang
1be062decd iscsi: Extract common statements in spdk_iscsi_append_text
Also this patch removes the unnecessary empty line

Change-Id: I2db31b88796e57298a7df59945868ee7a7750290
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-09-26 16:05:26 -07:00
Jim Harris
5e86ed2620 Revert "iscsi: optimization for read process."
This reverses commit d79522497a.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id6b431f90df35ff77736c0059b065092b7e1e9b8
2016-09-23 11:35:54 -07:00
Daniel Verkamp
2e9cd2cd77 iscsi: eliminate pointless temporary log buffer
SPDK_NOTICELOG() can already do printf()-style formatting, so there is
no need to use snprintf() on a temporary buffer first.

Change-Id: Iffb5369b74f27fb2c4b3ac07ea0cdeab52258ba1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-09-22 20:59:31 -07:00
Cunyin Chang
d79522497a iscsi: optimization for read process.
This patch aimed at avoid run out of large rbuf for read commands.

Change-Id: If10f45292da5d5a26c2e338f1ddeafccedb88a4c
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-09-22 20:58:03 -07:00
Cunyin Chang
dadbf52dda iscsi: optimization for read command.
flush the data in pdu to client if the pdu are ready and sequential.

Change-Id: Idf0ec0c7f6058790a85407dff324900fd36c9527
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-09-09 07:58:19 -07:00
Daniel Verkamp
d2ea70cafd iscsi: use spdk/endian.h functions
Switch from the non-portable <sys/endian.h> functions (htobeXX/beXXtoh)
to the SPDK endian conversion functions.

Change-Id: Id49b87f2e536c68f0d5d567e78e1990c0a37ef14
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-25 13:29:56 -07:00
Daniel Verkamp
1cac214f53 iscsi: remove unused header includes
Change-Id: I4ce69ad4a714ba0a1dadb6897fad68582e14307d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-23 09:32:19 -07:00
Cunyin Chang
fcc97846fa iscsi: Return check condition if the IO size exceed the maximum value.
Change-Id: Ibd36dda002559dbbf050253eb06ca24a179dbb66
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-08-10 11:32:26 -07:00
Daniel Verkamp
3c8183956e iscsi: use spdk_app_get_current_core() for events
Change-Id: I3758c147b9aed291ecd5a1361e20786d4d377e19
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
02d42f4a69 iscsi: remove stray Doxygen file markers
Change-Id: Ia4f0b926b1e79e20a46b4c6af7cfd195e57824e3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Daniel Verkamp
ad6fa9f0d6 iscsi: replace printf()s with spdk/log.h calls
Change-Id: Ic2df5a410f5308bf8567058659d518052395fc36
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-08 15:53:57 -07:00
Ben Walker
d29384bf97 iscsi: Add an iscsi library.
Change-Id: I28f3f4723a66f845eb478a6873d7aedb8f5409b8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-08-03 14:43:40 -07:00