| 826 | } |
| 827 | |
| 828 | int |
| 829 | test_set_rxtx_conf(cmdline_fixed_string_t mode) |
| 830 | { |
| 831 | printf("mode switch to %s\n", mode); |
| 832 | |
| 833 | if (!strcmp(mode, "vector")) { |
| 834 | /* vector rx, tx */ |
| 835 | tx_conf.tx_rs_thresh = 32; |
| 836 | tx_conf.tx_free_thresh = 32; |
| 837 | return 0; |
| 838 | } else if (!strcmp(mode, "scalar")) { |
| 839 | /* bulk alloc rx, full-featured tx */ |
| 840 | tx_conf.tx_rs_thresh = 32; |
| 841 | tx_conf.tx_free_thresh = 32; |
| 842 | port_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_CHECKSUM; |
| 843 | return 0; |
| 844 | } else if (!strcmp(mode, "hybrid")) { |
| 845 | /* bulk alloc rx, vector tx |
| 846 | * when vec macro not define, |
| 847 | * using the same rx/tx as scalar |
| 848 | */ |
| 849 | tx_conf.tx_rs_thresh = 32; |
| 850 | tx_conf.tx_free_thresh = 32; |
| 851 | port_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_CHECKSUM; |
| 852 | return 0; |
| 853 | } else if (!strcmp(mode, "full")) { |
| 854 | /* full feature rx,tx pair */ |
| 855 | tx_conf.tx_rs_thresh = 32; |
| 856 | tx_conf.tx_free_thresh = 32; |
| 857 | port_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_SCATTER; |
| 858 | return 0; |
| 859 | } |
| 860 | |
| 861 | return -1; |
| 862 | } |
| 863 | |
| 864 | int |
| 865 | test_set_rxtx_anchor(cmdline_fixed_string_t type) |
no test coverage detected