Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package accel-config for openSUSE:Factory 
checked in at 2023-01-02 15:02:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/accel-config (Old)
 and      /work/SRC/openSUSE:Factory/.accel-config.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "accel-config"

Mon Jan  2 15:02:36 2023 rev:14 rq:1046169 version:3.5.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/accel-config/accel-config.changes        
2022-11-29 10:54:18.397099427 +0100
+++ /work/SRC/openSUSE:Factory/.accel-config.new.1563/accel-config.changes      
2023-01-02 15:02:41.605527997 +0100
@@ -1,0 +2,7 @@
+Tue Dec 27 23:01:03 UTC 2022 - Ferdinand Thiessen <r...@fthiessen.de>
+
+- Update to version 3.5.2:
+  * Bug fix in help system
+  * Remove mdev implementation
+
+-------------------------------------------------------------------

Old:
----
  idxd-config-accel-config-v3.5.0.tar.gz

New:
----
  idxd-config-accel-config-v3.5.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ accel-config.spec ++++++
--- /var/tmp/diff_new_pack.LaMi0Q/_old  2023-01-02 15:02:42.165531144 +0100
+++ /var/tmp/diff_new_pack.LaMi0Q/_new  2023-01-02 15:02:42.169531166 +0100
@@ -19,7 +19,7 @@
 %define pkg_libname libaccel-config1
 %define src_name idxd-config-accel-config-v%{version}
 Name:           accel-config
-Version:        3.5.0
+Version:        3.5.2
 Release:        0
 Summary:        Configure accelerator subsystem devices
 License:        GPL-2.0-only

++++++ idxd-config-accel-config-v3.5.0.tar.gz -> 
idxd-config-accel-config-v3.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.5.0/Documentation/accfg/Makefile.am 
new/idxd-config-accel-config-v3.5.2/Documentation/accfg/Makefile.am
--- old/idxd-config-accel-config-v3.5.0/Documentation/accfg/Makefile.am 
2022-10-15 02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/Documentation/accfg/Makefile.am 
2022-11-29 01:09:23.000000000 +0100
@@ -29,9 +29,7 @@
        accel-config-disable-device.1 \
        accel-config-disable-wq.1 \
        accel-config-enable-wq.1 \
-       accel-config-enable-device.1 \
-       accel-config-remove-mdev.1 \
-       accel-config-create-mdev.1
+       accel-config-enable-device.1
 
 EXTRA_DIST = \
        $(man1_MANS) \
@@ -46,9 +44,7 @@
        accel-config-disable-device.txt \
        accel-config-disable-wq.txt \
        accel-config-enable-wq.txt \
-       accel-config-enable-device.txt \
-       accel-config-remove-mdev.txt \
-       accel-config-create-mdev.txt
+       accel-config-enable-device.txt
 
 CLEANFILES = $(man1_MANS)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config-config-wq.txt
 
new/idxd-config-accel-config-v3.5.2/Documentation/accfg/accel-config-config-wq.txt
--- 
old/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config-config-wq.txt
  2022-10-15 02:29:50.000000000 +0200
+++ 
new/idxd-config-accel-config-v3.5.2/Documentation/accfg/accel-config-config-wq.txt
  2022-11-29 01:09:23.000000000 +0100
@@ -56,8 +56,8 @@
 -y::
 --type::
        configure the type for the wq. The wq type can be "kernel" for kernel
-       user case to request wq, "mdev" for mediated device driver use case to
-       request wq or "user" for regular character device driver use case to wq.
+       user case to request wq or "user" for regular character device driver
+       use case to wq.
 
 -n::
 --name::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config-create-mdev.txt
 
new/idxd-config-accel-config-v3.5.2/Documentation/accfg/accel-config-create-mdev.txt
--- 
old/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config-create-mdev.txt
        2022-10-15 02:29:50.000000000 +0200
+++ 
new/idxd-config-accel-config-v3.5.2/Documentation/accfg/accel-config-create-mdev.txt
        1970-01-01 01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-
-accel-config-create-mdev(1)
-===========================
-
-NAME
-----
-accel-config-create-mdev - create mdev to enabled workqueues of devices.
-A uuid is generated which is associated with the mdev and will be stored in
-/sys/class/mdev_bus under the device pcie bdf id. Creation of mdevs require
-enabled workqueues. For mdevs of the shared type, at least one shared
-mode workqueue needs to be enabled. Each dedicated type mdev require one
-dedicated mode workqueue to be enabled. Creation of dedicated type mdevs
-would set the state of workqueue used as "locked". Creation of shared
-type mdevs do not alter the state of workqueues.
-
-SYNOPSIS
---------
-[verse]
-'accel-config create-mdev <device-name> [<mdev-type>|<options>]'
-
-EXAMPLE
--------
-accel-config create-mdev dsa0 1dwq
-
-accel-config create-mdev dsa0 -l
-----
-Available mdev types:
-       1dwq
-       1swq
-----
-
-OPTIONS
---------
--l::
---list-mdev-types::
-       list the available mdev types
-
-include::../copyright.txt[]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config-list.txt 
new/idxd-config-accel-config-v3.5.2/Documentation/accfg/accel-config-list.txt
--- 
old/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config-list.txt   
    2022-10-15 02:29:50.000000000 +0200
+++ 
new/idxd-config-accel-config-v3.5.2/Documentation/accfg/accel-config-list.txt   
    2022-11-29 01:09:23.000000000 +0100
@@ -176,7 +176,6 @@
 --engines::
        Include active engine info in the listing
 
-TO BE CHANGED
 -i::
 --idle::
        Include both idle (not enabled) and active devices in the listing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config-remove-mdev.txt
 
new/idxd-config-accel-config-v3.5.2/Documentation/accfg/accel-config-remove-mdev.txt
--- 
old/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config-remove-mdev.txt
        2022-10-15 02:29:50.000000000 +0200
+++ 
new/idxd-config-accel-config-v3.5.2/Documentation/accfg/accel-config-remove-mdev.txt
        1970-01-01 01:00:00.000000000 +0100
@@ -1,37 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-
-accel-config-remove-mdev(1)
-===========================
-
-NAME
-----
-accel-config-remove-mdev - remove mdev of a device associated with
-the passed uuid. Passing "all" will remove all mdevs of the device.
-
-SYNOPSIS
---------
-[verse]
-'accel-config remove-mdev <device-name> [<uuid>|<options>]'
-
-EXAMPLE
--------
-accel-config remove-mdev dsa0 0f34f0ed-6f67-4086-a4b7-8e1ecf077dce
-
-accel-config remove-mdev dsa0 all
-
-accel-config remove-mdev dsa0 -l
-----
-Available mdevs:
-        uuid:edc13abf-cbf4-4de8-bf01-0dc864c54290, type:1dwq
-        uuid:7e776dce-a80b-4da8-9b13-d0483bff678f, type:1swq
-        uuid:45174189-1b18-4270-9f02-30cadbd4b1a4, type:1swq
-        uuid:3c53af36-be6f-405f-9ebf-d556e0735943, type:1swq
-        uuid:131a1337-4c32-48a0-97a7-0aac053f383c, type:1swq
-----
-OPTIONS
--------
--l::
---list-mdevs::
-       list available mdevs of device
-
-include::../copyright.txt[]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config.txt 
new/idxd-config-accel-config-v3.5.2/Documentation/accfg/accel-config.txt
--- old/idxd-config-accel-config-v3.5.0/Documentation/accfg/accel-config.txt    
2022-10-15 02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/Documentation/accfg/accel-config.txt    
2022-11-29 01:09:23.000000000 +0100
@@ -43,5 +43,3 @@
 linkaccel-config:accel-config-config-group[1],
 linkaccel-config:accel-config-config-wq[1],
 linkaccel-config:accel-config-config-engine[1],
-linkaccel-config:accel-config-create-mdev[1],
-linkaccel-config:accel-config-remove-mdev[1],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/accfg/Makefile.am 
new/idxd-config-accel-config-v3.5.2/accfg/Makefile.am
--- old/idxd-config-accel-config-v3.5.0/accfg/Makefile.am       2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/accfg/Makefile.am       2022-11-29 
01:09:23.000000000 +0100
@@ -16,8 +16,7 @@
                ../util/json.h \
                enable.c \
                config_attr.c \
-               config.c \
-               mdev.c
+               config.c
 
 accel_config_LDADD =\
        lib/libaccel-config.la \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/accfg/accel-config.c 
new/idxd-config-accel-config-v3.5.2/accfg/accel-config.c
--- old/idxd-config-accel-config-v3.5.0/accfg/accel-config.c    2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/accfg/accel-config.c    2022-11-29 
01:09:23.000000000 +0100
@@ -50,7 +50,7 @@
                return 0;
        }
 
-       return help_show_man_page(argv[0], "accfg", "ACCFG_MAN_VIEWER");
+       return help_show_man_page(argv[0], "accel-config", "ACCFG_MAN_VIEWER");
 }
 
 static struct cmd_struct commands[] = {
@@ -67,8 +67,6 @@
        {"config-group", cmd_config_group},
        {"config-wq", cmd_config_wq},
        {"config-engine", cmd_config_engine},
-       {"create-mdev", cmd_create_mdev},
-       {"remove-mdev", cmd_remove_mdev},
 #ifdef ENABLE_TEST
        {"test", cmd_test},
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/accfg/lib/libaccfg.c 
new/idxd-config-accel-config-v3.5.2/accfg/lib/libaccfg.c
--- old/idxd-config-accel-config-v3.5.0/accfg/lib/libaccfg.c    2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/accfg/lib/libaccfg.c    2022-11-29 
01:09:23.000000000 +0100
@@ -29,7 +29,6 @@
 #include "private.h"
 #include <accfg/idxd.h>
 
-#define MDEV_POSTFIX "mdev_supported_types"
 #define IDXD_DRIVER_BIND_PATH "/sys/bus/dsa/drivers/idxd"
 #define IDXD_DRIVER(d) ((d)->ctx->compat ? \
                (d)->bus_type_str : "idxd")
@@ -39,7 +38,6 @@
 char *accfg_wq_device_portals[] = {
        [ACCFG_WQT_KERNEL] = "dmaengine",
        [ACCFG_WQT_USER] = "user",
-       [ACCFG_WQT_MDEV] = "mdev",
        NULL
 };
 
@@ -68,12 +66,6 @@
        [ACCFG_DEVICE_IAX] = 64,
 };
 
-ACCFG_EXPORT char *accfg_mdev_basenames[] = {
-       [ACCFG_MDEV_TYPE_1_DWQ]      = "1dwq",
-       [ACCFG_MDEV_TYPE_1_SWQ]      = "1swq",
-       NULL
-};
-
 enum {
        ACCFG_CMD_STATUS_MAX = 0x45,
        ACCFG_CMD_STATUS_ERROR = 0x80010000,
@@ -177,11 +169,6 @@
        }
 }
 
-static inline bool is_mdev_registered(struct accfg_device *device)
-{
-       return device->mdev_path && !access(device->mdev_path, F_OK);
-}
-
 static int accfg_set_param(struct accfg_ctx *ctx, int dfd, char *name,
                void *buf, int len)
 {
@@ -271,16 +258,6 @@
        return strdup(buf);
 }
 
-static void free_mdevs(struct accfg_device *device)
-{
-       struct accfg_device_mdev *mdev, *next;
-
-       list_for_each_safe(&device->mdev_list, mdev, next, list) {
-               list_del_from(&device->mdev_list, &mdev->list);
-               free(mdev);
-       }
-}
-
 static void free_engine(struct accfg_engine *engine)
 {
        struct accfg_device *device = engine->device;
@@ -328,13 +305,11 @@
                free_wq(wq);
        list_for_each_safe(&device->engines, engine, engine_next, list)
                free_engine(engine);
-       free_mdevs(device);
 
        if (head)
                list_del_from(head, &device->list);
        free(device->device_path);
        free(device->device_buf);
-       free(device->mdev_path);
        free(device);
 }
 
@@ -553,72 +528,6 @@
        return -ENODEV;
 }
 
-static int mdev_str_to_type(char *mdev_type_str)
-{
-       char **b;
-       int i;
-
-       for (b = accfg_mdev_basenames, i = 0; *b != NULL; b++, i++)
-               if (strstr(mdev_type_str, *b))
-                       return i;
-
-       return ACCFG_MDEV_TYPE_UNKNOWN;
-}
-
-static int add_device_mdevs(struct accfg_ctx *ctx, struct accfg_device *dev)
-{
-       struct accfg_device_mdev *dev_mdev;
-       uuid_t uu;
-       struct dirent **d;
-       char *f, *mdev_type_str;
-       char p[PATH_MAX];
-       char mdev_path[PATH_MAX];
-       int n, n1, rc = 0;
-
-       n1 = n = scandir(dev->mdev_path, &d, NULL, alphasort);
-       if (n < 0) {
-               err(ctx, "scandir failed\n");
-               return -ENOENT;
-       }
-
-       while (n--) {
-               f = &d[n]->d_name[0];
-               if (*f == '.' || uuid_parse(f, uu))
-                       continue;
-               sprintf(p, "%s/%s/mdev_type", dev->mdev_path, f);
-               if (!realpath(p, mdev_path))
-                       continue;
-               dev_mdev = calloc(1,
-                       sizeof(struct accfg_device_mdev));
-               if (!dev_mdev) {
-                       err(ctx, "allocation failed\n");
-                       rc = -ENOMEM;
-                       goto exit_add_mdev;
-               }
-               uuid_copy(dev_mdev->uuid, uu);
-               mdev_type_str = strrchr(mdev_path, '/') + 1;
-               dev_mdev->device = dev;
-               dev_mdev->type = mdev_str_to_type(mdev_type_str);
-               if (dev_mdev->type == ACCFG_MDEV_TYPE_UNKNOWN) {
-                       err(ctx, "mdev type error\n");
-                       free(dev_mdev);
-                       rc = -EINVAL;
-                       goto exit_add_mdev;
-               }
-               list_add_tail(&dev->mdev_list, &dev_mdev->list);
-       }
-
-exit_add_mdev:
-       while (n1--)
-               free(d[n1]);
-       free(d);
-
-       if (rc)
-               free_mdevs(dev);
-
-       return rc;
-}
-
 static void *add_device(void *parent, int id, const char *ctl_base,
                char *dev_prefix, char *bus_type)
 {
@@ -626,7 +535,6 @@
        struct accfg_device *device;
        int dfd;
        int rc;
-       char *p;
 
        dfd = open(ctl_base, O_PATH);
        if (dfd == -1) {
@@ -652,7 +560,6 @@
        list_head_init(&device->groups);
        list_head_init(&device->wqs);
        list_head_init(&device->engines);
-       list_head_init(&device->mdev_list);
 
        device->ctx = ctx;
        device->id = id;
@@ -685,20 +592,6 @@
                goto err_dev_path;
        }
 
-       device->mdev_path = strdup(device->device_path);
-       if (!device->mdev_path) {
-               err(ctx, "strdup of device_path failed\n");
-               goto err_dev_path;
-       }
-
-       if (asprintf(&p, "%s/%s", MDEV_BUS,
-                       basename(dirname(device->mdev_path))) < 0) {
-               err(ctx, "device mdev_path allocation failed\n");
-               goto err_dev_path;
-       }
-       free(device->mdev_path);
-       device->mdev_path = p;
-
        device->device_buf = calloc(1, strlen(device->device_path) +
                        MAX_BUF_LEN);
        if (!device->device_buf) {
@@ -714,9 +607,6 @@
 
        device->bus_type_str = bus_type;
 
-       if (is_mdev_registered(device) && add_device_mdevs(ctx, device))
-               goto err_dev_path;
-
        list_add_tail(&ctx->devices, &device->list);
 
        return device;
@@ -724,7 +614,6 @@
 err_dev_path:
 err_read:
        free(device->device_buf);
-       free(device->mdev_path);
        free(device);
 err_device:
        return NULL;
@@ -750,8 +639,6 @@
                wq->type = ACCFG_WQT_KERNEL;
        else if (strcmp(ptype, "user") == 0)
                wq->type = ACCFG_WQT_USER;
-       else if (strcmp(ptype, "mdev") == 0)
-               wq->type = ACCFG_WQT_MDEV;
        else
                wq->type = ACCFG_WQT_NONE;
 
@@ -1078,144 +965,6 @@
                        add_engine);
 }
 
-ACCFG_EXPORT struct accfg_device_mdev *accfg_device_first_mdev(struct 
accfg_device *device)
-{
-       return list_top(&device->mdev_list, struct accfg_device_mdev, list);
-}
-
-ACCFG_EXPORT struct accfg_device_mdev *accfg_device_next_mdev(struct 
accfg_device_mdev *mdev)
-{
-       struct accfg_device *device = mdev->device;
-
-       return list_next(&device->mdev_list, mdev, list);
-}
-
-ACCFG_EXPORT void accfg_mdev_get_uuid(struct accfg_device_mdev *mdev, uuid_t 
uuid)
-{
-       uuid_copy(uuid, mdev->uuid);
-}
-
-ACCFG_EXPORT enum accfg_mdev_type accfg_mdev_get_type(struct accfg_device_mdev 
*mdev)
-{
-       return mdev->type;
-}
-
-static void accfg_gen_uuid(struct accfg_device *device, uuid_t uuid)
-{
-       struct accfg_device_mdev *entry, *next;
-
-       uuid_clear(uuid);
-       while (1) {
-               uuid_generate(uuid);
-               if (list_empty(&device->mdev_list))
-                       return;
-               list_for_each_safe(&device->mdev_list, entry, next, list) {
-                       if (uuid_compare(uuid, entry->uuid) != 0)
-                               return;
-               }
-       }
-}
-
-ACCFG_EXPORT int accfg_create_mdev(struct accfg_device *device,
-               enum accfg_mdev_type type, uuid_t uuid)
-{
-       struct accfg_ctx *ctx = accfg_device_get_ctx(device);
-       struct accfg_device_mdev *mdev;
-       char uuid_str[UUID_STR_LEN];
-       char mdev_path[PATH_MAX];
-       unsigned int version;
-       int rc;
-
-       if (!is_mdev_registered(device))
-               return -ENOENT;
-
-       if (type >= ACCFG_MDEV_TYPE_UNKNOWN || type < 0)
-               return -EINVAL;
-
-       mdev = calloc(1, sizeof(struct accfg_device_mdev));
-       if (!mdev) {
-               err(ctx, "mdev allocation failed\n");
-               return -ENOMEM;
-       }
-       accfg_gen_uuid(device, mdev->uuid);
-       mdev->type = type;
-
-       uuid_unparse(mdev->uuid, uuid_str);
-       version = device->version  >> 8;
-       sprintf(mdev_path, "%s/%s/idxd-%s-%s-v%d/create", device->mdev_path,
-                       MDEV_POSTFIX, device->device_type_str,
-                       accfg_mdev_basenames[type], version);
-       rc = sysfs_write_attr(ctx, mdev_path, uuid_str);
-       if (rc < 0) {
-               err(ctx, "create mdev failed %d\n", rc);
-               save_last_error(device, NULL, NULL, NULL);
-               goto create_err;
-       }
-
-       list_add_tail(&device->mdev_list, &mdev->list);
-       uuid_copy(uuid, mdev->uuid);
-       return 0;
-
-create_err:
-       free(mdev);
-       return rc;
-}
-
-static int accfg_device_mdev_remove(struct accfg_device *device,
-               struct accfg_device_mdev *mdev)
-{
-       struct accfg_ctx *ctx = accfg_device_get_ctx(device);
-       char uuid_str[UUID_STR_LEN];
-       char mdev_path[PATH_MAX];
-       int rc;
-
-       uuid_unparse(mdev->uuid, uuid_str);
-       sprintf(mdev_path, "%s/%s/remove", device->mdev_path, uuid_str);
-       rc = sysfs_write_attr(ctx, mdev_path, "1");
-       if (rc < 0) {
-               save_last_error(device, NULL, NULL, NULL);
-               return rc;
-       }
-
-       list_del(&mdev->list);
-       free(mdev);
-
-       return 0;
-}
-
-ACCFG_EXPORT int accfg_remove_mdev(struct accfg_device *device, uuid_t uuid)
-{
-       struct accfg_ctx *ctx = accfg_device_get_ctx(device);
-       struct accfg_device_mdev *entry, *next;
-       int rc, all;
-
-       if (!is_mdev_registered(device))
-               return -ENOENT;
-
-       /* remove all mdevs if null uuid is passed */
-       all = uuid_is_null(uuid);
-       list_for_each_safe(&device->mdev_list, entry, next, list) {
-               if (all || !uuid_compare(entry->uuid, uuid)) {
-                       rc = accfg_device_mdev_remove(device, entry);
-                       if (rc < 0)
-                               goto remove_err;
-                       if (!all)
-                               return 0;
-               }
-       }
-
-       if (!all) {
-               err(ctx, "mdev uuid not found\n");
-               return -EINVAL;
-       }
-
-       return 0;
-
-remove_err:
-       err(ctx, "remove mdev failed %d\n", rc);
-       return rc;
-}
-
 /**
  * accfg_device_get_first - retrieve first device in the system
  * @ctx: context established by accfg_new
@@ -1371,12 +1120,6 @@
        return device->pasid_enabled;
 }
 
-ACCFG_EXPORT bool accfg_device_get_mdev_enabled(
-               struct accfg_device *device)
-{
-       return is_mdev_registered(device);
-}
-
 ACCFG_EXPORT int accfg_device_get_errors(struct accfg_device *device,
                struct accfg_error *error)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/accfg/lib/private.h 
new/idxd-config-accel-config-v3.5.2/accfg/lib/private.h
--- old/idxd-config-accel-config-v3.5.0/accfg/lib/private.h     2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/accfg/lib/private.h     2022-11-29 
01:09:23.000000000 +0100
@@ -29,13 +29,11 @@
        struct list_node list;
        int group_init;
        char *device_path;
-       char *mdev_path;
        char *device_buf;
        char *bus_type_str;
        char *device_type_str;
        enum accfg_device_type type;
        size_t buf_len;
-       struct list_head mdev_list;
 
        /* Device Attributes */
        struct accfg_error errors;
