| 304 | } |
| 305 | |
| 306 | static int |
| 307 | packet_process(struct rte_mbuf **buf, struct ipsec_sa *sa, |
| 308 | uint16_t num_pkts) |
| 309 | { |
| 310 | uint64_t time_stamp; |
| 311 | uint16_t k = 0; |
| 312 | |
| 313 | time_stamp = rte_rdtsc_precise(); |
| 314 | |
| 315 | k = rte_ipsec_pkt_process(&sa->ss[0], buf, num_pkts); |
| 316 | |
| 317 | time_stamp = rte_rdtsc_precise() - time_stamp; |
| 318 | |
| 319 | if (k != num_pkts) { |
| 320 | RTE_LOG(ERR, USER1, "rte_ipsec_pkt_process fail\n"); |
| 321 | return k; |
| 322 | } |
| 323 | |
| 324 | sa->cnt.process_ticks_elapsed += time_stamp; |
| 325 | sa->cnt.nb_process_call++; |
| 326 | sa->cnt.nb_process_pkt += k; |
| 327 | |
| 328 | return k; |
| 329 | } |
| 330 | |
| 331 | static int |
| 332 | create_traffic(struct ipsec_sa *sa, struct rte_ring *deq_ring, |
no test coverage detected