* prepare packets for inline ipsec processing: * set ol_flags and attach metadata. */
| 668 | * set ol_flags and attach metadata. |
| 669 | */ |
| 670 | static inline void |
| 671 | inline_outb_mbuf_prepare(const struct rte_ipsec_session *ss, |
| 672 | struct rte_mbuf *mb[], uint16_t num) |
| 673 | { |
| 674 | uint32_t i, ol_flags, bytes; |
| 675 | |
| 676 | ol_flags = ss->security.ol_flags & RTE_SECURITY_TX_OLOAD_NEED_MDATA; |
| 677 | bytes = 0; |
| 678 | for (i = 0; i != num; i++) { |
| 679 | |
| 680 | mb[i]->ol_flags |= RTE_MBUF_F_TX_SEC_OFFLOAD; |
| 681 | bytes += mb[i]->pkt_len; |
| 682 | if (ol_flags != 0) |
| 683 | rte_security_set_pkt_metadata(ss->security.ctx, |
| 684 | ss->security.ses, mb[i], NULL); |
| 685 | } |
| 686 | ss->sa->statistics.count += num; |
| 687 | ss->sa->statistics.bytes += bytes; |
| 688 | } |
| 689 | |
| 690 | |
| 691 | static inline int |
no test coverage detected