| 399 | } |
| 400 | |
| 401 | static void |
| 402 | fill_ipsec_sa_in(const struct ipsec_test_cfg *test_cfg, |
| 403 | struct ipsec_sa *sa) |
| 404 | { |
| 405 | sa->ipsec_xform.spi = DEFAULT_SPI; |
| 406 | sa->ipsec_xform.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS; |
| 407 | sa->ipsec_xform.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP; |
| 408 | sa->ipsec_xform.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL; |
| 409 | sa->ipsec_xform.tunnel.type = RTE_SECURITY_IPSEC_TUNNEL_IPV4; |
| 410 | sa->ipsec_xform.options.esn = test_cfg->esn; |
| 411 | sa->type = test_cfg->type; |
| 412 | sa->replay_win_sz = test_cfg->replay_win_sz; |
| 413 | sa->sa_flags = test_cfg->flags; |
| 414 | sa->cnt.nb_prepare_call = 0; |
| 415 | sa->cnt.nb_prepare_pkt = 0; |
| 416 | sa->cnt.nb_process_call = 0; |
| 417 | sa->cnt.nb_process_pkt = 0; |
| 418 | sa->cnt.process_ticks_elapsed = 0; |
| 419 | sa->cnt.prepare_ticks_elapsed = 0; |
| 420 | } |
| 421 | |
| 422 | static int |
| 423 | init_sa_session(const struct ipsec_test_cfg *test_cfg, |