| 374 | |
| 375 | |
| 376 | static inline void |
| 377 | process_pkts_inbound(struct ipsec_ctx *ipsec_ctx, |
| 378 | struct ipsec_traffic *traffic) |
| 379 | { |
| 380 | unsigned int lcoreid = rte_lcore_id(); |
| 381 | uint16_t nb_pkts_in, n_ip4, n_ip6; |
| 382 | |
| 383 | n_ip4 = traffic->ip4.num; |
| 384 | n_ip6 = traffic->ip6.num; |
| 385 | |
| 386 | if (app_sa_prm.enable == 0) { |
| 387 | nb_pkts_in = ipsec_inbound(ipsec_ctx, traffic->ipsec.pkts, |
| 388 | traffic->ipsec.num, MAX_PKT_BURST); |
| 389 | split46_traffic(traffic, traffic->ipsec.pkts, nb_pkts_in); |
| 390 | } else { |
| 391 | inbound_sa_lookup(ipsec_ctx->sa_ctx, traffic->ipsec.pkts, |
| 392 | traffic->ipsec.saptr, traffic->ipsec.num); |
| 393 | ipsec_process(ipsec_ctx, traffic); |
| 394 | } |
| 395 | |
| 396 | inbound_sp_sa(ipsec_ctx->sp4_ctx, |
| 397 | ipsec_ctx->sa_ctx, &traffic->ip4, n_ip4, |
| 398 | &core_statistics[lcoreid].inbound.spd4); |
| 399 | |
| 400 | inbound_sp_sa(ipsec_ctx->sp6_ctx, |
| 401 | ipsec_ctx->sa_ctx, &traffic->ip6, n_ip6, |
| 402 | &core_statistics[lcoreid].inbound.spd6); |
| 403 | } |
| 404 | |
| 405 | static inline void |
| 406 | outbound_spd_lookup(struct sp_ctx *sp, |
no test coverage detected