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

Function esn_outb_nb_segments

dpdk/lib/ipsec/esp_outb.c:691–702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689
690
691static inline int
692esn_outb_nb_segments(struct rte_mbuf *m)
693{
694 if (m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) {
695 uint16_t pkt_l3len = m->pkt_len - m->l2_len;
696 uint16_t segments =
697 (m->tso_segsz > 0 && pkt_l3len > m->tso_segsz) ?
698 (pkt_l3len + m->tso_segsz - 1) / m->tso_segsz : 1;
699 return segments;
700 }
701 return 1; /* no TSO */
702}
703
704/* Compute how many packets can be sent before overflow occurs */
705static inline uint16_t

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected