This patch updates device id and PF driver in IXGBE PMD to support X550.

Signed-off-by: Changchun Ouyang <changchun.ouyang at intel.com>
---
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 14 ++++++++++
 lib/librte_ether/rte_ethdev.h                   |  2 +-
 lib/librte_pmd_ixgbe/ixgbe_bypass_api.h         |  9 +++++++
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c             | 11 +++++---
 lib/librte_pmd_ixgbe/ixgbe_fdir.c               | 35 ++++++++++++++++++++-----
 lib/librte_pmd_ixgbe/ixgbe_pf.c                 |  6 +++--
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c               |  6 +++++
 7 files changed, 70 insertions(+), 13 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h 
b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index 978b0ed..dea620f 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -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 ********************/

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 50df654..0004604 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -2119,7 +2119,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.
diff --git a/lib/librte_pmd_ixgbe/ixgbe_bypass_api.h 
b/lib/librte_pmd_ixgbe/ixgbe_bypass_api.h
index 6af370a..b4a7386 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_bypass_api.h
+++ b/lib/librte_pmd_ixgbe/ixgbe_bypass_api.h
@@ -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;
        }
diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c 
b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
index 59122a1..2961016 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c
@@ -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\n",
@@ -644,8 +647,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;
        }
diff --git a/lib/librte_pmd_ixgbe/ixgbe_fdir.c 
b/lib/librte_pmd_ixgbe/ixgbe_fdir.c
index 6c0a530..a47118f 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_fdir.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_fdir.c
@@ -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 */
diff --git a/lib/librte_pmd_ixgbe/ixgbe_pf.c b/lib/librte_pmd_ixgbe/ixgbe_pf.c
index 170944d..7f2b3d2 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_pf.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_pf.c
@@ -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))
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c 
b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index dfc2076..ebb2e79 100644
--- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -2836,6 +2836,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;
@@ -2855,6 +2857,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;
@@ -3575,6 +3579,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));
-- 
1.8.4.2

Reply via email to