MCPcopy Create free account
hub / github.com/F-Stack/f-stack / inline_outb_mbuf_prepare

Function inline_outb_mbuf_prepare

dpdk/lib/ipsec/esp_outb.c:670–688  ·  view source on GitHub ↗

* prepare packets for inline ipsec processing: * set ol_flags and attach metadata. */

Source from the content-addressed store, hash-verified

668 * set ol_flags and attach metadata.
669 */
670static inline void
671inline_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
691static inline int

Callers 3

Calls 1

Tested by

no test coverage detected