@@ -79,7 +79,6 @@ struct ipsec_unitest_params {
79
79
struct rte_mbuf * obuf [BURST_SIZE ], * ibuf [BURST_SIZE ],
80
80
* testbuf [BURST_SIZE ];
81
81
82
- uint8_t * digest ;
83
82
uint16_t pkt_index ;
84
83
};
85
84
@@ -111,8 +110,6 @@ static struct ipsec_testsuite_params testsuite_params = { NULL };
111
110
static struct ipsec_unitest_params unittest_params ;
112
111
static struct user_params uparams ;
113
112
114
- static uint8_t global_key [128 ] = { 0 };
115
-
116
113
struct supported_cipher_algo {
117
114
const char * keyword ;
118
115
enum rte_crypto_cipher_algorithm algo ;
@@ -215,30 +212,26 @@ fill_crypto_xform(struct ipsec_unitest_params *ut_params,
215
212
const struct supported_auth_algo * auth_algo ,
216
213
const struct supported_cipher_algo * cipher_algo )
217
214
{
218
- ut_params -> auth_xform .type = RTE_CRYPTO_SYM_XFORM_AUTH ;
219
- ut_params -> auth_xform .auth .algo = auth_algo -> algo ;
220
- ut_params -> auth_xform .auth .key .data = global_key ;
221
- ut_params -> auth_xform .auth .key .length = auth_algo -> key_len ;
222
- ut_params -> auth_xform .auth .digest_length = auth_algo -> digest_len ;
223
- ut_params -> auth_xform .auth .op = RTE_CRYPTO_AUTH_OP_VERIFY ;
224
-
225
215
ut_params -> cipher_xform .type = RTE_CRYPTO_SYM_XFORM_CIPHER ;
226
216
ut_params -> cipher_xform .cipher .algo = cipher_algo -> algo ;
227
- ut_params -> cipher_xform .cipher .key .data = global_key ;
228
- ut_params -> cipher_xform .cipher .key .length = cipher_algo -> key_len ;
229
- ut_params -> cipher_xform .cipher .op = RTE_CRYPTO_CIPHER_OP_DECRYPT ;
230
- ut_params -> cipher_xform .cipher .iv .offset = IV_OFFSET ;
231
- ut_params -> cipher_xform .cipher .iv .length = cipher_algo -> iv_len ;
217
+ ut_params -> auth_xform .type = RTE_CRYPTO_SYM_XFORM_AUTH ;
218
+ ut_params -> auth_xform .auth .algo = auth_algo -> algo ;
232
219
233
220
if (ut_params -> ipsec_xform .direction ==
234
221
RTE_SECURITY_IPSEC_SA_DIR_INGRESS ) {
235
- ut_params -> crypto_xforms = & ut_params -> auth_xform ;
236
- ut_params -> auth_xform .next = & ut_params -> cipher_xform ;
222
+ ut_params -> cipher_xform .cipher .op =
223
+ RTE_CRYPTO_CIPHER_OP_DECRYPT ;
224
+ ut_params -> auth_xform .auth .op = RTE_CRYPTO_AUTH_OP_VERIFY ;
237
225
ut_params -> cipher_xform .next = NULL ;
226
+ ut_params -> auth_xform .next = & ut_params -> cipher_xform ;
227
+ ut_params -> crypto_xforms = & ut_params -> auth_xform ;
238
228
} else {
239
- ut_params -> crypto_xforms = & ut_params -> cipher_xform ;
240
- ut_params -> cipher_xform .next = & ut_params -> auth_xform ;
229
+ ut_params -> cipher_xform .cipher .op =
230
+ RTE_CRYPTO_CIPHER_OP_ENCRYPT ;
231
+ ut_params -> auth_xform .auth .op = RTE_CRYPTO_AUTH_OP_GENERATE ;
241
232
ut_params -> auth_xform .next = NULL ;
233
+ ut_params -> cipher_xform .next = & ut_params -> auth_xform ;
234
+ ut_params -> crypto_xforms = & ut_params -> cipher_xform ;
242
235
}
243
236
}
244
237
@@ -287,9 +280,12 @@ testsuite_setup(void)
287
280
int rc ;
288
281
289
282
memset (ts_params , 0 , sizeof (* ts_params ));
283
+ memset (ut_params , 0 , sizeof (* ut_params ));
284
+ memset (& uparams , 0 , sizeof (struct user_params ));
290
285
291
286
uparams .auth = RTE_CRYPTO_SYM_XFORM_AUTH ;
292
287
uparams .cipher = RTE_CRYPTO_SYM_XFORM_CIPHER ;
288
+ uparams .aead = RTE_CRYPTO_SYM_XFORM_NOT_SPECIFIED ;
293
289
strcpy (uparams .auth_algo , "null" );
294
290
strcpy (uparams .cipher_algo , "null" );
295
291
0 commit comments