The kernel driver unloading/loading code is Linux specific; replace it
with stubs on FreeBSD for now.
Change-Id: Ic67c1d89b2fb9a65e9ce5b88d27b6cd6af5554a7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
spdk_nvmf_request_complete() always sets CID to the value in the
command, so there is no need to set it in the command execution
functions.
Change-Id: Ibbe745b862e27fff7c55e553758ef093e3ef7f6d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Use the passthrough command for all Identify commands except Identify
Controller.
Also only check the CNS field of CDW10 and use the new enumerated names
instead of magic numbers.
Change-Id: Ia94f820ac85a2d6b2d0ae02659e73c53f1b1a4cd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Drop the special-case preprocessor definition for PCI access library now
that config.h is available with an equivalent SPDK_CONFIG_PCIACCESS
define.
Change-Id: I4891d0f2fd7d3eea51b767df9e594555b36265ea
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
If we connected a subsystem twice from the initiator, the second
connection will be rejected by the NVMf target, however, the previous
connection will also be impacted because we destroy the connection id
before ack the disconnect event.
Change-Id: Ib597cc68a7823524460693053898f4d6e5499eb4
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
There is no need to handle Read and Write commands separately; the
generic raw I/O command case can handle them just as well.
Change-Id: I8475eed0a20bd809c447ed2ccac0b99f6c2a9b4d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Replace use of the newly-deprecated rte_mempool_count() with the new
name, rte_mempool_avail_count().
Also add a compatibility wrapper so that builds against older DPDK
versions still work.
Change-Id: If3c44bdef4bbcf7a456a1dfa272348ccc6f35261
Reported-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The host is not allowed to send normal admin or I/O commands until the
controller is enabled (via the Fabric Property Set command).
Change-Id: Ib62be3a3792fc0b36bace28b4c9afdf78dad3bcd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Only allow Connect on a new connection (one that has no associated
session yet), and only allow Propert Set/Get on admin queues.
Change-Id: Iae22379ee47b095333372e6d151a7a1509acf654
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The NVMe spec requires that the I/O queue entry size values in CC are
set before any I/O queues may be created.
Change-Id: I4f0c9a9c20411223d281993745c85a8431197961
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Track each individual bit in the Set Property handler for CC, and fail
the request if any unhandled bits are modified.
Also add handlers for IOSQES and IOCQES (I/O submission and completion
queue entry size).
Change-Id: I374dc3c15197e029ba07fd9ee1cff0e38a0a884d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
It is not implemented yet, but add a message to remind us to write it
later.
Change-Id: Ic1c35a0d35f728bc63b38c334d9c622493bee967
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Property Set of CC.SHN is not supposed to terminate the session - remove
the commented-out code that was attempting to do this.
Change-Id: I1db230df9be549764287a8fd45ccdebea1d22a8b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Set CSTS.SHST = 10b to indicate that shutdown is complete, and
CSTS.RDY = 0 to match the state of CC.EN.
Change-Id: Ia651c34427526a38f22cba3910df2cf7d4bedd92
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Explicitly include spdk.common.mk at the top of all lib Makefiles so
that CONFIG options and other predefined variables are set.
Change-Id: I1e560c294fe8242602e45191a280f4295533ae44
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
There is no need to allocate ibv_sge structures within the RDMA request;
we can just fill them out on the stack right before submitting each
request.
Change-Id: I438ff0be2f6d07ffa933255c92c4ec964aa1b235
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Just return success or failure - the actual count was not used.
Change-Id: I26e7c4c6319af444d221d9b0f313fb7071733619
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
All of the WC events that we handle map back to a request, so look it up
before checking the opcode.
Change-Id: I1b70a773374f64387df0a21a4f7fd64b26534b14
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Make sure all tracelogs in rdma.c use SPDK_TRACE_RDMA.
Change-Id: Idc3d3b6654215b5ab3ee84a106e46ffd3019cc7a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
These NVMf spec structure definitions are the same as the equivalent
NVMe structs.
Change-Id: I21c45973b7843e3767c48f97ec42e7b446df296f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
There was only one function and a structure declaration
left.
Change-Id: I63277b4182120e7a76a925ed0bf7378ec7c23f20
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
These can be simplified and merged into the subsystem.
Remove the concept of mappings from subsystems and replace
it with a list of hosts and ports. The host is optional -
not specifying a host means any host can connect.
Change-Id: Ib3786acb40a34b7e10935af55f4b6756d40cc906
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Make the transport responsible for filling out the fabric-specific
details in the discovery log entry.
Change-Id: I41d871c605becd557dca18f8ef7e80da66950257
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Make the core NVMf to transport interface generic and allow for multiple
transport types to be registered.
Change-Id: I0a2767a47d55999c45f788ae1318bb50af60ab4e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change the Port configuration file entries to a new format:
[Port1]
Listen <transport> <address>:<service>
Initially, this still only supports RDMA, but the new format will allow
specifying other transports once they are added.
Change-Id: Iadfd19b91db57b571064379368dbe77204ccecbb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Each subsystem will run on a single core, which is more than enough
to fully saturate a device and a NIC. For now, all subsystems
run on the master lcore.
Change-Id: I95340a262d70fd346fa81fe519e7d4190a369e64
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Instead of starting the connection poller immediately upon
the connect event, wait for the first connect capsule to
start the poller.
This builds toward associating all connections with the same
session with the same lcore.
Change-Id: I7f08b2dd34585d093ad36a4ebca63c5f782dcf14
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
It can be different per fabric interface within a single port.
Change-Id: If13590d7f12291499ccfd705efaf6d2b1b1d7003
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The type is already stored in the fabric_intf.
Change-Id: Icd33dd29f2fa1313329b4053892693c7ff90945d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
For now, it just contains RDMA, plus a raw byte array to allow generic
copying.
Change-Id: I02fe11f99dd8b49000de0dba991cd34c99fd7a4a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Pull out the duplicated min checks against the ibdev_attr values.
Change-Id: I774c355ba669486afde5c05c55a4ed653723db98
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Set a status code in the response capsule for each possible error case.
Also enforce CC.EN == 1 before I/O connect.
The NVMf spec requires that the controller is enabled before any I/O
queue Connect commands are allowed.
Change-Id: If56d6b4d6bedad00e9e845e77f05f715e3969f8b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Drop the debug print in conn.c that was the only user.
We still have the connect data structure when determining the connection
type, and after that point, the queue ID is not needed.
Change-Id: Ida9e170099f977ec6b84478874863c40d6f7d8a1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The NVMf target is being refactored to split the RDMA transport-specific
code into its own file. Once this is complete, we should be able to
plug in other transports and build the NVMf target without any RDMA
dependency if desired.
To enable this, change the CONFIG option to RDMA; it still controls
whether the whole NVMf target is built for now, but once the RDMA
dependency is actually made optional, we will be able to build the
generic NVMf target code without libibverbs installed.
Change-Id: I8cd90a9aaa85dcefcc9b0f8f2e7b6af21958b2a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>