| 161 | } |
| 162 | |
| 163 | static void |
| 164 | l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid) |
| 165 | { |
| 166 | struct rte_ether_hdr *eth; |
| 167 | void *tmp; |
| 168 | int sent; |
| 169 | unsigned dst_port; |
| 170 | struct rte_eth_dev_tx_buffer *buffer; |
| 171 | |
| 172 | dst_port = l2fwd_dst_ports[portid]; |
| 173 | eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *); |
| 174 | |
| 175 | /* 02:00:00:00:00:xx */ |
| 176 | tmp = ð->dst_addr.addr_bytes[0]; |
| 177 | *((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40); |
| 178 | |
| 179 | /* src addr */ |
| 180 | rte_ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], ð->src_addr); |
| 181 | |
| 182 | buffer = tx_buffer[dst_port]; |
| 183 | sent = rte_eth_tx_buffer(dst_port, 0, buffer, m); |
| 184 | if (sent) |
| 185 | port_statistics[dst_port].tx += sent; |
| 186 | } |
| 187 | |
| 188 | /* main processing loop */ |
| 189 | static void |
no test coverage detected