igb: fix i211 support
authorSergey Mironov <grrwlf@gmail.com>
Thu, 4 Sep 2014 08:35:11 +0000 (12:35 +0400)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 24 Sep 2014 17:33:36 +0000 (19:33 +0200)
igb_ethdev.c contains function eth_igb_infos_get() which should set
number of tx/rx queues supported by the hardware. It contains huge
[switch] but there is no i211 case!
Also, there are few other places which mention i210, but not mention i211.

I didn't check it enough to say it is totally correct.
For now I see that it just able to send and receive some packets.

Signed-off-by: Sergey Mironov <grrwlf@gmail.com>
Reviewed-by: Helin Zhang <helin.zhang@intel.com>
[Thomas: fix indent]
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_pmd_e1000/igb_ethdev.c

index c9acdc5..0117d1a 100644 (file)
@@ -816,7 +816,8 @@ eth_igb_start(struct rte_eth_dev *dev)
         * value of Write-Back Threshold registers.
         */
        if ((hw->mac.type == e1000_82576) || (hw->mac.type == e1000_82580) ||
-               (hw->mac.type == e1000_i350) || (hw->mac.type == e1000_i210)) {
+               (hw->mac.type == e1000_i350) || (hw->mac.type == e1000_i210) ||
+               (hw->mac.type == e1000_i211)) {
                uint32_t ivar;
 
                /* Enable all RX & TX queues in the IVAR registers */
@@ -964,7 +965,7 @@ igb_get_rx_buffer_size(struct e1000_hw *hw)
                rx_buf_size = (E1000_READ_REG(hw, E1000_RXPBS) & 0xf);
                rx_buf_size = (uint32_t) e1000_rxpbs_adjust_82580(rx_buf_size);
                rx_buf_size = (rx_buf_size << 10);
-       } else if (hw->mac.type == e1000_i210) {
+       } else if (hw->mac.type == e1000_i210 || hw->mac.type == e1000_i211) {
                rx_buf_size = (E1000_READ_REG(hw, E1000_RXPBS) & 0x3f) << 10;
        } else {
                rx_buf_size = (E1000_READ_REG(hw, E1000_PBA) & 0xffff) << 10;
@@ -1311,6 +1312,12 @@ eth_igb_infos_get(struct rte_eth_dev *dev,
                dev_info->max_vmdq_pools = 0;
                break;
 
+       case e1000_i211:
+               dev_info->max_rx_queues = 2;
+               dev_info->max_tx_queues = 2;
+               dev_info->max_vmdq_pools = 0;
+               break;
+
        case e1000_vfadapt:
                dev_info->max_rx_queues = 2;
                dev_info->max_tx_queues = 2;