Commit Graph

50 Commits

Author SHA1 Message Date
Ben Walker
cfafcc3edd nvmf: Init transport before adding listeners
Change-Id: I1fbaca75c6b95127ff2b6ac7c0ea0f0a918b9405
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-20 16:22:58 -07:00
Ben Walker
1e6ffa0394 nvmf: Add a public API header
This changes as little code as possible while still creating
a single public API header. This enables future clean up
of the public API and clarification of the exposed
concepts.

Change-Id: I780e7a5a9afd27acf0276516bd71b896ad301c50
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-14 15:26:31 -07:00
Ben Walker
18a2cc11c1 env: Remove unused DPDK headers.
Remove #includes for all DPDK headers that weren't
necessary.

Change-Id: Ib02522e0f04e64a1c98afceb7508cc0e8d931a9d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-12 09:53:32 -07:00
Ben Walker
7f5b671db7 env: Convert some rte_mempools to spdk_mempools
This converts some, but not all, usage of rte_mempool
to spdk_mempool. The remaining rte_mempools use features
we elected not to expose through spdk_mempool such as
constructors, so that will need to be revisited.

Change-Id: I6528809a864ab466b8d19431789bf0f976b648b6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-12 09:53:32 -07:00
GangCao
372942e569 nvme: move global request_mempool allocation into nvme_impl
The user no longer needs to create the request pool.

Change-Id: I83bb8948143d4cc961d232f9f30df3106d5e0eab
Signed-off-by: GangCao <gang.cao@intel.com>
2016-09-27 14:25:39 -07:00
Changpeng Liu
2641c31af2 nvmf: Listen for incoming connections only on addresses specified
Currently the NVMf target listens for new connections on any address.
Instead, listen only on the addresses specified by the user.

Change-Id: Idb6d37c422e442fc70a8673bd3fcfb9c27b57828
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-08-19 15:34:01 -07:00
Daniel Verkamp
c16ca1ade7 nvmf: remove app framework subsystem from library
It is no longer needed, since the nvmf_tgt app handles initialization
and shutdown.

Change-Id: I051afe2b4fcbd09b32998386c63f591a0ab343c2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-19 09:26:02 -07:00
Daniel Verkamp
8c931adaa4 nvmf: move shutdown cleanup to nvmf_tgt app
Change-Id: Ie1f5869dbbea3300d0aeb32e60a95d9a3c7ea535
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-19 09:17:38 -07:00
Daniel Verkamp
4c6e4d4963 nvmf: move acceptor poller into nvmf_tgt app
The NVMe over Fabrics target library now exposes a simple function call
that polls the acceptor once, and the application handles registration
of the poller.

Also rename the transport function pointers related to the acceptor so
they better reflect their purpose.

Change-Id: I5fa0d516586bf17e73afeb88ff3c2d5b0d46794d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-17 10:01:37 -07:00
Daniel Verkamp
0c00baf9bc nvmf: move conf file parsing to nvmf_tgt app
Change-Id: Iaf09d39046bceae023739d49e31804e150bb19d4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-17 10:01:37 -07:00
Changpeng Liu
8a23223e1b nvmf: Allow users to configure which lcore each subsystem runs on
Users can specify the core for each subsystem and the acceptor listen routine
to run on different cores for performance consideration.

Change-Id: I4bd1a96f39194c870863b4b778e6ea7cf8fc1a2d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-08-16 09:20:42 -07:00
Cunyin Chang
077fe1da65 nvmf: Add nvmf subsystem dependence on bdev
prepare for the virtual controller.

Change-Id: I022e2c88cf8332c035b51e843d6b3ced4716df9c
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-08-16 08:54:25 -07:00
Ben Walker
f1a584a9f7 nvmf: Use a shared memory pool for large data buffers.
Change-Id: Iab66335cee2a1e6c1774edd34978735be6763ce1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-29 15:36:10 -07:00
Ben Walker
756df04485 nvmf: Remove g_nvmf_tgt global usage from transport layer
Change-Id: Id788312f597abf6ea937beb7d1d1bd5a168ae0f0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-26 14:24:39 -07:00
Ben Walker
296add8bb1 nvmf: Add config options for inline and max I/O size
These don't actually work quite yet, but pipe the
configuration file data through to where it will
be needed.

Change-Id: I95512d718d45b936fa85c03c0b80689ce3c866bc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-26 14:23:25 -07:00
Daniel Verkamp
d693613626 nvmf: remove unused g_nvmf_tgt.mutex
It isn't protecting anything any more.

