X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.c;h=4989d22ca86cf651999a0fedb393cff5a8fcbd36;hb=042f5c94fd3a49e4fe85e5ae2405a39ca65a2436;hp=a2d0be56b328471a722843e76bd289c0819708c8;hpb=0e459ffa08891a3ba238821a80499b9b17e2f2d3;p=dpdk.git diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index a2d0be56b3..4989d22ca8 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -484,6 +484,11 @@ uint8_t bitrate_enabled; struct gro_status gro_ports[RTE_MAX_ETHPORTS]; uint8_t gro_flush_cycles = GRO_DEFAULT_FLUSH_CYCLES; +/* + * hexadecimal bitmask of RX mq mode can be enabled. + */ +enum rte_eth_rx_mq_mode rx_mq_mode = ETH_MQ_RX_VMDQ_DCB_RSS; + /* Forward function declarations */ static void setup_attached_port(portid_t pi); static void map_port_queue_stats_mapping_registers(portid_t pi, @@ -1955,11 +1960,14 @@ fwd_stats_display(void) "%s\n", acc_stats_border, acc_stats_border); #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES +#define CYC_PER_MHZ 1E6 if (total_recv > 0) - printf("\n CPU cycles/packet=%u (total cycles=" - "%"PRIu64" / total RX packets=%"PRIu64")\n", - (unsigned int)(fwd_cycles / total_recv), - fwd_cycles, total_recv); + printf("\n CPU cycles/packet=%.2F (total cycles=" + "%"PRIu64" / total RX packets=%"PRIu64") at %"PRIu64 + " MHz Clock\n", + (double) fwd_cycles / total_recv, + fwd_cycles, total_recv, + (uint64_t)(rte_get_tsc_hz() / CYC_PER_MHZ)); #endif } @@ -3007,7 +3015,7 @@ check_all_ports_link_status(uint32_t port_mask) "Port%d Link Up. speed %u Mbps- %s\n", portid, link.link_speed, (link.link_duplex == ETH_LINK_FULL_DUPLEX) ? - ("full-duplex") : ("half-duplex\n")); + ("full-duplex") : ("half-duplex")); else printf("Port %d Link Down\n", portid); continue; @@ -3339,7 +3347,9 @@ init_port_config(void) if (port->dcb_flag == 0) { if( port->dev_conf.rx_adv_conf.rss_conf.rss_hf != 0) - port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_RSS; + port->dev_conf.rxmode.mq_mode = + (enum rte_eth_rx_mq_mode) + (rx_mq_mode & ETH_MQ_RX_RSS); else port->dev_conf.rxmode.mq_mode = ETH_MQ_RX_NONE; } @@ -3440,7 +3450,9 @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, } /* set DCB mode of RX and TX of multiple queues */ - eth_conf->rxmode.mq_mode = ETH_MQ_RX_VMDQ_DCB; + eth_conf->rxmode.mq_mode = + (enum rte_eth_rx_mq_mode) + (rx_mq_mode & ETH_MQ_RX_VMDQ_DCB); eth_conf->txmode.mq_mode = ETH_MQ_TX_VMDQ_DCB; } else { struct rte_eth_dcb_rx_conf *rx_conf = @@ -3448,6 +3460,8 @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, struct rte_eth_dcb_tx_conf *tx_conf = ð_conf->tx_adv_conf.dcb_tx_conf; + memset(&rss_conf, 0, sizeof(struct rte_eth_rss_conf)); + rc = rte_eth_dev_rss_hash_conf_get(pid, &rss_conf); if (rc != 0) return rc; @@ -3460,7 +3474,9 @@ get_eth_dcb_conf(portid_t pid, struct rte_eth_conf *eth_conf, tx_conf->dcb_tc[i] = i % num_tcs; } - eth_conf->rxmode.mq_mode = ETH_MQ_RX_DCB_RSS; + eth_conf->rxmode.mq_mode = + (enum rte_eth_rx_mq_mode) + (rx_mq_mode & ETH_MQ_RX_DCB_RSS); eth_conf->rx_adv_conf.rss_conf = rss_conf; eth_conf->txmode.mq_mode = ETH_MQ_TX_DCB; }