@@ -58,13 +56,6 @@
        char *pasid_enabled;
 };
 
-struct accfg_device_mdev {
-       struct accfg_device *device;
-       uuid_t uuid;
-       enum accfg_mdev_type type;
-       struct list_node list;
-};
-
 struct accfg_group {
        struct accfg_device *device;
        int id;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.5.0/accfg/libaccel_config.h 
new/idxd-config-accel-config-v3.5.2/accfg/libaccel_config.h
--- old/idxd-config-accel-config-v3.5.0/accfg/libaccel_config.h 2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/accfg/libaccel_config.h 2022-11-29 
01:09:23.000000000 +0100
@@ -63,7 +63,6 @@
        ACCFG_WQT_NONE = 0,
        ACCFG_WQT_KERNEL,
        ACCFG_WQT_USER,
-       ACCFG_WQT_MDEV,
 };
 
 enum accfg_control_flag {
@@ -73,12 +72,6 @@
        ACCFG_WQ_DISABLE,
 };
 
-enum accfg_mdev_type {
-       ACCFG_MDEV_TYPE_1_DWQ,
-       ACCFG_MDEV_TYPE_1_SWQ,
-       ACCFG_MDEV_TYPE_UNKNOWN,
-};
-
 /* no need to save device error */
 struct accfg_error {
        uint64_t val[4];
@@ -95,7 +88,6 @@
 };
 
 extern char *accfg_basenames[];
-extern char *accfg_mdev_basenames[];
 
 struct group_parameters {
        unsigned int tokens_reserved __attribute((deprecated));
@@ -189,7 +181,6 @@
 uint64_t accfg_device_get_gen_cap(struct accfg_device *device);
 unsigned int accfg_device_get_configurable(struct accfg_device *device);
 bool accfg_device_get_pasid_enabled(struct accfg_device  *device);
-bool accfg_device_get_mdev_enabled(struct accfg_device *device);
 int accfg_device_get_errors(struct accfg_device *device, struct accfg_error 
*error);
 enum accfg_device_state accfg_device_get_state(struct accfg_device *device);
 unsigned int accfg_device_get_max_tokens(struct accfg_device *device)
@@ -214,19 +205,6 @@
 struct accfg_wq *accfg_ctx_get_last_error_wq(struct accfg_ctx *ctx);
 struct accfg_group *accfg_ctx_get_last_error_group(struct accfg_ctx *ctx);
 struct accfg_engine *accfg_ctx_get_last_error_engine(struct accfg_ctx *ctx);
-struct accfg_device_mdev;
-struct accfg_device_mdev *accfg_device_first_mdev(struct accfg_device *device);
-struct accfg_device_mdev *accfg_device_next_mdev(struct accfg_device_mdev 
*mdev);
-void accfg_mdev_get_uuid(struct accfg_device_mdev *mdev, uuid_t uuid);
-enum accfg_mdev_type accfg_mdev_get_type(struct accfg_device_mdev *mdev);
-int accfg_create_mdev(struct accfg_device *device, enum accfg_mdev_type type,
-               uuid_t uuid);
-int accfg_remove_mdev(struct accfg_device *device, uuid_t uuid);
-
-#define accfg_device_mdev_foreach(device, mdev) \
-       for (mdev = accfg_device_first_mdev(device); \
-               mdev != NULL; \
-               mdev = accfg_device_next_mdev(mdev))
 
 /* libaccfg function for group */
 struct accfg_group;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/accfg/mdev.c 
new/idxd-config-accel-config-v3.5.2/accfg/mdev.c
--- old/idxd-config-accel-config-v3.5.0/accfg/mdev.c    2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/accfg/mdev.c    1970-01-01 
01:00:00.000000000 +0100
@@ -1,165 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright(c) 2019 Intel Corporation. All rights reserved. */
-
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <libgen.h>
-#include <dirent.h>
-#include <linux/limits.h>
-#include <linux/uuid.h>
-#include <util/filter.h>
-#include <util/util.h>
-#include <util/parse-options.h>
-#include <util/strbuf.h>
-#include <accfg/libaccel_config.h>
-#include <sys/epoll.h>
-#include <sys/stat.h>
-#include <accfg.h>
-
-static int opt_called;
-static struct accfg_device *device;
-
-static int opt_cb_create_mdev(const struct option *opt, const char *arg, int 
unset)
-{
-       char **m;
-
-       if (opt->short_name != 'l')
-               return -1;
-
-       printf("Available mdev types:\n");
-       for (m = accfg_mdev_basenames; *m; m++)
-               printf("\t%s\n", *m);
-
-       opt_called = true;
-
-       return 0;
-}
-
-static int opt_cb_remove_mdev(const struct option *opt, const char *arg, int 
unset)
-{
-       uuid_t uuid;
-       char uuid_str[UUID_STR_LEN];
-       struct accfg_device_mdev *mdev;
-       enum accfg_mdev_type type;
-
-       if (opt->short_name != 'l')
-               return -1;
-
-       printf("Available mdevs:\n");
-       accfg_device_mdev_foreach(device, mdev) {
-               accfg_mdev_get_uuid(mdev, uuid);
-               type = accfg_mdev_get_type(mdev);
-               uuid_unparse(uuid, uuid_str);
-               printf("\tuuid:%s, type:%s\n", uuid_str,
-                               accfg_mdev_basenames[type]);
-       }
-       opt_called = true;
-
-       return 0;
-}
-
-int cmd_create_mdev(int argc, const char **argv, void *ctx)
-{
-       char **m;
-       int rc, t;
-       uuid_t uuid;
-       char uuid_str[UUID_STR_LEN];
-
-       const struct option options[] = {
-               OPT_CALLBACK_NOOPT('l', "list-mdev-types", NULL, NULL,
-                               "will list available mdev types", 
opt_cb_create_mdev),
-               OPT_END(),
-       };
-
-       const char *const u[] = {
-               "accfg create-mdev <device name> [<mdev type>|<options>]",
-               NULL
-       };
-
-       if (argc < 3)
-               usage_with_options(u, options);
-
-       device = accfg_ctx_device_get_by_name(ctx, argv[1]);
-       if (!device) {
-               fprintf(stderr, "Enter a valid device to create mdev\n");
-               usage_with_options(u, options);
-       }
-
-       if (!accfg_device_get_mdev_enabled(device)) {
-               fprintf(stderr, "mdev support not available\n");
-               return 0;
-       }
-
-       parse_options(argc, argv, options, u, 0);
-       if (opt_called)
-               return 0;
-
-       for (m = accfg_mdev_basenames, t = 0; *m; m++, t++)
-               if (!strcmp(argv[1], *m))
-                       break;
-       if (!*m) {
-               fprintf(stderr, "Invalid mdev type\n");
-               usage_with_options(u, options);
-       }
-
-       rc = accfg_create_mdev(device, t, uuid);
-       if (rc < 0)
-               return rc;
-
-       uuid_unparse(uuid, uuid_str);
-       printf("Created mdev with uuid: %s\n", uuid_str);
-
-       return 0;
-}
-
-int cmd_remove_mdev(int argc, const char **argv, void *ctx)
-{
-       int rc;
-       uuid_t uuid;
-
-       const struct option options[] = {
-               OPT_CALLBACK_NOOPT('l', "list-mdevs", NULL, NULL,
-                               "will list available mdevs", 
opt_cb_remove_mdev),
-               OPT_END(),
-       };
-
-       const char *const u[] = {
-               "accfg remove-mdev <device name> [<uuid>|<options>]",
-               "Pass \"all\" to remove all mdevs",
-               NULL
-       };
-
-       if (argc < 3)
-               usage_with_options(u, options);
-
-       device = accfg_ctx_device_get_by_name(ctx, argv[1]);
-       if (!device) {
-               fprintf(stderr, "Enter a valid device to remove mdev\n");
-               usage_with_options(u, options);
-       }
-
-       if (!accfg_device_get_mdev_enabled(device)) {
-               fprintf(stderr, "mdev support not available\n");
-               return 0;
-       }
-
-       parse_options(argc, argv, options, u, 0);
-       if (opt_called)
-               return 0;
-
-       if (!strcmp(argv[1], "all"))
-               uuid_clear(uuid);
-       else if (uuid_parse(argv[1], uuid) < 0) {
-               fprintf(stderr, "Invalid uuid\n");
-               usage_with_options(u, options);
-       }
-
-       rc = accfg_remove_mdev(device, uuid);
-
-       return rc;
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/builtin.h 
new/idxd-config-accel-config-v3.5.2/builtin.h
--- old/idxd-config-accel-config-v3.5.0/builtin.h       2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/builtin.h       2022-11-29 
01:09:23.000000000 +0100
@@ -30,8 +30,6 @@
 int cmd_config_group(int argc, const char **argv, void *ctx);
 int cmd_config_wq(int argc, const char **argv, void *ctx);
 int cmd_config_engine(int argc, const char **argv, void *ctx);
-int cmd_create_mdev(int argc, const char **argv, void *ctx);
-int cmd_remove_mdev(int argc, const char **argv, void *ctx);
 #ifdef ENABLE_TEST
 int cmd_test(int argc, const char **argv, void *ctx);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/configure.ac 
new/idxd-config-accel-config-v3.5.2/configure.ac
--- old/idxd-config-accel-config-v3.5.0/configure.ac    2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/configure.ac    2022-11-29 
01:09:23.000000000 +0100
@@ -133,13 +133,9 @@
 
 accfg_confdir=${sysconfdir}/accel-config
 accfg_conf=accel-config.conf
-accfg_mdev_bus=/sys/class/mdev_bus
-accfg_mdev_prefix=/sys/bus/mdev/devices
 
 AC_SUBST([accfg_confdir])
 AC_SUBST([accfg_conf])
-AC_SUBST([accfg_mdev_bus])
-AC_SUBST([accfg_mdev_prefix])
 
 my_CFLAGS="\
 -Wall \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/debian/changelog 
new/idxd-config-accel-config-v3.5.2/debian/changelog
--- old/idxd-config-accel-config-v3.5.0/debian/changelog        2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/debian/changelog        2022-11-29 
01:09:23.000000000 +0100
@@ -1,3 +1,20 @@
+accel-config (3.5.2-1) unstable; urgency=medium
+
+  * Add tests of other dsa opcodes in dsa user test runner
+  * Fix drain descriptor readback address assignment
+  * Remove mdev implementation
+
+ -- Ramesh Thomas <ramesh.tho...@intel.com>  Mon, 28 Nov 2022 16:08:41 -0800
+
+accel-config (3.5.1-1) unstable; urgency=medium
+
+  * Fix a bug in the --help option
+  * Modify incorrect print information
+  * Fix dedicated mode wq size 1 failure
+  * Remove redundant -f 0x0 in iaa_user_test_runner.sh
+
+ -- Ramesh Thomas <ramesh.tho...@intel.com>  Wed, 23 Nov 2022 11:43:32 -0800
+
 accel-config (3.5.0-1) unstable; urgency=medium
 
   * Update debian scripts to install contrib/configs in /etc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/git-version 
new/idxd-config-accel-config-v3.5.2/git-version
--- old/idxd-config-accel-config-v3.5.0/git-version     2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/git-version     2022-11-29 
01:09:23.000000000 +0100
@@ -19,7 +19,7 @@
        fi
 }
 
-DEF_VER=3.5.0
+DEF_VER=3.5.2
 
 LF='
 '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/test/README.md 
new/idxd-config-accel-config-v3.5.2/test/README.md
--- old/idxd-config-accel-config-v3.5.0/test/README.md  2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/test/README.md  2022-11-29 
01:09:23.000000000 +0100
@@ -2,8 +2,7 @@
 
 The test command is an option to test all the library code of accel-config,
 including set and get libaccfg functions for all components in dsa device, set
-large wq to exceed max total size in dsa, test the create-mdev and remove-mdev
-on shared wq and dedicated wq.
+large wq to exceed max total size in dsa.
 
 Build
 =====
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/test/common 
new/idxd-config-accel-config-v3.5.2/test/common
--- old/idxd-config-accel-config-v3.5.0/test/common     2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/test/common     2022-11-29 
01:09:23.000000000 +0100
@@ -121,9 +121,6 @@
 #
 _cleanup()
 {
-       lsmod | grep -q "idxd_mdev" && {
-               rmmod idxd_mdev
-       }
        lsmod | grep -q "idxd_vdev" && {
                rmmod idxd_vdev
        }
@@ -160,6 +157,12 @@
        local opcode="$1"
        dec_opcode=$((opcode))
        case $dec_opcode in
+       "0")
+               echo "NOOP"
+               ;;
+       "2")
+               echo "DRAIN"
+               ;;
        "3")
                echo "MEMMOVE"
                ;;
@@ -172,9 +175,36 @@
        "6")
                echo "COMPVAL"
                ;;
+       "7")
+               echo "CR_DELTA"
+               ;;
+       "8")
+               echo "AP_DELTA"
+               ;;
        "9")
                echo "DUALCAST"
                ;;
+       "16")
+               echo "CRCGEN"
+               ;;
+       "17")
+               echo "COPY_CRC"
+               ;;
+       "18")
+               echo "DIF_CHECK"
+               ;;
+       "19")
+               echo "DIF_INS"
+               ;;
+       "20")
+               echo "DIF_STRP"
+               ;;
+       "21")
+               echo "DIF_UPDT"
+               ;;
+       "32")
+               echo "CFLUSH"
+               ;;
        *)
                echo "UNKNOWN"
                ;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/test/dsa_prep.c 
new/idxd-config-accel-config-v3.5.2/test/dsa_prep.c
--- old/idxd-config-accel-config-v3.5.0/test/dsa_prep.c 2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/test/dsa_prep.c 2022-11-29 
01:09:23.000000000 +0100
@@ -29,8 +29,8 @@
        if (tsk->opcode == DSA_OPCODE_MEMMOVE)
                tsk->opcode = DSA_OPCODE_DRAIN;
 
