X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.h;h=419997f7c90e11af97c5a171907575330b3cbde7;hb=9bf26e1318e3cd7a04115c8201255505e90cab83;hp=cba964029f43332eac965ec4f157092ad920a603;hpb=d862c45b5955d010752f2321fa5d01cd8a5d6720;p=dpdk.git diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index cba964029f..419997f7c9 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. */ + uint32_t tx_metadata; + const struct rte_eth_rxtx_callback *tx_set_md_cb[MAX_QUEUE_ID+1]; }; /** @@ -263,6 +264,11 @@ 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; /** * Forwarding Configuration @@ -319,11 +325,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; /**