Commit Graph

7423 Commits

Author SHA1 Message Date
Shuhei Matsumoto
4ea197883c lib/iscsi: Add iscsi_target_node_set_redirect RPC
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I090f55debe4ecdc47459bcfe0571a937f064313b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3439
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
420b2353ea lib/iscsi: Inform initiator that target has temporary moved to a different address
If the portal group map of the target has a redirect portal,
iscsi_tgt_node_is_moved() fills the buffer by the redirected address
and returns true.

iscsi_op_login_check_target() calls iscsi_tgt_node_is_redirected() before
calling iscsi_tgt_node_access() because login redirection can be
checked before any or after all security check.

If iscsi_tgt_node_is_redirected() returns true, notify login redirection
to the corresponding initiator.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4573a69c0a32eafcfe48080a033c135e127da321
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3221
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
2c8309e00e lib/iscsi: Update redirect portal of public portal group
iscsi_tgt_node_redirect() updates redirect portal of the initial
portal iin a primary portal group for the target node.

Check if the specified portal group is a public portal group and is
mapped to the target node first.

Then if the passed IP address-port pair is NULL, clear the current
redirect setting. Public portal group and private portal group are
clearly separated and redirect portal must be chosen from a private
portal group. Hence this clear method is intuitive and simple.

If the passed IP address-port pair is not NULL, check if they are
valid, and are not in the specified portal group. Then update a
redirect portal of the portal group map.

Finally, send asynchronous logout request to all corresponding
initiators.

Besides, change allocating pg_map from malloc to calloc to initialize
redirect portal.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I79d826663f4c3d5a117add286f133adeb1ce07f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3222
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
651f6d6a3a lib/iscsi: Return portals only in public portal group for SendTargets
All redirect portals in private portal groups are temporary and so they
should be informed only by temporary login redirection response.

Then this patch changes SendTargets operation to return portals only
in primary portal groups.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic62ada749886290df2d1490377cc5ca883b3f47a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3492
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
10d6218444 lib/iscsi: Create portal group as public or private portal group
In SPDK iSCSI target, portal group works almost as identifier of
portal.

To support iSCSI login redirection, we need to have two types of
portal groups, public and private portal groups.

We need portals of public portal groups to redirect to a portal in
a private portal groups at login via temporary login redirection
funciton, and we need to make SendTargets return only portals in
public portal groups.

To do these simply, we mark primary or secondary portal group expicitly
at its creation by this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iccf87a4b9dd1f4a8fbb857a399b8f2dbc7c0b3ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3491
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
0f22282fc3 lib/iscsi: Check if IP address-port pair is valid as redirect portal
Add a helper function iscsi_parse_redirect_addr() to validate the
passed IP address-port pair.

iSCSI login redirection will support only numeric IP address and
TCP port, and add AI_NUMERICSERV and AI_NUMERICHOST.

This function is almost same as nvme_tcp_parse_addr() and
nvme_rdma_parse_addr().

Besides, update error log in posix_sock_create() to use
gai_strerror(). gai_strerror() will provide more accurate
information as done by nvme_tcp_parse_addr() and nvme_rdma_parse_addr().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I65c6de81a64dcb26551ce796172d0458e1c298a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3357
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:27:43 +00:00
Tomasz Zawadzki
99d3695c2c lib/sock: bump SO_VERSION to 4.0
Following patch was merged while still having parent one
pointing before SPDK 20.07 release.
(61cd9d) lib/sock: Add option to enable or disable quick ACK

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1cbc0acfdd2a1a5403844167a107e0f63a2e213c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3709
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-10 14:41:16 +00:00
Shuhei Matsumoto
61cd9d308e lib/sock: Add option to enable or disable quick ACK
TCP delayed ACK can be disabled or enabled by enabling or disabling
quick ACK, respectively.

The recently added spdk_sock_impl_opts is helpful for sock library
to control quick ACK.

Hence this patch adds and uses an option enable_quickack. The option
is effective only for the POSIX sock module.

We have spdk_sock_opts now too but spdk_sock_impl_opts will be better
for this case.

