Some platforms require that a specific file extension is used for
executables. Append $(EXEEXT) to $(APP) definitions to accommodate
this. The name EXEEXT has been chosen for consistency with automake
which uses the same variable for the same purpose.
Add extensions for generated files used by Windows to the 'clean' target
(.obj, .lib, .pdb) and add output files to .gitignore.
Tested using a cross compiler that forces a .exe suffix and verifying
that all LINK messages include the correct suffix and that a second
call to make does nothing (showing that the targets match the
generated executables).
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Ief012f6294d2f94b23c8b4f9747e21a0dfb91e96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6494
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: Ben Walker <benjamin.walker@intel.com>
MinGW builds require a thin layer above the standard libraries to
provide POSIX functionality that is missing on Windows. Add support
for building this.
MinGW cross builds are experimental and work is ongoing to integrate
them into the CI and test environment. Including the changes at this
stage is being done to facilitate that process.
The layer has been arranged in the same way as DPDK and is
accessed as an external build using ./configure --with-wpdk=<dir>.
Support has also been added for using a default ./wpdk in
preparation for reaching the required level of stability.
The help text for ./configure indicates that support for --with-wpdk
is experimental.
Further details and instructions can be found at https://wpdk.github.io.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Iff0f705789f19fb193dcb3c9090c3e90613a8d9a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6589
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: Ben Walker <benjamin.walker@intel.com>
!Do not merge this patch before RocksDB patches are merged:
https: //review.spdk.io/gerrit/c/spdk/rocksdb/+/6485
https: //review.spdk.io/gerrit/c/spdk/rocksdb/+/6486
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie13ff102ddf627026013dcb8b41cb3ee205eaaeb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6761
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This is an internal API used in several places. The call can fail, so
make sure it can report that correctly.
Change-Id: Iac0ed2c8299c9dd3d2556070278a2224c3807b7b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6640
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Purpose: Make the code clean and remove duplicated code.
Change-Id: I6cc8b94af24f89301531bd38d766afb53898e0ed
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6811
Community-CI: Broadcom CI
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
include test_nvme_ns_set_identify_data,
test_spdk_nvme_ns_get_values(Most functions that simply get values),
test_spdk_nvme_ns_is_active,
and spdk_nvme_ns_supports(Judge whether extended_lba and compare are supported).
The above func is completed.
Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: I916173a195692045ee0ee3fa408a1696e0eb5b1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6511
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
It is possible that nbd pthread is created but not executed,
then spdk_nbd_stop is call before nbd_pthread's execution,
but nbd pthread starts to execute while nbd is totally stopped.
This patch can get spdk_stop_nbd aligned with nbd pthread.
Change-Id: I57cc92b94d36cd706616c9058134f716f0812892
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6278
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: <dongx.yi@intel.com>
This is better naming to represent their usage.
retry_poller and count can also be used to do
async nbd_stop procedure in the following patch.
Change-Id: Ie5a74e4add3f1a6c7257df00aded8b5d52a09955
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6277
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
The next patch will add nvme_bdev_channel and we will not be able to
io_channel from nvme_ch anymore.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8ba93e66657d21da58df63f3ad6dde4b155fc174
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6612
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>
Add mutex per nvme_bdev_ctrlr and replace g_bdev_nvme_mutex by it
for possible cases. These are just drop-in-replacement.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib1d5eebd65e514cfe96ad60a9004d9bace7b4f6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6693
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 will make us easier to maintain the operation to delete
nvme_bdev_ctrlr and its trids. The added unit test cases guard us
from degradation.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I400d4092020e89bacaebc7be045a456b8760ed8d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6688
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: Changpeng Liu <changpeng.liu@intel.com>
By adding the second parameter, hotplug, factor out the common part
of remove_cb() and bdev_nvme_delete() into a helper function
_bdev_nvme_delete().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5becbc7a7a94e852510e6a2745afb9c533d21713
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6692
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>
The following patches will refactor bdev_nvme_remove_trid() and merge
it into bdev_nvme_delete(). Add test cases for bdev_nvme_remove_trid()
to avoid degradation by the following patches.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I42da17c62843ead9a30ab9a06463df4b679e561d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6686
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
spdk_vbdev_register() was deprecated in SPDK 19.04.
config_text field in spdk_bdev_module was deprecated in SPDK 20.10.
spdk_bdev_part_base_construct() was deprecated in SPDK 20.10.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib795ccdf61154c168032ccf8b81ea77e5e663851
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6628
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
spdk_bdev_part_base_construct() is deprecated so this patch
moves remaining instances to spdk_bdev_part_base_construct_ext().
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iccd4b15933bec41885adfaf4fc4ce2abedd2d6c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6627
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This statistic is incremented when we don't reap
anything from the CQ. Together with the total number
of polls it can be useful to estimate idle percentage.
Change-Id: I61b51d049b0bc506fb8a896e225187e46e75a564
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6295
Community-CI: Broadcom CI
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>
Leverage SO_INCOMING_CPU to get the CPU affinity of connections
(sockets). And allocate the connections to specific poll groups,
which aims to utilize cache locality.
From our test:
6 P4600 NVMe on target,target uses 8 cores, NIC irqs are bound to
these 8 cores, and initiator side uses 24 and 32 cores,
we can get 11%~17% randwrite performance boost for posix, and 8%~12%
for uring.
Change-Id: I011e0a21502c85adcccd4a14fbe9838b43f54976
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5748
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
We need to catch the JSONRPCException when we cannot
connect, so that the error message can be printed
more cleanly. Also suggest to the user that maybe
they don't have an SPDK application running when
it cannot connect.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I497bed86573d5bf07a2b48b3d6682a2427aa4987
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6754
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The shadow registers need to be zero when the qpair is
created. This happens automatically when a given qid
is used for the first time, since the page is allocated
with zmalloc. But if a qid is reused, we need to make
sure its shadow registers are cleared *before* we create
the qpair again with the same qid.
So clear the registers in nvme_pcie_ctrlr_delete_io_qpair,
just after the cq is deleted.
Fixes issue #1795.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I08c30d1ea248559a01b802cd132dd57199b491b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6752
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
If the iov_len is 0, it is OK for the iov_base to be
NULL.
Reported-by: Yi Ren <yunye.ry@alibaba-inc.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I45c9be68fc2975bf2abd91a9d77935ce516c5210
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6706
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Because of recent changes in RocksDB Makefile we cannot
use absolute path during its build any more. Change it
to relative path.
RocksDB Makefile change:
80f71b5863 (diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R463)
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I3a4fd010b2d9d8eb0dd3b7bf159d582aa5032669
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6735
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
These tests compile the driver both as a shared object and statically
linking it to the identify application. Additionally, in both
configurations, the app is used to list all available NVMe controllers,
as well as print information about each one indivdually.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I127caf08acad11241bf685b392617ab4b810226b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6680
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>
Community-CI: Mellanox Build Bot
Replaced the "_tc[0-9]+" suffix with a more descriptive title describing
the test case being executed.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Id1c2f6dcf155d8ae99dc490983ab4bb1451bfefd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6764
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>
Community-CI: Mellanox Build Bot
Removed the PCI_ALLOWED="NONE" line from setup.sh calls to bind to all
available PCI devices. It'll allow the out-of-tree NVMe driver tests
from the following patch to execute properly, as they require NVMe
devices to be attachable from SPDK.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I56e89a6b853f02343803bb6ec704ea3c0a8bd12f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6679
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
The application will now print some of the fields from the identify
controller data.
The code has been copied from `examples/nvme/identify`, but, for the
sake of simplicity, trimmed down to printing reduced number of fields.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I838c47deffb0b877344f3cad0e88b6aca19790ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6678
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
Now that it's possible to both submit the identify controller command
and process its completion, the initialization flow has been updated to
issue that command and update controller's identify data (which can be
retrieved via nvme_ctrlr_get_data()).
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Iee0e85f431275a5e6f1767db1d807de7fba6cdcc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6677
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
Added function that check the completion queue for completed commands,
executes their callbacks, and puts the associated requests back onto the
free request queue.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I0f04c0d173a7058d4d4f7e59e573ce48130ff024
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6676
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>
Community-CI: Mellanox Build Bot
This patch adds code required for sending identify controller admin
command. It means allocating an NVMe request, filling spdk_nvme_cmd
structure, and submitting the command by writing the command to the
submission queue and ringing the doorbell.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I69934213a350df03852860eeaeadc2a456c7673c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6675
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>
Community-CI: Mellanox Build Bot
This function allows the user to retrieve the controller's identify
data. Currently, that buffer is zeroed, but it'll be populated by the
identify command.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I91a99feef25ecf94c43cf144c12ac3c541c76cd9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6674
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Added a simple controller enablement state machine based on the CC.EN
and CSTS.RDY bits. The admin queue registers are also filled during
this process, so it's now possible to send admin requests.
To simplify the code, there are no timeouts for a controller to
transition from a specific state to the next one or for the whole
initialization process. This means that if a controller gets stuck, the
code will hang indefinitely too.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I93f5a5931d7b24780da242e601dcdf2bec5f6552
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6673
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
After enumerating and attaching NVMe controllers, they're now
initialized at the end of nvme_probe()/nvme_connect(). For now, they're
immediately marked as initialized, but subsequent patches will replace
it with an actual initialization.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I22137bb10e871c7e79c28053c8ec98a835e11147
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6672
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch adds NVMe submission/completion queue pair definitions.
These definitions are required to keep track of outstanding NVMe
requests. The admin queue pair is now instantiated with the minumum
number of entries (2).
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I2ced3ce7d210408d66cc17de1e66d86b1a1dbf79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6671
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
These values are needed for managing a submission/completion queue pair,
which will be added in the subsequent patch.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I80ac0d607160f06a13014b7dea95ae8172290aee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6670
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
It allows the controller to issue memory read/writes (the bus master
enable bit) and disables the ability to generate INTx interrupts which
won't be serviced.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I3b041f1ea7c2bc275b609afcc3d1e4f655aee4c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6669
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Added getters/setters providing access to several of the NVMe
controller's registers. Only the registers that are needed for the
initialization are implemented.
For now all of them are unused, so they're marked as external to avoid
the -Wunused-function warnings. The subsequent patches will make use of
them and mark as static appropriately.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I7012583f74e87720f6915afca69474ad1bb1e377
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6668
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The controller's memory register space (located in the first BAR) is now
mapped. The functions for accessing individual registers from this area
will be added in the following patch.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ie5f88079a46152ba8d68e534d5e4c0c2bef84ef3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6667
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The identify app can now be used in two modes:
- without any parameters it'll attach to all available NVMe controllers
and print each one out,
- with a single parameter specifying the BDF address of the controller
it'll only attach and print out information about that controller.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I02c7a8a072f1db5fdfd428a5ab84163f26338a09
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6666
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Added interface, nvme_connect(), for connecting an NVMe device specified
by a BDF address. Similarly to spdk_nvme_connect(), it returns a
pointer to an NVMe controller representing requested device.
Under the hood, it uses spdk_nvme_pci_device_attach() to attach the
PCI device.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I15c7cabae07539cb97aba810385d26f223abfd6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6665
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The NVMe devices can now be enumerated, attached, and detached. To
simplify the driver, the probing step has been omitted - all available
controllers are attached and need to be detached later.
The driver registers itself as a PCI driver via a call to
SPDK_PCI_DRIVER_REGISTER() and then uses spdk_pci_enumerate() to
enumerate available NVMe devices and attach them.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Id03e2f4365f4f7ca98178be70278d0c4b7b34b26
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6664
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch introduces initial definitions for a stripped down version of
an out-of-tree NVMe driver. It's purpose is to showcase SPDK's
interfaces for writing user-space drivers for various types of devices.
The choice of NVMe as the example is based on the fact that it can be
emulated by QEMU and the code can be borrowed from SPDK's regular NVMe
driver.
This driver will only provide the most basic functionalities (e.g.
device probing, controller initialization, only admin queue support,
etc.) and won't have support for any device quirks. Therefore, it's
only intented to be used with emulated devices.
In addition, an application utilizing the driver to list all available
NVMe controllers and print their identify data will be added. It'll
be a very basic, stripped down version of `examples/nvme/identify`.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I67c748aabf75a37ca72dfb74301a610f7c4ae2bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6663
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>