lkml.org 
[lkml]   [2022]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 8/8] crypto: x86/chacha - add kernel-doc comments to assembly
On Mon, Dec 19, 2022 at 12:55:55PM -0600, Robert Elliott wrote:
> +/**
> + * chacha_2block_xor_avx2 - Encrypt 2 blocks using the x86 AVX2 feature set
> + * @state: address of input state matrix, s (%rdi)
> + * @dst: address of up to 2 data blocks output, o (%rsi)
> + * @src: address of up to 2 data blocks input, i (%rdx)
> + * @len: input/output length in bytes (%rcx)
> + * @nrounds: number of rounds (%r8d)
> + *
> + * This function encrypts two ChaCha blocks by loading the state
> + * matrix twice across four AVX registers. It performs matrix operations
> + * on four words in each matrix in parallel, but requires shuffling to
> + * rearrange the words after each round.

2 blocks, or up to 2 blocks? What does that mean?

> + *
> + * Return: none
> + * Prototype: asmlinkage void chacha_2block_xor_avx2(u32 *state, u8 *dst, const u8 *src,
> + * unsigned int len, int nrounds);

When the return type is void, there is no need to write "Return: none".

- Eric

\
 
 \ /
  Last update: 2023-03-26 23:15    [W:0.048 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site