ethdev: allow to force Rx scatter mode
[dpdk.git] / lib / librte_ether / rte_ethdev.h
index 1dd1d39..2b98700 100644 (file)
@@ -307,7 +307,8 @@ struct rte_eth_rxmode {
                hw_vlan_strip    : 1, /**< VLAN strip enable. */
                hw_vlan_extend   : 1, /**< Extended VLAN enable. */
                jumbo_frame      : 1, /**< Jumbo Frame Receipt enable. */
-               hw_strip_crc     : 1; /**< Enable CRC stripping by hardware. */
+               hw_strip_crc     : 1, /**< Enable CRC stripping by hardware. */
+               enable_scatter   : 1; /**< Enable scatter packets rx handler */
 };
 
 /**
@@ -649,6 +650,7 @@ struct rte_eth_fc_conf {
        uint16_t send_xon;    /**< Is XON frame need be sent */
        enum rte_eth_fc_mode mode;  /**< Link flow control mode */
        uint8_t mac_ctrl_frame_fwd; /**< Forward MAC control frames */
+       uint8_t autoneg;      /**< Use Pause autoneg */
 };
 
 /**
@@ -1140,8 +1142,12 @@ typedef int (*fdir_set_masks_t)(struct rte_eth_dev *dev,
                                struct rte_fdir_masks *fdir_masks);
 /**< @internal Setup flow director masks on an Ethernet device */
 
+typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
+                              struct rte_eth_fc_conf *fc_conf);
+/**< @internal Get current flow control parameter on an Ethernet device */
+
 typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
-                               struct rte_eth_fc_conf *fc_conf);
+                              struct rte_eth_fc_conf *fc_conf);
 /**< @internal Setup flow control parameter on an Ethernet device */
 
 typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
@@ -1389,6 +1395,7 @@ struct eth_dev_ops {
        eth_queue_release_t        tx_queue_release;/**< Release TX queue.*/
        eth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */
        eth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */
+       flow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */
        flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */
        priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control.*/
        eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address */
@@ -1509,6 +1516,9 @@ struct rte_eth_dev_data {
        struct rte_eth_conf dev_conf;   /**< Configuration applied to device. */
        uint16_t max_frame_size;        /**< Default is ETHER_MAX_LEN (1518). */
 
+       uint32_t min_rx_buf_size;
+       /**< Common rx buffer size handled by all queues */
+
        uint64_t rx_mbuf_alloc_failed; /**< RX ring mbuf allocation failures. */
        struct ether_addr* mac_addrs;/**< Device Ethernet Link address. */
        uint64_t mac_pool_sel[ETH_NUM_RECEIVE_MAC_ADDR];
@@ -2700,6 +2710,21 @@ int  rte_eth_led_on(uint8_t port_id);
  */
 int  rte_eth_led_off(uint8_t port_id);
 
+/**
+ * Get current status of the Ethernet link flow control for Ethernet device
+ *
+ * @param port_id
+ *   The port identifier of the Ethernet device.
+ * @param fc_conf
+ *   The pointer to the structure where to store the flow control parameters.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENOTSUP) if hardware doesn't support flow control.
+ *   - (-ENODEV)  if *port_id* invalid.
+ */
+int rte_eth_dev_flow_ctrl_get(uint8_t port_id,
+                             struct rte_eth_fc_conf *fc_conf);
+
 /**
  * Configure the Ethernet link flow control for Ethernet device
  *
@@ -2715,7 +2740,7 @@ int  rte_eth_led_off(uint8_t port_id);
  *   - (-EIO)     if flow control setup failure
  */
 int rte_eth_dev_flow_ctrl_set(uint8_t port_id,
-                               struct rte_eth_fc_conf *fc_conf);
+                             struct rte_eth_fc_conf *fc_conf);
 
 /**
  * Configure the Ethernet priority flow control under DCB environment