X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.h;h=f8ebe71acc8fef300b3e3d88bf19f12a6b68e5b7;hb=c1077933d45b2bb6b8721746e63f5a125bd2353a;hp=098a072bc31c0cd8f8698051dac0957d11dd276d;hpb=4bfcbcf5c9f64fbc347fb5ced9ecd5e0ea5a3f47;p=dpdk.git diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 098a072bc3..f8ebe71acc 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -5,10 +5,13 @@ #ifndef _TESTPMD_H_ #define _TESTPMD_H_ +#include + #include #include #include #include +#include #define RTE_PORT_ALL (~(portid_t)0x0) @@ -117,12 +120,12 @@ struct fwd_stream { unsigned int retry_enabled; /* "read-write" results */ - unsigned int rx_packets; /**< received packets */ - unsigned int tx_packets; /**< received packets transmitted */ - unsigned int fwd_dropped; /**< received packets not forwarded */ - unsigned int rx_bad_ip_csum ; /**< received packets has bad ip checksum */ - unsigned int rx_bad_l4_csum ; /**< received packets has bad l4 checksum */ - unsigned int rx_bad_outer_l4_csum; + uint64_t rx_packets; /**< received packets */ + uint64_t tx_packets; /**< received packets transmitted */ + uint64_t fwd_dropped; /**< received packets not forwarded */ + uint64_t rx_bad_ip_csum ; /**< received packets has bad ip checksum */ + uint64_t rx_bad_l4_csum ; /**< received packets has bad l4 checksum */ + uint64_t rx_bad_outer_l4_csum; /**< received packets has bad outer l4 checksum */ unsigned int gro_times; /**< GRO operation times */ #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES @@ -160,25 +163,18 @@ struct softnic_port { struct rte_port { struct rte_eth_dev_info dev_info; /**< PCI info + driver name */ struct rte_eth_conf dev_conf; /**< Port configuration. */ - struct ether_addr eth_addr; /**< Port ethernet address */ + struct rte_ether_addr eth_addr; /**< Port ethernet address */ struct rte_eth_stats stats; /**< Last port statistics */ - uint64_t tx_dropped; /**< If no descriptor in TX ring */ - struct fwd_stream *rx_stream; /**< Port RX stream, if unique */ - struct fwd_stream *tx_stream; /**< Port TX stream, if unique */ unsigned int socket_id; /**< For NUMA support */ uint16_t parse_tunnel:1; /**< Parse internal headers */ uint16_t tso_segsz; /**< Segmentation offload MSS for non-tunneled packets. */ uint16_t tunnel_tso_segsz; /**< Segmentation offload MSS for tunneled pkts. */ uint16_t tx_vlan_id;/**< The tag ID */ uint16_t tx_vlan_id_outer;/**< The outer tag ID */ - void *fwd_ctx; /**< Forwarding mode context */ - uint64_t rx_bad_ip_csum; /**< rx pkts with bad ip checksum */ - uint64_t rx_bad_l4_csum; /**< rx pkts with bad l4 checksum */ - uint64_t rx_bad_outer_l4_csum; - /**< rx pkts with bad outer l4 checksum */ uint8_t tx_queue_stats_mapping_enabled; uint8_t rx_queue_stats_mapping_enabled; volatile uint16_t port_status; /**< port started or not */ + uint8_t need_setup; /**< port just attached */ uint8_t need_reconfig; /**< need reconfiguring port or not */ uint8_t need_reconfig_queues; /**< need reconfiguring queues or not */ uint8_t rss_flag; /**< enable rss or not */ @@ -187,13 +183,18 @@ struct rte_port { 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 */ - struct ether_addr *mc_addr_pool; /**< pool of multicast addrs */ + 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]; #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]; }; /** @@ -254,6 +255,7 @@ extern struct fwd_engine rx_only_engine; extern struct fwd_engine tx_only_engine; extern struct fwd_engine csum_fwd_engine; extern struct fwd_engine icmp_echo_engine; +extern struct fwd_engine noisy_vnf_engine; #ifdef SOFTNIC extern struct fwd_engine softnic_fwd_engine; #endif @@ -262,6 +264,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 uint16_t mempool_flags; /** * Forwarding Configuration @@ -318,11 +323,13 @@ 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; /**