-       acctest_prep_desc_common(tsk->desc, tsk->opcode, (uint64_t)(tsk->dst1),
-                                (uint64_t)(tsk->src1), 0, tsk->dflags);
+       acctest_prep_desc_common(tsk->desc, tsk->opcode, 0,
+                                0, 0, tsk->dflags);
        tsk->desc->completion_addr = (uint64_t)(tsk->comp);
        tsk->comp->status = 0;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.5.0/test/dsa_user_test_runner.sh 
new/idxd-config-accel-config-v3.5.2/test/dsa_user_test_runner.sh
--- old/idxd-config-accel-config-v3.5.0/test/dsa_user_test_runner.sh    
2022-10-15 02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/test/dsa_user_test_runner.sh    
2022-11-29 01:09:23.000000000 +0100
@@ -89,6 +89,10 @@
        local wq_mode_name
        local xfer_size
 
+    if [ $opcode == "0x2" ];then
+        return 0
+    fi
+
        for wq_mode_code in 0 1; do
                wq_mode_name=$(wq_mode2name "$wq_mode_code")
                echo "Performing $wq_mode_name WQ batched $op_name testing"
@@ -100,6 +104,55 @@
        done
 }
 
+# Test operation with a given opcode
+# $1: opcode (e.g. 0x3 for memmove)
+# $2: flag (optional, default 0x3 for BOF on, 0x2 for BOF off)
+#
+test_dif_op()
+{
+       local opcode="$1"
+       local flag="$2"
+       local op_name
+       op_name=$(opcode2name "$opcode")
+       local wq_mode_code
+       local wq_mode_name
+       local xfer_size
+
+       for wq_mode_code in 0 1; do
+               wq_mode_name=$(wq_mode2name "$wq_mode_code")
+               echo "Performing $wq_mode_name WQ $op_name testing"
+               for xfer_size in $SIZE_512 $SIZE_1K $SIZE_4K; do
+                       echo "Testing $xfer_size bytes"
+                       "$DSATEST" -w "$wq_mode_code" -l "$xfer_size" -o 
"$opcode" \
+                               -f "$flag" t200 -v
+               done
+       done
+}
+
+# Test operation in batch mode with a given opcode
+# $1: opcode (e.g. 0x3 for memmove)
+# $2: flag (optional, default 0x3 for BOF on, 0x2 for BOF off)
+#
+test_dif_op_batch()
+{
+       local opcode="$1"
+       local flag="$2"
+       local op_name
+       op_name=$(opcode2name "$opcode")
+       local wq_mode_code
+       local wq_mode_name
+       local xfer_size
+
+       for wq_mode_code in 0 1; do
+               wq_mode_name=$(wq_mode2name "$wq_mode_code")
+               echo "Performing $wq_mode_name WQ batched $op_name testing"
+               for xfer_size in $SIZE_512 $SIZE_1K $SIZE_4K; do
+                       echo "Testing $xfer_size bytes"
+                       "$DSATEST" -w "$wq_mode_code" -l "$xfer_size" -o 0x1 -b 
"$opcode" \
+                               -c 16 -f "$flag" t2000 -v
+               done
+       done
+}
 _cleanup
 start_dsa
 enable_wqs
@@ -108,18 +161,33 @@
 
 flag="0x1"
 echo "Testing with 'block on fault' flag ON"
-for opcode in "0x3" "0x4" "0x5" "0x6" "0x9"; do
+for opcode in "0x0" "0x2" "0x3" "0x4" "0x5" "0x6" "0x9" "0x10" "0x11" "0x20"; 
do
        test_op $opcode $flag
        test_op_batch $opcode $flag
 done
 
 flag="0x0"
 echo "Testing with 'block on fault' flag OFF"
-for opcode in "0x3" "0x4" "0x5" "0x6" "0x9"; do
+for opcode in "0x0" "0x2" "0x3" "0x4" "0x5" "0x6" "0x9" "0x10" "0x11" "0x20"; 
do
        test_op $opcode $flag
        test_op_batch $opcode $flag
 done
 
+# For DIF
+flag="0x1"
+echo "Testing with 'block on fault' flag ON"
+for opcode in "0x12" "0x13" "0x14" "0x15"; do
+       test_dif_op $opcode $flag
+       test_dif_op_batch $opcode $flag
+done
+
+flag="0x0"
+echo "Testing with 'block on fault' flag OFF"
+for opcode in "0x12" "0x13" "0x14" "0x15"; do
+       test_dif_op $opcode $flag
+       test_dif_op_batch $opcode $flag
+done
+
 disable_wqs
 stop_dsa
 _cleanup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/test/iaa_test.c 
new/idxd-config-accel-config-v3.5.2/test/iaa_test.c
--- old/idxd-config-accel-config-v3.5.0/test/iaa_test.c 2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/test/iaa_test.c 2022-11-29 
01:09:23.000000000 +0100
@@ -35,14 +35,14 @@
        int rc = ACCTEST_STATUS_OK;
        int itr = num_desc, i = 0, range = 0;
 
-       info("testnoop: tflags %#x num_desc %ld\n", tflags, num_desc);
+       info("test noop: tflags %#x num_desc %ld\n", tflags, num_desc);
 
        ctx->is_batch = 0;
 
        if (ctx->dedicated == ACCFG_WQ_SHARED)
                range = ctx->threshold;
        else
