| 461 | } |
| 462 | |
| 463 | static void |
| 464 | parse_eth_dest(const char *optarg) |
| 465 | { |
| 466 | uint8_t c, *dest, peer_addr[6]; |
| 467 | uint16_t portid; |
| 468 | char *port_end; |
| 469 | |
| 470 | errno = 0; |
| 471 | portid = strtoul(optarg, &port_end, 10); |
| 472 | if (errno != 0 || port_end == optarg || *port_end++ != ',') |
| 473 | rte_exit(EXIT_FAILURE, "Invalid eth-dest: %s", optarg); |
| 474 | if (portid >= RTE_MAX_ETHPORTS) |
| 475 | rte_exit(EXIT_FAILURE, |
| 476 | "eth-dest: port %d >= RTE_MAX_ETHPORTS(%d)\n", portid, |
| 477 | RTE_MAX_ETHPORTS); |
| 478 | |
| 479 | if (cmdline_parse_etheraddr(NULL, port_end, &peer_addr, |
| 480 | sizeof(peer_addr)) < 0) |
| 481 | rte_exit(EXIT_FAILURE, "Invalid ethernet address: %s\n", |
| 482 | port_end); |
| 483 | dest = (uint8_t *)&dest_eth_addr[portid]; |
| 484 | for (c = 0; c < 6; c++) |
| 485 | dest[c] = peer_addr[c]; |
| 486 | *(uint64_t *)(val_eth + portid) = dest_eth_addr[portid]; |
| 487 | } |
| 488 | |
| 489 | #define MAX_JUMBO_PKT_LEN 9600 |
| 490 | #define MEMPOOL_CACHE_SIZE 256 |
no test coverage detected