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 2021-10-23 00:51:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/accel-config (Old)
 and      /work/SRC/openSUSE:Factory/.accel-config.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "accel-config"

Sat Oct 23 00:51:41 2021 rev:6 rq:926983 version:3.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/accel-config/accel-config.changes        
2021-09-10 23:41:58.802602080 +0200
+++ /work/SRC/openSUSE:Factory/.accel-config.new.1890/accel-config.changes      
2021-10-23 00:52:25.713159830 +0200
@@ -1,0 +2,8 @@
+Fri Oct  8 13:28:16 UTC 2021 - Danilo Spinella <danilo.spine...@suse.com>
+
+- Update to version 3.4.2
+  * Add feature to skip tests based on feature availability
+  * Skip tests requiring shared memory if feature not available
+  * Add API to retrieve wq occupancy attribute
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ accel-config.spec ++++++
--- /var/tmp/diff_new_pack.SSFM4W/_old  2021-10-23 00:52:26.109160005 +0200
+++ /var/tmp/diff_new_pack.SSFM4W/_new  2021-10-23 00:52:26.113160007 +0200
@@ -19,7 +19,7 @@
 %define pkg_libname libaccel-config1
 %define src_name idxd-config-accel-config-v%{version}
 Name:           accel-config
-Version:        3.4.1
+Version:        3.4.2
 Release:        0
 Summary:        Configure accelerator subsystem devices
 License:        GPL-2.0-only

++++++ idxd-config-accel-config-v3.4.1.tar.gz -> 
idxd-config-accel-config-v3.4.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.4.1/accfg/lib/libaccel-config.sym 
new/idxd-config-accel-config-v3.4.2/accfg/lib/libaccel-config.sym
--- old/idxd-config-accel-config-v3.4.1/accfg/lib/libaccel-config.sym   
2021-07-30 23:48:38.000000000 +0200
+++ new/idxd-config-accel-config-v3.4.2/accfg/lib/libaccel-config.sym   
2021-09-29 01:03:05.000000000 +0200
@@ -161,3 +161,8 @@
        accfg_ctx_get_last_error_group;
        accfg_ctx_get_last_error_engine;
 } LIBACCFG_9;
+
+LIBACCFG_11 {
+global:
+       accfg_wq_get_occupancy;
+} LIBACCFG_10;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.1/accfg/lib/libaccfg.c 
new/idxd-config-accel-config-v3.4.2/accfg/lib/libaccfg.c
--- old/idxd-config-accel-config-v3.4.1/accfg/lib/libaccfg.c    2021-07-30 
23:48:38.000000000 +0200
+++ new/idxd-config-accel-config-v3.4.2/accfg/lib/libaccfg.c    2021-09-29 
01:03:05.000000000 +0200
@@ -2033,6 +2033,18 @@
        return wq->max_transfer_size;
 }
 
+ACCFG_EXPORT int accfg_wq_get_occupancy(struct accfg_wq *wq)
+{
+       int dfd;
+       struct accfg_ctx *ctx = accfg_wq_get_ctx(wq);
+
+       dfd = open(wq->wq_path, O_PATH);
+       if (dfd < 0)
+               return -ENXIO;
+
+       return accfg_get_param_long(ctx, dfd, "occupancy");
+}
+
 ACCFG_EXPORT int accfg_wq_get_clients(struct accfg_wq *wq)
 {
        struct accfg_ctx *ctx = accfg_wq_get_ctx(wq);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/idxd-config-accel-config-v3.4.1/accfg/libaccel_config.h 
new/idxd-config-accel-config-v3.4.2/accfg/libaccel_config.h
--- old/idxd-config-accel-config-v3.4.1/accfg/libaccel_config.h 2021-07-30 
23:48:38.000000000 +0200
+++ new/idxd-config-accel-config-v3.4.2/accfg/libaccel_config.h 2021-09-29 
01:03:05.000000000 +0200
@@ -277,6 +277,7 @@
 int accfg_wq_get_threshold(struct accfg_wq *wq);
 int accfg_wq_get_clients(struct accfg_wq *wq);
 int accfg_wq_get_ats_disable(struct accfg_wq *wq);
+int accfg_wq_get_occupancy(struct accfg_wq *wq);
 int accfg_wq_is_enabled(struct accfg_wq *wq);
 int accfg_wq_set_size(struct accfg_wq *wq, int val);
 int accfg_wq_set_priority(struct accfg_wq *wq, int val);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.1/git-version 
new/idxd-config-accel-config-v3.4.2/git-version
--- old/idxd-config-accel-config-v3.4.1/git-version     2021-07-30 
23:48:38.000000000 +0200
+++ new/idxd-config-accel-config-v3.4.2/git-version     2021-09-29 
01:03:05.000000000 +0200
@@ -19,7 +19,7 @@
        fi
 }
 
