When we support ANA multipath, I/O path will get nvme_bdev_ns from
nvme_bdev_ctrlr->namespaces, and nvme_bdev_ctrlr will be got from
nvme_io_channel.
Hence this patch adds a pointer to nvme_bdev_ctrlr to struct
nvme_io_channel.
As a side effect, nvme_io_channel->ctrlr is helpful to simplify
admin command submit functions, and do it in this patch.
For ocssd_bdev, we will do the similar change later.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6976d1543ccda37dde4b81b2124d88f0d05ed7eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5055
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
When we support ANA multipath, we will use spdk_nvme_ns and
spdk_nvme_qpair pointers for I/O submit functions after checking
ANA state of spdk_nvme_ns.
It will be efficient and easy to understand if we unify such check.
The next patch will provide a helper function to do such check.
This patch changes the parameters of I/O submit functions as a
preparation.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic741caa1d7e6df844b875beea776e79d4eb8d6fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5204
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
bdev_nvme_flush() just completes with success now and uses only
bio parameter now, but matching parameters with other similar I/O
APIs will be good for future enhancement and following patches.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I64be668fa781396ef68b6b506b22cb153d7b6850
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5203
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
Using bdev_io->bdev will be more straightforward than using
bdev_io->bdev->ctxt and &nbdev->disk.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie5854ab063b7b21710e9f899dd93340624a8cb49
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5202
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
This and the next change will enable us to pass spdk_nvme_ns and
spdk_nvme_qpair as parameters to I/O passthrough APIs. When we support
ANA multipath, ANA state of spdk_nvme_ns will be checked. These changes
follow that.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id38a0e14501ff6402f9b151eaf9e44864079412b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5200
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
If DPDK was not told to unlink the hugepage backing files during the
hugepage_init, the application will keep them open while holding a
lock on each file. Check if said lock is held, if not, remove the
file.
Change-Id: I738a3d7756c335b63388a2efeb03debd734d9c9e
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5065
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Main changes:
- By default, allocate all hugepages on node0. On NUMA-aware systems,
processes will most often use default policy with local node as the
preffered one for allocations. This usually is node0, thus splitting
hugepages evenly across the nodes, in default setup, would force
allocations from a remote node, impacting overall performance (in
case hugepages on node0 run out). See 68740678e1 as a reference.
- Introduce HUGE_EVEN_ALLOC - force setup.sh to evenly distribute
hugepages across all the nodes.
- Introduce HUGEPGSZ - overrides default page size
- Introduce CLEAR_HUGE - remove all hugepages on demand before
allocation is performed.
- HUGENODE - this now can be a list of nodes to use. NRHUGE will be
set across all the nodes from the list.
Change-Id: I084829edde3c416e7fc6b7b6abe369cc0631fcd7
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5042
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This is done so user can easily filter out parts of the output which
are not relevant for additional processing (greping, seding, etc.).
Change-Id: I67eafd1fbeb723224cca6b0026e149cb7f85bfe9
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5152
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This is done in order to improve the grepability of the output. Sort
is based on the BDF address.
Hugepages statistics are intact.
Change-Id: I121e9a46bfb1550380f233c1d5c06cefb9d4e7a9
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5022
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
As part of FC transport destroy, FC LLD (Low level Driver) needs to
to do its cleanup which cannot be completed synchronously. So
allow transport destroy to be asynchronous.
FC transport code to use this functionality will be pushed shortly.
Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I104cf7d131e18199abdcf0651df261fe41d666ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5180
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
Add an new optional parameter wait to the RPC, iscsi_create_portal_group
not to listen on portals until it is started explicitly.
Fixes the issue #1676.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic217f1ccceb618e70fdb2aff3f710d262a8a9bdb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5091
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>
Add an new RPC, iscsi_start_portal_group, to start listening on
portals if the specified portal group is not started yet.
The next patch will add an new parameter wait to the existing RPC,
iscsi_create_portal_group.
The RPC allows the specified portal group to be already started,
and returns a success response in this case.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I631d6bccffb38092c95694f922f10648e24d6ff7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5090
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>
Factor out the internal of rpc_iscsi_delete_portal_group() into
a function _rpc_iscsi_change_portal_group() and rename the related
data structure to use them for the upcoming RPC,
iscsi_start_portal_group.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I965f1e52f04fb54c6a89987836f89c508441a37e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5089
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Add an new function iscsi_portal_group_resume() and add an new parameter
pause to iscsi_portal_group_open(). They will be used in the following
patches to pause listening portals while target nodes are created at
start-up because Windows hosts do not retry login.
Pausing and resuming portal group is possible because we can unlisten
temporarily by simply not calling accept(). Any inbound connection
requests are queued to the backlog and once the backlog queue is full,
further inbound connection requests are simply dropped. If we restart
calling accept(), we will dequeue the backlog and be ready for more
connecitons.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If7403f91ebd729b47d98a23e589cba8b35569dc6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5088
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>
Each nvme BDF can have multiple namespaces, hence multiple block
devices, return them all.
Change-Id: I93fe8acf5b1904f05514445eb3e970ef4254caed
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5170
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: John Kariuki <John.K.Kariuki@intel.com>
lsblk will include all the potential holders|virtual devices given
block device may be part of. This is relevant in case a nvme|virtio
device is part of the lvm|md setup.
Change-Id: I32198ddcf71746c3cbad4a96496a1762a5c201cd
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5167
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
These codes are at the end of bdevperf_construct_jobs,
and they can be replaced by _bdevperf_construct_job_done.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I9bcae562a2a277f6131864ad2ea7b7f565135814
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5181
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>
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a few references to %ld to remove the assumption
about the size of a long. Similarly, use %z with size_t arguments.
Where the value being printed is an unsigned 64-bit value, use PRIu64
instead of %ld.
Explicitly test for not __linux__ where that is the intent, rather
than testing for __FreeBSD__.
Cast pointer to uintptr_t before aligning it, rather than using
a specific integer size which may not be large enough to store a
pointer.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Icfe219e1bbb2d06b3ef05710fac5b7091d340251
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5142
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a few references to %ld to remove the assumption
about the size of a long.
Where the value being printed is an unsigned 64-bit value, use PRIu64
instead of %ld.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ifa558522437f4922b922abf17712173cb5ca1184
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5134
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
SPDK virtio driver does not support the virtio legacy
device but it's ok for the modern and transitional
device. So update the probe function.
From the spec:
Transitional PCI Device ID Virtio Device
0x1000 network card
0x1001 block device
0x1002 memory ballooning (traditional)
0x1003 console
0x1004 SCSI host
0x1005 entropy source
0x1009 9P transport
Transitional Device: a device supporting both drivers conforming to
modern specification, and allowing legacy drivers.
Change-Id: I28cd277fb2b2e07a429082b7d7bd581f254eae9c
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5053
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
In my thought, this await_req will not have performance improvement,
and it makes the code more complicated, so remove it.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I97d86448fc273098d001a08d914ad45ddac07e16
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5149
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The zone append command, which is part of the Zoned Namespace Command Set,
has a maximum data transfer size that can be less than or equal to mdts.
Since zone append commands will not be allowed to be split, the user has
to be able to get the maximum zone append data transfer size. Add a
function that returns this limit.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I9da2672ea8a307ff62251c069a42f7540765e08b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5140
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Zone append is an optional command in the Zoned Namespace Command Set.
Add a convenience function to check if the controller supports the zone
append command.
The ratified NVMe TP 4056 added a CSI field (in cdw14) to the Get Log Page
command. However, since there already exist two public functions to get a
log page (spdk_nvme_ctrlr_cmd_get_log_page() and
spdk_nvme_ctrlr_cmd_get_log_page_ext()), avoid creating a third one for
now, since nvme_ctrlr_get_zns_cmd_and_effects_log() itself can leverage
one of the existing public functions.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I99516dbac8db6714488b4d6cabe64c27f46d6153
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5078
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Make enum spdk_nvme_ctrlr_flags more readable.
Other enums in spdk, e.g. enum accel_capability,
and enum NVME_RDMA_COMPLETION_FLAGS, already define
the enum values using bit shifts.
Do the same for enum spdk_nvme_ctrlr_flags.
No functional change intended.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ida7d7e4ff7f4cffce85cb2d6ea2bc0168875fdb8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5158
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
Remove superfluous parentheses around ctrlr->cdata.mdts.
They provide no value while making the code harder to read.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I4342d87f0e33fd92fe76357eb0379fb1e9c8f98f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5138
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
RTE_DEV_ALLOWED is an enum and has no associated define, hence checking
for its presence will always be false.
We could test for RTE_DEV_WHITELISTED define, but this macro added for
deprecation warning will be dropped in the future.
Switch to a check on DPDK version.
Fixes: 10ed0eb755 ("env_dpdk/pci: adapt to 20.11 EAL changes")
Signed-off-by: David Marchand <david.marchand@redhat.com>
Change-Id: I75270977b580065b36c753266cbaa5fb73f99eb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5165
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a few references to %ld to remove the assumption
about the size of a long. Similarly, use %z with size_t arguments.
Where the value being printed is an unsigned 64-bit value, use PRIu64
instead of %ld.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I0ec4c0cb5e7a8f4b94a1ee6272c8df9ee7f06aa6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5141
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Explicitly test for __linux__ which is clearly the intent and
matches the behaviour described in the comments.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I498476f4a214891b897609924e018c5b132afaf2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5143
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a few references to %ld to remove the assumption
about the size of a long. Similarly, use %z with size_t arguments.
Where the value being printed is an unsigned 64-bit value, use PRIu64
instead of %ld.
Add a cast when comparing an enum to an integer value.
Add an explicit uint64_t cast to the definition of BLOCK_CNT to prevent
value truncation.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I093cffe7e79bc04eba012f4ffaf33062a642d062
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5137
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk
Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.
Part of a set of independent changes which
Fixes#1613
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Iab76fbdebb13a9fda652418a0d75148d24c62378
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5082
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>
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk
Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.
Added stubs for use when configured with pmem.
Part of a set of independent changes which
Fixes#1613
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I8944b8aaa90f27102ae6b030bfab89898194e5a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5085
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>
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk
Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.
Move include of idxd/idxd.c after definition of movdir64b so that mock
function is used.
Part of a set of independent changes which
Fixes#1613
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I760755122a1d3ca96f12b00b0040ae15471beafa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5110
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>
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk
Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.
Part of a set of independent changes which
Fixes#1613
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I3960ecc572090348c2ccabfc907b7abee89ed97f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5083
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>
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk
Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.
Part of a set of independent changes which
Fixes#1613
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ic291ba22cbee121b5c75b80910378b456a217189
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5080
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>
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk
Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.
Part of a set of independent changes which
Fixes#1613
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I63953b666e841942f51f9cc035c6a6521663079d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5084
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>
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure
can be seen by removing 'LDFLAGS += -Wl,--gc-sections' in
spdk.unittest.mk
Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.
Part of a set of independent changes which
Fixes#1613
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I0a8606f9ec1743f7ca430f68c90b59f5699155b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5081
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>
With some build environments (e.g. clang, see #1613) linking fails with
unresolved references. This is caused by the inclusion of 'unused code'
which is usually discarded by the linker. The 'unused code' contains
references to functions that have not been 'stubbed' out. The failure can
be seen by removing 'LDFLAGS += -Wl,--gc-sections' in spdk.unittest.mk
Resolved by adding stubs for missing references. These are never called
so return an arbtrary default value.
Part of a set of independent changes which
Fixes#1613
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I7bafbd2b414e1502d54f317d7b671798d564732c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5079
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>
Using ocdev_io->io.zone to update zone is a little confusing,
and so cache zone pointer from ocdev_io->io.zone and use it for
clarification.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iaee9b1fa8a86240022ddf5038a8c86b48476ba78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5148
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This refactoring increases the code size slightly but improves
readability, and will make the following patches easier.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I704eca60fe98e4622e0d39d2e54ead63844156f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5147
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This is to improve readability even if the factored functions are
used only in a single place.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifa6c7ba4380124a957e66e31123e3743d83e7615
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5146
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Factor out getting chunk info. offset into a helper function
bdev_ocssd_to_chunk_info_offset() and locate it next to
bdev_ocssd_to_disk_lba(). This will improve readability a little.
Besides, cache addr_shift first in bdev_ocssd_translate_lba() for
clarification.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4c078e2002638d90b000b97f9f7cda90938d02ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5132
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
Factor out the internal of bdev_ocssd_num_parallel_units() into an
new inline helper function ocssd_range_num_parallel_units(), and
apply the latter into a few functions.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I16550046ed2d6f543f66711810b30bd45f21c970
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5130
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Clean-up bdev_ocssd_num_zones(), bdev_ocssd_get_zone_by_lba(),
and bdev_ocssd_get_zone_by_slba() to make a little easier to read
and understand.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I13c92dc86dc3855f1ec9ab5ae9d7097607f20512
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5129
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>
Cache the return value of bdev_ocssd_num_zones() in bdev_ocssd_init_zones()
to improve readability.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If71b40221694e512617389da03720211744f3b5c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5128
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>