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

Function l2fwd_mac_updating

dpdk/examples/l2fwd-crypto/main.c:609–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

607/* >8 End of Enqueuing packets for TX. */
608
609static void
610l2fwd_mac_updating(struct rte_mbuf *m, uint16_t dest_portid)
611{
612 struct rte_ether_hdr *eth;
613 void *tmp;
614
615 eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
616
617 /* 02:00:00:00:00:xx */
618 tmp = &eth->dst_addr.addr_bytes[0];
619 *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dest_portid << 40);
620
621 /* src addr */
622 rte_ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], &eth->src_addr);
623}
624
625static void
626l2fwd_simple_forward(struct rte_mbuf *m, uint16_t portid,

Callers 1

l2fwd_simple_forwardFunction · 0.70

Calls 1

rte_ether_addr_copyFunction · 0.85

Tested by

no test coverage detected