This option is not supported on FreeBSD. FreeBSD users can set the
option globally via sysctl if desired.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic89620267acce5872dc8ecaf7a99bb70ae97e993
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3603
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-10 11:29:20 +00:00
Maciej Szwed
436fa2efae rocksdb: Update rocksdb code to work with spdk/rocksdb branch spdk-v6.10.2
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib907762e9124737a9ea7d4786903446e4ed61abb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3461
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-10 11:27:32 +00:00
Seth Howell
a22f55658c lib/nvme: add timeout to fabric connect commands.
We can't afford to wait here blocking forever. Add a
reasonable timeout (1 second) to this command.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I7e373c5515d42a46403f03d7d09e72225f8910ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3563
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-10 11:27:16 +00:00
Shuhei Matsumoto
5682de86c4 lib/iscsi: Add iscsi_portal_grp_find_portal_by_addr() as a helper function
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ieec2b9871d931c7ee394bc16444f5a283a9655bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3438
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
f5ee7d9bd8 lib/iscsi: Factor out send target portals from iscsi_send_tgts() into a helper function
iSCSI login redirect will change SendTargets. To make the change
easier, factor out sending target portals from iscsi_send_tgts
into iscsi_send_tgt_portals() even if iscsi_send_tgt_portals() is
used only once.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic565421afc9b099a507aac59ef7c741b113efa8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3443
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
1d08c96288 lib/iscsi: Remove unused the param iaddr from iscsi_send_tgts()
Previously we might have any possibility to need iaddr in
iscsi_send_tgts(), but it is highly unlikely now. Let's remove
the param iaddr from iscsi_send_tgts().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ide3405706b727a9d6ebaa92ed83509196ff675da
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3442
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
c15a6180cd lib/iscsi: Add pg_tag to the 2nd parameter of iscsi_conns_request_logout()
The upcoming new feature, iSCSI login redirection will requests
connections whose portal group tag matches to logout asynchronously.
Hence add pg_tag to the second parameter of iscsi_conns_request_logout()
and iscsi_conns_request_logout() checks if conn->pg_tag is equal to
the passed pg_tag.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iaea37f28046396404c5b4faed01d748f2944288c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3160
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
aa69140dba lib/iscsi: Remove unused the param conn from iscsi_append_text()
Previously we might have any possibility to need conn in
iscsi_append_text(), but it is highly unlikely now. Let's remove
the param conn from iscsi_append_text(). This patch includes a
minor simplification not to use rc but return directly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifa009c1374e878f8d3b9c0043ba0352f59010b59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3157
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
c0d796d7f8 lib/iscsi: Use fixed size char array to parse string of portal address and port
Dynamically allocated string is not necessary, and use fixed size
char array for simplification instead.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iada118fbc81f24d0273269f4980bab28bd9c2c23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3161
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
92b28effd4 lib/iscsi: Abort queued R2T task before submitting abort request to SCSI layer
Previously iscsi_del_transfer_task() and iscsi_clear_all_transfer_task()
were called after SCSI layer completed abort request.

However, SCSI layer waits until all target requests are aborted or
completed anyway.

So the timing to call iscsi_del_transfer_task() and
iscsi_clear_all_transfer_task() were not effective.

Hence for ABORT TASK, call iscsi_del_transfer_task() before
iscsi_op_abort_task(), for ABORT TASK SET and LUN RESET, call
iscsi_clear_all_transfer_task() before iscsi_op_abort_task_set().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7c22b7305499e6e7d7335b7b5616a3abac0252c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3149
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
a4b5041cd0 lib/nvmf: Fix return type to be alone on a line for _nvmf_ctrlr_destruct()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0af1bf6fa8dc5dec0263ea799f166632c10078ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3624
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-06 23:33:00 +00:00
Ziye Yang
4ba5e90176 nbd: Add the O_DIRECT flag when opening the file.
To eliminate the cache issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Id67fabb901de9666e6bad04c9df74a538bdbc659
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3662
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Sun Zhenyuan <sunzhenyuan@baidu.com>
2020-08-06 22:43:20 +00:00
Ziye Yang
7bac9b06f1 nvme TCP: Make the control related pdu also allocated from the SPDK DMA memory
Purpose: To make the pdu management consistent with other PDUs, then
we can easily adapt our code into some hardware offloading solution.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic4a2847fd1b6cacda4cbaa52ff12c338f0394805
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3588
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-04 18:28:08 +00:00
Alexey Marchuk
864d93c053 nvmf: Add check for bidirectional xfer type
RDMA target can't handle bidirectional xfer type, in debug build
it throws an assert in nvmf_rdma_setup_wr function. NVMF controller
performs checks od opcodes, but the failure happens before this
check. Add similar validation in TCP transport.

Change-Id: I14400b9c301295c0ae1d35a4330189d38aeee723
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3436
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-04 18:27:45 +00:00
Darek Stojaczyk
4e0208001c json_config: fix static analyzer false-positive
The variable can't be uninitialized, but gcc complains:

json_config.c:415:3: error: ‘params_len’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
   spdk_json_write_val_raw(w, cfg.params->start, params_len);

Change-Id: I845dcc19fa18c3583c420e66c16c11a3fdf99ad4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3626
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-04 16:57:08 +00:00
Seth Howell
ab3a465554 lib/bdev: fix potential mem leak in part.c
The way this is written currently, there is a
(very very unlikely) chance that the first strdup
fails and the second one succeeds. Just clean that
up.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5ca1106c713753448a2bf988166a2d79ab9fa86d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3610
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-04 16:56:42 +00:00
Seth Howell
305d64589e lib/virtio: fix heap use after free issue.
fixes 79c7744efb

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ia7919b8922de7e99b0a9f5266a96940f05f4865c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3609
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-04 16:56:42 +00:00
Jacek Kalwas
beb468e9c7 nvmf: fix cc.en and csts.rdy setting during shutdown
CC.EN, CSTS.RDY should not be modified during shutdown.
It doesn't make much sense (against nvme spec) and nvmf spec 1.1
doesn't mentioned it (4.6) either.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I7014b10b0217db61c3d380d5c0843808e54577cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3477
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-04 16:56:22 +00:00
Jacek Kalwas
aedcec8a0c nvmf: disconnecting io qpairs during shutdown handling
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Iaee05abead7c685989d91f965133ee6b9e221f89
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3476
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-04 16:56:22 +00:00
Tomasz Zawadzki
241f290794 json_config: do not attempt to resolve JSON that failed decode
When config entry fails spdk_json_decode_object(),
that basically means incorrectly formatted JSON config.
Decode object is simple enough here - 'method' and optional 'params'.

Before this change SPDK_ERRLOG printed garbage, rather than JSON
object that failed the decode.

We actually should not do it at all:
- the object is not formatted right already
- it might be the last object, so spdk_json_next() won't work

It was not usefull, so this patch removes it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ife67ac0d9a1a66d567bfbdd5896e893f3e8cb3ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3257
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-31 08:23:53 +00:00
Tomasz Zawadzki
cebf307b61 json_config: do not assume JSON contains 'params' field
Not all JSON methods require 'params' field to be supplied.
Verification of the JSON is done on server side in
parse_single_request().

We should not attempt to process garbage values on correct
JSON config file during app start.

Segfault can be observed if following valid JSON config is supplied:
{
	"method": "framework_wait_init"
}
Resulting in:
json_config.c:388:13: runtime error: applying non-zero offset 18446744073709551600 to null pointer
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3386067==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x0000007260ff bp 0x7ffe6ea06890 sp 0x7ffe6ea067e0 T0)
==3386067==The signal is caused by a READ memory access.
==3386067==Hint: this fault was caused by a dereference of a high value address (see register values below).  Dissassemble the provided pc to learn which register was used.
    #0 0x7260ff in app_json_config_load_subsystem_config_entry /home/tzawadzk/spdk/lib/event/json_config.c:391
    #1 0x7cbb13 in msg_queue_run_batch /home/tzawadzk/spdk/lib/thread/thread.c:505
    #2 0x7cd00a in thread_poll /home/tzawadzk/spdk/lib/thread/thread.c:581
    #3 0x7cfe18 in spdk_thread_poll /home/tzawadzk/spdk/lib/thread/thread.c:689
    #4 0x71d6ef in _reactor_run /home/tzawadzk/spdk/lib/event/reactor.c:326
    #5 0x71eb00 in reactor_run /home/tzawadzk/spdk/lib/event/reactor.c:382
    #6 0x71f911 in spdk_reactors_start /home/tzawadzk/spdk/lib/event/reactor.c:477
    #7 0x718237 in spdk_app_start /home/tzawadzk/spdk/lib/event/app.c:691
    #8 0x407e94 in main /home/tzawadzk/spdk/app/spdk_tgt/spdk_tgt.c:120
    #9 0x7f0f2eef2041 in __libc_start_main ../csu/libc-start.c:308
    #10 0x4079ad in _start (/home/tzawadzk/spdk/build/bin/spdk_tgt+0x4079ad)

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7ef1a764467817ad788fdf5dbe17eaeb99dcc22e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3256
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-31 08:23:53 +00:00
Seth Howell
0d8f86f842 lib/nvme: don't submit request if qpair is disconnected.
This becomes a problem when the qpair is reconnected.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I6677b396cf766684a4891ffbee93aa3e4e83374d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3391
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-31 08:23:44 +00:00
Jacek Kalwas
92f29271d5 nvmf: add aqa property rsvd bits validation
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I824544f8b8faa040a5e0a6802c8ff611d3cb3b86
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3249
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-07-31 08:23:30 +00:00
Jacek Kalwas
e5bf2a1966 nvmf: fix aqa property validation
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I4de16c80fda5a39cfcdb15badb0d37acd1a5a21c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3102
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-31 08:23:30 +00:00
GangCao
51e8c2362b RPC: update the error message for current RPC state
This is to fix below issue:
https://github.com/spdk/spdk/issues/1516

Change-Id: Ibd7b4692b3d94fb7131aa0763d7fb7f6298d4101
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3565
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-07-31 08:21:37 +00:00
Changpeng Liu
da60639f86 rocksdb: call spdk_app_stop before exit the process
For some other reason when the host didn't have a block
device e.g: "Nvme0n1", we will call exit(1) directly in
the process, the ASAN will report memory leak issue, so
before exiting the process, we call spdk_app_stop to
do the cleanup.

Fix issue #1422.

Change-Id: I7b7a05807625586bd5b97dc31f41e2b86e1b323f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3586
Community-CI: Mellanox Build Bot
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-31 08:21:10 +00:00
Alexey Marchuk
6967fec6df nvmf/rdma: Submit recv to SRQ when AER is released
Currently we don't resubmit receive request associated with AER
request to SRQ. This leads to reducing of SRQ elements and may
lead to non responsive NVMF target.

Fixes #1507

Change-Id: Ie96f8c4be0202ae973e561ebe5ea28688a6a3b72
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3558
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-30 18:20:30 +00:00
Jin Yu
79c7744efb virtio: fix virtio hw double free issue
During virtio_pci_dev_probe, if enum_cb fails, hw needs
to be released. But in bdev_virtio, if vdev fails after
initialization, it will enter the bdev destruction process
which call the modern_destruct_dev function and hw will
be released during the process. So we will encounter the
problem of hw being released twice.

Change-Id: Ifba35284c072355ba0e10428b597a1894d32d59e
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3564
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-07-30 08:43:23 +00:00
Ben Walker
a9be2ce64a env: Rename pci_device_rte_hotremove to pci_device_rte_dev_event
Give this a more generic name. We're going to be using these
events for more than just hotremove coming up.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ia5356e9ab809807ba4d85ecc212a496e96012bce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3559
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-30 08:43:06 +00:00
yidong0635
0d73f143b8 lib/iscsi: Put bits NAND or OR together.
We can OR some of the bits ,and setting them one time.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ie919ef66f3b8deea125df47d2194130b364c302a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3489
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-07-30 08:43:00 +00:00
Ben Walker
e12a4f6ec8 Revert "thread: add spdk_env_get_primary_core"
This reverts commit 6194cb2e15.

It's unclear whether we need to add a new API for the env layer
for upcoming work. Nothing currently uses it. When we have a clear
need, we can add this back in.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I174276799d650a1365b37a737271a54a796cd455
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3561
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-29 14:58:44 +00:00
Jin Yu
b45f293d57 vhost-blk: add resize bdev support
This will allow us to resize the backend bdev of vhost-blk
and notify the guest OS that the capactiy of virtio-blk
disk has been resized.

The spdk api entry is `spdk_bdev_notify_blockcnt_change`.
Any bdev if used as vhost-blk backend may need to implement
a rpc that calls this function.

Related DPDK patch has been merged and release in 20.02.
https://www.mail-archive.com/dev@dpdk.org/msg153365.html

Change-Id: I961c61de0fc03e210d776035a40f3a4adfa9b4f3
Signed-off-by: Li Feng <fengli@smartx.com>
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1468
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-29 08:05:31 +00:00
Seth Howell
0b1799cd98 nvme/transport: addd assert for transport.
Silences a KW error.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ifd8d6088a22de7c230d48751be2b3991d0649778
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3553
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-29 07:37:26 +00:00
paul luse
8d059e7a18 accel: add API to cancel a batch sequence
Added to the framework as well as all 3 engines.  Needed by apps
in the event that they have to fail following the creation of a
batch, allows them to tell the framework to forget about the batch
as they have no intent to send it.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id94754ab1350e5a969a5fd2306bd59c38f0a0120
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3389
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-27 22:43:40 +00:00
Jim Harris
751e2812bc nvme: do not abort reqs in multi-process cleanup path
When a process cleans up IO qpairs from another crashed
process in a multi-process environment, we must not try to
abort reqs for that IO qpair.  Any reqs will contain callbacks
for the crashed process which we must not try to execute in
a different process.

Fixes issue #1509.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5e58cce7bdb86e3feb4084733815c086901f867e

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3536
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-27 22:42:07 +00:00
Alexey Marchuk
3d1d4fcf54 nvmf/rdma: Send ibv async event to the correct thread
Since rqpair->qpair.group is set to NULL when we remove the
qpair from poll group, we fail to send event to qpair's thread.
This patch adds a pointer to io_chaneel to spdk_nvmf_rdma_qpair
structure and a function to handle poll_group_remove transport
operation. In this function we get io_channel from nvmf_tgt,
this channel will be used to get a thread for sending
async event notification. This also guarantees that the thread
will be alive while we are destroying qpair.

Change-Id: I1222be9f9004304ba0a90edf6d56d316d014efda
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3475
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-27 17:19:44 +00:00
Darek Stojaczyk
6b41a08654 dpdkbuild: build dpdk with meson+ninja
Makefile support in DPDK was deprecated and will be removed soon,
so switch to the officially supported way of building DPDK -
with meson and ninja. Two new tools. Basically, our Makefiles
will invoke meson+ninja for DPDK, no other SPDK components are
affected.

Apparently DPDK wanted to move away from an octopus-like config
system and the ideology behind meson configuration is simple now:
build everything by default. Some PMDs can be explicitly disabled
with meson command line, but all libraries (both static and shared
versions) and test apps are built unconditionally.

How long does it take to build minimal DPDK with meson? Too much.
On my machine half of the total build time is spent on libraries
we don't need at all. (I have some hacks up my sleeve to disable
building those libraries - see the subsequent patch.) As for the
official way of building a minimal DPDK, there was a patch [1]
on dpdk mailing list to introduce more specific configuration,
but it was rejected:

> We talked about this a few times in the past, and it was actually one
> of the design goals to _avoid_ replicating the octopus-like config
> system of the makefiles. That's because it makes the test matrix
> insanely complicated, not to mention the harm to user friendliness,
> among other things.
>
> If someone doesn't want to use a PMD, they can just avoid installing it
> - it's simple enough.
>
> Sorry, but from me it's a very strong NACK.

Let's not follow that direction, hack the DPDK build system instead.

