* Parse the coremask given as argument (hexadecimal string) and set * the global configuration of forwarding cores. */
| 247 | * the global configuration of forwarding cores. |
| 248 | */ |
| 249 | static void |
| 250 | parse_fwd_coremask(const char *coremask) |
| 251 | { |
| 252 | char *end; |
| 253 | unsigned long long int cm; |
| 254 | |
| 255 | /* parse hexadecimal string */ |
| 256 | end = NULL; |
| 257 | cm = strtoull(coremask, &end, 16); |
| 258 | if ((coremask[0] == '\0') || (end == NULL) || (*end != '\0')) |
| 259 | rte_exit(EXIT_FAILURE, "Invalid fwd core mask\n"); |
| 260 | else if (set_fwd_lcores_mask((uint64_t) cm) < 0) |
| 261 | rte_exit(EXIT_FAILURE, "coremask is not valid\n"); |
| 262 | } |
| 263 | |
| 264 | /* |
| 265 | * Parse the coremask given as argument (hexadecimal string) and set |
no test coverage detected