lists.linaro.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
List overview
Download
Acc
April 2023
----- 2024 -----
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
acc@lists.linaro.org
4 participants
8 discussions
Start a n
N
ew thread
[PATCH V4 0/6] add init2 and dynamic load for digest/aead agls
by Hao Fang
compress/cipher/rsa/ecc already support the init2 and dynamic load, now add support for digest/aead algs. --- v3->v4: 1)fix bug alg match for init2. v2->v3: 1)add alg match for init2. v1->v2: 1)fix bug for aead init testcase. 2)tinyfix for code style. --- Hao Fang (6): uadk/digest: introduce the init2 interface for digest uadk/aead: introduce the init2 interface for aead uadk/digest: adapt the module dynamic load for the digest algs uadk/aead: adadpt the module dynamic load for aead algs uadk/tools: add init2 test for digest algs uadk/tool: add init2 test for aead algs drv/hisi_sec.c | 105 +++++++++---- include/drv/wd_aead_drv.h | 26 ---- include/drv/wd_digest_drv.h | 26 ---- include/wd_aead.h | 28 ++++ include/wd_digest.h | 28 ++++ libwd_crypto.map | 6 + uadk_tool/test/test_sec.c | 249 ++++++++++++++++++++++++++++--- wd_aead.c | 288 +++++++++++++++++++++++++++--------- wd_digest.c | 286 ++++++++++++++++++++++++++--------- 9 files changed, 794 insertions(+), 248 deletions(-) -- 2.30.0
1 year, 5 months
1
6
0
0
[PATCH V3 0/6] add init2 and dynamic load for digest/aead agls
by Hao Fang
compress/cipher/rsa/ecc already support the init2 and dynamic load, now add support for digest/aead algs. --- v2->v3: 1)add alg match for init2. v1->v2: 1)fix bug for aead init testcase. 2)tinyfix for code style. --- Hao Fang (6): uadk/digest: introduce the init2 interface for digest uadk/aead: introduce the init2 interface for aead uadk/digest: adapt the module dynamic load for the digest algs uadk/aead: adadpt the module dynamic load for aead algs uadk/tools: add init2 test for digest algs uadk/tool: add init2 test for aead algs drv/hisi_sec.c | 105 +++++++++---- include/drv/wd_aead_drv.h | 26 ---- include/drv/wd_digest_drv.h | 26 ---- include/wd_aead.h | 28 ++++ include/wd_digest.h | 28 ++++ libwd_crypto.map | 6 + uadk_tool/test/test_sec.c | 249 ++++++++++++++++++++++++++++--- wd_aead.c | 288 +++++++++++++++++++++++++++--------- wd_digest.c | 286 ++++++++++++++++++++++++++--------- 9 files changed, 794 insertions(+), 248 deletions(-) -- 2.30.0
1 year, 5 months
1
6
0
0
[PATCH v2] crypto/uadk: set queue pair in dev_configure
by Zhangfei Gao
By default, uadk only alloc two queues for each algorithm, which will impact performance. Set queue pair number as required in dev_configure. The default max queue pair number is 8, which can be modified via para: max_nb_queue_pairs Example: sudo dpdk-test-crypto-perf -l 0-10 --vdev crypto_uadk,max_nb_queue_pairs=10 -- --devtype crypto_uadk --optype cipher-only --buffer-sz 8192 Signed-off-by: Zhangfei Gao <zhangfei.gao(a)linaro.org> --- doc/guides/cryptodevs/uadk.rst | 27 +++++++++++++++++++ drivers/crypto/uadk/uadk_crypto_pmd.c | 18 +++++++++++-- drivers/crypto/uadk/uadk_crypto_pmd_private.h | 1 + 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/doc/guides/cryptodevs/uadk.rst b/doc/guides/cryptodevs/uadk.rst index 9af6b88a5a..053622f7bf 100644 --- a/doc/guides/cryptodevs/uadk.rst +++ b/doc/guides/cryptodevs/uadk.rst @@ -110,3 +110,30 @@ Test steps sudo dpdk-test --vdev=crypto_uadk --log-level=6 RTE>>cryptodev_uadk_autotest RTE>>quit + + +Initialization +-------------- + +To use the PMD in an application, user must: + +* Call rte_vdev_init("crypto_uadk") within the application. + +* Use --vdev="crypto_uadk" in the EAL options, which will call rte_vdev_init() internally. + +The following parameters (all optional) can be provided in the previous two calls: + +* max_nb_queue_pairs: Specify the maximum number of queue pairs in the device (8 by default). + The max value of max_nb_queue_pairs can be queried from the device property available_instances. + Property available_instances value may differ from the devices and platforms. + Allocating queue pairs bigger than available_instances will fail. + +Example: + +.. code-block:: console + + cat /sys/class/uacce/hisi_sec2-2/available_instances + 256 + + sudo dpdk-test-crypto-perf -l 0-10 --vdev crypto_uadk,max_nb_queue_pairs=10 \ + -- --devtype crypto_uadk --optype cipher-only --buffer-sz 8192 diff --git a/drivers/crypto/uadk/uadk_crypto_pmd.c b/drivers/crypto/uadk/uadk_crypto_pmd.c index 4f729e0f07..824383512e 100644 --- a/drivers/crypto/uadk/uadk_crypto_pmd.c +++ b/drivers/crypto/uadk/uadk_crypto_pmd.c @@ -357,8 +357,15 @@ static const struct rte_cryptodev_capabilities uadk_crypto_v2_capabilities[] = { /* Configure device */ static int uadk_crypto_pmd_config(struct rte_cryptodev *dev __rte_unused, - struct rte_cryptodev_config *config __rte_unused) + struct rte_cryptodev_config *config) { + char env[128]; + + /* set queue pairs num via env */ + sprintf(env, "sync:%d@0", config->nb_queue_pairs); + setenv("WD_CIPHER_CTX_NUM", env, 1); + setenv("WD_DIGEST_CTX_NUM", env, 1); + return 0; } @@ -434,7 +441,7 @@ uadk_crypto_pmd_info_get(struct rte_cryptodev *dev, if (dev_info != NULL) { dev_info->driver_id = dev->driver_id; dev_info->driver_name = dev->device->driver->name; - dev_info->max_nb_queue_pairs = 128; + dev_info->max_nb_queue_pairs = priv->max_nb_qpairs; /* No limit of number of sessions */ dev_info->sym.max_nb_sessions = 0; dev_info->feature_flags = dev->feature_flags; @@ -1015,6 +1022,7 @@ uadk_cryptodev_probe(struct rte_vdev_device *vdev) struct uadk_crypto_priv *priv; struct rte_cryptodev *dev; struct uacce_dev *udev; + const char *input_args; const char *name; udev = wd_get_accel_dev("cipher"); @@ -1030,6 +1038,9 @@ uadk_cryptodev_probe(struct rte_vdev_device *vdev) if (name == NULL) return -EINVAL; + input_args = rte_vdev_device_args(vdev); + rte_cryptodev_pmd_parse_input_args(&init_params, input_args); + dev = rte_cryptodev_pmd_create(name, &vdev->device, &init_params); if (dev == NULL) { UADK_LOG(ERR, "driver %s: create failed", init_params.name); @@ -1044,6 +1055,7 @@ uadk_cryptodev_probe(struct rte_vdev_device *vdev) RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO; priv = dev->data->dev_private; priv->version = version; + priv->max_nb_qpairs = init_params.max_nb_queue_pairs; rte_cryptodev_pmd_probing_finish(dev); @@ -1078,4 +1090,6 @@ static struct cryptodev_driver uadk_crypto_drv; RTE_PMD_REGISTER_VDEV(UADK_CRYPTO_DRIVER_NAME, uadk_crypto_pmd); RTE_PMD_REGISTER_CRYPTO_DRIVER(uadk_crypto_drv, uadk_crypto_pmd.driver, uadk_cryptodev_driver_id); +RTE_PMD_REGISTER_PARAM_STRING(UADK_CRYPTO_DRIVER_NAME, + "max_nb_queue_pairs=<int>"); RTE_LOG_REGISTER_DEFAULT(uadk_crypto_logtype, INFO); diff --git a/drivers/crypto/uadk/uadk_crypto_pmd_private.h b/drivers/crypto/uadk/uadk_crypto_pmd_private.h index 9075f0f058..5a7dbff117 100644 --- a/drivers/crypto/uadk/uadk_crypto_pmd_private.h +++ b/drivers/crypto/uadk/uadk_crypto_pmd_private.h @@ -67,6 +67,7 @@ struct uadk_crypto_priv { bool env_cipher_init; bool env_auth_init; enum uadk_crypto_version version; + unsigned int max_nb_qpairs; } __rte_cache_aligned; extern int uadk_crypto_logtype; -- 2.39.2 (Apple Git-143)
1 year, 5 months
1
0
0
0
[PATCH] crypto/uadk: set queue pair in dev_configure
by Zhangfei Gao
By default, uadk only alloc two queues for each algorithm, which will impact performance. Set queue pair number as required in dev_configure. The default max queue pair number is 8, which can be modified via para: max_nb_queue_pairs Example: sudo dpdk-test-crypto-perf -l 0-10 --vdev crypto_uadk,max_nb_queue_pairs=10 -- --devtype crypto_uadk --optype cipher-only --buffer-sz 8192 lcore id Buf Size Burst Size Gbps Cycles/Buf 3 8192 32 7.5226 871.19 7 8192 32 7.5225 871.20 1 8192 32 7.5225 871.20 4 8192 32 7.5224 871.21 5 8192 32 7.5224 871.21 10 8192 32 7.5223 871.22 9 8192 32 7.5223 871.23 2 8192 32 7.5222 871.23 8 8192 32 7.5222 871.23 6 8192 32 7.5218 871.28 Signed-off-by: Zhangfei Gao <zhangfei.gao(a)linaro.org> --- drivers/crypto/uadk/uadk_crypto_pmd.c | 19 +++++++++++++++++-- drivers/crypto/uadk/uadk_crypto_pmd_private.h | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/uadk/uadk_crypto_pmd.c b/drivers/crypto/uadk/uadk_crypto_pmd.c index 4f729e0f07..34aae99342 100644 --- a/drivers/crypto/uadk/uadk_crypto_pmd.c +++ b/drivers/crypto/uadk/uadk_crypto_pmd.c @@ -357,8 +357,15 @@ static const struct rte_cryptodev_capabilities uadk_crypto_v2_capabilities[] = { /* Configure device */ static int uadk_crypto_pmd_config(struct rte_cryptodev *dev __rte_unused, - struct rte_cryptodev_config *config __rte_unused) + struct rte_cryptodev_config *config) { + char env[128]; + + /* set queue pairs num via env */ + sprintf(env, "sync:%d@0", config->nb_queue_pairs); + setenv("WD_CIPHER_CTX_NUM", env, 1); + setenv("WD_DIGEST_CTX_NUM", env, 1); + return 0; } @@ -434,7 +441,7 @@ uadk_crypto_pmd_info_get(struct rte_cryptodev *dev, if (dev_info != NULL) { dev_info->driver_id = dev->driver_id; dev_info->driver_name = dev->device->driver->name; - dev_info->max_nb_queue_pairs = 128; + dev_info->max_nb_queue_pairs = priv->max_nb_qpairs; /* No limit of number of sessions */ dev_info->sym.max_nb_sessions = 0; dev_info->feature_flags = dev->feature_flags; @@ -1015,6 +1022,7 @@ uadk_cryptodev_probe(struct rte_vdev_device *vdev) struct uadk_crypto_priv *priv; struct rte_cryptodev *dev; struct uacce_dev *udev; + const char *input_args; const char *name; udev = wd_get_accel_dev("cipher"); @@ -1030,6 +1038,9 @@ uadk_cryptodev_probe(struct rte_vdev_device *vdev) if (name == NULL) return -EINVAL; + input_args = rte_vdev_device_args(vdev); + rte_cryptodev_pmd_parse_input_args(&init_params, input_args); + dev = rte_cryptodev_pmd_create(name, &vdev->device, &init_params); if (dev == NULL) { UADK_LOG(ERR, "driver %s: create failed", init_params.name); @@ -1044,6 +1055,7 @@ uadk_cryptodev_probe(struct rte_vdev_device *vdev) RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO; priv = dev->data->dev_private; priv->version = version; + priv->max_nb_qpairs = init_params.max_nb_queue_pairs; rte_cryptodev_pmd_probing_finish(dev); @@ -1078,4 +1090,7 @@ static struct cryptodev_driver uadk_crypto_drv; RTE_PMD_REGISTER_VDEV(UADK_CRYPTO_DRIVER_NAME, uadk_crypto_pmd); RTE_PMD_REGISTER_CRYPTO_DRIVER(uadk_crypto_drv, uadk_crypto_pmd.driver, uadk_cryptodev_driver_id); +RTE_PMD_REGISTER_PARAM_STRING(UADK_CRYPTO_DRIVER_NAME, + "max_nb_queue_pairs=<int> " + "socket_id=<int>"); RTE_LOG_REGISTER_DEFAULT(uadk_crypto_logtype, INFO); diff --git a/drivers/crypto/uadk/uadk_crypto_pmd_private.h b/drivers/crypto/uadk/uadk_crypto_pmd_private.h index 9075f0f058..5a7dbff117 100644 --- a/drivers/crypto/uadk/uadk_crypto_pmd_private.h +++ b/drivers/crypto/uadk/uadk_crypto_pmd_private.h @@ -67,6 +67,7 @@ struct uadk_crypto_priv { bool env_cipher_init; bool env_auth_init; enum uadk_crypto_version version; + unsigned int max_nb_qpairs; } __rte_cache_aligned; extern int uadk_crypto_logtype; -- 2.39.2 (Apple Git-143)
1 year, 5 months
2
2
0
0
[PATCH V2 0/6] add init2 and dynamic load for digest/aead agls
by Hao Fang
compress/cipher/rsa/ecc already support the init2 and dynamic load, now add support for digest/aead algs. --- v1->v2: 1)fix bug for aead init testcase. 2)tinyfix for code style. --- Hao Fang (6): uadk/digest: introduce the init2 interface for digest uadk/aead: introduce the init2 interface for aead uadk/digest: adapt the module dynamic load for the digest algs uadk/aead: adadpt the module dynamic load for aead algs uadk/tools: add init2 test for digest algs uadk/tool: add init2 test for aead algs drv/hisi_sec.c | 105 +++++++++---- include/drv/wd_aead_drv.h | 26 ---- include/drv/wd_digest_drv.h | 26 ---- include/wd_aead.h | 28 ++++ include/wd_digest.h | 28 ++++ libwd_crypto.map | 6 + uadk_tool/test/test_sec.c | 249 ++++++++++++++++++++++++++++--- wd_aead.c | 288 +++++++++++++++++++++++++++--------- wd_digest.c | 286 ++++++++++++++++++++++++++--------- 9 files changed, 794 insertions(+), 248 deletions(-) -- 2.30.0
1 year, 5 months
1
6
0
0
uadk scheduler proposal review
by Zhangfei Gao
Hi, Pls help review uadk scheduler proposal More info 【腾讯文档】uadk scheduler proposal
https://docs.qq.com/doc/DRWxHeEFpVm9qVHJa
workers。","range":{"gcpBegin":409,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":409,"len":55},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":464,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":464,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":464,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"6u41ua"}},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"scheduler驱动接管所有ops,再根据policy,分发给workers。","range":{"gcpBegin":465,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":465,"len":40},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":505,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":505,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":505,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"6u41ua"}},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"最简单是直接转发给默认worker,当worker_num=1,忽略policy.","range":{"gcpBegin":506,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":506,"len":41},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":547,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":547,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":547,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"6u41ua"}},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"alloc_scheduler(default_worker)传默认worker, 后续再解析环境变量,config文件或者参数传递,增加其他worker。","range":{"gcpBegin":548,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":548,"len":78},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":626,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":626,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":626,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"6u41ua"}},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"加速器驱动不用主动注册到uadk,因为需要dlopen->probe,parse scheduler worker参数的时候再解析,类似qemu,","range":{"gcpBegin":627,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":627,"len":73},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":700,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":700,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":700,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"6u41ua"}},"pBdr":{"bottom":{}},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":701,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":701,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":701,"len":1},"property":{"pStyle":{"val":"ablt93"},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"before: app -> crypto/compress api -> ops -> driver ops","range":{"gcpBegin":702,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":702,"len":56},"property":{"b":{"val":false},"i":{"val":false},"strike":{"val":false},"spacing":{"val":0},"u":{"val":"STUnderline_none"},"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":758,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":758,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":758,"len":1},"property":{"numPr":{},"snapToGrid":{"val":true},"spacing":{"line":240}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"now: app -> crypto/compress api -> ops -> scheduler ops -> policy -> driver a ops","range":{"gcpBegin":759,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":759,"len":81},"property":{"b":{"val":false},"i":{"val":false},"strike":{"val":false},"spacing":{"val":0},"u":{"val":"STUnderline_none"},"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":840,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":840,"len":1},"property":{"b":{"val":false},"i":{"val":false},"strike":{"val":false},"spacing":{"val":0},"u":{"val":"STUnderline_none"},"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":840,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"\t\t\t\t\t\t\t\t\t\t\t\t\t -> driver b
ops","range":{"gcpBegin":841,"len":0}},&…
" data-version="3.0.0" data-hash="f4b78a37065c67af61f432e7019a7b2f"> Background uadk targets to support more accelerators, including cpu instruction (isa ce and isa sve) and other vendors. Required from Fanghao Goal 1. How to support these accelerators in the uadk framework, now uadk only support HiSilicon accelerator. 2. How to switch between these accelerators to get full performance. Proposal 大概的想法,参考dpdk 1. scheduler也是一个驱动,采用同样的驱动接口ops 2. 必选的驱动,buildin,简化动态加载 3. 该驱动权限更高,接管所有ops, 4. scheduler驱动可带多个workers, 即真正的加速器驱动,scheduler -> workers。 5. scheduler驱动接管所有ops,再根据policy,分发给workers。 6. 最简单是直接转发给默认worker,当worker_num=1,忽略policy. 7. alloc_scheduler(default_worker)传默认worker, 后续再解析环境变量,config文件或者参数传递,增加其他worker。 8. 加速器驱动不用主动注册到uadk,因为需要dlopen->probe,parse scheduler worker参数的时候再解析,类似qemu, before: app -> crypto/compress api -> ops -> driver ops now: app -> crypto/compress api -> ops -> scheduler ops -> policy -> driver a ops -> driver b ops adapter","range":{"gcpBegin":4,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":4,"len":21},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"SettingOperation","param":{"property":{"abstractNum":{"bgss1a":{"abstractNumId":"bgss1a","lvl":{"0":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%1."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":336,"hanging":336}},"rPr":{"rFonts":{}},"ilvl":0},"1":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%2."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":776,"hanging":336}},"ilvl":1,"rPr":{"rFonts":{}}},"2":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%3."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":1216,"hanging":336}},"ilvl":2,"rPr":{"rFonts":{}}},"3":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%4."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":1656,"hanging":336}},"ilvl":3,"rPr":{"rFonts":{}}},"4":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%5."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2096,"hanging":336}},"ilvl":4,"rPr":{"rFonts":{}}},"5":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%6."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2536,"hanging":336}},"ilvl":5,"rPr":{"rFonts":{}}},"6":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%7."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2976,"hanging":336}},"ilvl":6,"rPr":{"rFonts":{}}},"7":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%8."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":3416,"hanging":336}},"ilvl":7,"rPr":{"rFonts":{}}},"8":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%9."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":3856,"hanging":336}},"ilvl":8,"rPr":{"rFonts":{}}}},"lvl_dict_op":{"opType":"Update"}}},"abstractNum_dict_op":{"opType":"Update"},"num":{"uok3bl":{"abstractNumId":{"val":"bgss1a"},"numId":"uok3bl"}},"num_dict_op":{"opType":"Update"}},"settingType":"numbering"},"propertyType":"NumberingProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":25,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":25,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":25,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"uok3bl"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{},"ind":{},"jc":{"val":"STJcWml_left"}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"shengyang: request_ctx, 没有加速器会失败,用户程序忽略错误,用户程序看下。","range":{"gcpBegin":26,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":26,"len":49},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":75,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":75,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":75,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"uok3bl"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{},"ind":{},"jc":{"val":"STJcWml_left"}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"wd_xxx_init->alloc_sheduler时需要缺省worker, 如何定,直接hardcode,或者wd_xxx_init解析环境?","range":{"gcpBegin":76,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":76,"len":73},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":149,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":149,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":149,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"uok3bl"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{},"ind":{},"jc":{"val":"STJcWml_left"}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"alloc_scheduler woker[8] 简单用数组,还是链表之类,不限制个数","range":{"gcpBegin":150,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":150,"len":43},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":193,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":193,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":193,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"uok3bl"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{},"ind":{},"jc":{"val":"STJcWml_left"}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"worker相同是否要支持。","range":{"gcpBegin":194,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":194,"len":14},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":208,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":208,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":208,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"uok3bl"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{},"ind":{},"jc":{"val":"STJcWml_left"}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""}],"subStory":[],"srcGlobalPadId":"300000000$ElGxAiVojTrZ","copyStart":2292}" data-version="3.0.0" data-hash="6a0b89629c5baee33b29d681d3ded575"> TBD 1. longfang, 名字->adapter 2. shengyang: request_ctx, 没有加速器会失败,用户程序忽略错误,用户程序看下。 3. wd_xxx_init->alloc_sheduler时需要缺省worker, 如何定,直接hardcode,或者wd_xxx_init解析环境? 4. alloc_scheduler woker[8] 简单用数组,还是链表之类,不限制个数 5. worker相同是否要支持。 alloc_scheduler","range":{"gcpBegin":513,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":513,"len":30},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":543,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":543,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":543,"len":1},"property":{"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"ind":{"left":776,"leftChars_i":true},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":544,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":544,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":544,"len":1},"property":{"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"ind":{"left":776},"taskPr":{},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"为简化, worker 暂时只增加不减少,初始化的时候,parse条件,一步到位,","range":{"gcpBegin":545,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":545,"len":41},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":586,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":586,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":586,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"0tju7e"}},"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"先不考虑动态减少worker的情况。后面看情况","range":{"gcpBegin":587,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":587,"len":23},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":610,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":610,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":610,"len":1},"property":{"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"ind":{"left":0,"firstLineChars":200},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":611,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":611,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":611,"len":1},"property":{"pBdr":{},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"ind":{"left":776},"taskPr":{},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"为简化,暂时不提供动态修改参数的api,诸如threshold.","range":{"gcpBegin":612,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":612,"len":32},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":644,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":644,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":644,"len":1},"property":{"numPr":{"ilvl":{"val":0},"numId":{"val":"0tju7e"}},"snapToGrid":{"val":true},"spacing":{"before":0,"after":0,"line":240},"taskPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":645,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":645,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":645,"len":1},"property":{"pStyle":{"val":"ablt93"},"pBdr":{},"snapToGrid":{"val":false},"jc":{"val":"STJcWml_left"},"taskPr":{},"rPr":{},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"Example:","range":{"gcpBegin":646,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":646,"len":8},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":654,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":654,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":654,"len":1},"property":{"pStyle":{"val":"bdfjvo"},"pBdr":{},"taskPr":{},"rPr":{},"numPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"heading 3"},{"operationType":"InsertText","param":{"text":"参数传递","range":{"gcpBegin":655,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":655,"len":4},"property":{"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"SettingOperation","param":{"property":{"abstractNum":{"wvis5d":{"abstractNumId":"wvis5d","lvl":{"0":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%1."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":336,"hanging":336}},"rPr":{},"ilvl":0},"1":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%2."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":776,"hanging":336}},"ilvl":1},"2":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%3."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":1216,"hanging":336}},"ilvl":2},"3":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%4."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":1656,"hanging":336}},"ilvl":3},"4":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%5."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2096,"hanging":336}},"ilvl":4},"5":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%6."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2536,"hanging":336}},"ilvl":5},"6":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_decimal"},"lvlText":{"val":"%7."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":2976,"hanging":336}},"ilvl":6},"7":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerLetter"},"lvlText":{"val":"%8."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":3416,"hanging":336}},"ilvl":7},"8":{"start":{"val":1},"numFmt":{"val":"STNumberFormat_lowerRoman"},"lvlText":{"val":"%9."},"lvlJc":{"val":"STJcWml_left"},"pPr":{"ind":{"left":3856,"hanging":336}},"ilvl":8}},"lvl_dict_op":{"opType":"Update"}}},"abstractNum_dict_op":{"opType":"Update"},"num":{"nrbh2k":{"abstractNumId":{"val":"wvis5d"},"numId":"nrbh2k"}},"num_dict_op":{"opType":"Update"}},"settingType":"numbering"},"propertyType":"NumberingProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":659,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":659,"len":1},"property":{"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":659,"len":1},"property":{"pStyle":{"val":"ablt93"},"numPr":{"ilvl":{"val":0},"numId":{"val":"nrbh2k"}},"pBdr":{},"taskPr":{},"rPr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":"Normal"},{"operationType":"InsertText","param":{"text":"... --vdev \"crypto_aesni_mb0,name=aesni_mb_1\" --vdev \"crypto_aesni_mb1,name=aesni_mb_2\" --vdev \"crypto_scheduler,worker=aesni_mb_1,worker=aesni_mb_2\" ...","range":{"gcpBegin":660,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":660,"len":153},"property":{"rFonts":{"ascii":"SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", Courier, monospace","hAnsi":"SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", Courier, monospace","eastAsia":"SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", Courier, monospace","cs":"SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", Courier, monospace"},"i":{"val":false},"strike":{"val":false},"color":{"val":"888888"},"sz":{"val":180},"u":{"val":"STUnderline_none"},"shd":{"val":"STShd_clear","color":"STHexColorAuto_auto","fill":"F8F8F8"},"author":"p.144115215818243108"},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"InsertText","param":{"text":"\r","range":{"gcpBegin":813,"len":0}},"builtinStyleName":""},{"operationType":"ModifyRunProp","param":{"range":{"gcpBegin":813,"len":1},"property":{"rFonts":{"ascii":"SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", Courier, monospace","hAnsi":"SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", Courier, monospace","eastAsia":"SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", Courier, monospace","cs":"SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", Courier, monospace"},"i":{"val":false},"strike":{"val":false},"color":{"val":"888888"},"sz":{"val":180},"u":{"val":"STUnderline_none"},"shd":{"val":"STShd_clear","color":"STHexColorAuto_auto","fill":"F8F8F8"},"author":"p.144115215818243108","isPlaceholder":true},"mode":1},"propertyType":"RunProperty","builtinStyleName":""},{"operationType":"ModifyParagraphProp","param":{"range":{"gcpBegin":813,"len":1},"property":{"numPr":{},"pBdr":{}},"mode":1},"propertyType":"ParagraphProperty","builtinStyleName":""}],"subStory":[],"srcGlobalPadId":"300000000$ElGxAiVojTrZ","copyStart":4718}" data-version="3.0.0" data-hash="03cbb5d001222496f5029b26b3fd3d59"> Advantage no big uapi change required one api for setting para. (env, conf, para setting) Disadvantage / Limitation 1. 要求前提:所有驱动ops相同, comp, crypto,未来指令加速驱动? struct wd_alg_driver { const char *drv_name; const char *alg_name; ~ int (*init)(void *conf, void *priv); void (*exit)(void *priv); int (*send)(handle_t ctx, void *drv_msg); int (*recv)(handle_t ctx, void *drv_msg); int (*get_usage)(void *param); }; 2. 一种算法,一个scheduler? (可以多个woker/driver) wd_xxx_init -> alloc_scheduler 3. 为简化, worker 暂时只增加不减少,初始化的时候,parse条件,一步到位, 先不考虑动态减少worker的情况。后面看情况 4. 为简化,暂时不提供动态修改参数的api,诸如threshold. Example: 1. 参数传递 ... --vdev "crypto_aesni_mb0,name=aesni_mb_1" --vdev "crypto_aesni_mb1,name=aesni_mb_2" --vdev "crypto_scheduler,worker=aesni_mb_1,worker=aesni_mb_2" ...
1 year, 5 months
3
7
0
0
[PATCH] crypto/uadk: set queue pair in dev_configure
by Zhangfei Gao
By default uadk only alloc two queues for each algorithm, which will impact performance. Set queue pair number as required in dev_configure. By default the max queue pair number is 8, which can be modified via para: max_nb_queue_pairs Example: sudo dpdk-test-crypto-perf -l 0-10 --vdev crypto_uadk,max_nb_queue_pairs=10 -- --devtype crypto_uadk --optype cipher-only --buffer-sz 8192 lcore id Buf Size Burst Size Gbps Cycles/Buf 3 8192 32 7.5226 871.19 7 8192 32 7.5225 871.20 1 8192 32 7.5225 871.20 4 8192 32 7.5224 871.21 5 8192 32 7.5224 871.21 10 8192 32 7.5223 871.22 9 8192 32 7.5223 871.23 2 8192 32 7.5222 871.23 8 8192 32 7.5222 871.23 6 8192 32 7.5218 871.28 Signed-off-by: Zhangfei Gao <zhangfei.gao(a)linaro.org> --- drivers/crypto/uadk/uadk_crypto_pmd.c | 19 +++++++++++++++++-- drivers/crypto/uadk/uadk_crypto_pmd_private.h | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/uadk/uadk_crypto_pmd.c b/drivers/crypto/uadk/uadk_crypto_pmd.c index 4f729e0f07..34aae99342 100644 --- a/drivers/crypto/uadk/uadk_crypto_pmd.c +++ b/drivers/crypto/uadk/uadk_crypto_pmd.c @@ -357,8 +357,15 @@ static const struct rte_cryptodev_capabilities uadk_crypto_v2_capabilities[] = { /* Configure device */ static int uadk_crypto_pmd_config(struct rte_cryptodev *dev __rte_unused, - struct rte_cryptodev_config *config __rte_unused) + struct rte_cryptodev_config *config) { + char env[128]; + + /* set queue pairs num via env */ + sprintf(env, "sync:%d@0", config->nb_queue_pairs); + setenv("WD_CIPHER_CTX_NUM", env, 1); + setenv("WD_DIGEST_CTX_NUM", env, 1); + return 0; } @@ -434,7 +441,7 @@ uadk_crypto_pmd_info_get(struct rte_cryptodev *dev, if (dev_info != NULL) { dev_info->driver_id = dev->driver_id; dev_info->driver_name = dev->device->driver->name; - dev_info->max_nb_queue_pairs = 128; + dev_info->max_nb_queue_pairs = priv->max_nb_qpairs; /* No limit of number of sessions */ dev_info->sym.max_nb_sessions = 0; dev_info->feature_flags = dev->feature_flags; @@ -1015,6 +1022,7 @@ uadk_cryptodev_probe(struct rte_vdev_device *vdev) struct uadk_crypto_priv *priv; struct rte_cryptodev *dev; struct uacce_dev *udev; + const char *input_args; const char *name; udev = wd_get_accel_dev("cipher"); @@ -1030,6 +1038,9 @@ uadk_cryptodev_probe(struct rte_vdev_device *vdev) if (name == NULL) return -EINVAL; + input_args = rte_vdev_device_args(vdev); + rte_cryptodev_pmd_parse_input_args(&init_params, input_args); + dev = rte_cryptodev_pmd_create(name, &vdev->device, &init_params); if (dev == NULL) { UADK_LOG(ERR, "driver %s: create failed", init_params.name); @@ -1044,6 +1055,7 @@ uadk_cryptodev_probe(struct rte_vdev_device *vdev) RTE_CRYPTODEV_FF_SYMMETRIC_CRYPTO; priv = dev->data->dev_private; priv->version = version; + priv->max_nb_qpairs = init_params.max_nb_queue_pairs; rte_cryptodev_pmd_probing_finish(dev); @@ -1078,4 +1090,7 @@ static struct cryptodev_driver uadk_crypto_drv; RTE_PMD_REGISTER_VDEV(UADK_CRYPTO_DRIVER_NAME, uadk_crypto_pmd); RTE_PMD_REGISTER_CRYPTO_DRIVER(uadk_crypto_drv, uadk_crypto_pmd.driver, uadk_cryptodev_driver_id); +RTE_PMD_REGISTER_PARAM_STRING(UADK_CRYPTO_DRIVER_NAME, + "max_nb_queue_pairs=<int> " + "socket_id=<int>"); RTE_LOG_REGISTER_DEFAULT(uadk_crypto_logtype, INFO); diff --git a/drivers/crypto/uadk/uadk_crypto_pmd_private.h b/drivers/crypto/uadk/uadk_crypto_pmd_private.h index 9075f0f058..5a7dbff117 100644 --- a/drivers/crypto/uadk/uadk_crypto_pmd_private.h +++ b/drivers/crypto/uadk/uadk_crypto_pmd_private.h @@ -67,6 +67,7 @@ struct uadk_crypto_priv { bool env_cipher_init; bool env_auth_init; enum uadk_crypto_version version; + unsigned int max_nb_qpairs; } __rte_cache_aligned; extern int uadk_crypto_logtype; -- 2.39.2 (Apple Git-143)
1 year, 5 months
1
0
0
0
[PATCH 0/6] add init2 and dynamic load for digest/aead agls
by Hao Fang
compress/cipher/rsa/ecc already support the init2 and dynamic load, now add support for digest/aead algs. Hao Fang (6): uadk/digest: introduce the init2 interface for digest uadk/aead: introduce the init2 interface for aead uadk/digest: adapt the module dynamic load for the digest algs uadk/aead: adadpt the module dynamic load for aead algs uadk/tools: add init2 test for digest algs uadk/tool: add init2 test for aead algs drv/hisi_sec.c | 105 +++++++++---- include/drv/wd_aead_drv.h | 26 ---- include/drv/wd_digest_drv.h | 26 ---- include/wd_aead.h | 28 ++++ include/wd_digest.h | 28 ++++ libwd_crypto.map | 6 + uadk_tool/test/test_sec.c | 249 ++++++++++++++++++++++++++++--- wd_aead.c | 288 +++++++++++++++++++++++++++--------- wd_digest.c | 286 ++++++++++++++++++++++++++--------- 9 files changed, 794 insertions(+), 248 deletions(-) -- 2.30.0
1 year, 5 months
1
6
0
0
← Newer
1
Older →
Jump to page:
1
Results per page:
10
25
50
100
200