Replacing the source and destination MAC addresses. 8< */
| 168 | |
| 169 | /* Replacing the source and destination MAC addresses. 8< */ |
| 170 | static void |
| 171 | lsi_simple_forward(struct rte_mbuf *m, unsigned portid) |
| 172 | { |
| 173 | struct rte_ether_hdr *eth; |
| 174 | void *tmp; |
| 175 | unsigned dst_port = lsi_dst_ports[portid]; |
| 176 | int sent; |
| 177 | struct rte_eth_dev_tx_buffer *buffer; |
| 178 | |
| 179 | eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); |
| 180 | |
| 181 | /* 02:00:00:00:00:xx */ |
| 182 | tmp = ð->dst_addr.addr_bytes[0]; |
| 183 | *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40); |
| 184 | |
| 185 | /* src addr */ |
| 186 | rte_ether_addr_copy(&lsi_ports_eth_addr[dst_port], ð->src_addr); |
| 187 | |
| 188 | buffer = tx_buffer[dst_port]; |
| 189 | sent = rte_eth_tx_buffer(dst_port, 0, buffer, m); |
| 190 | if (sent) |
| 191 | port_statistics[dst_port].tx += sent; |
| 192 | } |
| 193 | /* >8 End of replacing the source and destination MAC addresses. */ |
| 194 | |
| 195 | /* main processing loop */ |
no test coverage detected