-DEF_VER=3.4.1
+DEF_VER=3.4.2
 
 LF='
 '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/idxd-config-accel-config-v3.4.1/test/libaccfg.c 
new/idxd-config-accel-config-v3.4.2/test/libaccfg.c
--- old/idxd-config-accel-config-v3.4.1/test/libaccfg.c 2021-07-30 
23:48:38.000000000 +0200
+++ new/idxd-config-accel-config-v3.4.2/test/libaccfg.c 2021-09-29 
01:03:05.000000000 +0200
@@ -244,7 +244,9 @@
 {
        int rc = 0;
 
-       SET_ERR(rc, accfg_wq_set_str_mode(wq, wq_param->mode));
+       rc = accfg_wq_set_str_mode(wq, wq_param->mode);
+       if (rc)
+               return rc;
        SET_ERR(rc, accfg_wq_set_str_type(wq, wq_param->type));
        SET_ERR(rc, accfg_wq_set_str_name(wq, wq_param->name));
        SET_ERR(rc, accfg_wq_set_size(wq, wq_param->wq_size));
@@ -394,7 +396,8 @@
                device_test_reset(ctx, device, true);
 }
 
-static int set_config(struct accfg_ctx *ctx, struct config_test_ctx *ct_ctx)
+static int set_config(struct accfg_ctx *ctx, struct config_test_ctx *ct_ctx,
+               char *wq_mode)
 {
        int rc = 0;
        struct accfg_device *device;
@@ -422,6 +425,9 @@
        }
 
        for (i = 0; i < 4; i++) {
+               if (wq_mode && strcmp(ct_ctx->wq_param[i]->mode, wq_mode))
+                       continue;
+
                wq = ct_ctx->wq[i];
                printf("configuring wq %s\n", accfg_wq_get_devname(wq));
                rc = config_wq(ctx, device, wq, ct_ctx->wq_param[i]);
@@ -444,7 +450,8 @@
        return 0;
 }
 
-static int check_config(struct accfg_ctx *ctx, struct config_test_ctx *ct_ctx)
+static int check_config(struct accfg_ctx *ctx, struct config_test_ctx *ct_ctx,
+               char *wq_mode)
 {
        int rc = 0;
        struct accfg_device *device;
@@ -472,6 +479,9 @@
        }
 
        for (i = 0; i < 4; i++) {
+               if (wq_mode && strcmp(ct_ctx->wq_param[i]->mode, wq_mode))
+                       continue;
+
                wq = ct_ctx->wq[i];
                printf("check wq %s\n", accfg_wq_get_devname(wq));
                rc = check_wq(ctx, device, wq, ct_ctx->wq_param[i]);
@@ -519,17 +529,17 @@
        }
 
        /* configure 2 wqs with some wq sizes */
-       wq = ct_ctx->wq[0];
+       wq = ct_ctx->wq[1];
        printf("configuring wq %s\n", accfg_wq_get_devname(wq));
-       rc = config_wq(ctx, device, wq, ct_ctx->wq_param[0]);
+       rc = config_wq(ctx, device, wq, ct_ctx->wq_param[1]);
        if (rc) {
                fprintf(stderr, "config wq failed\n");
                return rc;
        }
 
-       wq = ct_ctx->wq[2];
+       wq = ct_ctx->wq[3];
        printf("configuring wq %s\n", accfg_wq_get_devname(wq));
