src/dpdk/drivers/common/dpaax/caamflib/desc/algo.h
static inline uint8_t *conv_to_zuc_eia_iv(uint8_t *iv)
{
	uint8_t dir = (iv[14] & 0x80) ? 4 : 0;

	iv[12] = iv[4] | dir;
	iv[13] = 0;
	iv[14] = 0;
	iv[15] = 0;

	iv[8] = iv[0];
	iv[9] = iv[1];
	iv[10] = iv[2];
	iv[11] = iv[3];

	return (iv + 8);
}
/**
 * conv_to_zuc_eia_iv - ZUCA IV 16-byte to 8-byte convert
 * function for 3G.
 * @iv: 16 bytes of original IV data.
 *
 * From the original IV, we extract 32-bits of COUNT,
 * 5-bits of bearer and 1-bit of direction.
 * Refer to CAAM refman for ZUCA IV format. Then these values are
 * appended as COUNT||BEARER||DIR continuously to make a 38-bit block.
 * This 38-bit block is copied left justified into 8-byte array used as
 * converted IV.
 *
 * Return: 8-bytes of IV data as understood by SEC HW
 */
ZUCA IV 16-byte to 8-byte convert
function for 3G.
@iv: 16 bytes of original IV data.

From the original IV, we extract 32-bits of COUNT,
5-bits of bearer and 1-bit of direction.
Refer to CAAM refman for ZUCA IV format. Then these values are
appended as COUNT||BEARER||DIR continuously to make a 38-bit block.
This 38-bit block is copied left justified into 8-byte array used as
converted IV.

8-bytes of IV data as understood by SEC HW
ZUCA IV 16 - byte to 8 - byte convert function for 3G . @iv : 16 bytes of original IV data . From the original IV we extract 32 - bits of COUNT 5 - bits of bearer and 1 - bit of direction . Refer to CAAM refman for ZUCA IV format . Then these values are appended as COUNT||BEARER||DIR continuously to make a 38 - bit block . This 38 - bit block is copied left justified into 8 - byte array used as converted IV . 8 - bytes of IV data as understood by SEC HW
static inline uint8_t *conv_to_zuc_eia_iv(uint8_t *iv)
{
	uint8_t dir = (iv[14] & 0x80) ? 4 : 0;
	iv[12] = iv[4] | dir;
	iv[13] = 0;
	iv[14] = 0;
	iv[15] = 0;
	iv[8] = iv[0];
	iv[9] = iv[1];
	iv[10] = iv[2];
	iv[11] = iv[3];
	return (iv + 8);
}
static inline uint8_t * conv_to_zuc_eia_iv ( uint8_t * iv ) { uint8_t dir = ( iv [ 14 ] & 0x80 ) ? 4 : 0 ; iv [ 12 ] = iv [ 4 ] | dir ; iv [ 13 ] = 0 ; iv [ 14 ] = 0 ; iv [ 15 ] = 0 ; iv [ 8 ] = iv [ 0 ] ; iv [ 9 ] = iv [ 1 ] ; iv [ 10 ] = iv [ 2 ] ; iv [ 11 ] = iv [ 3 ] ; return ( iv + 8 ) ; }
conv_to_zuc_eia_iv - ZUCA IV 16-byte to 8-byte convert
 function for 3G.
conv_to_zuc_eia_iv - ZUCA IV 16 - byte to 8 - byte convert function for 3G .