[PATCH v2 0/5] Support driver in kernel 5.10 and bug fixes
by ramesh.thomas@intel.com
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
Updated to match new driver changes in kernel 5.10. mdev types are named
idxd-<accel type>-<mdev type>-v<hw version>. Driver loading in test
takes care of interdependency between 2 required kernel modules -
idxd_mdev and idxd.
Some bug fixes.
v2:
Change return value in patch 3 to -ENODEV from -1
Ramesh Thomas (5):
accel-config: Support new driver changes in kernel ver 5.10
accel-config: Fix a segmentation fault issue in add device
accel-config: Fix a return value error
accel-config: Add freeing of mdev list
accel-config: Manage idxd_mdev and idxd kernel
accfg/lib/libaccfg.c | 56 ++++++++++++++++++++++++++------------------
test/libaccfg.c | 36 ++++++++++++++++++++--------
2 files changed, 59 insertions(+), 33 deletions(-)
--
2.26.2
1 year, 5 months
[PATCH v1 0/5] Support driver in kernel 5.10 and bug fixes
by ramesh.thomas@intel.com
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
Updated to match new driver changes in kernel 5.10. mdev types are named
idxd-<accel type>-<mdev type>-v<hw version>. Driver loading in test
takes care of interdependency between 2 required kernel modules -
idxd_mdev and idxd.
Some bug fixes.
Ramesh Thomas (5):
accel-config: Support new driver changes in kernel ver 5.10
accel-config: Fix a segmentation fault issue in add device
accel-config: Fix a return value error
accel-config: Add freeing of mdev list
accel-config: Manage idxd_mdev and idxd kernel
accfg/lib/libaccfg.c | 56 ++++++++++++++++++++++++++------------------
test/libaccfg.c | 36 ++++++++++++++++++++--------
2 files changed, 59 insertions(+), 33 deletions(-)
--
2.26.2
1 year, 5 months
[PATCH v3 00/14] accel-config: Add mdev support
by ramesh.thomas@intel.com
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
Implements vfio mdev support for wqs. This implementation uses
wqs internally and user does not need to attach wqs. Mdevs are
stored and listed in the context of devices.
Initially 2 types of mdevs, 1dwq and 1swq are supported.
1swq uses shared wq type while 1dwq uses dedicaed wq.
Implements both library and command interfaces.
Added improvements in test case management and clears up
stale state after test failures.
Added support for "locked" wq state.
Added unit tests and man pages.
Added support for new kernel ver 5.10 driver changes.
Ramesh Thomas (14):
accel-config: Add mdev path to device context
accel-config: Create mdev structures and load mdevs into device
context
accel-config: Add lib functions to list mdevs and retrieve mdev
properties
accel-config: Add mdev json support
accel-config: Implement create and remove mdev library API
accel-config: Add mdev create and remove commands
accel-config: Improve management of test cases
accel-config: Unit tests for mdev support
accel-config: Add wq locked state support
accel-config: Add documentation for wq options
accel-config: Add documentation for mdev commands
accel-config: Clear conditions blocking unit test after failure
accel-config: Support new driver changes in kernel ver 5.10
accel-config: Remove unloading of driver at end
.../accfg/accel-config-config-wq.txt | 15 +
.../accfg/accel-config-create-mdev.txt | 32 +-
.../accfg/accel-config-remove-mdev.txt | 26 +-
accfg/config.c | 5 +-
accfg/enable.c | 4 +-
accfg/lib/libaccel-config.sym | 11 +
accfg/lib/libaccfg.c | 223 +++++++++++++-
accfg/lib/private.h | 9 +
accfg/libaccel_config.h | 28 +-
accfg/mdev.c | 123 +++++++-
test/libaccfg.c | 279 +++++++++++++++---
util/json.c | 44 ++-
12 files changed, 733 insertions(+), 66 deletions(-)
--
v2:
Split documentation batch into wq-config and mdev create/remove
v3:
Add support for new driver changes in kernel ver 5.10
2.26.2
1 year, 5 months
[PATCH v2 00/12] accel-config: Add mdev support
by ramesh.thomas@intel.com
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
Implements vfio mdev support for wqs. This implementation uses
wqs internally and user does not need to attach wqs. Mdevs are
stored and listed in the context of devices.
Initially 2 types of mdevs, 1dwq and 1swq are supported.
1swq uses shared wq type while 1dwq uses dedicaed wq.
Implements both library and command interfaces.
Added improvements in test case management and clears up
stale state after test failures.
Added support for "locked" wq state.
Added unit tests and man pages.
Ramesh Thomas (12):
accel-config: Add mdev path to device context
accel-config: Create mdev structures and load mdevs into device
context
accel-config: Add lib functions to list mdevs and retrieve mdev
properties
accel-config: Add mdev json support
accel-config: Implement create and remove mdev library API
accel-config: Add mdev create and remove commands
accel-config: Improve management of test cases
accel-config: Unit tests for mdev support
accel-config: Add wq locked state support
accel-config: Add documentation for wq options
accel-config: Add documentation for mdev commands
accel-config: Clear conditions blocking unit test after failure
.../accfg/accel-config-config-wq.txt | 15 +
.../accfg/accel-config-create-mdev.txt | 32 +-
.../accfg/accel-config-remove-mdev.txt | 26 +-
accfg/config.c | 5 +-
accfg/enable.c | 4 +-
accfg/lib/libaccel-config.sym | 11 +
accfg/lib/libaccfg.c | 228 +++++++++++++-
accfg/lib/private.h | 9 +
accfg/libaccel_config.h | 28 +-
accfg/mdev.c | 123 +++++++-
test/libaccfg.c | 277 +++++++++++++++---
util/json.c | 44 ++-
12 files changed, 738 insertions(+), 64 deletions(-)
--
v2:
Split documentation batch into wq-config and mdev create/remove
2.26.2
1 year, 5 months
[PATCH v1 00/11] accel-config: Add mdev support
by ramesh.thomas@intel.com
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
Implements vfio mdev support for wqs. This implementation uses
wqs internally and user does not need to attach wqs. Mdevs are
stored and listed in the context of devices.
Initially 2 types of mdevs, 1dwq and 1swq are supported.
1swq uses shared wq type while 1dwq uses dedicaed wq.
Implements both library and command interfaces.
Added improvements in test case management and clears up
stale state after test failures.
Added support for "locked" wq state.
Added unit tests and man pages.
Ramesh Thomas (11):
accel-config: Add mdev path to device context
accel-config: Create mdev structures and load mdevs into device
context
accel-config: Add lib functions to list mdevs and retrieve mdev
properties
accel-config: Add mdev json support
accel-config: Implement create and remove mdev library API
accel-config: Add mdev create and remove commands
accel-config: Improve management of test cases
accel-config: Unit tests for mdev support
accel-config: Add wq locked state support
accel-config: Add documentation for mdev commands
accel-config: Clear conditions blocking unit test after failure
.../accfg/accel-config-config-wq.txt | 15 +
.../accfg/accel-config-create-mdev.txt | 32 +-
.../accfg/accel-config-remove-mdev.txt | 26 +-
accfg/config.c | 5 +-
accfg/enable.c | 4 +-
accfg/lib/libaccel-config.sym | 11 +
accfg/lib/libaccfg.c | 228 +++++++++++++-
accfg/lib/private.h | 9 +
accfg/libaccel_config.h | 28 +-
accfg/mdev.c | 123 +++++++-
test/libaccfg.c | 277 +++++++++++++++---
util/json.c | 44 ++-
12 files changed, 738 insertions(+), 64 deletions(-)
--
2.26.2
1 year, 5 months
[PATCH v1 0/5] Fix static analysis bugs
by ramesh.thomas@intel.com
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
Fixes bugs found by static code analysis
Ramesh Thomas (5):
accel-config: static analysis bug fix
accel-config: static analysis bug fix
accel-config: static analysis bug fix
accel-config: static analysis bug fix
accel-config: static analysis bug fix
accfg/lib/libaccfg.c | 10 ++++++----
accfg/list.c | 3 +--
2 files changed, 7 insertions(+), 6 deletions(-)
--
2.26.2
1 year, 5 months
[PATCH v1] accel-config: Fix static code analysis issues
by ramesh.thomas@intel.com
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
Fixed bugs found in static code analysis
Signed-off-by: Ramesh Thomas <ramesh.thomas(a)intel.com>
---
accfg/lib/libaccfg.c | 10 ++++++----
accfg/list.c | 3 +--
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/accfg/lib/libaccfg.c b/accfg/lib/libaccfg.c
index cd9da42..3b53be3 100644
--- a/accfg/lib/libaccfg.c
+++ b/accfg/lib/libaccfg.c
@@ -529,7 +529,7 @@ static void *add_wq(void *parent, int id, const char *wq_base,
{
struct accfg_wq *wq;
struct accfg_device *device = parent;
- struct accfg_group *group = device->group;
+ struct accfg_group *group;
struct accfg_ctx *ctx;
char *path;
char *wq_base_string;
@@ -540,6 +540,7 @@ static void *add_wq(void *parent, int id, const char *wq_base,
if (!device)
return NULL;
+ group = device->group;
ctx = accfg_device_get_ctx(device);
dfd = open(wq_base, O_PATH);
if (dfd < 0)
@@ -615,7 +616,6 @@ err_read:
free(wq->wq_buf);
free(wq->wq_path);
err_wq:
- close(dfd);
free(wq);
free(path);
return NULL;
@@ -715,7 +715,7 @@ static void *add_engine(void *parent, int id, const char *engine_base,
struct accfg_engine *engine;
struct accfg_device *device = parent;
struct accfg_ctx *ctx;
- struct accfg_group *group = device->group;
+ struct accfg_group *group;
char *path;
char *engine_base_string;
int dfd;
@@ -724,6 +724,7 @@ static void *add_engine(void *parent, int id, const char *engine_base,
if (!device)
return NULL;
+ group = device->group;
ctx = accfg_device_get_ctx(device);
dfd = open(engine_base, O_PATH);
if (dfd < 0)
@@ -1109,12 +1110,13 @@ ACCFG_EXPORT int accfg_device_get_clients(struct accfg_device *device)
ACCFG_EXPORT int accfg_device_set_token_limit(struct accfg_device *dev, int val)
{
struct accfg_ctx *ctx;
- char *path = dev->device_buf;
+ char *path;
char buf[SYSFS_ATTR_SIZE];
if (!dev)
return -EINVAL;
+ path = dev->device_buf;
ctx = accfg_device_get_ctx(dev);
if (sprintf(path, "%s/token_limit", dev->device_path) >=
diff --git a/accfg/list.c b/accfg/list.c
index c22da41..2234e65 100644
--- a/accfg/list.c
+++ b/accfg/list.c
@@ -56,8 +56,7 @@ static struct json_object *group_to_json(struct accfg_group *group,
struct json_object *jobj = NULL;
struct accfg_device *dev = NULL;
- if (group)
- dev = accfg_group_get_device(group);
+ dev = accfg_group_get_device(group);
if (!jgroup)
return NULL;
--
2.26.2
1 year, 5 months