X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=app%2Ftest-pmd%2Ftestpmd.h;h=33ef3e271a20d347c7a57200fdb2790ebb849074;hb=2df00d562d203fb1450261c26d0ffa47b8007089;hp=e3a6f7c7178c173fc26482b444602e2300b3a639;hpb=35b2d13fd6fdcbd191f2a30d74648faeb1186c65;p=dpdk.git diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index e3a6f7c717..33ef3e271a 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -11,6 +11,7 @@ #include #include #include +#include #define RTE_PORT_ALL (~(portid_t)0x0) @@ -57,8 +58,6 @@ typedef uint16_t portid_t; typedef uint16_t queueid_t; typedef uint16_t streamid_t; -#define MAX_QUEUE_ID ((1 << (sizeof(queueid_t) * 8)) - 1) - #if defined RTE_LIBRTE_PMD_SOFTNIC #define SOFTNIC 1 #else @@ -77,8 +76,10 @@ enum { /**< allocate mempool natively, but populate using anonymous memory */ MP_ALLOC_XMEM, /**< allocate and populate mempool using anonymous memory */ - MP_ALLOC_XMEM_HUGE + MP_ALLOC_XMEM_HUGE, /**< allocate and populate mempool using anonymous hugepage memory */ + MP_ALLOC_XBUF + /**< allocate mempool natively, use rte_pktmbuf_pool_create_extbuf */ }; #ifdef RTE_TEST_PMD_RECORD_BURST_STATS @@ -104,6 +105,13 @@ struct rss_type_info { */ extern const struct rss_type_info rss_type_table[]; +/** + * Dynf name array. + * + * Array that holds the name for each dynf. + */ +extern char dynf_names[64][RTE_MBUF_DYN_NAMESIZE]; + /** * The data structure associated with a forwarding stream between a receive * port/queue and a transmit port/queue. @@ -178,22 +186,25 @@ struct rte_port { uint8_t need_reconfig_queues; /**< need reconfiguring queues or not */ uint8_t rss_flag; /**< enable rss or not */ uint8_t dcb_flag; /**< enable dcb */ - uint16_t nb_rx_desc[MAX_QUEUE_ID+1]; /**< per queue rx desc number */ - uint16_t nb_tx_desc[MAX_QUEUE_ID+1]; /**< per queue tx desc number */ - struct rte_eth_rxconf rx_conf[MAX_QUEUE_ID+1]; /**< per queue rx configuration */ - struct rte_eth_txconf tx_conf[MAX_QUEUE_ID+1]; /**< per queue tx configuration */ + uint16_t nb_rx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue rx desc number */ + uint16_t nb_tx_desc[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue tx desc number */ + struct rte_eth_rxconf rx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue rx configuration */ + struct rte_eth_txconf tx_conf[RTE_MAX_QUEUES_PER_PORT+1]; /**< per queue tx configuration */ struct rte_ether_addr *mc_addr_pool; /**< pool of multicast addrs */ uint32_t mc_addr_nb; /**< nb. of addr. in mc_addr_pool */ uint8_t slave_flag; /**< bonding slave port */ struct port_flow *flow_list; /**< Associated flows. */ - const struct rte_eth_rxtx_callback *rx_dump_cb[MAX_QUEUE_ID+1]; - const struct rte_eth_rxtx_callback *tx_dump_cb[MAX_QUEUE_ID+1]; + const struct rte_eth_rxtx_callback *rx_dump_cb[RTE_MAX_QUEUES_PER_PORT+1]; + const struct rte_eth_rxtx_callback *tx_dump_cb[RTE_MAX_QUEUES_PER_PORT+1]; #ifdef SOFTNIC struct softnic_port softport; /**< softnic params */ #endif /**< metadata value to insert in Tx packets. */ - rte_be32_t tx_metadata; - const struct rte_eth_rxtx_callback *tx_set_md_cb[MAX_QUEUE_ID+1]; + uint32_t tx_metadata; + const struct rte_eth_rxtx_callback *tx_set_md_cb[RTE_MAX_QUEUES_PER_PORT+1]; + /**< dynamic flags. */ + uint64_t mbuf_dynf; + const struct rte_eth_rxtx_callback *tx_set_dynf_cb[RTE_MAX_QUEUES_PER_PORT+1]; }; /** @@ -263,6 +274,9 @@ extern struct fwd_engine ieee1588_fwd_engine; #endif extern struct fwd_engine * fwd_engines[]; /**< NULL terminated array. */ +extern cmdline_parse_inst_t cmd_set_raw; +extern cmdline_parse_inst_t cmd_show_set_raw; +extern cmdline_parse_inst_t cmd_show_set_raw_all; extern uint16_t mempool_flags; @@ -321,6 +335,7 @@ extern uint8_t flow_isolate_all; /**< set by "--flow-isolate-all */ extern uint8_t mp_alloc_type; /**< set by "--mp-anon" or "--mp-alloc" parameter */ extern uint8_t no_link_check; /**