| 1487 | " [disabled]\n"; |
| 1488 | |
| 1489 | static void |
| 1490 | cmd_pipeline_port_in(char **tokens, |
| 1491 | uint32_t n_tokens, |
| 1492 | char *out, |
| 1493 | size_t out_size) |
| 1494 | { |
| 1495 | struct port_in_params p; |
| 1496 | char *pipeline_name; |
| 1497 | uint32_t t0; |
| 1498 | int enabled, status; |
| 1499 | |
| 1500 | if (n_tokens < 7) { |
| 1501 | snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); |
| 1502 | return; |
| 1503 | } |
| 1504 | |
| 1505 | pipeline_name = tokens[1]; |
| 1506 | |
| 1507 | if (strcmp(tokens[2], "port") != 0) { |
| 1508 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "port"); |
| 1509 | return; |
| 1510 | } |
| 1511 | |
| 1512 | if (strcmp(tokens[3], "in") != 0) { |
| 1513 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "in"); |
| 1514 | return; |
| 1515 | } |
| 1516 | |
| 1517 | if (strcmp(tokens[4], "bsz") != 0) { |
| 1518 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "bsz"); |
| 1519 | return; |
| 1520 | } |
| 1521 | |
| 1522 | if (parser_read_uint32(&p.burst_size, tokens[5]) != 0) { |
| 1523 | snprintf(out, out_size, MSG_ARG_INVALID, "burst_size"); |
| 1524 | return; |
| 1525 | } |
| 1526 | |
| 1527 | t0 = 6; |
| 1528 | |
| 1529 | if (strcmp(tokens[t0], "link") == 0) { |
| 1530 | if (n_tokens < t0 + 4) { |
| 1531 | snprintf(out, out_size, MSG_ARG_MISMATCH, |
| 1532 | "pipeline port in link"); |
| 1533 | return; |
| 1534 | } |
| 1535 | |
| 1536 | p.type = PORT_IN_RXQ; |
| 1537 | |
| 1538 | p.dev_name = tokens[t0 + 1]; |
| 1539 | |
| 1540 | if (strcmp(tokens[t0 + 2], "rxq") != 0) { |
| 1541 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "rxq"); |
| 1542 | return; |
| 1543 | } |
| 1544 | |
| 1545 | if (parser_read_uint16(&p.rxq.queue_id, tokens[t0 + 3]) != 0) { |
| 1546 | snprintf(out, out_size, MSG_ARG_INVALID, |
no test coverage detected