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

Function update_mac_addrs

dpdk/examples/dma/dmafwd.c:282–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282static void
283update_mac_addrs(struct rte_mbuf *m, uint32_t dest_portid)
284{
285 struct rte_ether_hdr *eth;
286 void *tmp;
287
288 eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
289
290 /* 02:00:00:00:00:xx - overwriting 2 bytes of source address but
291 * it's acceptable cause it gets overwritten by rte_ether_addr_copy
292 */
293 tmp = &eth->dst_addr.addr_bytes[0];
294 *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dest_portid << 40);
295
296 /* src addr */
297 rte_ether_addr_copy(&dma_ports_eth_addr[dest_portid], &eth->src_addr);
298}
299
300/* Perform packet copy there is a user-defined function. 8< */
301static inline void

Callers 1

dma_tx_portFunction · 0.70

Calls 1

rte_ether_addr_copyFunction · 0.85

Tested by

no test coverage detected