X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.h;h=6ca872db82c95e789bbf84e353c2bb8c9ece26c9;hb=64308555d5bf8d7da8c3bde7d9c32550ac9c4382;hp=a4dfd4fc234ed97997313cc282f78618d18c7ed3;hpb=55509e3a49fb28317c1e56a534cdcc4a3849df79;p=dpdk.git diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index a4dfd4fc23..6ca872db82 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -12,6 +12,7 @@ #include #include #include +#include #define RTE_PORT_ALL (~(portid_t)0x0) @@ -42,6 +43,16 @@ */ #define RTE_MAX_SEGS_PER_PKT 255 /**< nb_segs is a 8-bit unsigned char. */ +/* + * The maximum number of segments per packet is used to configure + * buffer split feature, also specifies the maximum amount of + * optional Rx pools to allocate mbufs to split. + */ +#define MAX_SEGS_BUFFER_SPLIT 8 /**< nb_segs is a 8-bit unsigned char. */ + +/* The prefix of the mbuf pool names created by the application. */ +#define MBUF_POOL_NAME_PFX "mb_pool" + #define MAX_PKT_BURST 512 #define DEF_PKT_BURST 32 @@ -126,28 +137,61 @@ struct fwd_stream { 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 */ + uint64_t rx_bad_outer_ip_csum; + /**< received packets having bad outer ip checksum */ unsigned int gro_times; /**< GRO operation times */ uint64_t core_cycles; /**< used for RX and TX processing */ struct pkt_burst_stats rx_burst_stats; struct pkt_burst_stats tx_burst_stats; }; +/** + * Age action context types, must be included inside the age action + * context structure. + */ +enum age_action_context_type { + ACTION_AGE_CONTEXT_TYPE_FLOW, + ACTION_AGE_CONTEXT_TYPE_INDIRECT_ACTION, +}; + /** Descriptor for a single flow. */ struct port_flow { struct port_flow *next; /**< Next flow in list. */ struct port_flow *tmp; /**< Temporary linking. */ uint32_t id; /**< Flow rule ID. */ struct rte_flow *flow; /**< Opaque flow object returned by PMD. */ - struct rte_flow_conv_rule rule; /* Saved flow rule description. */ + struct rte_flow_conv_rule rule; /**< Saved flow rule description. */ + enum age_action_context_type age_type; /**< Age action context type. */ uint8_t data[]; /**< Storage for flow rule description */ }; -/* Descriptor for shared action */ -struct port_shared_action { - struct port_shared_action *next; /**< Next flow in list. */ - uint32_t id; /**< Shared action ID. */ +/* Descriptor for indirect action */ +struct port_indirect_action { + struct port_indirect_action *next; /**< Next flow in list. */ + uint32_t id; /**< Indirect action ID. */ enum rte_flow_action_type type; /**< Action type. */ - struct rte_flow_shared_action *action; /**< Shared action handle. */ + struct rte_flow_action_handle *handle; /**< Indirect action handle. */ + enum age_action_context_type age_type; /**< Age action context type. */ +}; + +struct port_flow_tunnel { + LIST_ENTRY(port_flow_tunnel) chain; + struct rte_flow_action *pmd_actions; + struct rte_flow_item *pmd_items; + uint32_t id; + uint32_t num_pmd_actions; + uint32_t num_pmd_items; + struct rte_flow_tunnel tunnel; + struct rte_flow_action *actions; + struct rte_flow_item *items; +}; + +struct tunnel_ops { + uint32_t id; + char type[16]; + uint32_t enabled:1; + uint32_t actions:1; + uint32_t items:1; }; /** @@ -164,8 +208,6 @@ struct rte_port { 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 */ - 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 */ @@ -180,8 +222,9 @@ struct rte_port { 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. */ - struct port_shared_action *actions_list; - /**< Associated shared actions. */ + struct port_indirect_action *actions_list; + /**< Associated indirect actions. */ + LIST_HEAD(, port_flow_tunnel) flow_tunnel_list; 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]; /**< metadata value to insert in Tx packets. */ @@ -206,7 +249,6 @@ struct fwd_lcore { streamid_t stream_idx; /**< index of 1st stream in "fwd_streams" */ streamid_t stream_nb; /**< number of streams in "fwd_streams" */ lcoreid_t cpuid_idx; /**< index of logical core in CPU id table */ - queueid_t tx_queue; /**< TX queue to send forwarded packets */ volatile char stopped; /**< stop forwarding when set */ }; @@ -283,25 +325,6 @@ enum dcb_mode_enable DCB_ENABLED }; -#define MAX_TX_QUEUE_STATS_MAPPINGS 1024 /* MAX_PORT of 32 @ 32 tx_queues/port */ -#define MAX_RX_QUEUE_STATS_MAPPINGS 4096 /* MAX_PORT of 32 @ 128 rx_queues/port */ - -struct queue_stats_mappings { - portid_t port_id; - uint16_t queue_id; - uint8_t stats_counter_id; -} __rte_cache_aligned; - -extern struct queue_stats_mappings tx_queue_stats_mappings_array[]; -extern struct queue_stats_mappings rx_queue_stats_mappings_array[]; - -/* Assign both tx and rx queue stats mappings to the same default values */ -extern struct queue_stats_mappings *tx_queue_stats_mappings; -extern struct queue_stats_mappings *rx_queue_stats_mappings; - -extern uint16_t nb_tx_queue_stats_mappings; -extern uint16_t nb_rx_queue_stats_mappings; - extern uint8_t xstats_hide_zero; /**< Hide zero values for xstats display */ /* globals used for configuration */ @@ -319,6 +342,7 @@ extern uint8_t no_flush_rx; /**