14/04/2021 20:37, Akhil Goyal: > Hi Thomas, > > > + RTE_STD_C11 > > + union { /* temporary anonymous union for ABI compatibility */ > > + > > struct { > > const uint8_t *data; /**< pointer to key data */ > > uint16_t length; /**< key length in bytes */ > > @@ -222,6 +225,27 @@ struct rte_crypto_cipher_xform { > > * - Each key can be either 128 bits (16 bytes) or 256 bits (32 bytes). > > * - Both keys must have the same size. > > **/ > > + > > + RTE_STD_C11 > > + struct { /* temporary anonymous struct for ABI compatibility */ > > + const uint8_t *_key_data; /* reserved for key.data union */ > > + uint16_t _key_length; /* reserved for key.length union */ > > + /* next field can fill the padding hole */ > > + > > + uint16_t dataunit_len; > > + /**< When RTE_CRYPTODEV_FF_CIPHER_MULTIPLE_DATA_UNITS is > > enabled, > > + * this is the data-unit length of the algorithm, > > + * otherwise or when the value is 0, use the operation length. > > + * The value should be in the range defined by the dataunit_set field > > + * in the cipher capability. > > + * > > + * - For AES-XTS it is the size of data-unit, from IEEE Std 1619-2007. > > + * For-each data-unit in the operation, the tweak (IV) value is > > + * assigned consecutively starting from the operation assigned IV. > > + */ > > + > > + }; }; /* temporary struct nested in union for ABI compatibility */ > > + > Can we add a deprecation notice also in this patch to remove these temporary > Struct and union, so that we remember to remove them in 21.11
I thought about it, but a deprecation notice may involve new design considerations and requires 3 approvals. I think it is better to send it separately. > > @@ -127,6 +135,11 @@ struct rte_cryptodev_symmetric_capability { > > /**< cipher key size range */ > > struct rte_crypto_param_range iv_size; > > /**< Initialisation vector data size range */ > > + uint32_t dataunit_set; > > + /**< > > + * A bitmap for a set of the supported data-unit > > lengths. > > Add reference to the newly created macros here > > > + * 0 for any length defined in the algorithm standard. > > + */ Yes, I've seen this miss after sending. I'll reword like this: * Supported data-unit lengths: * RTE_CRYPTO_CIPHER_DATA_UNIT_LEN_* bits * or 0 for lengths defined in the algorithm standard.