int main(int argc, char **argv);
#endif
+#define RTE_PORT_ALL (~(portid_t)0x0)
+
+#define RTE_TEST_RX_DESC_MAX 2048
+#define RTE_TEST_TX_DESC_MAX 2048
+
+#define RTE_PORT_STOPPED (uint16_t)0
+#define RTE_PORT_STARTED (uint16_t)1
+#define RTE_PORT_CLOSED (uint16_t)2
+#define RTE_PORT_HANDLING (uint16_t)3
+
/*
* Default size of the mbuf data buffer to receive standard 1518-byte
* Ethernet frames in a mono-segment memory buffer.
uint64_t rx_bad_l4_csum; /**< rx pkts with bad 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_reconfig; /**< need reconfiguring port or not */
+ uint8_t need_reconfig_queues; /**< need reconfiguring queues or not */
+ uint8_t rss_flag; /**< enable rss or not */
+ struct rte_eth_rxconf rx_conf; /**< rx configuration */
+ struct rte_eth_txconf tx_conf; /**< tx configuration */
};
/**
portid_t nb_fwd_ports; /**< Nb. of ports involved. */
};
+/**
+ * DCB mode enable
+ */
+enum dcb_mode_enable
+{
+ DCB_VT_ENABLED,
+ DCB_ENABLED
+};
+
+/*
+ * DCB general config info
+ */
+struct dcb_config {
+ enum dcb_mode_enable dcb_mode;
+ uint8_t vt_en;
+ enum rte_eth_nb_tcs num_tcs;
+ uint8_t pfc_en;
+};
+
+/*
+ * In DCB io FWD mode, 128 RX queue to 128 TX queue mapping
+ */
+enum dcb_queue_mapping_mode {
+ DCB_VT_Q_MAPPING = 0,
+ DCB_4_TCS_Q_MAPPING,
+ DCB_8_TCS_Q_MAPPING
+};
+
#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 */
extern uint16_t nb_txd;
extern uint16_t rx_free_thresh;
+extern uint8_t rx_drop_en;
extern uint16_t tx_free_thresh;
extern uint16_t tx_rs_thresh;
+extern uint32_t txq_flags;
+
+extern uint8_t dcb_config;
+extern uint8_t dcb_test;
+extern enum dcb_queue_mapping_mode dcb_q_mapping;
extern uint16_t mbuf_data_size; /**< Mbuf data space size. */
extern uint32_t param_total_num_mbufs;
void set_pkt_forwarding_mode(const char *fwd_mode);
void start_packet_forwarding(int with_tx_first);
void stop_packet_forwarding(void);
+void init_port_config(void);
+int init_port_dcb_config(portid_t pid,struct dcb_config *dcb_conf);
+void start_port(portid_t pid);
+void stop_port(portid_t pid);
+void close_port(portid_t pid);
+int all_ports_stopped(void);
void pmd_test_exit(void);
void fdir_add_signature_filter(portid_t port_id, uint8_t queue_id,