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

Function hdr_segment_init

dpdk/lib/gso/gso_common.c:12–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include "gso_common.h"
11
12static inline void
13hdr_segment_init(struct rte_mbuf *hdr_segment, struct rte_mbuf *pkt,
14 uint16_t pkt_hdr_offset)
15{
16 /* Copy MBUF metadata */
17 hdr_segment->nb_segs = 1;
18 hdr_segment->port = pkt->port;
19 hdr_segment->ol_flags = pkt->ol_flags;
20 hdr_segment->packet_type = pkt->packet_type;
21 hdr_segment->pkt_len = pkt_hdr_offset;
22 hdr_segment->data_len = pkt_hdr_offset;
23 hdr_segment->tx_offload = pkt->tx_offload;
24
25 /* Copy the packet header */
26 rte_memcpy(rte_pktmbuf_mtod(hdr_segment, char *),
27 rte_pktmbuf_mtod(pkt, char *),
28 pkt_hdr_offset);
29}
30
31static inline void
32free_gso_segment(struct rte_mbuf **pkts, uint16_t nb_pkts)

Callers 1

gso_do_segmentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected