Commit Graph

26 Commits

Author SHA1 Message Date
paul luse
397cf3f884 lib/idxd: small code cleanup
Suggestions from a prior review... able to remove a boolean by changing
how the batch elements 'index' and 'remaining' are used.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I273e5e231bb30d51eb3ae0a59eec110377d49ab7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4813
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>
2020-10-22 22:43:28 +00:00
paul luse
9d5268b19c lib/idxd: remove unused translations
Added by mistake.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I08fb4d105f4834a551488bcfec413a46f1404e34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4811
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>
Community-CI: Mellanox Build Bot
2020-10-22 22:43:28 +00:00
paul luse
63d7ac35c9 lib/idxd: small code simplifcation
Earlier refactoring enables us to not have to keep track of batch completions in
the batch struct as they're always used sequentially now so we can just add
the addresses from the start up to the number of elements in the batch.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I00cdcdec3376a1c32c9dab72c68fea868c1cb540
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4810
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>
Community-CI: Mellanox Build Bot
2020-10-22 22:43:28 +00:00
paul luse
33eac886b9 lib/idxd: refactor batching for increased performance
And to eliminate an artificial constraint on # of user descriptors.
The main idea here was to move from a single ring that covered all
user descriptors to a pre-allocated ring per pre-allocated batch.

In addition, the other major change here is in how we poll for
completions.  We used to poll the batch rings then the main ring.
Now when commands are prepared their completion address is added to
a per channel list and the poller simply runs through that list
not caring which ring the completion address belongs too. This
simplifies the completion logic considerably and will avoid
polling locations that can't potentially have a completion.

Some minor rework was included as well, mainly getting rid of the
ring_ctrl struct as it didn't serve much of a purpose anyway and
with how things are setup now its easier to read with all the
elements in the channel struct.

Also, a change that came in while this was WIP needed a few fixes
to function correctly.  Addressed those and moved them to a
helper function so we have one point of control for xlations.

