| 280 | } |
| 281 | |
| 282 | static void |
| 283 | update_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 = ð->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], ð->src_addr); |
| 298 | } |
| 299 | |
| 300 | /* Perform packet copy there is a user-defined function. 8< */ |
| 301 | static inline void |
no test coverage detected