commit accel-config for openSUSE:Factory
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 2024-08-09 16:16:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/accel-config (Old) and /work/SRC/openSUSE:Factory/.accel-config.new.7232 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "accel-config" Fri Aug 9 16:16:06 2024 rev:20 rq:1192814 version:4.1.8 Changes: -------- --- /work/SRC/openSUSE:Factory/accel-config/accel-config.changes 2024-03-18 16:46:30.815284825 +0100 +++ /work/SRC/openSUSE:Factory/.accel-config.new.7232/accel-config.changes 2024-08-09 16:17:10.437218006 +0200 @@ -1,0 +2,15 @@ +Thu Aug 8 15:07:51 UTC 2024 - Antonio Teixeira <antonio.teixeira@suse.com> + +- Update to 4.1.8: + * Check for error return from iaa_do_crypto + * Clean up resource leak in accfg_wq_get_occupancy + * Update dsa_config_test_runner.sh +- 4.1.7 changelog: + * Typo fixes + * Make verbose logging optional + * Clean up typo + * Don't attempt to disable non-existent devices + * Don't list attributes not present + * add required SECURITY.md file for OSSF Scorecard compliance + +------------------------------------------------------------------- Old: ---- idxd-config-accel-config-v4.1.6.tar.gz New: ---- idxd-config-accel-config-v4.1.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ accel-config.spec ++++++ --- /var/tmp/diff_new_pack.rQk0X7/_old 2024-08-09 16:17:10.881236544 +0200 +++ /var/tmp/diff_new_pack.rQk0X7/_new 2024-08-09 16:17:10.881236544 +0200 @@ -19,7 +19,7 @@ %define pkg_libname libaccel-config1 %define src_name idxd-config-accel-config-v%{version} Name: accel-config -Version: 4.1.6 +Version: 4.1.8 Release: 0 Summary: Configure accelerator subsystem devices License: GPL-2.0-only ++++++ idxd-config-accel-config-v4.1.6.tar.gz -> idxd-config-accel-config-v4.1.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.1.6/SECURITY.md new/idxd-config-accel-config-v4.1.8/SECURITY.md --- old/idxd-config-accel-config-v4.1.6/SECURITY.md 1970-01-01 01:00:00.000000000 +0100 +++ new/idxd-config-accel-config-v4.1.8/SECURITY.md 2024-07-31 05:24:22.000000000 +0200 @@ -0,0 +1,5 @@ +# Security Policy +Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation. + +## Reporting a Vulnerability +Please report any security vulnerabilities in this project utilizing the guidelines [here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handli...). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.1.6/accfg/lib/libaccfg.c new/idxd-config-accel-config-v4.1.8/accfg/lib/libaccfg.c --- old/idxd-config-accel-config-v4.1.6/accfg/lib/libaccfg.c 2024-02-29 19:39:57.000000000 +0100 +++ new/idxd-config-accel-config-v4.1.8/accfg/lib/libaccfg.c 2024-07-31 05:24:22.000000000 +0200 @@ -1919,6 +1919,7 @@ ACCFG_EXPORT int accfg_wq_get_occupancy(struct accfg_wq *wq) { + long occ; int dfd; struct accfg_ctx *ctx = accfg_wq_get_ctx(wq); @@ -1926,7 +1927,9 @@ if (dfd < 0) return -ENXIO; - return accfg_get_param_long(ctx, dfd, "occupancy"); + occ = accfg_get_param_long(ctx, dfd, "occupancy"); + close(dfd); + return occ; } ACCFG_EXPORT int accfg_wq_get_clients(struct accfg_wq *wq) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.1.6/debian/changelog new/idxd-config-accel-config-v4.1.8/debian/changelog --- old/idxd-config-accel-config-v4.1.6/debian/changelog 2024-02-29 19:39:57.000000000 +0100 +++ new/idxd-config-accel-config-v4.1.8/debian/changelog 2024-07-31 05:24:22.000000000 +0200 @@ -1,3 +1,28 @@ +accel-config (4.1.8-1) unstable; urgency=medium + + * [ Jerry Snitselaar ] + * Check for error return from iaa_do_crypto + * Clean up resource leak in accfg_wq_get_occupancy + * [ shangsong2 ] + * Update dsa_config_test_runner.sh + + -- Ramesh Thomas <ramesh.thomas@intel.com> Tue, 30 Jul 2024 23:19:39 -0400 + +accel-config (4.1.7-1) unstable; urgency=medium + + * [ Adrian Huang ] + * Typo fixes + * [ Jerry Snitselaar ] + * Make verbose logging optional + * Clean up typo + * Don't attempt to disable non-existent devices + * [ Ramesh Thomas ] + * Don't list attributes not present + * [ Robert Dower ] + * add required SECURITY.md file for OSSF Scorecard compliance + + -- Ramesh Thomas <ramesh.thomas@intel.com> Tue, 11 Jun 2024 14:53:12 -0400 + accel-config (4.1.6-1) unstable; urgency=medium [ Hentabli, Abdelrahim ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.1.6/git-version new/idxd-config-accel-config-v4.1.8/git-version --- old/idxd-config-accel-config-v4.1.6/git-version 2024-02-29 19:39:57.000000000 +0100 +++ new/idxd-config-accel-config-v4.1.8/git-version 2024-07-31 05:24:22.000000000 +0200 @@ -19,7 +19,7 @@ fi } -DEF_VER=4.1.6 +DEF_VER=4.1.8 LF=' ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.1.6/test/common new/idxd-config-accel-config-v4.1.8/test/common --- old/idxd-config-accel-config-v4.1.6/test/common 2024-02-29 19:39:57.000000000 +0100 +++ new/idxd-config-accel-config-v4.1.8/test/common 2024-07-31 05:24:22.000000000 +0200 @@ -122,13 +122,18 @@ disable_all() { for device_type in 'dsa' 'iax'; do # Kernel before 5.13 has dsa and iax bus. Because of ABI change, iax - # bus is removed. All devices are in /sys/bus/das/devices. + # bus is removed. All devices are in /sys/bus/dsa/devices. if [ -d /sys/bus/iax ] && [ $device_type == 'iax' ]; then DSA_DEVICE_PATH="/sys/bus/iax/devices" else DSA_DEVICE_PATH="/sys/bus/dsa/devices" fi - # Get available devices + + if ! ls "${DSA_DEVICE_PATH}/" | grep -qE "${device_type}[0-9]*"; then + continue + fi + + # Get available devices for device_path in ${DSA_DEVICE_PATH}/${device_type}* ; do [[ $(echo "$device_path" | grep -c '!') -eq 0 ]] && { # Get wqs and disable it if the status is enabled diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.1.6/test/dsa_config_test_runner.sh new/idxd-config-accel-config-v4.1.8/test/dsa_config_test_runner.sh --- old/idxd-config-accel-config-v4.1.6/test/dsa_config_test_runner.sh 2024-02-29 19:39:57.000000000 +0100 +++ new/idxd-config-accel-config-v4.1.8/test/dsa_config_test_runner.sh 2024-07-31 05:24:22.000000000 +0200 @@ -1,9 +1,16 @@ -#!/bin/bash -Ex +#!/bin/bash -E # SPDX-License-Identifier: GPL-2.0 # Copyright(c) 2019-2020 Intel Corporation. All rights reserved. . "$(dirname "$0")/common" +if [[ $* =~ "--verbose" ]]; then + set -x + VERBOSE="-v" +else + VERBOSE="" +fi + DSA=dsa0 WQ0=wq0.0 GRP0=group0.0 @@ -60,7 +67,7 @@ # Traffic class is set 1 for best performance # Not allow to config traffic class a and b - # group descriptor in gregress limit + # group descriptor in progress limit if [ "$IDXD_VERSION" != "0x100" ]; then "$ACCFG" config-group $DSA/$GRP0 -d 3 || exit 1 @@ -141,10 +148,12 @@ fi "$ACCFG" config-wq $DSA/$WQ0 -g -1 || exit 1 - # operaton config + # operation config if [ "$IDXD_VERSION" != "0x100" ]; then [ ! -f "$IDXD_DEVICE_PATH/$DSA/$WQ0/op_config" ] && exit 1 + op_cap="$(cat $IDXD_DEVICE_PATH/$DSA/$WQ0/op_config | cut -c 55-)" + echo 0 > "$IDXD_DEVICE_PATH/$DSA/$WQ0/op_config" read_ret=$(cat $IDXD_DEVICE_PATH/$DSA/$WQ0/op_config | cut -c 55-) if [ "$read_ret" != "00000000,00000000" ]; then @@ -164,9 +173,9 @@ echo "config wq op_config failed" && exit "$EXIT_FAILURE" fi - "$ACCFG" config-wq $DSA/$WQ0 --op-config=0000007b,00bf07ff || exit 1 + "$ACCFG" config-wq $DSA/$WQ0 --op-config="${op_cap}" || exit 1 read_ret=$(cat $IDXD_DEVICE_PATH/$DSA/$WQ0/op_config | cut -c 55-) - if [ "$read_ret" != "0000007b,00bf07ff" ]; then + if [ "$read_ret" != "${op_cap}" ]; then echo "config wq full operations failed" && exit "$EXIT_FAILURE" fi @@ -178,9 +187,9 @@ fi "$ACCFG" enable-device $DSA "$ACCFG" enable-wq $DSA/$WQ0 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 -v && echo "shoudl fail, but pass" && exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x4 -c 2 && - echo "shoudl fail, but pass" && exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 "${VERBOSE}" && echo "should fail, but pass" && exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x4 -c 2 "${VERBOSE}" && + echo "should fail, but pass" && exit 1 "$ACCFG" disable-device $DSA "$ACCFG" config-wq $DSA/$WQ0 -g 0 -m dedicated -y user -n app1 -d user -p 10 -o 8 @@ -191,10 +200,10 @@ fi "$ACCFG" enable-device $DSA "$ACCFG" enable-wq $DSA/$WQ0 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 || echo "shoudl pass, but fail" || exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x5 && echo "shoudl fail, but pass" && exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x3 -c 2 && - echo "shoudl fail, but pass" && exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 "${VERBOSE}" || echo "should pass, but fail" || exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x5 "${VERBOSE}" && echo "should fail, but pass" && exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x3 -c 2 "${VERBOSE}" && + echo "should fail, but pass" && exit 1 "$ACCFG" disable-device $DSA "$ACCFG" config-wq $DSA/$WQ0 -g 0 -m dedicated -y user -n app1 -d user -p 10 -o 272 @@ -205,19 +214,19 @@ fi "$ACCFG" enable-device $DSA "$ACCFG" enable-wq $DSA/$WQ0 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x0 && echo "shoudl fail, but pass" && exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x2 && echo "shoudl fail, but pass" && exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 && echo "shoudl fail, but pass" && exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x7 && echo "shoudl fail, but pass" && exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x8 && echo "shoudl fail, but pass" && exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x4 || echo "shoudl pass, but fail" || exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x5 || echo "shoudl pass, but fail" || exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x6 || echo "shoudl pass, but fail" || exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x9 || echo "shoudl fail, but pass" || exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x5 -c 2 || - echo "shoudl pass, but fail" || exit 1 - "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x9 -c 2 || - echo "shoudl pass, but fail" || exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x0 "${VERBOSE}" && echo "should fail, but pass" && exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x2 "${VERBOSE}" && echo "should fail, but pass" && exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x3 "${VERBOSE}" && echo "should fail, but pass" && exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x7 "${VERBOSE}" && echo "should fail, but pass" && exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x8 "${VERBOSE}" && echo "should fail, but pass" && exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x4 "${VERBOSE}" || echo "should pass, but fail" || exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x5 "${VERBOSE}" || echo "should pass, but fail" || exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x6 "${VERBOSE}" || echo "should pass, but fail" || exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x9 "${VERBOSE}" || echo "should fail, but pass" || exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x5 -c 2 "${VERBOSE}" || + echo "should pass, but fail" || exit 1 + "$DSATEST" -w 0 -l 4096 -f 0x1 -o 0x1 -b 0x9 -c 2 "${VERBOSE}" || + echo "should pass, but fail" || exit 1 "$ACCFG" disable-device $DSA fi } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.1.6/test/dsa_user_test_runner.sh new/idxd-config-accel-config-v4.1.8/test/dsa_user_test_runner.sh --- old/idxd-config-accel-config-v4.1.6/test/dsa_user_test_runner.sh 2024-02-29 19:39:57.000000000 +0100 +++ new/idxd-config-accel-config-v4.1.8/test/dsa_user_test_runner.sh 2024-07-31 05:24:22.000000000 +0200 @@ -1,4 +1,4 @@ -#!/bin/bash -Ex +#!/bin/bash -E # SPDX-License-Identifier: GPL-2.0 # Copyright(c) 2019-2020 Intel Corporation. All rights reserved. @@ -6,15 +6,22 @@ rc="$EXIT_SKIP" -input1=$1 -if [ "$input1" == "--skip-config" ]; then -DEV=`ls /dev/dsa/ | sed -ne 's|wq\([^.]\+\)\(.*\)|dsa\1/wq\1\2|p'` -DSA=`echo $DEV | cut -f1 -d/` -echo "$DEV" -echo "$DSA" +if [[ $* =~ "--verbose" ]]; then + VERBOSE="-v" + set -x else -DSA=dsa0 -echo "$DSA" + VERBOSE="" +fi + +if [[ $* =~ "--skip-config" ]]; then + SKIPCONFIG="true" + DEV=`ls /dev/dsa/ | sed -ne 's|wq\([^.]\+\)\(.*\)|dsa\1/wq\1\2|p'` + DSA=`echo $DEV | cut -f1 -d/` + echo "$DEV" + echo "$DSA" +else + DSA=dsa0 + echo "$DSA" fi WQ0=wq0.0 WQ1=wq0.1 @@ -78,12 +85,12 @@ echo "Performing $wq_mode_name WQ $op_name testing" for xfer_size in $SIZE_1 $SIZE_4K $SIZE_64K $SIZE_1M $SIZE_2M; do echo "Testing $xfer_size bytes" - if [ "$input1" == "--skip-config" ]; then + if ! test -z "${SKIPCONFIG}"; then "$DSATEST" -l "$xfer_size" -o "$opcode" \ - -f "$flag" t200 -v -d "$DEV" + -f "$flag" t200 "${VERBOSE}" -d "$DEV" else "$DSATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \ - -f "$flag" t200 -v + -f "$flag" t200 "${VERBOSE}" fi done done @@ -112,12 +119,12 @@ echo "Performing $wq_mode_name WQ batched $op_name testing" for xfer_size in $SIZE_1 $SIZE_4K $SIZE_64K $SIZE_1M $SIZE_2M; do echo "Testing $xfer_size bytes" - if [ "$input1" == "--skip-config" ]; then + if ! test -z "${SKIPCONFIG}"; then "$DSATEST" -l "$xfer_size" -o 0x1 -b "$opcode" \ - -c 16 -f "$flag" t2000 -v -d "$DEV" + -c 16 -f "$flag" t2000 "${VERBOSE}" -d "$DEV" else "$DSATEST" -w "$wq_mode_code" -l "$xfer_size" -o 0x1 -b "$opcode" \ - -c 16 -f "$flag" t2000 -v + -c 16 -f "$flag" t2000 "${VERBOSE}" fi done done @@ -142,12 +149,12 @@ 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" - if [ "$input1" == "--skip-config" ]; then + if ! test -z "${SKIPCONFIG}"; then "$DSATEST" -l "$xfer_size" -o "$opcode" \ - -f "$flag" t200 -v -d "$DEV" + -f "$flag" t200 "${VERBOSE}" -d "$DEV" else "$DSATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \ - -f "$flag" t200 -v + -f "$flag" t200 "${VERBOSE}" fi done done @@ -172,17 +179,17 @@ 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" - if [ "$input1" == "--skip-config" ]; then + if ! test -z "${SKIPCONFIG}"; then "$DSATEST" -l "$xfer_size" -o 0x1 -b "$opcode" \ - -c 16 -f "$flag" t2000 -v -d "$DEV" + -c 16 -f "$flag" t2000 "${VERBOSE}" -d "$DEV" else "$DSATEST" -w "$wq_mode_code" -l "$xfer_size" -o 0x1 -b "$opcode" \ - -c 16 -f "$flag" t2000 -v + -c 16 -f "$flag" t2000 "${VERBOSE}" fi done done } -if [ "$input1" != "--skip-config" ]; then +if test -z "${SKIPCONFIG}"; then _cleanup start_dsa enable_wqs @@ -219,7 +226,7 @@ test_dif_op_batch $opcode $flag done -if [ "$input1" != "--skip-config" ]; then +if ! $SKIPCONFIG; then disable_wqs stop_dsa _cleanup diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.1.6/test/iaa.c new/idxd-config-accel-config-v4.1.8/test/iaa.c --- old/idxd-config-accel-config-v4.1.6/test/iaa.c 2024-02-29 19:39:57.000000000 +0100 +++ new/idxd-config-accel-config-v4.1.8/test/iaa.c 2024-07-31 05:24:22.000000000 +0200 @@ -2625,6 +2625,10 @@ (uint8_t *)iaa_crypto_aecs->aes_key_low, (uint8_t *)iaa_crypto_aecs->counter_iv, key_size, iaa_crypto_aecs->crypto_algorithm, 1); + if (expected_len < 0) { + err("iaa_do_crypto returned: %d\n", expected_len); + return -ENXIO; + } rc = memcmp(tsk->dst1, tsk->output, expected_len); if (!mismatch_expected) { @@ -2673,6 +2677,10 @@ (uint8_t *)iaa_crypto_aecs->aes_key_low, (uint8_t *)iaa_crypto_aecs->counter_iv, key_size, iaa_crypto_aecs->crypto_algorithm, 0); + if (expected_len < 0) { + err("iaa_do_crypto returned: %d\n", expected_len); + return -ENXIO; + } rc = memcmp(tsk->dst1, tsk->output, expected_len); if (!mismatch_expected) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.1.6/test/iaa_user_test_runner.sh new/idxd-config-accel-config-v4.1.8/test/iaa_user_test_runner.sh --- old/idxd-config-accel-config-v4.1.6/test/iaa_user_test_runner.sh 2024-02-29 19:39:57.000000000 +0100 +++ new/idxd-config-accel-config-v4.1.8/test/iaa_user_test_runner.sh 2024-07-31 05:24:22.000000000 +0200 @@ -1,4 +1,4 @@ -#!/bin/bash -Ex +#!/bin/bash -E # SPDX-License-Identifier: GPL-2.0 # Copyright(c) 2019-2020 Intel Corporation. All rights reserved. @@ -7,13 +7,21 @@ rc="$EXIT_SKIP" DEV_OPT="" -input1=$1 -if [ "$input1" == "--skip-config" ]; then + +if [[ $* =~ "--verbose" ]]; then + VERBOSE="-v" + set -x +else + VERBOSE="" +fi + +if [[ $* =~ "--skip-config" ]]; then DEV=`ls /dev/iax/ | sed -ne 's|wq\([^.]\+\)\(.*\)|iax\1/wq\1\2|p'` DEV=`echo $DEV | cut -f1 -d' '` IAA=`echo $DEV | cut -f1 -d/` DEV_OPT="-d $DEV" echo "$DEV" + SKIPCONFIG="true" else IAA=iax1 fi @@ -140,10 +148,10 @@ if [ "$extra_flag" != "" ] then "$IAATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \ - -f "$flag" -1 "$extra_flag" -t 5000 -v $DEV_OPT + -f "$flag" -1 "$extra_flag" -t 5000 "${VERBOSE}" $DEV_OPT else "$IAATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \ - -f "$flag" -t 5000 -v $DEV_OPT + -f "$flag" -t 5000 "${VERBOSE}" $DEV_OPT fi done done @@ -160,133 +168,133 @@ if [ $((IAA_OPCODE_MASK_SCAN & OP_CAP2)) -ne 0 ]; then "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c \ - -3 128 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT + -3 128 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c \ - -3 256 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT + -3 256 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c \ - -3 1024 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT + -3 1024 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c \ - -3 16384 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT + -3 16384 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c \ - -3 262144 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT + -3 262144 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c \ - -3 524288 -o $IAA_OPCODE_SCAN -t 5000 -v $DEV_OPT + -3 524288 -o $IAA_OPCODE_SCAN -t 5000 "${VERBOSE}" $DEV_OPT fi if [ $((IAA_OPCODE_MASK_SET_MEMBERSHIP & OP_CAP2)) -ne 0 ]; then "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x38 \ - -3 256 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT + -3 256 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x38 \ - -3 512 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT + -3 512 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x38 \ - -3 2048 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT + -3 2048 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x38 \ - -3 32768 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT + -3 32768 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x38 \ - -3 524288 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT + -3 524288 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x38 \ - -3 1048576 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 -v $DEV_OPT + -3 1048576 -o $IAA_OPCODE_SET_MEMBERSHIP -t 5000 "${VERBOSE}" $DEV_OPT fi if [ $((IAA_OPCODE_MASK_EXTRACT & OP_CAP2)) -ne 0 ]; then "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c \ - -3 128 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT + -3 128 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c \ - -3 256 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT + -3 256 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c \ - -3 1024 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT + -3 1024 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c \ - -3 16384 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT + -3 16384 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c \ - -3 262144 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT + -3 262144 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c \ - -3 524288 -o $IAA_OPCODE_EXTRACT -t 5000 -v $DEV_OPT + -3 524288 -o $IAA_OPCODE_EXTRACT -t 5000 "${VERBOSE}" $DEV_OPT fi if [ $((IAA_OPCODE_MASK_SELECT & OP_CAP2)) -ne 0 ]; then "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c \ - -3 128 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT + -3 128 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c \ - -3 256 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT + -3 256 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c \ - -3 1024 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT + -3 1024 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c \ - -3 16384 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT + -3 16384 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c \ - -3 262144 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT + -3 262144 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c \ - -3 524288 -o $IAA_OPCODE_SELECT -t 5000 -v $DEV_OPT + -3 524288 -o $IAA_OPCODE_SELECT -t 5000 "${VERBOSE}" $DEV_OPT fi if [ $((IAA_OPCODE_MASK_RLE_BURST & OP_CAP2)) -ne 0 ]; then "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x1c \ - -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x1c \ - -3 1024 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 1024 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x1c \ - -3 4096 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 4096 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 32768 -2 0x1c \ - -3 32768 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 32768 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x1c \ - -3 65536 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 65536 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 131072 -2 0x1c \ - -3 131072 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 131072 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 32 -2 0x3c \ - -3 16 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 16 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 64 -2 0x3c \ - -3 32 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 32 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 128 -2 0x3c \ - -3 64 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 64 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 256 -2 0x3c \ - -3 128 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 128 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x3c \ - -3 256 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 256 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x3c \ - -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 64 -2 0x7c \ - -3 16 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 16 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 128 -2 0x7c \ - -3 32 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 32 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 256 -2 0x7c \ - -3 64 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 64 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c \ - -3 128 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 128 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c \ - -3 256 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 256 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2048 -2 0x7c \ - -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 -v $DEV_OPT + -3 512 -o $IAA_OPCODE_RLE_BURST -t 5000 "${VERBOSE}" $DEV_OPT fi if [ $((IAA_OPCODE_MASK_FIND_UNIQUE & OP_CAP2)) -ne 0 ]; then "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x38 \ - -3 256 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT + -3 256 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x38 \ - -3 512 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT + -3 512 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x38 \ - -3 2048 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT + -3 2048 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x38 \ - -3 32768 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT + -3 32768 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x38 \ - -3 524288 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT + -3 524288 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x38 \ - -3 1048576 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 -v $DEV_OPT + -3 1048576 -o $IAA_OPCODE_FIND_UNIQUE -t 5000 "${VERBOSE}" $DEV_OPT fi if [ $((IAA_OPCODE_MASK_EXPAND & OP_CAP2)) -ne 0 ]; then "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 512 -2 0x7c \ - -3 128 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT + -3 128 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1024 -2 0x7c \ - -3 256 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT + -3 256 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 4096 -2 0x7c \ - -3 1024 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT + -3 1024 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 65536 -2 0x7c \ - -3 16384 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT + -3 16384 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 1048576 -2 0x7c \ - -3 262144 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT + -3 262144 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT "$IAATEST" -w "$wq_mode_code" -f "$flag" -l 2097152 -2 0x7c \ - -3 524288 -o $IAA_OPCODE_EXPAND -t 5000 -v $DEV_OPT + -3 524288 -o $IAA_OPCODE_EXPAND -t 5000 "${VERBOSE}" $DEV_OPT fi done } @@ -308,7 +316,7 @@ echo "Testing $xfer_size bytes" "$IAATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \ - -f "$flag" -a "$aecs_flag" -t 5000 -v $DEV_OPT + -f "$flag" -a "$aecs_flag" -t 5000 "${VERBOSE}" $DEV_OPT done done } @@ -329,12 +337,12 @@ echo "Testing $xfer_size bytes" "$IAATEST" -w "$wq_mode_code" -l "$xfer_size" -o "$opcode" \ - -f "$flag" -t 5000 -v $DEV_OPT + -f "$flag" -t 5000 "${VERBOSE}" $DEV_OPT done done } -if [ "$input1" != "--skip-config" ]; then +if test -z "${SKIPCONFIG}"; then _cleanup start_iaa enable_wqs @@ -487,7 +495,7 @@ test_op_transl_fetch $IAA_OPCODE_TRANSL_FETCH $flag fi -if [ "$input1" != "--skip-config" ]; then +if test -z "${SKIPCONFIG}"; then disable_wqs stop_iaa _cleanup diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/idxd-config-accel-config-v4.1.6/util/json.c new/idxd-config-accel-config-v4.1.8/util/json.c --- old/idxd-config-accel-config-v4.1.6/util/json.c 2024-02-29 19:39:57.000000000 +0100 +++ new/idxd-config-accel-config-v4.1.8/util/json.c 2024-07-31 05:24:22.000000000 +0200 @@ -150,8 +150,6 @@ uint64_t iaa_cap; enum accfg_device_state dev_state; int int_val; - uint64_t ulong_val; - uint64_t ullong_val; bool new_bool; int evls; @@ -291,14 +289,6 @@ if (accfg_device_get_type(device) != ACCFG_DEVICE_IAX) json_object_object_add(jdevice, "max_read_buffers", jobj); - ulong_val = accfg_device_get_max_batch_size(device); - if (ulong_val > 0) { - jobj = json_object_new_int(ulong_val); - if (!jobj) - goto err; - json_object_object_add(jdevice, "max_batch_size", jobj); - } - int_val = accfg_device_get_ims_size(device); if (int_val >= 0) { jobj = json_object_new_int(int_val); @@ -315,9 +305,9 @@ json_object_object_add(jdevice, "max_batch_size", jobj); } - ullong_val = accfg_device_get_max_transfer_size(device); - if (ullong_val > 0) { - jobj = json_object_new_int64(ullong_val); + int_val = accfg_device_get_max_transfer_size(device); + if (int_val >= 0) { + jobj = json_object_new_int64(int_val); if (!jobj) goto err; json_object_object_add(jdevice, "max_transfer_size", jobj); @@ -414,13 +404,19 @@ if (jobj) json_object_object_add(jaccfg, "block_on_fault", jobj); - jobj = json_object_new_int(accfg_wq_get_max_batch_size(wq)); - if (jobj) - json_object_object_add(jaccfg, "max_batch_size", jobj); + int_val = accfg_wq_get_max_batch_size(wq); + if (int_val >= 0) { + jobj = json_object_new_int(int_val); + if (jobj) + json_object_object_add(jaccfg, "max_batch_size", jobj); + } - jobj = json_object_new_int64(accfg_wq_get_max_transfer_size(wq)); - if (jobj) - json_object_object_add(jaccfg, "max_transfer_size", jobj); + int_val = accfg_wq_get_max_transfer_size(wq); + if (int_val >= 0) { + jobj = json_object_new_int64(int_val); + if (jobj) + json_object_object_add(jaccfg, "max_transfer_size", jobj); + } if (!(flags & UTIL_JSON_SAVE) && accfg_wq_get_cdev_minor(wq) >= 0) { jobj = json_object_new_int(accfg_wq_get_cdev_minor(wq));
participants (1)
-
Source-Sync