Added support for NOP in cases where a batch is submitted with
only 1 descriptor.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie201b28118823100e908e0d1b08e7c10bb8fa9e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3654
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>
2020-10-22 22:43:28 +00:00
yidong0635
ec51918c07 lib/idxd: Fix warning on cleanlinux with gcc-10.
home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_submit_copy’:
/home/clear/spdk/lib/idxd/idxd.c:761:5: error: ‘src_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  761 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:761:26: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  761 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
  LINK lvol_ut
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_submit_dualcast’:
/home/clear/spdk/lib/idxd/idxd.c:806:5: error: ‘src_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  806 |  if (src_nbytes < nbytes || dst1_nbytes < nbytes || dst2_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:806:26: error: ‘dst1_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  806 |  if (src_nbytes < nbytes || dst1_nbytes < nbytes || dst2_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/home/clear/spdk/lib/idxd/idxd.c:806:50: error: ‘dst2_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  806 |  if (src_nbytes < nbytes || dst1_nbytes < nbytes || dst2_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_submit_compare’:
/home/clear/spdk/lib/idxd/idxd.c:845:5: error: ‘src1_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  845 |  if (src1_nbytes < nbytes || src2_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:845:27: error: ‘src2_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  845 |  if (src1_nbytes < nbytes || src2_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_submit_fill’:
/home/clear/spdk/lib/idxd/idxd.c:881:5: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  881 |  if (dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_submit_crc32c’:
/home/clear/spdk/lib/idxd/idxd.c:919:5: error: ‘src_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  919 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:919:26: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  919 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
  CC test/unit/lib/util/cpuset.c/cpuset_ut.o
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_batch_prep_copy’:
/home/clear/spdk/lib/idxd/idxd.c:1108:5: error: ‘src_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1108 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:1108:26: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1108 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_batch_prep_fill’:
/home/clear/spdk/lib/idxd/idxd.c:1142:5: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1142 |  if (dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_batch_prep_crc32c’:
/home/clear/spdk/lib/idxd/idxd.c:1218:5: error: ‘src_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1218 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:1218:26: error: ‘dst_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1218 |  if (src_nbytes < nbytes || dst_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
  LINK iscsi_fuzz
/home/clear/spdk/lib/idxd/idxd.c: In function ‘spdk_idxd_batch_prep_compare’:
/home/clear/spdk/lib/idxd/idxd.c:1255:5: error: ‘src1_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1255 |  if (src1_nbytes < nbytes || src2_nbytes < nbytes) {
      |     ^
/home/clear/spdk/lib/idxd/idxd.c:1255:27: error: ‘src2_nbytes’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 1255 |  if (src1_nbytes < nbytes || src2_nbytes < nbytes) {
      |      ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I7f1b01c04e4f7287616c590b652aa5cee26d2901
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4694
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-16 08:15:57 +00:00
Tomasz Zawadzki
4e8e97c886 log: remove internal log.h header
There is nothing left here, so remove it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib947d42bc577dbebb4650b1be885e05a80f8f8cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4541
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI
2020-10-15 08:23:39 +00:00
Tomasz Zawadzki
2172c432cf log: simplify SPDK_LOG_REGISTER_COMPONENT
This patch removes the string from register component.
Removed are all instances in libs or hardcoded in apps.

Starting with this patch literal passed to register,
serves as name for the flag.

All instances of SPDK_LOG_* were replaced with just *
in lowercase.
No actual name change for flags occur in this patch.

Affected are SPDK_LOG_REGISTER_COMPONENT() and
SPDK_*LOG() macros.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I002b232fde57ecf9c6777726b181fc0341f1bb17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Mellanox Build Bot
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
2020-10-14 08:00:35 +00:00
Ben Walker
bdaee9792e idxd: Perform address translation on all addresses in descriptors
The WQ has not been provided a PASID so virtual addressing is not
supported. This worked previously because all test set ups had IOVA=VA.

Change-Id: I6b08714e246a0dc8d5bc0f31efa4b90b601c5b4c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4558
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
2020-10-13 07:48:05 +00:00
paul luse
8d059e7a18 accel: add API to cancel a batch sequence
Added to the framework as well as all 3 engines.  Needed by apps
in the event that they have to fail following the creation of a
batch, allows them to tell the framework to forget about the batch
as they have no intent to send it.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id94754ab1350e5a969a5fd2306bd59c38f0a0120
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3389
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>
2020-07-27 22:43:40 +00:00
paul luse
8cee297c3f lib/idxd: add batching support for compare command
Also one small bug fix w/compare in accel_perf as a result
of changes made in accel_perf sicne base compare was added.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id8e67bd9de9cbd006ac148f4a77807cc3e8e662b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2958
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-22 23:01:45 +00:00
paul luse
8d0334726f lib/idxd: factor out common code used in prep'ing batch commands
Create helper function.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I264f0ed067e4657f21ee38d875235b3410d9d04b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2957
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
80da74964a lib/idxd: add support for batching crc32c requests
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I38e8b26272e86e84e579262496b367375976638d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2955
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
396b05a3e4 lib/idxd: add support for batching the fill command
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0996db55e78b7b74bf0a603ac0e9825a4d80d2e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2953
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
68a648ca90 lib/idxd: use more appropriate casting of ptr to int values
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I8e5b65c43d073bc479be145c3355d1974ee04d04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2916
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-22 15:02:06 +00:00
paul luse
22058d70fc lib/idxd: add support for batching dualcast commands
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia5b5a346ae5c8470d9792766dba2bcf68c6fe2fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2915
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>
2020-07-22 12:20:27 +00:00
paul luse
fc250841ca idxd: add batch capability to accel framework and IDXD back-end
This patch only includes the basic framework for batching and the
ability to batch one type of command, copy. Follow-on patches will
add the ability to batch other commands and include an example of
how to do so via the accel perf tool.  SW engine support for batching
will also come in a future patch. Documentation will also be coming.

Batching allows the application to submit a list of independent
descriptors to DSA with one single "batch" descriptor. This is beneficial
when the application is in a position to have several operations ready
at once; batching saves the overhead of submitting each one separately.

The way batching works in SPDK is as follows:

1) The app gets a handle to a new batch with spdk_accel_batch_create()
2) The app uses that handle to prepare a command to be included in the
batch. For copy the command is spdk_accel_batch_prep_copy(). The
app many continue to prep commands for the batch up to the max via
calling spdk_accel_batch_get_max()
3) The app then submits the batch with spdk_accel_batch_submit()
4) The callback provided for each command in the batch will be called as
they complete, the callback provided to the batch submit itself will be
called then the entire batch is done.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4102e9291fe59a245cedde6888f42a923b6dbafd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2248
Community-CI: Mellanox Build Bot
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>
2020-07-10 07:31:09 +00:00
paul luse
0aca4d91e8 lib/idxd: clean up some casting and type issues
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If196c51deead9828fd75388f34b5622884c5e2d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2204
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2020-06-17 07:21:05 +00:00
paul luse
8d2c520048 lib/idxd: add support for dual cast
Dual-cast copies the same source to two separate destination buffers.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Icadae34a75c35e2db672a193287b147416012a5a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2129
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2020-06-17 07:21:05 +00:00
Seth Howell
d18e63206a mk/lib: add a check that major and minor version is set for libs.
Also, while we are here, consolidate setting SO_SUFFIX to one spot.

Previously, it was possible for a library to slip through
without an SO version.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4db5fa5839502d266c6259892e5719b05134518c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2361
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-21 09:19:00 +00:00
paul luse
b57103a0c8 lib/idxd: add support for compare operation
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ibfcc5c2f4a169c4625ab4f58fbcb8957677a3427
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2108
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2020-05-20 14:16:22 +00:00
paul luse
8c1fd55583 lib/idxd: implement idxd back end for CRC
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib23c23f69d8f002023dd72be1b7369e50ac44fb2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2105
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-15 08:12:13 +00:00
Seth Howell
f6dcd815f4 lib/idxd: add a map file.
While we are here, give the library an so suffix
which was missed when the library was initially
created.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I68929127bf672c0f2f7153f9716882d03151480e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2209
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>
2020-05-11 12:29:07 +00:00
paul luse
d7d9dc126b lib/idxd: factor out common submission code into a prep routine
Prior to adding more operations, make this a bit more efficient.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I02b864f998800c25076233183840bba8bff92196
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2069
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-07 10:41:44 +00:00
paul luse
9d94a8d53a idxd: clean up some enum style issues for consistency
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I523176cc49951e6d6513b86b1e05ca8e2b5e62f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2022
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-30 17:51:19 +00:00
paul luse
5b03dd938c module/idxd: accel framework plug-in for idxd
Docs, RPC, unit tests, etc., will follow.  Notes:

* The current implementation will only work with VFIO.

* The current implementation supports only the existing accel
framework API. The API will be expanded for DSA exclusive features
in a subsequent patch.

* SW is required to manage flow control, to not over-run the work queues.
This is provided in the accel plug-in module. The upper layers use public
API to manage this.

* As we need to support any number of channels (we can't limit ourselves
to the number of work queues) we need to dynamically size/resize our
per channel descriptor rings based on the number of current channels. This
is done from upper layers via public API into the lib.

* As channels are created, the total number of work queue slots is divided
across the channels evenly.  Same thing when they are destroyed, remaining
channels will see the ring sizes increase. This is done from upper layers
via public API into the lib.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ifaa39935107206a2d990cec992854675e5502057
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1722
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-23 15:48:32 +00:00
paul luse
e58e9fbda8 lib/idxd: add low level idxd library
Module, etc., will follow. Notes:

* IDXD is an Intel silicon feature available in future Intel CPUs.
Initial development is being done on a simulator. Once HW is
available and the code fully tested the experimental label will be
lifted. Spec can be found here: https://software.intel.com/en-us/download/intel-data-streaming-accelerator-preliminary-architecture-specification

* The current implementation will only work with VFIO.

* DSA has a number of engines that can be grouped based on application
need such as type of memory being served or QoS. Engines are processing
units and are assigned to groups. Work queues are on device structures
that act as front-end groups for queueing descriptors. Full details on
what is configurable & how will come in later doc patches.

* There is a finite number of work queue slots that are divided amongst
the number of desired work queues in some fashion (ie evenly).

* SW (outside of the idxd lib) is required to manage flow control, to not
over-run the work queues.This is provided in the accel plug-in module.
The upper layers use public API to manage this.

* Work queue submissions are done with a 64 byte atomic instruction

* The design here creates a set of descriptor rings per channel that match
the size of the work queues. Then, an spdk_bit_array is used to make sure
we don't overrun a queue.  If there are not slots available, the operation
is put on a linked list to be retried later from the poller.

* As we need to support any number of channels (we can't limit ourselves
to the number of work queues) we need to dynamically size/resize our
per channel descriptor rings based on the number of current channels. This
is done from upper layers via public API into the lib.

* As channels are created, the total number of work queue slots is divided
across the channels evenly. Same thing when they are destroyed, remaining
channels with see the ring sizes increase. This is done from upper layers
via public API into the lib.

* The sim has 64 total work queue entries (WQE) that get dolled out to the
work queues (WQ) evenly.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I899bbeda3cef3db05bea4197b8757e89dddb579d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1809
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-23 15:48:32 +00:00