Change-Id: Ife14809751dd6fb52b787489f87e9fd8be0cbdf6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-26 09:18:18 -07:00
Daniel Verkamp
89031c3e27 nvmf: move discovery subsystem creation to conf.c
It is not currently configurable, but this will allow us to make the
discovery subsystem have config options (e.g. which lcore to run on).

Change-Id: I788a64ba4462b023453191e509ce8de59fd90ae4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-22 12:50:01 -07:00
Ben Walker
207e6a604e nvmf: Set minimum and maximum on allowed queue depths
Change-Id: I72988b0691154165757201f5f5bc89d199249660
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-22 10:37:02 -07:00
Ben Walker
7219b20124 nvmf: Set a minimum and maximum queues per session
Change-Id: I68d6fe5e3dfeb1e4709ce39654c61505189711bc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-22 10:37:02 -07:00
Ben Walker
944695ca21 nvmf: Remove controller.[ch] and probe for each subsystem.
This is a much simpler approach and is only slightly
less efficient.

Change-Id: I909de376d576a74156c1be447e90e7dbc240f025
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-22 09:24:45 -07:00
Ben Walker
88245ea26b nvmf: Rename MaxConnectionsPerSession to MaxQueuesPerSession
Change-Id: I9891f9ed481b93312152c2a59f4263003167f1d6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-20 07:26:58 -07:00
Daniel Verkamp
ffa936d94b nvmf: switch to rte_mempool_avail_count()
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>
2016-07-19 10:02:20 -07:00
Ben Walker
677a2dc5d7 nvmf: Merge conn.[ch] into session.[ch]
There was only one function and a structure declaration
left.

Change-Id: I63277b4182120e7a76a925ed0bf7378ec7c23f20
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-15 14:45:26 -07:00
Ben Walker
2b9d85c448 nvmf: Remove host.[ch] and port.[ch]
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>
2016-07-15 14:35:24 -07:00
Daniel Verkamp
21c450e187 nvmf: add transport function pointer table
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>
2016-07-15 13:11:03 -07:00
Ben Walker
c253f18656 nvmf: Move subsystem parsing to conf.c
Move the configuration file parsing for subsystems
into the configuration file parsing file.

Change-Id: Ie16e73cdc65fae7f2f3c3b22f9cba7f167024fa1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-14 10:36:54 -07:00
Ben Walker
1c603c11db nvmf: Move parsing of NVMe section to conf.c
Change-Id: Ie178d1cc393e36dfbd7dbfa5d5f6aad7327c10ba
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-14 10:35:22 -07:00
Ben Walker
b531f5914e nvmf: Remove NodeBase. Each Subsystem now defines its own NQN
This is just extra complication for no real benefit.

Change-Id: I528af98e799d0641e753390fe35ff561fa3d7d76
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-14 10:34:04 -07:00
Daniel Verkamp
f6d8e3d421 nvmf: drop nvmf_initialize() and nvmf_shutdown()
These were internal-only APIs; initialize just checks to see that the
pool was initialized (which is already checked internally), and shutdown
just called spdk_nvmf_shutdown_nvme(), which we can call directly.

Change-Id: I95e1b912d61a38fa9934f58df7b1512678303452
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-11 17:09:49 -07:00
Daniel Verkamp
353533e229 nvmf: drop pool size macros
Just calculate the required number of requests once and store it in a
global variable.

Change-Id: Iffeb637a3ac5f69ec89989b84f03699bac483b6e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-11 16:25:05 -07:00
Daniel Verkamp
6d49820adc nvmf: remove MaxSessionsPerSubsystem config option
There can be only one session per subsystem.

Change-Id: I8ba85a5ebd11dd71fda2a4bafa97a0935609379f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-11 15:52:02 -07:00
Daniel Verkamp
6e415c4411 nvmf: drop global nvme_request_pool
It is just a duplicate of the NVMe library request_mempool.

Change-Id: I2a5484e5d515b965503b2cfcd8d85ccfcb0dee05
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-11 15:33:55 -07:00
Daniel Verkamp
fdc1278440 nvmf: simplify session and connection cleanup
The whole cleanup process is now started by
spdk_shutdown_nvmf_subsystems().  Each subsystem will clean up its
session, if any, and each session will clean up its connections.

Change-Id: I9915d4547751ed4ffc4baa2c45c628698dd0b881
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-11 15:01:34 -07:00
Ben Walker
11b0c3cc51 nvmf: Standardize rdma init/fini functions
Change-Id: Ifa453e865e110cd534d34aae1bc036cc9f09b1bd
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-11 09:06:30 -07:00
Daniel Verkamp
f8296a99c2 nvmf: rename subsystem_grp.[ch] to subsystem.[ch]
NVMf does not have the concept of subsystem groups; the (former)
subsystem_grp files really contain structures and functions related to
individual subsystems.

