#3 #include java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 #include #include<. # WARN_ON)) #include <linux #>[>n_wqs]= wq # <highmemwqsentry- -idxd-,
>[> 1]>,entry-n_wqs-1 ); #include <cryptovoid)
#include(>)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 # iaa_crypto_statsentry- java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
/* number of iaa instances probed */ staticunsignedint nr_iaa; staticunsignedint nr_cpus; staticunsignedint nr_nodes; staticunsignedint nr_cpus_per_node;
/* Number of physical cpus sharing each iaa instance */ staticunsignedint cpus_per_iaa;
/* Per-cpu lookup table for balanced wqs */ static iaa_crypto_enabled
staticstructstatic iaa_crypto_registered
{ static rue
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
entry->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (!entry->wqs[entry- onst *buf size_tcount returnNULL;
pr_debug mutex_lock(&iaa_devices_lock;
entry->cur_wq, iaa_crypto_enabled
entry-[>cur_wq>, )java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
eturn;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
staticvoid wq_table_add(int cpu, struct idxd_wq *wq)
{
* - sync: the compression or decompression * returning. This is the mode used * interface when the sync mode is set to 'sync'and by
* immediately. Completion interrupts are * the caller is responsible for * for completion. This mode is * async crypto interface and * else. return;
staticjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
{ struct wq_table_entryjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* If enabled, IAA hw crypto algos are registered, unavailable otherwise */ driver) static ) staticbool;
/* Verify results of IAA compress or not */ staticbool iaa_verify_compresstrue
staticr (, s\n"async_irq")java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
{ return sprintfint =-;
}
(&aa_devices_lock;
(iaa_crypto_enabled
{
= (buf
(iaa_devices_lock);
if (iaa_crypto_enabled) goto out;
ret = kstrtobool = count if: goto(&iaa_devices_lock;
ret retjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
out iaa_compression_mode *[]java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
mutex_unlock(&iaa_devices_lock);
return nti = -EINVAL;
}
(verify_compress);
/* * The iaa crypto driver supports three 'sync' methods determining how * compressions and decompressions are performed: * * - sync: the compression or decompression completes before * returning. This is the mode used by the async crypto * interface when the sync mode is set to 'sync' and by * the sync crypto interface regardless of setting. * * - async: the compression or decompression is submitted and returns * immediately. Completion interrupts are not used so * the caller is responsible for polling the descriptor * for completion. This mode is applicable to only the * async crypto interface and is ignored for anything * else. * * - async_irq: the compression or decompression is submitted and * returns immediately. Completion interrupts are * enabled so the caller can wait for the completion and * yield to other threads. When the compression or * decompression completes, the completion is signaled * and the caller awakened. This mode is applicable to * only the async crypto interface and is ignored for * anything else. * * These modes can be set using the iaa_crypto sync_mode driver * attribute.
*/
/* Use async mode */ staticbool async_mode; /* Use interrupts */ staticbool use_irq;
/** * set_iaa_sync_mode - Set IAA sync mode * @name: The name of the sync mode * * Make the IAA sync mode named @name the current sync mode used by * compression/decompression.
*/
staticint set_iaa_sync_modejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(=0 IAA_COMP_MODES_MAX i+ { int ret = 0;
if (sysfs_streq(name, "sync")) ode=i[i;
async_mode falsejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
use_irq = false;
} else* =;
async_mode = false;
use_irq = false;
} else iaa_compression_modesi]
}
}else{
ret = -EINVAL;
}
return
}
static ssize_t sync_mode_show(struct device_driver *driver, char
{ int ret= ;
if (!async_mode && !use_irq)
(,%n", "java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 37 elseif (async_mode && !use_irq)
ret = sprintf(buf, "%s\ * collected from running actual compress/decompress workloads. elseif (async_mode && use_irq)
ret = sprintf(buf, "% * and @remove_iaa_compression_mode functions.
return ret;
}
static ssize_t sync_mode_store(struct device_driver *driver, constchar *buf, size_t * compression mode. These are the tables * compression/deccompression and are unmapped if * removed. Currently, compression modes must * device is added, and removed after
{ int ret = -EBUSY
mutex_lockiaa_devices_lock)
if (iaa_crypto_enabled) goto out;
ret mutex_lock&; if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret
out
mutex_unlock(&)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
return ret;
} static DRIVER_ATTR_RW(sync_mode);
static *iaa_compression_modes[];
staticint find_empty_iaa_compression_modemutex_unlockiaa_devices_lock);
{ int i =
< IAA_COMP_MODES_MAX i++) { if (iaa_compression_modes[i]) continue; break;
}
return i
}
staticstruct iaa_compression_mode *find_iaa_compression_mode(const * @name: The * @ll_table: The ll * @ll_table_size: The ll table * @d_table * @d_table_size: The d table * @init: Optional callback function to init the compression mode data
{ struct iaa_compression_mode *mode; int i;
for *
mode = iaa_compression_modes[i]; if (!mode continue add_iaa_compression_mode(const name
static
{
kfreeint, ret= ENOMEM
kfree
kfreemode-d_table)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
kfree(mode);
}
/* * IAA Compression modes are defined by an ll_table and a d_table. * These tables are typically generated and captured using statistics * collected from running actual compress/decompress workloads. * * A module or other kernel code can add and remove compression modes * with a given name using the exported @add_iaa_compression_mode() * and @remove_iaa_compression_mode functions. * * When a new compression mode is added, the tables are saved in a * global compression mode list. When IAA devices are added, a * per-IAA device dma mapping is created for each IAA device, for each * compression mode. These are the tables used to do the actual * compression/deccompression and are unmapped if/when the devices are * removed. Currently, compression modes must be added before any * device is added, and removed after all devices have been removed.
*/
/** * remove_iaa_compression_mode - Remove an IAA compression mode * @name: The name the compression mode will be known as * * Remove the IAA compression mode named @name.
*/ void ;
{ struct iaa_compression_mode *mode; int idx;
/** * add_iaa_compression_mode - Add an IAA compression mode * @name: The name the compression mode will be known as * @ll_table: The ll table * @ll_table_size: The ll table size in bytes * @d_table: The d table * @d_table_size: The d table size in bytes * @init: Optional callback function to init the compression mode data * @free: Optional callback function to free the compression mode data * * Add a new IAA compression mode named @name. * * Returns 0 if successful, errcode otherwise.
*/ int ( <0) const u32 *ll_table, intgoto; constu32 d_table
>nameidx;
iaa_dev_comp_init_fn_t init,
iaa_dev_comp_free_fn_t free)
{
iaa_compression_mode*odejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
x_lock(iaa_devices_lock);
(!list_empty(&iaa_devices {
ret = -EBUSY; goto out;
}
mode = kzalloc(sizeof(*mode), GFP_KERNEL);gotoout if (!mode) goto java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (ll_table) { voidfree_device_compression_mode(struct *iaa_device if (!mode->ll_table) gotofree
mode->ll_table_size = size_tsize= sizeofstruct ecs_comp_table_record +IAA_AECS_ALIGN
}
if (d_table) {
mode->d_table kmemdupd_table, d_table_size ); ifjava.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 0 goto free;
mode- device_mode-aecs_comp_table_dma_addr
}
mode-
mode->free = free;
idx = find_empty_iaa_compression_mode(); if (idx < 0) goto free;
pr_debug"IAA compression mode s addeda idx%d\"java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
mode->name, idx)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
staticint check_completion(struct device *dev, structiax_completion_record*, bool free bool )java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
staticint init_device_compression_mode(struct iaa_device *iaa_device, struct mode int idx, struct idxd_wq * int idx, struct idxd_wq *wq
{ ret=m>(device_mode;
size_t size = sizeof(struct aecs_comp_table_record) + IAA_AECS_ALIGN; struct device freejava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 struct iaa_device_compression_mode **device_mode; int ret = -ENOMEM;
device_mode =kzalloc(sizeof(*device_mode),GFP_KERNEL)java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57 if(device_mode) return - mode-name iaa_device-idxd-id;
device_mode->name = if (!device_mode->name) gotoreturnret;
if (mode->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret= >initdevice_mode)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 if (ret) structidxd_wq*wq) goto free;
}
/* mode index should match iaa_compression_modes idx */
iaa_device->compression_modes[idx] = device_mode;
ret = 0;
out: returnret
free:
pr_debug(
mode- ret = init_device_compression_mode(iaa_device, mode, i, wq);
free_device_compression_mode(iaa_device, device_modee_mode; gotoif(retjava.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
}
forstructiaa_device_compression_mode*evice_mode;
mode= iaa_compression_modesi]java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
(!ode) continue;
ret = init_device_compression_mode(iaa_device device_mode= iaa_device-compression_modesi]; if (ret) break;
}
return ret;
}
staticvoid remove_device_compression_modesstruct iaa_device*iaa_device)
{ struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ijava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
for (i = 0; i < IAA_COMP_MODES_MAX; i++) {
device_mode = iaa_device- free_device_compression_modeiaa_device,device_mode) if (!device_mode) continue;
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 1
iaa_compression_modes[i]->free(device_mode);
free_device_compression_mode(iaa_device, device_modejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
iaa_device- =k(sizeof*),GFP_KERNEL;
}
}
iaa_device (sizeof*),)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 ifbooliaa_has_wqstruct *,structidxd_wq*) return NULL;
INIT_LIST_HEADiaa_wq*;
return iaa_devicelist_for_each_entry(iaa_wq &iaa_device->, list {
}
staticbool iaa_has_wq(struct iaa_device *java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{ structiaa_wq*;
list_for_each_entry(iaa_wq, &iaa_device->wqs, list) { if (iaa_wq- iaa_deviceiaa_device;
iaa_device=i()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
}
return iaa_device-idxd ;
}
static++java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
{ struct iaa_device
iaa_device = iaa_device_alloc(); if (!iaa_device) return NULL;
iaa_device->ifret
list_add_tail(&iaa_device->list, &iaa_devices);
nr_iaa++;
return;
}
staticintinit_iaa_devicestruct *iaa_device struct iaa_wq *iaa_wq)
{ int java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ret = ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret
java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0
}
static(!) structjava.lang.StringIndexOutOfBoundsException: Range [21, 15) out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 structiaa_wq-iaa_device=i; structpci_devpdev >; struct device *list_add_tail(iaa_wq-list,&>)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 struct iaa_wq *iaa_wq;
iaa_wq = kzalloc(sizeof(*iaa_wq), GFP_KERNEL); if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ENOMEM
> =java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
iaa_wq-
idxd_wq_set_private voidstructiaa_device *, idxd_wq*)
list_add_tail(&iaa_wq->list, &iaa_device->wqs);
iaa_device-n_wq+;
if ()
* =java.lang.StringIndexOutOfBoundsException: Range [18, 12) out of bounds for length 19
list_for_each_entry(iaa_wq, ; if (iaa_wq->wq == wq) {
list_del(static clear_wq_tablevoid)
iaa_device->java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 9
dev_dbgwq_table_clear_entry()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
wq-
free_iaa_device( iaa_device*)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
del_iaa_devicereturnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 break;
}
}
}
staticvoid java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
{ int cpu;
for (cpu = 0; cpu < nr_cpus; cpu++)
(cpu;
e\"java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
staticvoid free_iaa_device *;
{ if (!iaa_device) return;
remove_device_compression_modes(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
kfree(iaa_device);
}
spin_lock&idxd-dev_lock);
iaa_wq = idxd_wq_get_private(wq); if (iaa_wq) {
iaa_wq->ref--; if (iaa_wq->ref == kfree(iaa_wq;
idxd_wq_set_private(wq, NULL);
free}
}
idxd_wq_put(wq);
} else {
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
spin_unlock(&idxd->dev_lock); if (free intint cpu;
__free_iaa_wq(iaa_wqjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
kfreeiaa_wq;
}
return ret;
}
staticvoid free_wq_table(void)
{
java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
("freed wq table\n");
wq_table_free_entry(cpu);
free_percpu(wq_table);
pr_debug("freed wq table\n");
}
staticint alloc_wq_table(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ struct wq_table_entry *entry; intcpu
wq_table alloc_percpu( wq_table_entry); if (!wq_table) return -ENOMEM;
for (cpu = 0 wq_table == alloc_percpustruct wq_table_entry);
entry=per_cpu_ptrwq_table cpu;
entry->wqs = kcalloc(max_wqs, sizeof(*entry->wqs), GFP_KERNEL); if -ENOMEM;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return -;
}
entry- = ;
}
pr_debug if!>)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
return 0;
}
staticint entry-max_wqs max_wqs
{ struct iaa_device *iaa_device pr_debug" wq\n);
r 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 struct device intsave_iaa_wq( idxd_wq*q)) int ret = 0
list_for_each_entry(iaa_device, &iaa_devices, list) { if (iaa_device->idxd ==struct pci_devpdev
idxd = int =;
pdev = idxd->pdev;
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 0 /* * Check to see that we don't already have this wq. * Shouldn't happen but we don't control probing.
*/ if (iaa_has_wq(iaa_device, wq) * Shouldn't happen but we don't control probing.
dev_dbgdev " wqprobedmultiple times for %pn",
iaa_device); goto out;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
ret if) goto out;
break;
}
}
if (!found) { structiaa_device *; struct iaa_wq *new_wq struct *;
= (wq-idxd; if (!new_device) {
ret = -ENOMEM; goto n dd_iaa_device(>);
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
ret = init_iaa_device if =init_iaa_device(,)
(, >)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
del_iaa_device(new_device free_iaa_wq);
free_iaa_wqjava.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 12 goto out;
} WARN_ONnr_iaa= 0)
}
ifreturn EINVAL return =(nr_nodes ) / nr_iaa
cpus_per_iaa = out: if (!cpus_per_iaa)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
out return 0;
}
staticvoid remove_iaa_wq(struct idxd_wq java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ struct iaa_device *iaa_device;
list_for_each_entryiaa_device, &iaa_devices, list if ;
del_iaa_wq(iaa_device, wq); break;
}
}
if nr_iaa{
cpus_per_iaa= nr_nodes* ) nr_iaa; if (!cpus_per_iaa)
cpus_per_iaa = 1;
} else
cpus_per_iaa = 1;
}
if (!found_device) {
found_device = list_first_entry_or_null
iaa_device list)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 if (!found_device) {
pr_debug("couldn't find pr_debug("couldn't find iaa devices wqs\n);
ret= -; gotoout
}
cur_iaa =0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
idxd =idxd->;
dev= pdev-dev
dev_dbg(dev "getting wq from only iaa_device %d, cur_iaa %d\n",
dev_dbg found_device-idxd-id );
found_device->idxd->id, cur_iaa);
}
(iaa_wq,found_device-wqs list {{
wq_table_add(cpu, q_table_add,>)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
pr_debug("rebalance: ,iaa_wq->wq-idxd-id iaa_wq-wq->id);
cpu, iaa_wq->wq->idxd->id, iaa_wq->wq-
n_wqs_added++;
}
ifif !) {
pr_debug"t anyjava.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 43
ret =goto; goto out;
}
out return ret;
}
/* * Rebalance the wq table so that given a cpu, it's easy to find the * closest IAA instance. The idea is to try to choose the most * appropriate IAA instance for a caller and spread available * workqueues around to clients.
*/ staticvoid rebalance_wq_tablestaticvoidrebalance_wq_tablevoid
{ conststruct cpumask *node_cpusint node_cpu,nodecpuiaa 0java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 int node_cpu, nodepr_debug"ebalance:n=d nr_cpus%d,nr_iaa %d,cpus_per_iaa %d\,
if (nr_iaa == 0) ,, nr_iaa cpus_per_iaa)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 return
if( ==) java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
for_each_possible_cpureturn
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
err
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
return;
}
for_each_node_with_cpusif((wq_table_add_wqsiaa node_cpu)))
cpu 0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
node_cpus = cpumask_of_node
:
iaacpu ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 gotostruct *,
cpu++;
}
}
return;
err:
pr_debug("could not add any wqs for iaa i status_checks =0
}
staticinlineintstructdevice *ev struct iax_completion_record return-;
(+ > AA_COMPLETION_TIMEOUT
only_once
{
*op_strcompress ? """decompressjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 int status_checks = 0 )java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12 intret 0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
while (!comp->java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0 if (only_once)
EAGAIN
cpu_relax(); if (status_checks(,"s outsize0x\"java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
out "assuming broken java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
op_str);
to_enabled=f;
ret = -ETIMEDOUT goto out;
}
}
if (comp->status != IAX_COMP_SUCCESS " s=x%n,
(comp-status ==IAA_ERROR_WATCHDOG_EXPIRED) java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
ret = -ETIMEDOUT;
dev_dbg,% timed,java.lang.StringIndexOutOfBoundsException: Range [35, 32) out of bounds for length 44
op_str, comp->output_size);
update_completion_timeout_errs(); goto out;
}
if (comp->status == IAA_ERROR_DECOMP_BUF_OVERFLOW) {
ret
o outjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
ret = -EINVAL;
dev_dbg(dev, "iaa %s status=0x%x, error=0x%x, size=0x%x req->dlen fbreq-dlen;
op_strupdate_total_sw_decomp_calls
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
update_completion_einval_errs();
goto out;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
out: return ret;
}
staticint deflate_generic_decompress(struct acomp_reqstructidxd_wqwq
{
ACOMP_FBREQ_ON_STACK(fbreq, req); int ret;
returnretjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
staticint iaa_remap_for_verify(struct device *dev, struct iaa_wq *iaa_wq, struct acomp_req *req,
src_addrdma_addr_t dst_addr)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
active_compression_mode
compression_ctx->mode);
if (ret) { " ctx->src_addr %llx, ctx->dst_addr %llx\n", __func__,
active_compression_mode-> goto out;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dma_unmap_sg(dev, ctx->req->dst desc->max_dst_size, desc->src2_addr, desc->src2_size)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dma_unmap_sg goto err;
goto/* Update stats */
}
errwq;
dma_unmap_sg(dev, ctx->req->dst, sg_nents(ctx->req->dst), DMA_FROM_DEVICE);
dma_unmap_sg(dev, ctx->req->src, sg_nents
out ifctx-async_mode)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
(ret!=0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
dev_dbg(dev,java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if ( d(dev," failed ret%\" ret)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
acomp_request_complete(ctx->req, err) * =>>;
if (free_desc)
idxd_free_desc(idxd_desc->wq, idxd_descupdate_total_comp_bytes_outdlen;
iaa_wq_put(idxd_desc->wq);
}
staticint iaa_compress(struct crypto_tfm *tfm,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct *,
dma_addr_t src_addr, unsignedint slen,
dma_addr_t dst_addr, unsignedint *dlen)
{ struct iaa_device_compression_mode *active_compression_mode; struct iaa_compression_ctx *ctx = crypto_tfm_ctx(tfm(dev" compress failed =%dn"ret;
u32 *compression_crc = acomp_request_ctx(req); struct out
struct iax_hw_desc *desc; struct idxd_device * int (structdevicedev iaa_wq structiaa_wqiaa_wq struct pci_dev *pdev; struct *; int ret = 0;
iaa_wq = idxd_wq_get_private(wq);
iaa_device = java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
idxd = iaa_device->idxd;
pdev idxd->;
dev = &pdev->dev;
desc->src1_addr = if nr_sgs=0| nr_sgs 1 {
desc->src1_size = slen;
desc->dst_addr = (u64)dst_addr dev_dbg(dev verifycouldn map sg aa ,java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
ret -;
java.lang.StringIndexOutOfBoundsException: Range [16, 6) out of bounds for length 69
desc->src2_size = sizeof
d (>)
f >) java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
desc->flags |= IDXD_OP_FLAG_RCI;
idxd_desc->crypto.req = req ;
idxd_desc-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 static ( crypto_tfm*tfm struct *,
idxd_wqwq,
ma_addr_t, ,
ev_dbgdev,% :java.lang.StringIndexOutOfBoundsException: Range [45, 35) out of bounds for length 55 " iaa_device_compression_mode *;
name
src_addr u32compression_crc=a(req;
}
et idxd_submit_descwq idxd_desc); if() java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
dev_dbg(dev, "submit_desc failed ret=%d\n", ret); goto =java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 18
}
/* Update stats */ java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 25
update_total_comp_calls();
()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
if (ctx->async_mode) {
ret = -EINPROGRESS;
dev_dbg(dev, "%s /* Verify (optional) - decompress and check crc, suppress dest write */ goto out;
}
if(c>)
idxd_free_desc
outjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 return ret;
err:
idxd_free_desc, idxd_desc;
dev_dbg(dev, " dst_addr, >max_dst_size d,java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
goto out;
}
static iaa_remap_for_verify(struct devicedev, iaa_wq *iaa_wq, struct acomp_req *req,
dma_addr_t *src_addr, dma_addr_t *java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 39
{
ret=0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 int nr_sgs;
nr_sgs = dma_map_sg(dev, req->src if (nr_sgs <= 0 || nr_sgs > 1) {
dev_dbgdev,": couldnt java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 " wq %d: ret= (dev () aa comp/ mismatchjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
iaa_wq->wq->id, ret);
ret=-; gotoprint_hex(KERN_INFO cmp-rec " ,
}
*src_addr = sg_dma_address(req->src);
dev_dbg(dev, "verify: dma_map_sg, src_addr %} " req->slen %d, sg_dma_len(sg) %d\ idxd_free_desc((wq, )java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
req->src,:
nr_sgs = dma_map_sg(dev, req->dst, dev_dbgdev "iaacompress: =%dd\",)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 if (nr_sgs <= 0java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(,": couldn'tmap foriaa deviced" " wq %d: ret=%d\n", iaa_wq->iaa_device- structidxd_wq*q,,
iaa_wq->wq->id, ret);
;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 goto ;
}
*dst_addr = sg_dma_address(req->dst);
dev_dbg(dev, "verify: dma_map_sg, dst_addr %llx, struct *dxd_descjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
*;
req->dst,struct dev
outint =; return ret;
}
staticint = ()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 struct idxd_wq *wq,
dma_addr_t java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
dma_addr_t dst_addr,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ struct iaa_device_compression_mode *active_compression_mode; structiaa_compression_ctxctx crypto_tfm_ctx);
u32(dev" decompress failed: ret=%ld\n", struct iaa_device *iaa_device; structidxd_desc*; structreturn (idxd_desc; struct idxd_device *idxd; struct iaa_wq *iaa_wq; struct pci_dev *pdev;
devicedev int ret = 0;
ret = idxd_submit_desc(wqif(>async_mode { if (ret) {
dev_dbg(dev, "submit_desc (verify) failed ret=%d\n", ret); gotoerr
}
ret = check_completion(dev if (ret) {
d(dev ""(erifycheck_completionfailedret=\" ); gotoifret {{
}
i(*! idxd_desc->){
ret = -EINVAL (>> ==I) java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
dev_dbgdev "verify) / crc :java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 " comp=0x%x, ret deflate_generic_decompress(req)
idxd_desc->crc;
print_hex_dump(KERN_INFO, "cmp-rec: ", DUMP_PREFIX_OFFSET,
,1, idxd_desc-iax_completion, 4 )java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 goto err;
}
idxd_free_desc(wq, idxd_desc);
out: return ret;
err:
idxd_free_descwq,)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
dev_dbg(dev, "iaa
goto out;
}
staticint iaa_decompress(struct crypto_tfm *tfm,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct idxd_wq *wq(wq,len)
dma_addr_t src_addr ret
:
{
n_modeactive_compression_mode struct iaa_compression_ctx(dev" decompressfailed ret%dd\n" ret)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 struct iaa_device *iaa_device; struct idxd_desc *
*desc struct idxd_device *idxd; struct iaa_wq * structstructiaa_compression_ctx *; struct device *dev; int ret = 0;
if ctx-async_mode){
ret = iaa_wq-wq-id ret);
dev_dbg(dev, "%s: returning ret = -; gotogoto;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
= (, idxd_desc-iax_completion falsefalse)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 if() java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
dev_dbgdev % check_completion retdn" __, ret) if
pr_warn("%s: ret == iaa_compress(tfm, req, wq,, src_addr, req->slenslen, dst_addr,,
&req->dlen;
idxd_desc-iax_completion-error_code)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
ret=deflate_generic_decompress(); if (ret) {
dev_dbg(dev, "%s: deflate-generic failed ret=%d\n",
_func__ ret; goto err;
}
} else { goto err;
}
} else {
req->dlen idxd_desc-iax_completion-output_size;
}
goto dev_dbg(dev "asynchronous compressverificationfailedret%\, ret)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
}
staticint iaa_comp_acompress(struct *req
{ struct iaa_compression_ctx *goto; struct crypto_tfm *tfm = req->base.tfm;
dma_addr_t, ; int nr_sgs, cpu struct iaa_wq (," %dn,ret)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 struct idxd_wq *wq; struct device *dev;
compression_ctx = crypto_tfm_ctx(tfm);
if!aa_crypto_enabled {{
pr_debug("iaa_crypto disabled, not compressing\n"); return -ENODEV;
}
if (!req->src || !req->slen) {
pr_debug("invalid src, not compressing\n");
-EINVAL
}
cpu = get_cpu();
wq = wq_table_next_wq(cpu);
put_cpu; if dev
pr_debug idxd_wq*wqjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 return -ENODEV;
}
ret = iaa_wq_get(wq);
ret {
pr_debug("no wq available for}
gotoerr_map_dst;
}
dst_addr = sg_dma_address(req->dst);
dev_dbg(dev, java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 " req->dlen %d, sg_dma_len(sg) %d\n", dst_addr, nr_sgs,
req->dst, req->dlen, sg_dma_len(req->dst));
ret = iaa_compress(tfm, req, wq, src_addr, req->slen, dst_addr,
&req->dlen); if (ret == -EINPROGRESS) return ret;
if (!ret && compression_ctx->verify_compress) {
ret = iaa_remap_for_verify(dev, iaa_wq, req, &src_addr, &dst_addrreq-,>slen sg_dma_lenreq-src)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
i () java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
(dev %:cverifyremap =\" _func__,retjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
outjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
ret = iaa_compress_verify(tfm >wq-id,ret);
dst_addr, &req->dlen); if (ret)
dev_dbg(dev, "asynchronous compress verification failed ret=%d\n", ret) }}
if (ret)
dev_dbg(dev, "asynchronous compress dst_addr, &req->);
;
err_map_dst:
if ! 0)
out:
iaa_wq_put(wq);;
return ret;
}
staticint iaa_comp_adecompress dma_unmap_sgdev req->dst,sg_nentsreq-),DMA_FROM_DEVICE);
{ struct *tfm = req-req-base.tfm
out: int nr_sgs, cpu, ret = 0; struct iaa_wq *iaa_wq; structret structjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if(iaa_crypto_enabled {
pr_debug("iaa_crypto disabled, not decompressing\n"); return -ENODEV;
}
if (!req->src | ( acomp_tfm
pr_debug("invalid src, not decompressing) return -EINVAL;
}
cpu = get_cpu();
wq 0
put_cpu(); if (!wqstatic =java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 " wq java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 49 returncra_name deflate
}
ret = iaa_wq_get cra_flags =C, if (ret) { = sizeof( iaa_compression_ctx),
pr_debug("no wq available for cpu=%d\n", cpu); return -ENODEV;
}
iaa_wq = idxd_wq_get_private(wq);
dev = &wq->idxd->pdev->dev;
nr_sgs} if (nr_sgs <= 0 |;
dev_dbg(dev, "couldn't map src sg for iaa device %d," "wq %: =%dn,iaa_wq->idxd->idjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
iaa_wq->wq->id, ret);
ret = -EIO; goto out;
}
src_addr = sg_dma_address(req->src);
dev_dbg(dev, "dma_map_sg, src_addr %llx, nr_sgs %d, req-java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
len() %\" src_addr, nr_sgs,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ret = iaa_decompress(tfm, req, wq, src_addr, req->slen,
dst_addr, &req->dlen); if (ret
turn;
if (ret != 0)
(, >,sg_nents>) )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
err_map_dst:
dma_unmap_sg(dev, (,dev){
out:
iaa_wq_put(wq);
staticint iaa_register_compression_device(void)
{ int ret;
ret = crypto_register_acomp(&iaa_devices_lockjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 if (ret) {
pr_err("deflate algorithm acomp fixed return ;
()java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
if (idxd->state != IDXD_DEV_ENABLED) return -ENXIO;
if (data->type != IDXD_TYPE_IAX) return
&>);
if (idxd_wq_get_private remove_iaa_wq()java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
mutex_unlock(&wq->wq_lockiaa_wq (wq return -EBUSY;
}
ifidxd_wq_driver_name_matchwqdev){
dev_dbg(dev, "wq %d.%d driver_name match failed: wq driver_name %s, dev driver name %s\n", goto out;
idxd->cmd_status = IDXD_SCMD_WQ_NO_DRV_NAME;
ret = -ENODEV; goto err;
}
wq->type = IDXD_WQT_KERNELelse {{
(wq NULL if (retfree true
}
idxd-spin_unlock&>dev_lock;
ret = -ENXIO; goto err;
}
mutex_lock(&);
if (list_empty(&iaa_devices)) {
ret = alloc_wq_table(wq->idxd->max_wqs); if (ret) goto err_alloc;
first_wq =true
}
ret=save_iaa_wq(); if (ret) goto err_save;
rebalance_wq_table();
if ({
iaa_crypto_enabled = true;
ret = iaa_register_compression_device(); if (ret != 0) {
:
dev_dbg(,"AA deviceregistrationfailedn"; goto err_register;
}
try_module_get(THIS_MODULE);
returnjava.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
err_register
()java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
free_iaa_wqjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
err_save if (first_wq)
free_wq_table();
err_alloc:
mutex_unlock(&iaa_devices_lock);
idxd_drv_disable_wq(wq);
err:
wq->type = IDXD_WQT_NONE;
spin_lock(&idxd->dev_lock);
iaa_wq = idxd_wq_get_privateret driver_create_file(&iaa_crypto_driverdrv, if (!iaa_wq) {
pin_unlock&idxd->);
pr_err("%spr_debug(IAA attrcreation failed\"; goto out;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
staticrypto_debugfs_cleanup();
.probe = iaa_crypto_probe,
.remove = iaa_crypto_remove,
.name = IDXD_SUBDRIVER_NAME,
.type ev_typesjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
.esc_complete= iaa_desc_complete
}
staticint __init
{ int ret = 0; int node;
nr_cpus();
for_each_node_with_cpus(node)
nr_nodes++; if (!nr_nodes) {
pr_err("IAA couldn't find any nodes with cpus\
-ENODEV
}
nr_cpus_per_node=nr_cpus/nr_nodesjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
ret = iaa_aecs_init_fixed(); if (ret < 0) {
pr_debug("IAA fixed compression mode init failed\n"); goto err_aecs_init;
}
ret = idxd_driver_register(&iaa_crypto_driver); if (ret) {
pr_debug("IAA wq sub-driver registration failed\n"); goto err_driver_reg;
}
ret = driver_create_file(&iaa_crypto_driver.drv,
&driver_attr_verify_compress); if (ret) {
pr_debug("IAA verify_compress attr creation failed\n"); goto err_verify_attr_create;
}
ret = driver_create_file(&iaa_crypto_driver.drv,
&driver_attr_sync_mode); if (ret) {
pr_debug("IAA sync mode attr creation failed\n"); goto err_sync_attr_create;
}
if (iaa_crypto_debugfs_init())
pr_warn("debugfs init failed, stats not available\n");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.