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

Function pkt_burst_mac_forward

dpdk/app/test-pmd/macfwd.c:45–63  ·  view source on GitHub ↗

* Forwarding of packets in MAC mode. * Change the source and the destination Ethernet addressed of packets * before forwarding them. */

Source from the content-addressed store, hash-verified

43 * before forwarding them.
44 */
45static bool
46pkt_burst_mac_forward(struct fwd_stream *fs)
47{
48 struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
49 uint16_t nb_rx;
50
51 /*
52 * Receive a burst of packets and forward them.
53 */
54 nb_rx = common_fwd_stream_receive(fs, pkts_burst, nb_pkt_per_burst);
55 if (unlikely(nb_rx == 0))
56 return false;
57
58 do_macfwd(pkts_burst, nb_rx, fs);
59
60 common_fwd_stream_transmit(fs, pkts_burst, nb_rx);
61
62 return true;
63}
64
65struct fwd_engine mac_fwd_engine = {
66 .fwd_mode_name = "mac",

Callers

nothing calls this directly

Calls 3

do_macfwdFunction · 0.85

Tested by

no test coverage detected