Available in qemu >= 5.1.0. Note that since CMB and PMR share the same
BAR they cannot be used together. If both are specified, PMR setup is
skipped.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ia0c6681b5ac7563efc6c32d2fff1808814196676
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7018
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Since the maps are unique to modules, they can store the group_impls
directly.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I7f11db558e38e940267fdf6eaacbe515334391c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7222
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>
This allows for different policies per module, as well as overlapped
placement_id values.
Change-Id: I0a9c83e68d22733d81f005eb054a4c5f236f88d9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7221
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>
If the qpair is part of a poll group, the socket will get
flushed as part of polling that group already. We only need
to explicitly flush to handle the case where the qpair is
not in a poll group.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ib2a510b6d26d1622950437d81e0a40f6b15d6b54
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7049
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
There was a fix for this that went into the posix layer, but the
underlying problem is the logic in the nvme/tcp transport. Attempt to
fix that instead.
Change-Id: I04dd850bb201641d441c8c1f88c7bb8ba1d09e58
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6751
Community-CI: Broadcom CI
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>
This list will hold any socket that has some event pending and needs to
be part of the set returned during polling of the group.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I5acf01677e59c1026f93671c7b7b3dc458075bf7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6748
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>
Community-CI: Mellanox Build Bot
Instead of iterating the list, we can just manipulate the list
in a single step.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I0172cdbce9af35a62d62dbccfac573e5d723f43a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6747
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>
Community-CI: Mellanox Build Bot
Logs are all changed to DEBUGLOG. If you compiles non-debug mode.
Gcc reports error. Using #ifdef DEBUG to exclude them.
Fixes#1903
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Idcaf083e430a77845fbd8443acade4b3f0e1efc9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7445
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>
Even if the operation is deferred, null it out if it reported success.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I3cc9eaa88bdd7a2e7d13790782f4a9b0966e5585
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6892
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
-x is supported since 0.4.0 release, make a note of that.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Icc64132536c18108029f6c5fa2cbdd5b27018d8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7417
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Test scenario is as follows.
Some iSCSI initiator sends a Data-OUT PDU sequence such that the size of
the data segment of any Data-OUT PDU is not block size multiples.
Test if such complex Data-OUT PDU sequence is processed correctly.
Desired Data Transfer Length is 5 * SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH / 2.
Number of Data-OUT PDUs is 4. Length of the data segment of the first two PDUs are
SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH / 2 - 4. Length of the data segment of the
third PDU is SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH. Length of the data segment
of the final PDU is SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH / 2 + 8.
Three data buffers should be used and three subtasks should be created and submitted.
The test scenario assume that a iscsi_conn_read_data() call could read
the required length of the data and all read lengths are 4 bytes multiples.
The latter is to verify data is copied to the correct offset by using data patterns.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5e3939d07cd4f50fe3dcf659a18a9f8fcbe01e07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6584
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>
Community-CI: Mellanox Build Bot
Test sharing data buffer among multiple Data-OUT PDUs.
Allocate real data buffers and the iscsi_conn_read_data() stub writes
data patterns into them.
The data pattern is to write offset per 4 bytes. This requires read
length to 4 bytes multiples but the requirement will be acceptable.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I87c673c3bb0ada2afebb9332af9525cd9d7388f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6568
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>
Community-CI: Mellanox Build Bot
Some iSCSI initiators send a Data-OUT PDU sequence whose PDUs do
not have block size multiples data.
SPDK iSCSI target had replied SCSI write error to such initiators
because previously we had sent a write subtask per Data-OUT PDU.
SPDK SCSI library had rejected the write subtask because its data
was not block size multiples.
This patch fixes the issue.
The idea is to aggregate multiple Data-OUT PDUs into a single write
subtask up to 64KB or until F bit is set. MaxRecvDataSegmentLength
is 64KB but MaxBurstLength is 1MB. Hence one Data-OUT PDU data may
be split into multiple data buffers, but the maximum number of split
is two.
When processing the data segment of the Data-OUT PDU, save the data
buffer of the current PDU to the current task if the data buffer is
not full and F bit is not set. In this case, write subtask is not
submitted.
When processing the header of the Data-OUT PDU, if the current task
saves the data buffer from the last Data-OUT PDU, it passes the data
buffer to the Data-OUT PDU.
When reading the data segment of the current PDU, attach the second
data buffer to the current PDU if the first data buffer becomes full.
These are enabled only if DIF is disabled.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib9cfb53fe8c0807a63e58c61bed3bb52f60f4830
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6439
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>
Community-CI: Mellanox Build Bot
Change-Id: I4ed583d91ae9e820be1ee6f4553f29d6650c4922
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5791
Community-CI: Broadcom CI
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: Jim Harris <james.r.harris@intel.com>
It can divide to two parts:
1, UIO driver - sigbus error handling and uevent
process.
2, VFIO - request notify handling.
sigbus error process is in previous patch.
Change-Id: Idc09754b83ae9ddcaea1f2afcbc13e528ead9863
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5768
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
struct sockaddr_nl {
sa_family_t nl_family; /* AF_NETLINK */
unsigned short nl_pad; /* Zero */
pid_t nl_pid; /* Port ID */
__u32 nl_groups; /* Multicast groups mask */
};
nl_pid is the unicast address of netlink socket. It's always 0
if the destination is in the kernel. For a user-space process,
nl_pid is usually the PID of the process owning the destination
socket. However, nl_pid identifies a netlink socket, not a
process. If a process owns several netlink sockets, then nl_pid
can be equal to the process ID only for at most one socket.
There are two ways to assign nl_pid to a netlink socket. If the
application sets nl_pid before calling bind(), then it is up to
the application to make sure that nl_pid is unique. If the
application sets it to 0, the kernel takes care of assigning it.
The kernel assigns the process ID to the first netlink socket the
process opens and assigns a unique nl_pid to every netlink socket
that the process subsequently creates.
Change-Id: Ic0688228105ea6ba4ebae1d130b9271126c37b0e
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7367
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Add the sigbus handler to virtio pci device
such as virtio_blk and virtio_scsi.
Change-Id: I07f2f175a585a425ef14050e2bf83bacb6e4c3bc
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5769
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>
This prepares for an upcoming patch to fix issue #1701 which
requires handling async events outside of the check
completions loop.
Fixes: #1701
Signed-off-by: G.Balaji <gbalajieie@gmail.com>
Change-Id: I4985d814903143511383172b1a443580db33a78f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7416
Community-CI: Broadcom CI
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>
In the case that reactor is needed to be valid, add an
explicit assert there.
Change-Id: Ic47030d50a6a940ddf87a3744bae38c94dd7252e
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7320
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
This makes it possible to traverse from the group_impl to
the group. It hasn't been necessary so far but will be in an
upcoming change.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I2bf119461bfd5ac5c8a63a3f1f4560d32e695c75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7218
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>
Individual modules will need to mantain their own placement maps for
this to work correctly, especially if modules have different algorithms.
This is a step toward allowing them to do that.
Change-Id: Ie798baa50b94f1e99d6690adb606b936c7b30da0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7217
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>
This is a step toward allowing for multiple maps. Each module may have a
different meaning for placement_id with different uniqueness rules. They
can't all be in the same map.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I608680a08b947a5d5c0818ff66505ed64e1b891e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7214
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>
Instead, move it down to the modules. This allows modules
to potentially change the value, if they are able.
Change-Id: I08f5fbadf5d1e96b489ddaaca72aa051ce2cb85c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7212
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>
This value is already available in the options structure.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I140dc79da1fa5f155a39f1f9e2f54f46d93b6c1c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7211
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
There are a small, bounded set of placement_ids that the socket layer
will ever encounter, and they remain valid for the lifetime of the
program. The association between a poll group and a placement_id is now
correctly broken when the reference count drops to 0 (in response to
sock_map_release calls), so do not free the entry when the poll group is
destroyed so that it may be reused again.
Change-Id: Iad90e2da7d0860fa8c5cff24f9699bef30cd7bc2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7210
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Allow the map to have entries with a valid placement_id, but no group.
This will be useful later when the order of placement_id discovery and
group assignment may be reversed.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ia39adb3a030135940aeb9eeadf9df78056e59c0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7209
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: Jim Harris <james.r.harris@intel.com>
Updated to represent default value of number of errors injected.
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: If3f7a5f4a222fa1180635beb671d9479eede0435
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7246
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
We can return error status when processing RELEASE2 without
a reservation, also add a UT to cover this case.
Fix issue #1898.
Change-Id: I56ffa8eabfc0409307500f8740cb627aab9d2f0b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7379
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This reverts commit aaac48880d.
This patch was showing issues with SPDK vhost mappings
when handling larger numbers of VMs.
Fixes issue #1901.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I81bd311d26037dcb9340d85abcb4ea45b20a5170
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7424
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is necessary to the following patches to test reset continuation.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I20e0a6b96694eb06adadfbe8e20f73380645ea43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7326
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>
Community-CI: Mellanox Build Bot
It is more readable to use const variable rather than raw number.
memset is the way to initialize variable size array.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I42f3f34422ea96e06a99bd6cc02e0e91349a4009
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7323
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: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Previously when attaching a ctrlr, all namespaces had not been
populated. Hence we had to populate each namespace manually.
It is more normal if all namespaces are populated when attaching the
corresponding ctrlr.
This patch does such change.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I55d9c444c492ba6e44a609eac81b1ef25a7190a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7313
Community-CI: Broadcom CI
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>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Previously spdk_nvme_probe_poll_async() had processed all attaching
controllers. Hence it was not easy to attach multiple controllers in
unit tests.
Besides, add a check to exclude duplicated controllers into ut_attach_ctrlr().
If the target is any SPDK library, we should insert another patch
only to do code movement, but this is a unit test file, and so it
will be acceptable to include code movement in the same file.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9e8eba6a67b2a6d0df384214ff84aa5b0c602217
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7312
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>