As for advantages of meson+ninja over Makefiles? I can't find any.
It's another build system that does a lot for you with some functions,
magic options, and a built-in dependency system. It seems nice if you know
the syntax, but it's another component that you need to learn, debug,
and possibly find bugs in (there's a lot of github issues open for meson).
I would compare it to CMake.

As for changes in this patch: rather that explicitly disabling
PMDs we don't need, specify a list of PMDs we do need and disable
everything else found in ./dpdk/drivers/*. This way we won't have
to disable the new PMDs as they're added to DPDK.

Meson configuration also sets RTE_EAL_PMD_PATH #define to a valid directory
with built PMD shared libs. When it's set, DPDK dynamically loads all shared
libraries inside. The drivers there depend on DPDK shared libs and fail to
load in static SPDK builds, so we disable them altogether by unsetting
RTE_EAL_PMD_PATH in the meson-generated config file - just like
DPDK Makefiles did. EAL checks for RTE_EAL_PMD_PATH being empty and skips
loading any external PMDs then. We do it for both static and shared libs.
We specify all PMDs at build time for now, so there's just no need to load
them dynamically.

We have three more hacks in our submodule:
 * disable building dpdk apps by commenting-out a line in dpdk/meson.build
 * disable building unnecessary libs (build everything that spdk *may*
   need)
 * build isa-l compress pmd with `-L[...] -lisal`. DPDK expects to find
   libisal with pkg-config. We don't want to prepare a pkg-config file,
   so comment-out a failing check in another meson.build file and provide
   isa-l through CFLAGS and LDFLAGS.

We also need to make some changes to our test/external_code. First of
all, -ldpdk is no more. Meson build generates a pkg-config file with all
libs, but we'll switch to it in a separate patch - for now just specify
all -lrte_ libs one by one. -Wl,--no-as-needed has to be added to some
test cases, otherwise rte_mempool_ring isn't loaded. We don't use any
APIs from this library, it only has a static constructor that provides
a few callbacks used by rte_mempool_create(). Also, since DPDK now builds
both static and shared libraries, we need to add -Wl,-Bstatic to force
using static libswhere required. It's only needed for DPDK libs, but we
use it for SPDK libs as well since there's no harm.

As for performance:
$ ./configure --enable-debug --with-crypto --with-reduce
$ time make -j40 -C dpdkbuild all
with meson:
real    0m8.287s
user    1m7.983s
sys     0m10.548s

before, with the old DPDK makefiles:
real    0m20.232s
user    0m55.921s
sys     0m16.491s

The subsequent builds are much faster too:
$ time make -j40 -C dpdkbuild all
meson:
real    0m0.876s
user    0m0.663s
sys     0m0.217s

makefiles:
real    0m10.150s
user    0m11.740s
sys     0m6.772s

[1] http://inbox.dpdk.org/dev/1a07d1cd59d84dce84e56c10fdabf5e5504560a6.camel@debian.org/

Change-Id: Ic65db563014100bafb12e61ee0530cc2ae64401d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1440
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-24 22:06:11 +00:00
Darek Stojaczyk
cdffd22581 env_dpdk: move NVMe PCI driver definition to the nvme lib
Now that drivers can be registered from upper layers there's
no need to keep them centralized inside env.

(check_format.sh complains that spdk_pci_nvme_get_driver() shouldn't
start with the spdk_ prefix - to workaround that we move the function
declaration from one place in env.h to another - that's enough to
convince check_format it really is a public function)

Change-Id: If86aebd6c997349569c71430ec815b413eb44ef8
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3187
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 21:42:26 +00:00
Darek Stojaczyk
f425f16385 env: add spdk_pci_driver_register() to the public API
This allows SPDK apps to register new PCI drivers outside of
the env layer, enabling SPDK as a whole with new use cases.

Change-Id: I0c998a9ec249c3ca610b7b3b8b6caf616b16f64c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3185
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 21:42:26 +00:00
Darek Stojaczyk
3498c0a886 env: add spdk_pci_get_driver()
An alternative to spdk_pci_*_get_driver();

Change-Id: I20a80b3c655a37fb1c76da21c2b70d5678041fab
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3186
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 21:42:26 +00:00
Darek Stojaczyk
e6decf684a env_dpdk: add DPDK-independent driver information to spdk_pci_driver
We want to make struct spdk_pci_driver public, so add env-agnostic
fields that define a driver directly to that struct.
PCI driver registration (potentially in upper layers) will only use
spdk_pci_id-s and spdk pci drv_flags, then those will be translated
to DPDK equivalents inside env_dpdk.

Change-Id: Ia24ecfc99ebf0f54f096eaf27bca5ed9c0dfe01d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3183
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 21:42:26 +00:00
paul luse
f7d25cf7c7 lib/accel: remove dead code
Not needed with new scheme around accel_task in prior patches.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic6f16654db62fe1dc51b0822f0ff92261da4494c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3212
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-24 19:38:46 +00:00
paul luse
ee7e31f9ae lib/accel: remove the need for the app to allocate an accel_task
This was sort of a clunky interface requiring a couple of inline
functions in every app that wants to use the accel_fw moving
forward. By having the accel_fw public API accept a callback arg
instead of an accel_task combined with adding a pool of accel_tasks
in the accel_fw engine we can eliminate this.

After changing the parm to a cb_arg, changes were made to all accel_fw
interfaces to put cb_fn and cb_arg as the last parms in public and
private function calls.

Related bdev_malloc changes need to be in this patch in order to pass CI.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2b75764e534562d91484a094c3352266156d8425
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3209
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-24 19:38:46 +00:00