MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_set_rxtx_conf

Function test_set_rxtx_conf

dpdk/app/test/test_pmd_perf.c:828–862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

826}
827
828int
829test_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
864int
865test_set_rxtx_anchor(cmdline_fixed_string_t type)

Callers 1

cmd_set_rxtx_parsedFunction · 0.85

Calls 2

strcmpFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected