ixgbe: support X550
authorOuyang Changchun <changchun.ouyang@intel.com>
Mon, 29 Sep 2014 07:16:26 +0000 (15:16 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 7 Oct 2014 15:01:08 +0000 (17:01 +0200)
Update device id and PF driver to support X550.

Signed-off-by: Changchun Ouyang <changchun.ouyang@intel.com>
lib/librte_eal/common/include/rte_pci_dev_ids.h
lib/librte_ether/rte_ethdev.h
lib/librte_pmd_ixgbe/ixgbe_bypass_api.h
lib/librte_pmd_ixgbe/ixgbe_ethdev.c
lib/librte_pmd_ixgbe/ixgbe_fdir.c
lib/librte_pmd_ixgbe/ixgbe_pf.c
lib/librte_pmd_ixgbe/ixgbe_rxtx.c

index 978b0ed..dea620f 100644 (file)
@@ -391,6 +391,9 @@ RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP)
 #define IXGBE_DEV_ID_82599_T3_LOM               0x151C
 #define IXGBE_DEV_ID_X540T                      0x1528
 #define IXGBE_DEV_ID_X540T1                     0x1560
+#define IXGBE_DEV_ID_X550T                      0x1563
+#define IXGBE_DEV_ID_X550EM_X_KX4               0x15AA
+#define IXGBE_DEV_ID_X550EM_X_KR                0x15AB
 
 #ifdef RTE_NIC_BYPASS
 #define IXGBE_DEV_ID_82599_BYPASS               0x155D
@@ -433,6 +436,9 @@ RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_XAUI_LOM)
 RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_T3_LOM)
 RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T)
 RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T1)
+RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T)
+RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KX4)
+RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KR)
 
 #ifdef RTE_NIC_BYPASS
 RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS)
@@ -480,11 +486,19 @@ RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV)
 #define IXGBE_DEV_ID_82599_VF_HV                0x152E
 #define IXGBE_DEV_ID_X540_VF                    0x1515
 #define IXGBE_DEV_ID_X540_VF_HV                 0x1530
+#define IXGBE_DEV_ID_X550_VF_HV                 0x1564
+#define IXGBE_DEV_ID_X550_VF                    0x1565
+#define IXGBE_DEV_ID_X550EM_X_VF                0x15A8
+#define IXGBE_DEV_ID_X550EM_X_VF_HV             0x15A9
 
 RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF)
 RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF_HV)
 RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF)
 RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF_HV)
+RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF_HV)
+RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF)
+RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_VF)
+RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_VF_HV)
 
 /****************** Virtual I40E devices from i40e_type.h ********************/
 
index bbc6022..3f79cc3 100644 (file)
@@ -2178,7 +2178,7 @@ extern int rte_eth_dev_vlan_filter(uint8_t port_id, uint16_t vlan_id , int on);
 
 /**
  * Enable/Disable hardware VLAN Strip by a rx queue of an Ethernet device.
- * 82599/X540 can support VLAN stripping at the rx queue level
+ * 82599/X540/X550 can support VLAN stripping at the rx queue level
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
index 6af370a..b4a7386 100644 (file)
@@ -76,6 +76,15 @@ static s32 ixgbe_bypass_rw_generic(struct ixgbe_hw *hw, u32 cmd, u32 *status)
                dir_sdi = IXGBE_ESDP_SDP0_DIR;
                dir_sdo = IXGBE_ESDP_SDP1_DIR;
                break;
+       case ixgbe_mac_X550:
+       case ixgbe_mac_X550EM_x:
+               sck = IXGBE_ESDP_SDP2;
+               sdi = IXGBE_ESDP_SDP0;
+               sdo = IXGBE_ESDP_SDP1;
+               dir_sck = IXGBE_ESDP_SDP2_DIR;
+               dir_sdi = IXGBE_ESDP_SDP0_DIR;
+               dir_sdo = IXGBE_ESDP_SDP1_DIR;
+               break;
        default:
                return IXGBE_ERR_DEVICE_NOT_SUPPORTED;
        }
index a147d46..215e563 100644 (file)
@@ -544,7 +544,10 @@ ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev,
        uint32_t q_map;
        uint8_t n, offset;
 
-       if ((hw->mac.type != ixgbe_mac_82599EB) && (hw->mac.type != ixgbe_mac_X540))
+       if ((hw->mac.type != ixgbe_mac_82599EB) &&
+               (hw->mac.type != ixgbe_mac_X540) &&
+               (hw->mac.type != ixgbe_mac_X550) &&
+               (hw->mac.type != ixgbe_mac_X550EM_x))
                return -ENOSYS;
 
        PMD_INIT_LOG(INFO, "Setting port %d, %s queue_id %d to stat index %d",
@@ -646,8 +649,10 @@ ixgbe_dcb_init(struct ixgbe_hw *hw,struct ixgbe_dcb_config *dcb_config)
        /* support all DCB capabilities in 82599 */
        dcb_config->support.capabilities = 0xFF;
 
-       /*we only support 4 Tcs for X540*/
-       if (hw->mac.type == ixgbe_mac_X540) {
+       /*we only support 4 Tcs for X540, X550 */
+       if (hw->mac.type == ixgbe_mac_X540 ||
+               hw->mac.type == ixgbe_mac_X550 ||
+               hw->mac.type == ixgbe_mac_X550EM_x) {
                dcb_config->num_tcs.pg_tcs = 4;
                dcb_config->num_tcs.pfc_tcs = 4;
        }
index 8819aac..cfcb515 100644 (file)
@@ -182,7 +182,10 @@ ixgbe_fdir_configure(struct rte_eth_dev *dev)
 
        PMD_INIT_FUNC_TRACE();
 
-       if (hw->mac.type != ixgbe_mac_82599EB && hw->mac.type !=ixgbe_mac_X540)
+       if (hw->mac.type != ixgbe_mac_82599EB &&
+               hw->mac.type != ixgbe_mac_X540 &&
+               hw->mac.type != ixgbe_mac_X550 &&
+               hw->mac.type != ixgbe_mac_X550EM_x)
                return -ENOSYS;
 
        err = configure_fdir_flags(&dev->data->dev_conf.fdir_conf, &fdirctrl);
@@ -463,7 +466,10 @@ fdir_add_update_signature_filter(struct rte_eth_dev *dev,
        union ixgbe_atr_input input;
        int err;
 
-       if (hw->mac.type != ixgbe_mac_82599EB && hw->mac.type !=ixgbe_mac_X540)
+       if (hw->mac.type != ixgbe_mac_82599EB &&
+               hw->mac.type != ixgbe_mac_X540 &&
+               hw->mac.type != ixgbe_mac_X550 &&
+               hw->mac.type != ixgbe_mac_X550EM_x)
                return -ENOSYS;
 
        err = fdir_filter_to_atr_input(fdir_filter, &input);
@@ -549,7 +555,10 @@ ixgbe_fdir_remove_signature_filter(struct rte_eth_dev *dev,
 
        PMD_INIT_FUNC_TRACE();
 
-       if (hw->mac.type != ixgbe_mac_82599EB && hw->mac.type !=ixgbe_mac_X540)
+       if (hw->mac.type != ixgbe_mac_82599EB &&
+               hw->mac.type != ixgbe_mac_X540 &&
+               hw->mac.type != ixgbe_mac_X550 &&
+               hw->mac.type != ixgbe_mac_X550EM_x)
                return -ENOSYS;
 
        err = fdir_filter_to_atr_input(fdir_filter, &input);
@@ -673,7 +682,10 @@ ixgbe_fdir_set_masks(struct rte_eth_dev *dev, struct rte_fdir_masks *fdir_masks)
 
        hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
-       if (hw->mac.type != ixgbe_mac_82599EB && hw->mac.type !=ixgbe_mac_X540)
+       if (hw->mac.type != ixgbe_mac_82599EB &&
+               hw->mac.type != ixgbe_mac_X540 &&
+               hw->mac.type != ixgbe_mac_X550 &&
+               hw->mac.type != ixgbe_mac_X550EM_x)
                return -ENOSYS;
 
        err = ixgbe_reinit_fdir_tables_82599(hw);
@@ -783,7 +795,10 @@ fdir_add_update_perfect_filter(struct rte_eth_dev *dev,
        union ixgbe_atr_input input;
        int err;
 
-       if (hw->mac.type != ixgbe_mac_82599EB && hw->mac.type !=ixgbe_mac_X540)
+       if (hw->mac.type != ixgbe_mac_82599EB &&
+               hw->mac.type != ixgbe_mac_X540 &&
+               hw->mac.type != ixgbe_mac_X550 &&
+               hw->mac.type != ixgbe_mac_X550EM_x)
                return -ENOSYS;
 
        err = fdir_filter_to_atr_input(fdir_filter, &input);
@@ -835,7 +850,10 @@ ixgbe_fdir_remove_perfect_filter(struct rte_eth_dev *dev,
 
        PMD_INIT_FUNC_TRACE();
 
-       if (hw->mac.type != ixgbe_mac_82599EB && hw->mac.type !=ixgbe_mac_X540)
+       if (hw->mac.type != ixgbe_mac_82599EB &&
+               hw->mac.type != ixgbe_mac_X540 &&
+               hw->mac.type != ixgbe_mac_X550 &&
+               hw->mac.type != ixgbe_mac_X550EM_x)
                return -ENOSYS;
 
        err = fdir_filter_to_atr_input(fdir_filter, &input);
@@ -858,7 +876,10 @@ ixgbe_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir *fdir)
                        IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
        uint32_t reg;
 
-       if (hw->mac.type != ixgbe_mac_82599EB && hw->mac.type !=ixgbe_mac_X540)
+       if (hw->mac.type != ixgbe_mac_82599EB &&
+               hw->mac.type != ixgbe_mac_X540 &&
+               hw->mac.type != ixgbe_mac_X550 &&
+               hw->mac.type != ixgbe_mac_X550EM_x)
                return;
 
        /* Get the information from registers */
index 59fb58b..51da1fd 100644 (file)
@@ -449,8 +449,10 @@ ixgbe_set_vf_lpe(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *ms
        uint32_t max_frs;
        int max_frame = new_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;
 
-       /* Only X540 supports jumbo frames in IOV mode */
-       if (hw->mac.type != ixgbe_mac_X540)
+       /* X540 and X550 support jumbo frames in IOV mode */
+       if (hw->mac.type != ixgbe_mac_X540 &&
+               hw->mac.type != ixgbe_mac_X550 &&
+               hw->mac.type != ixgbe_mac_X550EM_x)
                return -1;
 
        if ((max_frame < ETHER_MIN_LEN) || (max_frame > ETHER_MAX_JUMBO_FRAME_LEN))
index d436151..9a664c3 100644 (file)
@@ -2866,6 +2866,8 @@ ixgbe_dcb_hw_arbite_rx_config(struct ixgbe_hw *hw, uint16_t *refill,
                break;
        case ixgbe_mac_82599EB:
        case ixgbe_mac_X540:
+       case ixgbe_mac_X550:
+       case ixgbe_mac_X550EM_x:
                ixgbe_dcb_config_rx_arbiter_82599(hw, refill, max, bwg_id,
                                                  tsa, map);
                break;
@@ -2885,6 +2887,8 @@ ixgbe_dcb_hw_arbite_tx_config(struct ixgbe_hw *hw, uint16_t *refill, uint16_t *m
                break;
        case ixgbe_mac_82599EB:
        case ixgbe_mac_X540:
+       case ixgbe_mac_X550:
+       case ixgbe_mac_X550EM_x:
                ixgbe_dcb_config_tx_desc_arbiter_82599(hw, refill, max, bwg_id,tsa);
                ixgbe_dcb_config_tx_data_arbiter_82599(hw, refill, max, bwg_id,tsa, map);
                break;
@@ -3616,6 +3620,8 @@ ixgbe_dev_tx_init(struct rte_eth_dev *dev)
 
                        case ixgbe_mac_82599EB:
                        case ixgbe_mac_X540:
+                       case ixgbe_mac_X550:
+                       case ixgbe_mac_X550EM_x:
                        default:
                                txctrl = IXGBE_READ_REG(hw,
                                                IXGBE_DCA_TXCTRL_82599(txq->reg_idx));