-       rc = config_wq(ctx, device, wq, ct_ctx->wq_param[2]);
+       rc = config_wq(ctx, device, wq, ct_ctx->wq_param[3]);
        if (rc) {
                fprintf(stderr, "config wq failed\n");
                return rc;
@@ -561,7 +571,7 @@
 
        device = ct_ctx->device;
        group = ct_ctx->group[0];
-       wq = ct_ctx->wq[0];
+       wq = ct_ctx->wq[1];
 
        printf("configure device %s, group %s, wq %s for bounds test\n",
                        accfg_device_get_devname(device),
@@ -580,7 +590,7 @@
                return rc;
        }
 
-       rc = config_wq(ctx, device, wq, ct_ctx->wq_param[0]);
+       rc = config_wq(ctx, device, wq, ct_ctx->wq_param[1]);
        if (rc) {
                fprintf(stderr, "config wq failed\n");
                return rc;
@@ -659,8 +669,8 @@
        return 0;
 }
 
-/* test the set and get libaccfg functions */
-static int test_config(struct accfg_ctx *ctx)
+/* test set and get libaccfg functions for shared wqs */
+static int test_config_shared(struct accfg_ctx *ctx)
 {
        int rc = 0;
 
@@ -668,11 +678,41 @@
        if (rc)
                return rc;
 
-       rc = set_config(ctx, &test_ctx);
+       rc = set_config(ctx, &test_ctx, "shared");
+       if (rc) {
+               if (rc == -EINVAL) {
+                       fprintf(stderr, "shared wq support not available\n");
+                       device_test_reset(ctx, test_ctx.device, false);
+                       return -EOPNOTSUPP;
+               }
+               return rc;
+       }
+
+       rc = check_config(ctx, &test_ctx, "shared");
        if (rc)
                return rc;
 
-       rc = check_config(ctx, &test_ctx);
+       rc = device_test_reset(ctx, test_ctx.device, false);
+       if (rc)
+               return rc;
+
+       return 0;
+}
+
+/* test set and get libaccfg functions for dedicated wqs */
+static int test_config_dedicated(struct accfg_ctx *ctx)
+{
+       int rc = 0;
+
+       rc = device_test_reset(ctx, test_ctx.device, false);
+       if (rc)
+               return rc;
+
+       rc = set_config(ctx, &test_ctx, "dedicated");
+       if (rc)
+               return rc;
+
+       rc = check_config(ctx, &test_ctx, "dedicated");
        if (rc)
                return rc;
 
@@ -807,11 +847,14 @@
 {
        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);
+       rc = set_config(ctx, &test_ctx, NULL);
        if (rc)
                return rc;
 
@@ -840,11 +883,14 @@
 {
        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);
+       rc = set_config(ctx, &test_ctx, NULL);
        if (rc)
                return rc;
 
@@ -873,39 +919,38 @@
        do_test_fn test_fn;
        char *desc;
        bool enabled;
-       bool mdev;
 };
 
 static struct _test_case test_cases[] = {
        {
-               .test_fn = test_config,
-               .desc = "set and get configurations",
+               .test_fn = test_config_shared,
+               .desc = "set and get configurations for shared wqs",
+               .enabled = true,
+       },
+       {
+               .test_fn = test_config_dedicated,
+               .desc = "set and get configurations for dedicated wqs",
                .enabled = true,
-               .mdev = false,
        },
        {
                .test_fn = test_max_wq_size,
                .desc = "max wq size",
                .enabled = true,
-               .mdev = false,
        },
        {
                .test_fn = test_wq_boundary_conditions,
                .desc = "wq boundary conditions",
                .enabled = true,
-               .mdev = false,
        },
        {
                .test_fn = test_mdev_1swq,
                .desc = "1swq type mdev creation and removal",
                .enabled = true,
-               .mdev = true,
        },
        {
                .test_fn = test_mdev_1dwq,
                .desc = "1dwq type mdev creation and removal",
                .enabled = true,
-               .mdev = true,
        },
 };
 
@@ -1009,11 +1054,14 @@
                        continue;
                }
 
-               if (test_cases[i].mdev && mdev_disabled)
-                       continue;
-
                printf("\nRunning accfg-test%d: %s\n", i, test_cases[i].desc);
                err = test_cases[i].test_fn(ctx);
+               if (err == -EOPNOTSUPP) {
+                       fprintf(stderr,
+                               "accfg-test%d *skipped*: required feature not 
found\n",
+                               i);
+                       continue;
+               }
                if (err < 0) {
                        fprintf(stderr, "accfg-test%d *failed*: %d\n", i, err);
                        break;

Reply via email to