* set up output ports so that all traffic on port gets sent out * its paired port. Index using actual port numbers since that is * what comes in the mbuf structure. */
| 162 | * what comes in the mbuf structure. |
| 163 | */ |
| 164 | static void |
| 165 | configure_output_ports(const struct shared_info *info) |
| 166 | { |
| 167 | int i; |
| 168 | |
| 169 | if (info->num_ports > RTE_MAX_ETHPORTS) |
| 170 | rte_exit(EXIT_FAILURE, "Too many ethernet ports. " |
| 171 | "RTE_MAX_ETHPORTS = %u\n", |
| 172 | (unsigned int)RTE_MAX_ETHPORTS); |
| 173 | for (i = 0; i < info->num_ports - 1; i += 2) { |
| 174 | uint8_t p1 = info->id[i]; |
| 175 | uint8_t p2 = info->id[i+1]; |
| 176 | |
| 177 | output_ports[p1] = p2; |
| 178 | output_ports[p2] = p1; |
| 179 | |
| 180 | configure_tx_buffer(p1, MBQ_CAPACITY); |
| 181 | configure_tx_buffer(p2, MBQ_CAPACITY); |
| 182 | |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | /* |
| 187 | * Create the hash table that will contain the flows that |
no test coverage detected