ixgbe/base: disable X550em FEC to save power
[dpdk.git] / app / test-pmd / testpmd.h
index 581130b..f2c84d9 100644 (file)
@@ -48,7 +48,8 @@
  * Default size of the mbuf data buffer to receive standard 1518-byte
  * Ethernet frames in a mono-segment memory buffer.
  */
-#define DEFAULT_MBUF_DATA_SIZE 2048 /**< Default size of mbuf data buffer. */
+#define DEFAULT_MBUF_DATA_SIZE RTE_MBUF_DEFAULT_BUF_SIZE
+/**< Default size of mbuf data buffer. */
 
 /*
  * The maximum number of segments per packet is used when creating
@@ -137,6 +138,7 @@ struct fwd_stream {
  * The data structure associated with each port.
  */
 struct rte_port {
+       uint8_t                 enabled;    /**< Port enabled or not */
        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 */
@@ -160,8 +162,18 @@ struct rte_port {
        uint8_t                 dcb_flag;   /**< enable dcb */
        struct rte_eth_rxconf   rx_conf;    /**< rx configuration */
        struct rte_eth_txconf   tx_conf;    /**< tx configuration */
+       struct ether_addr       *mc_addr_pool; /**< pool of multicast addrs */
+       uint32_t                mc_addr_nb; /**< nb. of addr. in mc_addr_pool */
 };
 
+extern portid_t __rte_unused
+find_next_port(portid_t p, struct rte_port *ports, int size);
+
+#define FOREACH_PORT(p, ports) \
+       for (p = find_next_port(0, ports, RTE_MAX_ETHPORTS); \
+           p < RTE_MAX_ETHPORTS; \
+           p = find_next_port(p + 1, ports, RTE_MAX_ETHPORTS))
+
 /**
  * The data structure associated with each forwarding logical core.
  * The logical cores are internally numbered by a core index from 0 to
@@ -499,7 +511,7 @@ void rx_vlan_strip_set_on_queue(portid_t port_id, uint16_t queue_id, int on);
 
 void rx_vlan_filter_set(portid_t port_id, int on);
 void rx_vlan_all_filter_set(portid_t port_id, int on);
-void rx_vft_set(portid_t port_id, uint16_t vlan_id, int on);
+int rx_vft_set(portid_t port_id, uint16_t vlan_id, int on);
 void vlan_extend_set(portid_t port_id, int on);
 void vlan_tpid_set(portid_t port_id, uint16_t tp_id);
 void tx_vlan_set(portid_t port_id, uint16_t vlan_id);
@@ -522,26 +534,12 @@ int init_port_dcb_config(portid_t pid,struct dcb_config *dcb_conf);
 int start_port(portid_t pid);
 void stop_port(portid_t pid);
 void close_port(portid_t pid);
+void attach_port(char *identifier);
+void detach_port(uint8_t port_id);
 int all_ports_stopped(void);
 int port_is_started(portid_t port_id);
 void pmd_test_exit(void);
-
-void fdir_add_signature_filter(portid_t port_id, uint8_t queue_id,
-                              struct rte_fdir_filter *fdir_filter);
-void fdir_update_signature_filter(portid_t port_id, uint8_t queue_id,
-                                 struct rte_fdir_filter *fdir_filter);
-void fdir_remove_signature_filter(portid_t port_id,
-                                 struct rte_fdir_filter *fdir_filter);
 void fdir_get_infos(portid_t port_id);
-void fdir_add_perfect_filter(portid_t port_id, uint16_t soft_id,
-                            uint8_t queue_id, uint8_t drop,
-                            struct rte_fdir_filter *fdir_filter);
-void fdir_update_perfect_filter(portid_t port_id, uint16_t soft_id,
-                               uint8_t queue_id, uint8_t drop,
-                               struct rte_fdir_filter *fdir_filter);
-void fdir_remove_perfect_filter(portid_t port_id, uint16_t soft_id,
-                               struct rte_fdir_filter *fdir_filter);
-void fdir_set_masks(portid_t port_id, struct rte_fdir_masks *fdir_masks);
 void fdir_set_flex_mask(portid_t port_id,
                           struct rte_eth_fdir_flex_mask *cfg);
 void fdir_set_flex_payload(portid_t port_id,
@@ -564,11 +562,19 @@ void get_syn_filter(uint8_t port_id);
 void get_ethertype_filter(uint8_t port_id, uint16_t index);
 void get_2tuple_filter(uint8_t port_id, uint16_t index);
 void get_5tuple_filter(uint8_t port_id, uint16_t index);
-void get_flex_filter(uint8_t port_id, uint16_t index);
-int port_id_is_invalid(portid_t port_id);
 int rx_queue_id_is_invalid(queueid_t rxq_id);
 int tx_queue_id_is_invalid(queueid_t txq_id);
 
+/* Functions to manage the set of filtered Multicast MAC addresses */
+void mcast_addr_add(uint8_t port_id, struct ether_addr *mc_addr);
+void mcast_addr_remove(uint8_t port_id, struct ether_addr *mc_addr);
+
+enum print_warning {
+       ENABLED_WARN = 0,
+       DISABLED_WARN
+};
+int port_id_is_invalid(portid_t port_id, enum print_warning warning);
+
 /*
  * Work-around of a compilation error with ICC on invocations of the
  * rte_be_to_cpu_16() function.