src/dpdk/drivers/common/dpaax/caamflib/desc/algo.h
static inline int
cnstr_shdsc_zuce(uint32_t *descbuf, bool ps, bool swap,
		    struct alginfo *cipherdata, uint8_t dir)
{
	struct program prg;
	struct program *p = &prg;

	PROGRAM_CNTXT_INIT(p, descbuf, 0);
	if (swap)
		PROGRAM_SET_BSWAP(p);

	if (ps)
		PROGRAM_SET_36BIT_ADDR(p);
	SHR_HDR(p, SHR_ALWAYS, 1, 0);

	KEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,
	    cipherdata->keylen, INLINE_KEY(cipherdata));

	SEQLOAD(p, CONTEXT1, 0, 16, 0);

	MATHB(p, SEQINSZ, SUB, MATH2, VSEQINSZ, 4, 0);
	MATHB(p, SEQINSZ, SUB, MATH2, VSEQOUTSZ, 4, 0);
	ALG_OPERATION(p, OP_ALG_ALGSEL_ZUCE, OP_ALG_AAI_F8,
		      OP_ALG_AS_INITFINAL, 0, dir);
	SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1);
	SEQFIFOSTORE(p, MSG, 0, 0, VLF);

	return PROGRAM_FINALIZE(p);
}
/**
 * cnstr_shdsc_zuce - ZUC Enc (EEA2) as a shared descriptor
 * @descbuf: pointer to descriptor-under-construction buffer
 * @ps: if 36/40bit addressing is desired, this parameter must be true
 * @swap: must be true when core endianness doesn't match SEC endianness
 * @cipherdata: pointer to block cipher transform definitions
 * @dir: Cipher direction (DIR_ENC/DIR_DEC)
 *
 * Return: size of descriptor written in words or negative number on error
 */


size of descriptor written in words or negative number on error
size of descriptor written in words or negative number on error
static inline int
cnstr_shdsc_zuce(uint32_t *descbuf, bool ps, bool swap,
		    struct alginfo *cipherdata, uint8_t dir)
{
	struct program prg;
	struct program *p = &prg;
	PROGRAM_CNTXT_INIT(p, descbuf, 0);
	if (swap)
		PROGRAM_SET_BSWAP(p);
	if (ps)
		PROGRAM_SET_36BIT_ADDR(p);
	SHR_HDR(p, SHR_ALWAYS, 1, 0);
	KEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key,
	    cipherdata->keylen, INLINE_KEY(cipherdata));
	SEQLOAD(p, CONTEXT1, 0, 16, 0);
	MATHB(p, SEQINSZ, SUB, MATH2, VSEQINSZ, 4, 0);
	MATHB(p, SEQINSZ, SUB, MATH2, VSEQOUTSZ, 4, 0);
	ALG_OPERATION(p, OP_ALG_ALGSEL_ZUCE, OP_ALG_AAI_F8,
		      OP_ALG_AS_INITFINAL, 0, dir);
	SEQFIFOLOAD(p, MSG1, 0, VLF | LAST1);
	SEQFIFOSTORE(p, MSG, 0, 0, VLF);
	return PROGRAM_FINALIZE(p);
}
static inline int cnstr_shdsc_zuce ( uint32_t * descbuf , bool ps , bool swap , struct alginfo * cipherdata , uint8_t dir ) { struct program prg ; struct program * p = & prg ; PROGRAM_CNTXT_INIT ( p , descbuf , 0 ) ; if ( swap ) PROGRAM_SET_BSWAP ( p ) ; if ( ps ) PROGRAM_SET_36BIT_ADDR ( p ) ; SHR_HDR ( p , SHR_ALWAYS , 1 , 0 ) ; KEY ( p , KEY1 , cipherdata -> key_enc_flags , cipherdata -> key , cipherdata -> keylen , INLINE_KEY ( cipherdata ) ) ; SEQLOAD ( p , CONTEXT1 , 0 , 16 , 0 ) ; MATHB ( p , SEQINSZ , SUB , MATH2 , VSEQINSZ , 4 , 0 ) ; MATHB ( p , SEQINSZ , SUB , MATH2 , VSEQOUTSZ , 4 , 0 ) ; ALG_OPERATION ( p , OP_ALG_ALGSEL_ZUCE , OP_ALG_AAI_F8 , OP_ALG_AS_INITFINAL , 0 , dir ) ; SEQFIFOLOAD ( p , MSG1 , 0 , VLF | LAST1 ) ; SEQFIFOSTORE ( p , MSG , 0 , 0 , VLF ) ; return PROGRAM_FINALIZE ( p ) ; }
cnstr_shdsc_zuce - ZUC Enc (EEA2) as a shared descriptor
 @descbuf: pointer to descriptor-under-construction buffer
 @ps: if 36/40bit addressing is desired, this parameter must be true
 @swap: must be true when core endianness doesn't match SEC endianness
 @cipherdata: pointer to block cipher transform definitions
 @dir: Cipher direction (DIR_ENC/DIR_DEC)
cnstr_shdsc_zuce - ZUC Enc ( EEA2 ) as a shared descriptor @descbuf : pointer to descriptor - under - construction buffer @ps : if 36 / 40bit addressing is desired this parameter must be true @swap : must be true when core endianness doesn ' t match SEC endianness @cipherdata : pointer to block cipher transform definitions @dir : Cipher direction ( DIR_ENC / DIR_DEC )