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-08-31 13:46:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/accel-config (Old) and /work/SRC/openSUSE:Factory/.accel-config.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "accel-config" Thu Aug 31 13:46:01 2023 rev:16 rq:1108157 version:4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/accel-config/accel-config.changes 2023-05-02 16:24:03.099598398 +0200 +++ /work/SRC/openSUSE:Factory/.accel-config.new.1766/accel-config.changes 2023-08-31 13:52:08.229989482 +0200 @@ -1,0 +2,15 @@ +Wed Aug 30 15:47:17 UTC 2023 - Danilo Spinella <danilo.spine...@suse.com> + +- Update to version 4.1: + * add missing libssl-dev dependency + * Skip configuring ats_disable if the attribute is not present + * Add config-user-default command + * Add option "-c <config_file>" to load default configurations from + the file + * Disable default configured WQs and devices + * Add "-n <wq_name>" to specify WQ name for disabling WQs + * Add user_default_profile.conf + * Add doumentation for new command "config-user-default" + + +------------------------------------------------------------------- Old: ---- idxd-config-accel-config-v4.0.tar.gz New: ---- idxd-config-accel-config-v4.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ accel-config.spec ++++++ --- /var/tmp/diff_new_pack.nLMwgC/_old 2023-08-31 13:52:09.262026369 +0200 +++ /var/tmp/diff_new_pack.nLMwgC/_new 2023-08-31 13:52:09.266026512 +0200 @@ -19,7 +19,7 @@ %define pkg_libname libaccel-config1 %define src_name idxd-config-accel-config-v%{version} Name: accel-config -Version: 4.0 +Version: 4.1 Release: 0 Summary: Configure accelerator subsystem devices License: GPL-2.0-only @@ -88,6 +88,7 @@ %config %{_sysconfdir}/accel-config/contrib/configs/os_profile.conf %config %{_sysconfdir}/accel-config/contrib/configs/profilenote.txt %config %{_sysconfdir}/accel-config/contrib/configs/storage_profile.conf +%config %{_sysconfdir}/accel-config/contrib/configs/user_default_profile.conf %files -n %{pkg_libname} %doc README.md ++++++ idxd-config-accel-config-v4.0.tar.gz -> idxd-config-accel-config-v4.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/Documentation/accfg/Makefile.am new/idxd-config-accel-config-v4.1/Documentation/accfg/Makefile.am --- old/idxd-config-accel-config-v4.0/Documentation/accfg/Makefile.am 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/Documentation/accfg/Makefile.am 2023-08-22 03:10:43.000000000 +0200 @@ -29,7 +29,8 @@ accel-config-disable-device.1 \ accel-config-disable-wq.1 \ accel-config-enable-wq.1 \ - accel-config-enable-device.1 + accel-config-enable-device.1 \ + accel-config-config-user-default.1 EXTRA_DIST = \ $(man1_MANS) \ @@ -44,7 +45,8 @@ accel-config-disable-device.txt \ accel-config-disable-wq.txt \ accel-config-enable-wq.txt \ - accel-config-enable-device.txt + accel-config-enable-device.txt \ + accel-config-config-user-default.txt CLEANFILES = $(man1_MANS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/Documentation/accfg/accel-config-config-user-default.txt new/idxd-config-accel-config-v4.1/Documentation/accfg/accel-config-config-user-default.txt --- old/idxd-config-accel-config-v4.0/Documentation/accfg/accel-config-config-user-default.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/Documentation/accfg/accel-config-config-user-default.txt 2023-08-22 03:10:43.000000000 +0200 @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: GPL-2.0 + +accel-config-config-user-default(1) +=================================== + +NAME +---- +accel-config-config-user-default - load a pre-defined user default configuration + +SYNOPSIS +-------- +[verse] +'accel-config config-user-default' [<options>] + +Without an option, config-user-default loads a pre-defined user default +configuration. + +There is a config file template at contrib/configs/user_default_profile.conf. +Run "accel-config config-user-default -c user_default_profile.conf" to +configure all available devices with the template values. Any modifications to +the template file should retain the json format. + +EXAMPLE +------- +# accel-config config-user-default + +The command will load the pre-defined user default config to all available +WQs and engines on all available DSA and IAX devices with the following +attributes: + All WQs and all engines are in group 0 + + WQ attributes: + priority: 1 + group_id: 0 + block_on_fault: 1 + ats_disable: 0 + prs_disable: 1 + mode: "shared" + type: "user" + name: "user_default_wq" + driver_name: "user" + size: max WQ size / max WQs + threshold: size + max_transfer_size: default value + max_batch_size: default value on DSA. N/A on IAX + op_config: default value + + Attributes of all devices and groups are default values. + +# accel-config config-user-default -c /etc/accel-config/contrib/configs/user_default_profile.conf + +The command will load the specified user default config file. The config +file is a template that specifies attributes and devices. User can edit +the config file per requirements. + +# accel-config config-user-default -d -n <wq_name> +The command will disable all WQs named <wq_name> (default name is +"user_default_wq"). + +OPTIONS +------- +-c:: +--config-file:: + to specify the location of the customized user default config file + +-n:: +--name:: + to specify WQ name which will be used to disable enabled WQs +-d:: +--disable:: + to disable the configured devices and wqs + +-v:: +--verbose:: + verbose diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/accfg/accel-config.c new/idxd-config-accel-config-v4.1/accfg/accel-config.c --- old/idxd-config-accel-config-v4.0/accfg/accel-config.c 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/accfg/accel-config.c 2023-08-22 03:10:43.000000000 +0200 @@ -67,6 +67,7 @@ {"config-group", cmd_config_group}, {"config-wq", cmd_config_wq}, {"config-engine", cmd_config_engine}, + {"config-user-default", cmd_config_default}, #ifdef ENABLE_TEST {"test", cmd_test}, #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/accfg/config.c new/idxd-config-accel-config-v4.1/accfg/config.c --- old/idxd-config-accel-config-v4.0/accfg/config.c 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/accfg/config.c 2023-08-22 03:10:43.000000000 +0200 @@ -39,6 +39,7 @@ bool engines; bool wqs; const char *config_file; + const char *user_default_wq_name; char *buf; } config; @@ -117,6 +118,90 @@ static bool is_wq_threshold_writable(struct accfg_wq *wq, int val); static bool is_wq_prs_disable_writable(struct accfg_wq *wq, int val); +static bool is_wq_ats_disable_writable(struct accfg_wq *wq, int val); + +static int get_wq_size(struct accfg_device *dev) +{ + int max_wq_size, max_wqs; + + max_wq_size = accfg_device_get_max_work_queues_size(dev); + max_wqs = accfg_device_get_max_work_queues(dev); + + return max_wq_size / max_wqs; +} + +static int config_default_wq_set_prs_disable(struct accfg_wq *wq, int val) +{ + if (!is_wq_prs_disable_writable(wq, val)) + return -EPERM; + + return accfg_wq_set_prs_disable(wq, val); +} + +static int config_default_wq_set_ats_disable(struct accfg_wq *wq, int val) +{ + if (!is_wq_ats_disable_writable(wq, val)) + return -EPERM; + + return accfg_wq_set_ats_disable(wq, val); +} + +static int config_default_wq_set_threshold(struct accfg_wq *wq, int val) +{ + if (!is_wq_threshold_writable(wq, val)) + return -EPERM; + + return accfg_wq_set_threshold(wq, val); +} + +static struct conf_def_wq_param { + struct wq_parameters param; + bool configured; +} conf_def_wq_param[ACCFG_DEVICE_MAX]; + +static bool config_default_file; + +/* Return WQ parameter for dev type. */ +static struct wq_parameters *get_conf_def_wq_param(enum accfg_device_type type) +{ + if (type == ACCFG_DEVICE_DSA) + return &conf_def_wq_param[ACCFG_DEVICE_DSA].param; + else if (type == ACCFG_DEVICE_IAX) + return &conf_def_wq_param[ACCFG_DEVICE_IAX].param; + + return NULL; +} + +/* Check if dev is configured. */ +static bool conf_def_dev_configured(struct accfg_device *dev) +{ + if (accfg_device_get_type(dev) == ACCFG_DEVICE_DSA) + return conf_def_wq_param[ACCFG_DEVICE_DSA].configured; + else if (accfg_device_get_type(dev) == ACCFG_DEVICE_IAX) + return conf_def_wq_param[ACCFG_DEVICE_IAX].configured; + + return false; +} + +/* Set WQ parameters based on device cap: size and threshold. */ +static int config_default_wq_set_on_dev(struct accfg_device *dev) +{ + enum accfg_device_type dev_type; + struct wq_parameters *p; + + dev_type = accfg_device_get_type(dev); + p = get_conf_def_wq_param(dev_type); + if (!p) + return -EINVAL; + + p->wq_size = get_wq_size(dev); + if (p->wq_size <= 0) + return -ENOSPC; + + p->threshold = p->wq_size; + + return 0; +} static const struct wq_set_table wq_table[] = { { "size", accfg_wq_set_size, NULL, NULL, NULL }, @@ -132,7 +217,8 @@ { "max_transfer_size", NULL, accfg_wq_set_max_transfer_size, NULL, NULL }, { "threshold", accfg_wq_set_threshold, NULL, NULL, is_wq_threshold_writable }, - { "ats_disable", accfg_wq_set_ats_disable, NULL, NULL, NULL }, + { "ats_disable", accfg_wq_set_ats_disable, NULL, NULL, + is_wq_ats_disable_writable }, { "prs_disable", accfg_wq_set_prs_disable, NULL, NULL, is_wq_prs_disable_writable }, }; @@ -231,6 +317,17 @@ return true; } +static bool is_wq_ats_disable_writable(struct accfg_wq *wq, int val) +{ + if (val < 0 || val > 1) + return false; + + if (accfg_wq_get_ats_disable(wq) < 0) + return false; + + return true; +} + static int device_attribute_filter(char *key) { for (int i = 0; i < (int)ARRAY_SIZE(device_table); i++) { @@ -543,6 +640,39 @@ return 0; } +static void config_default_json(struct accfg_wq *wq, + json_object *jobj, char *key) +{ + enum accfg_device_type dev_type; + struct accfg_device *dev; + struct wq_parameters *p; + char *dev_type_str; + + dev = accfg_wq_get_device(wq); + dev_type = accfg_device_get_type(dev); + dev_type_str = accfg_device_get_type_str(dev); + p = get_conf_def_wq_param(dev_type); + if (!p) { + fprintf(stderr, "parsing dev type %s failed\n", dev_type_str); + + return; + } + + printf("dev type = %s, key = %s\n", dev_type_str, key); + if (!strcmp(key, "name")) + p->name = strdup(json_object_get_string(jobj)); + else if (!strcmp(key, "priority")) + p->priority = json_object_get_int(jobj); + else if (!strcmp(key, "group_id")) + p->group_id = json_object_get_int(jobj); + else if (!strcmp(key, "block_on_fault")) + p->block_on_fault = json_object_get_int(jobj); + else if (!strcmp(key, "ats_disable")) + p->ats_disable = json_object_get_int(jobj); + else if (!strcmp(key, "prs_disable")) + p->prs_disable = json_object_get_int(jobj); +} + /* * Configuring the value corresponding to integer and strings */ @@ -685,6 +815,12 @@ warn_once = false; } + if (wq && config_default_file) { + config_default_json(wq, jobj, key); + + return 0; + } + if (dev && dev_state != ACCFG_DEVICE_ENABLED) { rc = device_json_set_val(dev, jobj, key); if (rc < 0) { @@ -1221,3 +1357,347 @@ return rc; } + +static int config_default_wq(struct accfg_wq *wq) +{ + struct accfg_device *dev = accfg_wq_get_device(wq); + enum accfg_device_type dev_type; + struct wq_parameters *p; + + if (!conf_def_dev_configured(dev)) + return 0; + + dev_type = accfg_device_get_type(dev); + p = get_conf_def_wq_param(dev_type); + if (!p) + return -EINVAL; + + accfg_wq_set_priority(wq, p->priority); + accfg_wq_set_group_id(wq, p->group_id); + accfg_wq_set_block_on_fault(wq, p->block_on_fault); + accfg_wq_set_str_mode(wq, p->mode); + accfg_wq_set_str_type(wq, p->type); + accfg_wq_set_str_name(wq, p->name); + accfg_wq_set_str_driver_name(wq, p->driver_name); + + accfg_wq_set_size(wq, p->wq_size); + config_default_wq_set_threshold(wq, p->threshold); + config_default_wq_set_prs_disable(wq, p->prs_disable); + config_default_wq_set_ats_disable(wq, p->ats_disable); + + return 0; +} + +static int config_default_engine(struct accfg_engine *engine, + struct accfg_device *dev) +{ + enum accfg_device_type dev_type; + struct wq_parameters *p; + + /* Engine's group_id is same as WQ's. */ + dev_type = accfg_device_get_type(dev); + p = get_conf_def_wq_param(dev_type); + if (!p) + return -EINVAL; + + return accfg_engine_set_group_id(engine, p->group_id); +} + +static void config_default_activate_devices(void *ctx) +{ + enum accfg_device_state dev_state; + const char *dev_name, *wq_name; + struct accfg_engine *engine; + struct accfg_device *dev; + struct accfg_wq *wq; + int rc = 0; + + accfg_device_foreach(ctx, dev) { + /* Skip device that is not configured. */ + if (!conf_def_dev_configured(dev)) + continue; + + /* Don't enable WQs/engines on partially enabled devices. */ + dev_state = accfg_device_get_state(dev); + if (dev_state == ACCFG_DEVICE_ENABLED) + continue; + + /* Set WQ parameters calculated based on dev. */ + config_default_wq_set_on_dev(dev); + + /* Config WQs */ + accfg_wq_foreach(dev, wq) { + if (verbose) + printf("config %s\n", accfg_wq_get_devname(wq)); + + config_default_wq(wq); + } + + /* Config engines */ + accfg_engine_foreach(dev, engine) + config_default_engine(engine, dev); + + /* Enable device */ + dev_name = accfg_device_get_devname(dev); + if (verbose) + printf("enable %s\n", dev_name); + rc = accfg_device_enable(dev); + if (rc) { + fprintf(stderr, "Error enabling %s\n", dev_name); + continue; + } + + /* Enable WQs */ + accfg_wq_foreach(dev, wq) { + wq_name = accfg_wq_get_devname(wq); + if (verbose) + printf("enable %s\n", wq_name); + + rc = accfg_wq_enable(wq); + if (rc) { + fprintf(stderr, "Error enabling %s\n", wq_name); + continue; + } + } + } +} + +#define CONFIG_DEFAULT_WQ_PRIORITY 10 +#define CONFIG_DEFAULT_WQ_GROUP_ID 0 +#define CONFIG_DEFAULT_WQ_BLOCK_ON_FAULT 1 +#define CONFIG_DEFAULT_WQ_PRS_DISABLE 1 +#define CONFIG_DEFAULT_WQ_ATS_DISABLE 0 +#define CONFIG_DEFAULT_WQ_NAME "user_default_wq" +#define CONFIG_DEFAULT_WQ_TYPE "user" +#define CONFIG_DEFAULT_WQ_MODE "shared" +#define CONFIG_DEFAULT_WQ_DRV_NAME "user" + +/* Set fixed WQ parameters: mode, type, driver_name */ +static int config_default_wq_set_fixed(void) +{ + struct wq_parameters *p; + int i; + + for (i = 0; i < ACCFG_DEVICE_MAX; i++) { + p = &conf_def_wq_param[i].param; + + p->mode = strdup(CONFIG_DEFAULT_WQ_MODE); + if (!p->mode) { + fprintf(stderr, "strdup WQ mode failed\n"); + return -ENOMEM; + } + + p->type = strdup(CONFIG_DEFAULT_WQ_TYPE); + if (!p->type) { + fprintf(stderr, "strdup WQ type failed\n"); + return -ENOMEM; + } + + p->driver_name = strdup(CONFIG_DEFAULT_WQ_DRV_NAME); + if (!p->driver_name) { + fprintf(stderr, "strdup WQ driver_name failed\n"); + return -ENOMEM; + } + } + + return 0; +} + +static void config_default(void *ctx) +{ + struct wq_parameters *p; + int i; + + /* + * Configure WQ parameters except: + * 1. size and threshold will be configured when enabling WQs. + * 2. max_buffer_size, max_batch_size, op_config will be default values + * which have been initialized by driver. + */ + for (i = 0; i < ACCFG_DEVICE_MAX; i++) { + p = &conf_def_wq_param[i].param; + + p->priority = CONFIG_DEFAULT_WQ_PRIORITY; + p->group_id = CONFIG_DEFAULT_WQ_GROUP_ID; + p->block_on_fault = CONFIG_DEFAULT_WQ_BLOCK_ON_FAULT; + p->mode = strdup(CONFIG_DEFAULT_WQ_MODE); + p->type = strdup(CONFIG_DEFAULT_WQ_TYPE); + p->name = strdup(CONFIG_DEFAULT_WQ_NAME); + p->driver_name = strdup(CONFIG_DEFAULT_WQ_DRV_NAME); + p->prs_disable = CONFIG_DEFAULT_WQ_PRS_DISABLE; + p->ats_disable = CONFIG_DEFAULT_WQ_ATS_DISABLE; + + conf_def_wq_param[i].configured = true; + } +} + +static void config_default_param_free(void) +{ + struct wq_parameters *p; + int i; + + for (i = 0; i < ACCFG_DEVICE_MAX; i++) { + if (!conf_def_wq_param[i].configured) + continue; + + p = &conf_def_wq_param[i].param; + + free((char *)p->name); + free((char *)p->type); + free((char *)p->mode); + free((char *)p->driver_name); + } +} + +static int config_default_from_file(void *ctx) +{ + int rc; + + rc = read_config_file(ctx, &config, &util_param); + if (rc < 0) { + fprintf(stderr, "Reading config file failed: %d\n", rc); + return rc; + } + + config_default_file = true; + rc = parse_config(ctx, &config); + if (rc < 0) { + fprintf(stderr, "Parse json and set device fail: %d\n", rc); + return rc; + } + + config_default_wq_set_fixed(); + if (conf_def_wq_param[ACCFG_DEVICE_DSA].param.name) + conf_def_wq_param[ACCFG_DEVICE_DSA].configured = true; + if (conf_def_wq_param[ACCFG_DEVICE_IAX].param.name) + conf_def_wq_param[ACCFG_DEVICE_IAX].configured = true; + + return 0; +} + +void config_default_disable(void *ctx) +{ + char *user_default_wq_name; + struct accfg_device *dev; + + if (config.user_default_wq_name) + user_default_wq_name = strdup(config.user_default_wq_name); + else + user_default_wq_name = strdup(CONFIG_DEFAULT_WQ_NAME); + if (!user_default_wq_name) { + fprintf(stderr, "strdup user default wq name failed\n"); + return; + } + + printf("disable WQs named as %s\n", user_default_wq_name); + + accfg_device_foreach(ctx, dev) { + enum accfg_device_state dev_state; + enum accfg_wq_state wq_state; + bool non_default_wq_enabled; + struct accfg_wq *wq; + const char *wq_name; + + non_default_wq_enabled = false; + /* Disable enabled default WQs */ + accfg_wq_foreach(dev, wq) { + wq_name = accfg_wq_get_type_name(wq); + wq_state = accfg_wq_get_state(wq); + if (wq_state == ACCFG_WQ_DISABLED) + continue; + + if (!strcmp(wq_name, user_default_wq_name)) { + if (verbose) { + printf("disable %s\n", + accfg_wq_get_devname(wq)); + } + accfg_wq_disable(wq, true); + } else { + non_default_wq_enabled = true; + } + } + + /* Disable enabled device only when all WQs are disabled. */ + dev_state = accfg_device_get_state(dev); + if (dev_state == ACCFG_DEVICE_ENABLED && + !non_default_wq_enabled) { + if (verbose) { + printf("enable %s\n", + accfg_device_get_devname(dev)); + } + accfg_device_disable(dev, true); + } + } + free(user_default_wq_name); +} + +int cmd_config_default(int argc, const char **argv, void *ctx) +{ + bool disable = false; + const struct option options[] = { + OPT_FILENAME('c', "config-file", &config.config_file, "config-file", + "override the default config"), + OPT_BOOLEAN('d', "disable", &disable, + "disable configured default devices and wqs"), + OPT_STRING('n', "name", &config.user_default_wq_name, "user default wq name", + "specify user default wq name. Default \"user_default_wq\""), + OPT_BOOLEAN('v', "verbose", &verbose, + "emit extra debug messages to stderr"), + OPT_END(), + }; + const char *const u[] = { + "accfg config-default [<options>]", NULL + }; + struct util_filter_ctx fctx = { + 0 + }; + struct list_filter_arg cfa = { + 0 + }; + const char *prefix = "./"; + int i, rc = 0; + + argc = parse_options_prefix(argc, argv, prefix, options, u, 0); + for (i = 0; i < argc; i++) + error("unknown parameter \"%s\"\n", argv[i]); + if (argc) + usage_with_options(u, options); + + cfa.jdevices = json_object_new_array(); + if (!cfa.jdevices) + return -ENOMEM; + list_head_init(&cfa.jdev_list); + + fctx.filter_device = filter_device; + fctx.filter_group = filter_group; + fctx.filter_wq = filter_wq; + fctx.filter_engine = filter_engine; + fctx.list = &cfa; + cfa.flags = config_opts_to_flags(); + + rc = util_filter_walk(ctx, &fctx, &util_param); + if (rc) + return rc; + + free_containers(&cfa); + + if (disable) { + config_default_disable(ctx); + + return 0; + } + + if (config.config_file) { + /* Parse the default config file and set configs. */ + rc = config_default_from_file(ctx); + } else { + config_default(ctx); + } + + if (!rc) + config_default_activate_devices(ctx); + + config_default_param_free(); + + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/accfg/libaccel_config.h new/idxd-config-accel-config-v4.1/accfg/libaccel_config.h --- old/idxd-config-accel-config-v4.0/accfg/libaccel_config.h 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/accfg/libaccel_config.h 2023-08-22 03:10:43.000000000 +0200 @@ -36,6 +36,7 @@ enum accfg_device_type { ACCFG_DEVICE_DSA = 0, ACCFG_DEVICE_IAX = 1, + ACCFG_DEVICE_MAX = 2, ACCFG_DEVICE_TYPE_UNKNOWN = -1, }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/accfg-test.spec.in new/idxd-config-accel-config-v4.1/accfg-test.spec.in --- old/idxd-config-accel-config-v4.0/accfg-test.spec.in 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/accfg-test.spec.in 2023-08-22 03:10:43.000000000 +0200 @@ -2,7 +2,7 @@ Version: VERSION Release: 2%{?dist} Summary: Configure accelerator subsystem devices -License: GPLv2 +License: GPL-2.0 Group: System Environment/Base Source0: %{name}-%{version}.tar.gz @@ -22,7 +22,7 @@ %package -n DNAME Summary: Development files for libaccfg -License: LGPLv2.1 +License: LGPL-2.1-only Group: Development/Libraries Requires: LNAME%{?_isa} = %{version}-%{release} @@ -33,7 +33,7 @@ %package -n LNAME Summary: Configuration library for accelerator subsystem devices -License: LGPLv2.1 +License: LGPL-2.1-only Group: System Environment/Libraries %description -n LNAME @@ -41,7 +41,7 @@ %package -n %{name}-test Summary: Unit tests for %{name}. -License: GPLv2 +License: GPL-2.0 Group: Unspecified %description -n %{name}-test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/accfg.spec.in new/idxd-config-accel-config-v4.1/accfg.spec.in --- old/idxd-config-accel-config-v4.0/accfg.spec.in 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/accfg.spec.in 2023-08-22 03:10:43.000000000 +0200 @@ -2,7 +2,7 @@ Version: VERSION Release: 2%{?dist} Summary: Configure accelerator subsystem devices -License: GPLv2 +License: GPL-2.0 Group: System Environment/Base Source0: %{name}-%{version}.tar.gz @@ -22,7 +22,7 @@ %package -n DNAME Summary: Development files for libaccfg -License: LGPLv2.1 +License: LGPL-2.1-only Group: Development/Libraries Requires: LNAME%{?_isa} = %{version}-%{release} @@ -33,7 +33,7 @@ %package -n LNAME Summary: Configuration library for accelerator subsystem devices -License: LGPLv2.1 +License: LGPL-2.1-only Group: System Environment/Libraries %description -n LNAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/builtin.h new/idxd-config-accel-config-v4.1/builtin.h --- old/idxd-config-accel-config-v4.0/builtin.h 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/builtin.h 2023-08-22 03:10:43.000000000 +0200 @@ -30,6 +30,7 @@ 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_config_default(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-v4.0/contrib/configs/profilenote.txt new/idxd-config-accel-config-v4.1/contrib/configs/profilenote.txt --- old/idxd-config-accel-config-v4.0/contrib/configs/profilenote.txt 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/contrib/configs/profilenote.txt 2023-08-22 03:10:43.000000000 +0200 @@ -34,3 +34,31 @@ for throughput ops - targeting SPDK-like uses - DWQ threshold default 0 + +5. user_default_profile.conf + Recommended dsa and iax accel profile template + - The template specifies one DSA device and one IAX device + - The attributes are applied to all WQs and engines on DSA and IAX + - Run "accel-config config-user-default -c user_default_profile.conf" + to load the config to all WQs and engines on all available DSA and + IAX devices + - The attributes can be edited. Two devices can be tailored to one device. + - 1 group with all available WQs/all engs per group + - Attributes that can be changed: + "group_id":0 + "priority":10 + "block_on_fault":1 + "ats_disable":0 + "prs_disable":1 + "name":"user_default_wq" + - Calcuated attributes: + "size": max WQ size / max WQs + "threshold": WQ size + - Fixed attributes: + "type": "user" + "mode":"shared" + "driver_name":"user", + - Attributes with default values set by driver: + "max_batch_size": default value + "max_transfer_size": default value + "op_config": default value diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/contrib/configs/user_default_profile.conf new/idxd-config-accel-config-v4.1/contrib/configs/user_default_profile.conf --- old/idxd-config-accel-config-v4.0/contrib/configs/user_default_profile.conf 1970-01-01 01:00:00.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/contrib/configs/user_default_profile.conf 2023-08-22 03:10:43.000000000 +0200 @@ -0,0 +1,42 @@ +[ + { + "dev":"dsa0", + "groups":[ + { + "dev":"group0.0", + "grouped_workqueues":[ + { + "dev":"wq0.0", + "mode":"shared", + "group_id":0, + "priority":10, + "block_on_fault":1, + "name":"user_default_wq", + "ats_disable":0, + "prs_disable":1 + } + ] + } + ] + }, + { + "dev":"iax1", + "groups":[ + { + "dev":"group1.0", + "grouped_workqueues":[ + { + "dev":"wq1.0", + "mode":"shared", + "group_id":0, + "priority":10, + "block_on_fault":1, + "name":"user_default_wq", + "ats_disable":0, + "prs_disable":1 + } + ] + } + ] + } +] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/debian/accel-config-test.install new/idxd-config-accel-config-v4.1/debian/accel-config-test.install --- old/idxd-config-accel-config-v4.0/debian/accel-config-test.install 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/debian/accel-config-test.install 2023-08-22 03:10:43.000000000 +0200 @@ -1 +1 @@ -usr/lib/accel-config/test/* usr/libexec/accel-config/test +usr/libexec/accel-config/test/* usr/libexec/accel-config/test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/debian/changelog new/idxd-config-accel-config-v4.1/debian/changelog --- old/idxd-config-accel-config-v4.0/debian/changelog 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/debian/changelog 2023-08-22 03:10:43.000000000 +0200 @@ -1,3 +1,24 @@ +accel-config (4.1-1) unstable; urgency=medium + + [ Colin Ian King ] + * add missing libssl-dev dependency + * debian/accel-config-test.install fix path on copy + + [ Fenghua Yu ] + * Skip configuring ats_disable if the attribute is not present + * Add config-user-default command + * Add option "-c <config_file>" to load default configurations from + the file + * Disable default configured WQs and devices + * Add "-n <wq_name>" to specify WQ name for disabling WQs + * Add user_default_profile.conf + * Add doumentation for new command "config-user-default" + + [ Jerry Snitselaar ] + * Update spec file templates to use SPDX identifiers + + -- Ramesh Thomas <ramesh.tho...@intel.com> Mon, 21 Aug 2023 18:08:39 -0700 + accel-config (4.0-1) unstable; urgency=medium [ Colin Ian King ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/debian/control new/idxd-config-accel-config-v4.1/debian/control --- old/idxd-config-accel-config-v4.0/debian/control 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/debian/control 2023-08-22 03:10:43.000000000 +0200 @@ -14,7 +14,8 @@ pkg-config, uuid-dev, xmlto, - zlib1g-dev + zlib1g-dev, + libssl-dev Package: accel-config Section: misc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.0/git-version new/idxd-config-accel-config-v4.1/git-version --- old/idxd-config-accel-config-v4.0/git-version 2023-03-08 05:32:03.000000000 +0100 +++ new/idxd-config-accel-config-v4.1/git-version 2023-08-22 03:10:43.000000000 +0200 @@ -19,7 +19,7 @@ fi } -DEF_VER=4.0 +DEF_VER=4.1 LF=' '