Lines Matching refs:slen

88 			unsigned int slen, unsigned int dlen)  in update_param()  argument
90 if (p->iremain < slen) in update_param()
95 p->in += slen; in update_param()
96 p->iremain -= slen; in update_param()
165 unsigned int slen = p->iremain, dlen = p->oremain, tmplen; in compress() local
166 unsigned int adj_slen = slen; in compress()
177 if (slen % c->multiple) in compress()
178 adj_slen = round_up(slen, c->multiple); in compress()
179 if (slen < c->minimum) in compress()
181 if (slen > c->maximum) in compress()
182 adj_slen = slen = c->maximum; in compress()
183 if (adj_slen > slen || (u64)src % c->alignment) { in compress()
185 slen = min(slen, BOUNCE_BUFFER_SIZE); in compress()
186 if (adj_slen > slen) in compress()
187 memset(ctx->sbounce + slen, 0, adj_slen - slen); in compress()
188 memcpy(ctx->sbounce, src, slen); in compress()
190 slen = adj_slen; in compress()
191 pr_debug("using comp sbounce buffer, len %x\n", slen); in compress()
219 ret = ctx->driver->compress(src, slen, dst, &dlen, ctx->wmem); in compress()
236 g->uncompressed_length = cpu_to_be32(slen); in compress()
238 if (p->iremain < slen) { in compress()
239 *ignore = slen - p->iremain; in compress()
240 slen = p->iremain; in compress()
244 slen, *ignore, dlen, dskip); in compress()
246 return update_param(p, slen, dskip + dlen); in compress()
250 const u8 *src, unsigned int slen, in nx842_crypto_compress() argument
265 p.iremain = slen; in nx842_crypto_compress()
327 pr_debug("compress total slen %x dlen %x\n", slen, *dlen); in nx842_crypto_compress()
341 unsigned int slen = be32_to_cpu(g->compressed_length); in decompress() local
344 unsigned int adj_slen = slen; in decompress()
350 if (!slen || !required_len) in decompress()
353 if (p->iremain <= 0 || padding + slen > p->iremain) in decompress()
361 if (slen % c->multiple) in decompress()
362 adj_slen = round_up(slen, c->multiple); in decompress()
363 if (slen < c->minimum) in decompress()
365 if (slen > c->maximum) in decompress()
367 if (slen < adj_slen || (u64)src % c->alignment) { in decompress()
372 if (slen < adj_slen) in decompress()
373 memset(ctx->sbounce + slen, 0, adj_slen - slen); in decompress()
374 memcpy(ctx->sbounce, src, slen); in decompress()
376 spadding = adj_slen - slen; in decompress()
377 slen = adj_slen; in decompress()
378 pr_debug("using decomp sbounce buffer, len %x\n", slen); in decompress()
397 ret = ctx->driver->decompress(src, slen, dst, &dlen, ctx->wmem); in decompress()
403 slen = be32_to_cpu(g->compressed_length); in decompress()
412 ret = sw842_decompress(src, slen, dst, &dlen); in decompress()
417 slen -= spadding; in decompress()
427 slen, padding, dlen, ignore); in decompress()
429 return update_param(p, slen + padding, dlen); in decompress()
433 const u8 *src, unsigned int slen, in nx842_crypto_decompress() argument
446 p.iremain = slen; in nx842_crypto_decompress()
487 if (hdr_len > slen) { in nx842_crypto_decompress()
508 pr_debug("decompress total slen %x dlen %x\n", slen, *dlen); in nx842_crypto_decompress()