Change-Id: I4b3a64de799fffb29f8685ea4908d754516815cd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-08 10:54:10 -07:00
Daniel Verkamp
7066b5b952 nvmf: remove unused MaxRecvDataSegmentLength config
Change-Id: Ida9551aae5c1b6456c5871c77eadebc57f28bee8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-29 15:37:52 -07:00
Daniel Verkamp
dde6da8442 nvmf: remove unused listen_port from nvmf_tgt_init
We need to bind to each port declared in the config file; there is not a
single global port number.

Change-Id: I41c315588078d131c32cb145d22314047505c95c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-29 15:37:52 -07:00
Daniel Verkamp
196dfe4278 nvmf: remove MaxInCapsuleData configuration option
The maximum in-capsule data size is determined by the I/O queue bounce
buffer size, and there is no point in limiting it beyond that, so remove
the need to configure it.

Change-Id: I64806516b847e819f57ac9f62a162f7a04805b57
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-29 15:36:43 -07:00
Ziye Yang
88669436f9 nvmf: remove unnecessary nvmf.h
The function call of spdk_nvmf_check_pools can be
directly put in nvmf.c.

Reason: This pool is created by nvmf subsystem,
it should be recycled by this subsystem.

Change-Id: I49e49bcb56079fc25d26b1f5078a1808c2f8e189
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-06-28 12:45:33 -07:00
Daniel Verkamp
f0242ce745 nvmf: remove bb pools and replace with rte_malloc
The mempool functionality is never used at runtime - all bounce buffers
were immediately assigned to a rx_desc.

Change-Id: Ie2195059858e34b30b07e104739f046c13abc335
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-27 09:13:34 -07:00
Daniel Verkamp
31d2a116c8 nvmf: remove rx_desc and tx_desc mempools
The RDMA tx_desc and rx_desc pools were only used at startup; all
descriptors are immediately allocated and put into a queue, and the
mempool functionality was never used at runtime.

Change-Id: I2882274962550191a555c8483b8f7be2854b32ec
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-27 09:12:42 -07:00
Ben Walker
dc6a0a2bd2 nvmf: Rename init_grp.h/c to host.h/c
Match the names in the specification.

Change-Id: Ic3f95220efea4dfbdf209af43db20da26ae232b6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-06-17 13:31:05 -07:00
Ben Walker
422b147499 nvmf: Standardize names in init_grp.h
Prefix with spdk_nvmf_host.

Change-Id: I053030febf5b7157cc2c7075ac6170bc59ce0ced
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-06-17 13:31:05 -07:00
Daniel Verkamp
1bb4fac463 nvmf: remove unimplemented AuthFile config
This enables SPDK_NVMF_BUILD_ETC to be moved out of the library as well,
since only authfile was using it before

Change-Id: I10d1145881f9a0358d7effe2d2d9851899413e1b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-09 14:25:26 -07:00
Daniel Verkamp
c78d4d0b6c nvmf: move includes from nvmf.h where they're used
Most of the #include statements in nvmf.h aren't part of the public API.

Change-Id: I0d43dd542a28744a91a4fd0c4c806a991d1e194e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-09 14:25:26 -07:00
Daniel Verkamp
9b00a03a24 nvmf: drop spdk_nvmf_check_pools() parameter
There is only a single global g_nvmf_tgt that can be passed to this
function, so remove the parameter and use the global directly.

Change-Id: Ia1a2a1e6cd3801101ddeb4de5526dd115fa7ef8f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-09 14:25:26 -07:00
Daniel Verkamp
1c089ae19c nvmf: rename framework.c to nvmf.c
Change-Id: Ia9b4bf4738ad9e1ae158f3a610da8f0ab87e0215
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-08 13:15:26 -07:00
Daniel Verkamp
d67021b0e4 nvmf: merge nvmf.c and framework.c
There is no logical split between nvmf.c and framework.c, so combine
them and drop nvmf.c.

Change-Id: I91230c01ed7f171bfed04456b0bfcf0e7ddbc263
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-08 08:49:29 -07:00
Daniel Verkamp
ca4932f995 nvmf: remove unused g_nvmf_driver
The mutex is initialized, but otherwise is unused.

Change-Id: Ia68adbd430fad391cc465c07dd6e937e90dd2c5c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-08 08:49:12 -07:00
Daniel Verkamp
0f912a0eaf nvmf: add NVMe over Fabrics userspace target
Change-Id: I739916824d033bd1a8f8b7f5def09e58f23d13cb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-06 15:21:25 -07:00