-               range = ctx->wq_size - 1;
+               range = ctx->wq_size;
 
        while (itr > 0 && rc == ACCTEST_STATUS_OK) {
                i = (itr < range) ? itr : range;
@@ -84,7 +84,7 @@
        int rc = ACCTEST_STATUS_OK;
        int itr = num_desc, i = 0, range = 0;
 
-       info("testcrc64: opcode %d len %#lx tflags %#x num_desc %ld extra_flags 
%#lx\n",
+       info("test crc64: opcode %d len %#lx tflags %#x num_desc %ld 
extra_flags %#lx\n",
             opcode, buf_size, tflags, num_desc, extra_flags);
 
        ctx->is_batch = 0;
@@ -143,7 +143,7 @@
        int rc = ACCTEST_STATUS_OK;
        int itr = num_desc, i = 0, range = 0;
 
-       info("testcrc64: opcode %d len %#lx tflags %#x num_desc %ld\n",
+       info("test zcompress: opcode %d len %#lx tflags %#x num_desc %ld\n",
             opcode, buf_size, tflags, num_desc);
 
        ctx->is_batch = 0;
@@ -230,7 +230,7 @@
        int rc = ACCTEST_STATUS_OK;
        int itr = num_desc, i = 0, range = 0;
 
-       info("testcompress: opcode %d len %#lx tflags %#x num_desc %ld 
extra_flags %#lx\n",
+       info("test compress: opcode %d len %#lx tflags %#x num_desc %ld 
extra_flags %#lx\n",
             opcode, buf_size, tflags, num_desc, extra_flags);
 
        ctx->is_batch = 0;
@@ -299,7 +299,7 @@
        int rc = ACCTEST_STATUS_OK;
        int itr = num_desc, i = 0, range = 0;
 
-       info("testcrc64: opcode %d len %#lx tflags %#x num_desc %ld\n",
+       info("test filter: opcode %d len %#lx tflags %#x num_desc %ld\n",
             opcode, buf_size, tflags, num_desc);
 
        ctx->is_batch = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.5.0/test/iaa_user_test_runner.sh 
new/idxd-config-accel-config-v3.5.2/test/iaa_user_test_runner.sh
--- old/idxd-config-accel-config-v3.5.0/test/iaa_user_test_runner.sh    
2022-10-15 02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/test/iaa_user_test_runner.sh    
2022-11-29 01:09:23.000000000 +0100
@@ -91,121 +91,121 @@
                wq_mode_name=$(wq_mode2name "$wq_mode_code")
 
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c -3 128 \
-                       -o 0x50 -f 0x0 -t 5000 -v
+                       -o 0x50 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c -3 256 
\
-                       -o 0x50 -f 0x0 -t 5000 -v
+                       -o 0x50 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c -3 
1024 \
-                       -o 0x50 -f 0x0 -t 5000 -v
+                       -o 0x50 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c -3 
16384 \
-                       -o 0x50 -f 0x0 -t 5000 -v
+                       -o 0x50 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c -3 
262144 \
-                       -o 0x50 -f 0x0 -t 5000 -v
+                       -o 0x50 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c -3 
524288 \
-                       -o 0x50 -f 0x0 -t 5000 -v
+                       -o 0x50 -t 5000 -v
 
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 512 -2 0x38 -3 256 \
-                       -o 0x51 -f 0x0 -t 5000 -v
+                       -o 0x51 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x38 -3 512 
\
-                       -o 0x51 -f 0x0 -t 5000 -v
+                       -o 0x51 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x38 -3 
2048 \
-                       -o 0x51 -f 0x0 -t 5000 -v
+                       -o 0x51 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x38 -3 
32768 \
-                       -o 0x51 -f 0x0 -t 5000 -v
+                       -o 0x51 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x38 -3 
524288 \
-                       -o 0x51 -f 0x0 -t 5000 -v
+                       -o 0x51 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x38 -3 
1048576 \
-                       -o 0x51 -f 0x0 -t 5000 -v
+                       -o 0x51 -t 5000 -v
 
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c -3 128 \
-                       -o 0x52 -f 0x0 -t 5000 -v
+                       -o 0x52 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c -3 256 
\
-                       -o 0x52 -f 0x0 -t 5000 -v
+                       -o 0x52 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c -3 
1024 \
-                       -o 0x52 -f 0x0 -t 5000 -v
+                       -o 0x52 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c -3 
16384 \
-                       -o 0x52 -f 0x0 -t 5000 -v
+                       -o 0x52 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c -3 
262144 \
-                       -o 0x52 -f 0x0 -t 5000 -v
+                       -o 0x52 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c -3 
524288 \
-                       -o 0x52 -f 0x0 -t 5000 -v
+                       -o 0x52 -t 5000 -v
 
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c -3 128 \
-                       -o 0x53 -f 0x0 -t 5000 -v
+                       -o 0x53 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c -3 256 
\
-                       -o 0x53 -f 0x0 -t 5000 -v
+                       -o 0x53 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c -3 
1024 \
-                       -o 0x53 -f 0x0 -t 5000 -v
+                       -o 0x53 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c -3 
16384 \
-                       -o 0x53 -f 0x0 -t 5000 -v
+                       -o 0x53 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c -3 
262144 \
-                       -o 0x53 -f 0x0 -t 5000 -v
+                       -o 0x53 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c -3 
524288 \
-                       -o 0x53 -f 0x0 -t 5000 -v
+                       -o 0x53 -t 5000 -v
 
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 512 -2 0x1c -3 512 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x1c -3 
1024 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x1c -3 
4096 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 32768 -2 0x1c -3 
32768 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x1c -3 
65536 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 131072 -2 0x1c -3 
131072 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
 
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 32 -2 0x3c -3 16 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 64 -2 0x3c -3 32 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 128 -2 0x3c -3 64 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 256 -2 0x3c -3 128 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 512 -2 0x3c -3 256 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x3c -3 512 
\
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
 
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 64 -2 0x7c -3 16 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 128 -2 0x7c -3 32 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 256 -2 0x7c -3 64 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c -3 128 \
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c -3 256 
\
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 2048 -2 0x7c -3 512 
\
-                       -o 0x54 -f 0x0 -t 5000 -v
+                       -o 0x54 -t 5000 -v
 
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 512 -2 0x38 -3 256 \
-                       -o 0x55 -f 0x0 -t 5000 -v
+                       -o 0x55 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x38 -3 512 
\
-                       -o 0x55 -f 0x0 -t 5000 -v
+                       -o 0x55 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x38 -3 
2048 \
-                       -o 0x55 -f 0x0 -t 5000 -v
+                       -o 0x55 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x38 -3 
32768 \
-                       -o 0x55 -f 0x0 -t 5000 -v
+                       -o 0x55 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x38 -3 
524288 \
-                       -o 0x55 -f 0x0 -t 5000 -v
+                       -o 0x55 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x38 -3 
1048576 \
-                       -o 0x55 -f 0x0 -t 5000 -v
+                       -o 0x55 -t 5000 -v
 
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c -3 128 \
-                       -o 0x56 -f 0x0 -t 5000 -v
+                       -o 0x56 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c -3 256 
\
-                       -o 0x56 -f 0x0 -t 5000 -v
+                       -o 0x56 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c -3 
1024 \
-                       -o 0x56 -f 0x0 -t 5000 -v
+                       -o 0x56 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c -3 
16384 \
-                       -o 0x56 -f 0x0 -t 5000 -v
+                       -o 0x56 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c -3 
262144 \
-                       -o 0x56 -f 0x0 -t 5000 -v
+                       -o 0x56 -t 5000 -v
                ./iaa_test -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c -3 
524288 \
-                       -o 0x56 -f 0x0 -t 5000 -v
+                       -o 0x56 -t 5000 -v
        done
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/test/libaccfg.c 
new/idxd-config-accel-config-v3.5.2/test/libaccfg.c
--- old/idxd-config-accel-config-v3.5.0/test/libaccfg.c 2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/test/libaccfg.c 2022-11-29 
01:09:23.000000000 +0100
@@ -32,8 +32,6 @@
 
 #define SET_ERR(a, b) {a = a ? a : b; }
 
-static bool mdev_disabled;
-
 static struct dev_parameters device0_param = {
        .read_buffer_limit = 10,
 };
@@ -347,20 +345,9 @@
        int rc = 0;
        struct accfg_wq *wq;
        enum accfg_wq_state wq_state;
-       uuid_t uuid;
 
        if (accfg_device_is_active(device)) {
 
-               if (!mdev_disabled) {
-                       /* Remove all mdevs */
-                       uuid_clear(uuid);
-                       rc = accfg_remove_mdev(device, uuid);
-                       if (rc && !forced) {
-                               fprintf(stderr, "mdev removal failed\n");
-                               return rc;
-                       }
-               }
-
                /* make sure each wq is disabled */
                accfg_wq_foreach(device, wq) {
                        wq_state = accfg_wq_get_state(wq);
@@ -767,157 +754,6 @@
        return 0;
 }
 
-static int mdev_test(struct accfg_ctx *ctx, struct accfg_device *device,
-               char *mdev_type_str, int num_mdevs)
-{
-       enum accfg_mdev_type type;
-       int rc, i;
-       char **m;
-       uuid_t uuid;
-
-       for (m = accfg_mdev_basenames, type = 0; *m; m++, type++)
-               if (!strcmp(*m, mdev_type_str))
-                       break;
-
-       if (!*m) {
-               fprintf(stderr, "Invalid mdev type\n");
-               return -EINVAL;
-       }
-
-       printf("creating %d %s mdevs\n", num_mdevs, mdev_type_str);
-       for (i = 0; i < num_mdevs; i++) {
-               rc = accfg_create_mdev(device, type, uuid);
-               if (rc) {
-                       fprintf(stderr, "mdev creation failed\n");
-                       return rc;
-               }
-       }
-       printf("mdev creation succeeded\n");
-
-       /* Remove all mdevs */
-       printf("removing all mdevs\n");
-       uuid_clear(uuid);
-       rc = accfg_remove_mdev(device, uuid);
-       if (rc) {
-               fprintf(stderr, "mdev removal failed\n");
-               return rc;
-       }
-
-       printf("mdev removal succeeded\n");
-
-       return 0;
-}
-
-static int set_mdev_type(struct accfg_ctx *ctx, struct accfg_wq *wq,
-               struct wq_parameters *wq_param)
-{
-       int rc;
-
-       rc = accfg_wq_set_str_type(wq, "mdev");
-       if (rc)
-               fprintf(stderr, "Error setting mdev type\n");
-
-       rc = accfg_wq_set_str_name(wq, wq_param->name);
-       if (rc)
-               fprintf(stderr, "Error setting name for mdev type wq\n");
-
-       return rc;
-}
-
-static int enable_wq(struct accfg_ctx *ctx, struct accfg_device *device,
-               struct accfg_wq *wq)
-{
-       int rc;
-
-       rc = accfg_device_enable(device);
-       if (rc) {
-               fprintf(stderr, "error enabling device %s\n",
-                               accfg_device_get_devname(device));
-               return rc;
-       }
-
-       rc = accfg_wq_enable(wq);
-       if (rc) {
-               fprintf(stderr, "error enabling wq %s\n",
-                               accfg_wq_get_devname(wq));
-               return rc;
-       }
-
-       return 0;
-}
-
-/* test 1swq type mdev creation and removal */
-static int test_mdev_1swq(struct accfg_ctx *ctx)
-{
-       int rc = 0;
-
-       if (mdev_disabled)
-               return -EOPNOTSUPP;
-
-       rc = device_test_reset(ctx, test_ctx.device, false);
-       if (rc)
-               return rc;
-
-       rc = set_config(ctx, &test_ctx, NULL);
-       if (rc)
-               return rc;
-
-       rc = set_mdev_type(ctx, test_ctx.wq[2], test_ctx.wq_param[2]);
-       if (rc)
-               return rc;
-
-       rc = enable_wq(ctx, test_ctx.device, test_ctx.wq[2]);
-       if (rc)
-               return rc;
-
-       /* create and remove 5 1swq mdevs */
-       rc = mdev_test(ctx, test_ctx.device, "1swq", 5);
-       if (rc)
-               return rc;
-
-       rc = device_test_reset(ctx, test_ctx.device, false);
-       if (rc)
-               return rc;
-
-       return 0;
-}
-
-/* test 1dwq type mdev creation and removal */
-static int test_mdev_1dwq(struct accfg_ctx *ctx)
-{
-       int rc = 0;
-
-       if (mdev_disabled)
-               return -EOPNOTSUPP;
-
-       rc = device_test_reset(ctx, test_ctx.device, false);
-       if (rc)
-               return rc;
-
-       rc = set_config(ctx, &test_ctx, NULL);
-       if (rc)
-               return rc;
-
-       rc = set_mdev_type(ctx, test_ctx.wq[3], test_ctx.wq_param[3]);
-       if (rc)
-               return rc;
-
-       rc = enable_wq(ctx, test_ctx.device, test_ctx.wq[3]);
-       if (rc)
-               return rc;
-
-       /* create and remove 1 1dwq mdev */
-       rc = mdev_test(ctx, test_ctx.device, "1dwq", 1);
-       if (rc)
-               return rc;
-
-       rc = device_test_reset(ctx, test_ctx.device, false);
-       if (rc)
-               return rc;
-
-       return 0;
-}
-
 typedef int (*do_test_fn)(struct accfg_ctx *ctx);
 struct _test_case {
        do_test_fn test_fn;
@@ -946,16 +782,6 @@
                .desc = "wq boundary conditions",
                .enabled = true,
        },
-       {
-               .test_fn = test_mdev_1swq,
-               .desc = "1swq type mdev creation and removal",
-               .enabled = false,
-       },
-       {
-               .test_fn = test_mdev_1dwq,
-               .desc = "1dwq type mdev creation and removal",
-               .enabled = false,
-       },
 };
 
 int test_libaccfg(int loglevel, struct accfg_test *test,
@@ -979,9 +805,6 @@
                return EXIT_SKIP;
        }
 
-       if (access("/sys/module/idxd_mdev", F_OK))
-               mdev_disabled = true;
-
        /*
         * iterate to check the state of each device, skip entire test if any of
         * them is active or not configurable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.5.0/util/json.c 
new/idxd-config-accel-config-v3.5.2/util/json.c
--- old/idxd-config-accel-config-v3.5.0/util/json.c     2022-10-15 
02:29:50.000000000 +0200
+++ new/idxd-config-accel-config-v3.5.2/util/json.c     2022-11-29 
01:09:23.000000000 +0100
@@ -21,7 +21,6 @@
        "none",
        "kernel",
        "user",
-       "mdev"
 };
 
 /* adapted from mdadm::human_size_brief() */
@@ -137,12 +136,6 @@
        uint64_t ulong_val;
        uint64_t ullong_val;
        bool new_bool;
-       struct accfg_device_mdev *mdev;
-       struct json_object *json_uuid;
-       struct json_object *json_mtype;
-       char uuid_string[UUID_STR_LEN];
-       int mdev_found = 0;
-       struct json_object *json_mdev;
 
        if (!jdevice)
                return NULL;
@@ -334,38 +327,6 @@
                goto err;
        json_object_object_add(jdevice, "clients", jobj);
 
-       jobj = json_object_new_array();
-       accfg_device_mdev_foreach(device, mdev) {
-               uuid_t uuid;
-               const char *mdev_type;
-
-               accfg_mdev_get_uuid(mdev, uuid);
-               uuid_unparse(uuid, uuid_string);
-               json_uuid = json_object_new_string(uuid_string);
-               if (!json_uuid)
-                       break;
-               mdev_type = accfg_mdev_basenames[accfg_mdev_get_type(mdev)];
-               json_mtype = json_object_new_string(mdev_type);
-               if (!json_mtype) {
-                       json_object_put(json_uuid);
-                       break;
-               }
-               json_mdev = json_object_new_object();
-               if (!json_mdev) {
-                       json_object_put(json_uuid);
-                       json_object_put(json_mtype);
-                       break;
-               }
-               json_object_object_add(json_mdev, "uuid", json_uuid);
-               json_object_object_add(json_mdev, "type", json_mtype);
-               json_object_array_add(jobj, json_mdev);
-               mdev_found++;
-       }
-       if (mdev_found)
-               json_object_object_add(jdevice, "mdevs", jobj);
-       else
-               json_object_put(jobj);
-
        free(error);
        return jdevice;
 err:

Reply via email to