ixgbe/base: name constants
authorJijiang Liu <jijiang.liu@intel.com>
Wed, 18 Jun 2014 15:35:41 +0000 (17:35 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 18 Jun 2014 21:30:58 +0000 (23:30 +0200)
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Tested-by: Waterman Cao <waterman.cao@intel.com>
[Thomas: split code drop]

lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.c
lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c

index d85673c..0425cf9 100644 (file)
@@ -38,6 +38,13 @@ POSSIBILITY OF SUCH DAMAGE.
 #include "ixgbe_phy.h"
 #ident "$Id: ixgbe_82598.c,v 1.194 2012/03/28 00:54:08 jtkirshe Exp $"
 
+#define IXGBE_82598_MAX_TX_QUEUES 32
+#define IXGBE_82598_MAX_RX_QUEUES 64
+#define IXGBE_82598_RAR_ENTRIES   16
+#define IXGBE_82598_MC_TBL_SIZE  128
+#define IXGBE_82598_VFT_TBL_SIZE 128
+#define IXGBE_82598_RX_PB_SIZE   512
+
 STATIC s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw,
                                             ixgbe_link_speed *speed,
                                             bool *autoneg);
@@ -145,12 +152,12 @@ s32 ixgbe_init_ops_82598(struct ixgbe_hw *hw)
        /* Flow Control */
        mac->ops.fc_enable = &ixgbe_fc_enable_82598;
 
-       mac->mcft_size          = 128;
-       mac->vft_size           = 128;
-       mac->num_rar_entries    = 16;
-       mac->rx_pb_size         = 512;
-       mac->max_tx_queues      = 32;
-       mac->max_rx_queues      = 64;
+       mac->mcft_size          = IXGBE_82598_MC_TBL_SIZE;
+       mac->vft_size           = IXGBE_82598_VFT_TBL_SIZE;
+       mac->num_rar_entries    = IXGBE_82598_RAR_ENTRIES;
+       mac->rx_pb_size         = IXGBE_82598_RX_PB_SIZE;
+       mac->max_rx_queues      = IXGBE_82598_MAX_RX_QUEUES;
+       mac->max_tx_queues      = IXGBE_82598_MAX_TX_QUEUES;
        mac->max_msix_vectors   = ixgbe_get_pcie_msix_count_generic(hw);
 
        /* SFP+ Module */
index adb75dc..26ff26c 100644 (file)
@@ -38,6 +38,13 @@ POSSIBILITY OF SUCH DAMAGE.
 #include "ixgbe_phy.h"
 #ident "$Id: ixgbe_82599.c,v 1.301 2012/11/08 11:33:27 jtkirshe Exp $"
 
+#define IXGBE_82599_MAX_TX_QUEUES 128
+#define IXGBE_82599_MAX_RX_QUEUES 128
+#define IXGBE_82599_RAR_ENTRIES   128
+#define IXGBE_82599_MC_TBL_SIZE   128
+#define IXGBE_82599_VFT_TBL_SIZE  128
+#define IXGBE_82599_RX_PB_SIZE   512
+
 STATIC s32 ixgbe_setup_copper_link_82599(struct ixgbe_hw *hw,
                                         ixgbe_link_speed speed,
                                         bool autoneg,
@@ -271,12 +278,12 @@ s32 ixgbe_init_ops_82599(struct ixgbe_hw *hw)
        mac->ops.setup_rxpba = &ixgbe_set_rxpba_generic;
        ixgbe_init_mac_link_ops_82599(hw);
 
-       mac->mcft_size          = 128;
-       mac->vft_size           = 128;
-       mac->num_rar_entries    = 128;
-       mac->rx_pb_size         = 512;
-       mac->max_tx_queues      = 128;
-       mac->max_rx_queues      = 128;
+       mac->mcft_size          = IXGBE_82599_MC_TBL_SIZE;
+       mac->vft_size           = IXGBE_82599_VFT_TBL_SIZE;
+       mac->num_rar_entries    = IXGBE_82599_RAR_ENTRIES;
+       mac->rx_pb_size         = IXGBE_82599_RX_PB_SIZE;
+       mac->max_rx_queues      = IXGBE_82599_MAX_RX_QUEUES;
+       mac->max_tx_queues      = IXGBE_82599_MAX_TX_QUEUES;
        mac->max_msix_vectors   = ixgbe_get_pcie_msix_count_generic(hw);
 
        mac->arc_subsystem_valid = (IXGBE_READ_REG(hw, IXGBE_FWSM) &
index 1a0043b..5983f94 100644 (file)
@@ -37,6 +37,13 @@ POSSIBILITY OF SUCH DAMAGE.
 #include "ixgbe_common.h"
 #include "ixgbe_phy.h"
 
+#define IXGBE_X540_MAX_TX_QUEUES       128
+#define IXGBE_X540_MAX_RX_QUEUES       128
+#define IXGBE_X540_RAR_ENTRIES         128
+#define IXGBE_X540_MC_TBL_SIZE         128
+#define IXGBE_X540_VFT_TBL_SIZE                128
+#define IXGBE_X540_RX_PB_SIZE          384
+
 STATIC s32 ixgbe_update_flash_X540(struct ixgbe_hw *hw);
 STATIC s32 ixgbe_poll_flash_update_done_X540(struct ixgbe_hw *hw);
 STATIC s32 ixgbe_get_swfw_sync_semaphore(struct ixgbe_hw *hw);
@@ -116,12 +123,12 @@ s32 ixgbe_init_ops_X540(struct ixgbe_hw *hw)
        mac->ops.check_link = &ixgbe_check_mac_link_generic;
 
 
-       mac->mcft_size          = 128;
-       mac->vft_size           = 128;
-       mac->num_rar_entries    = 128;
-       mac->rx_pb_size         = 384;
-       mac->max_tx_queues      = 128;
-       mac->max_rx_queues      = 128;
+       mac->mcft_size          = IXGBE_X540_MC_TBL_SIZE;
+       mac->vft_size           = IXGBE_X540_VFT_TBL_SIZE;
+       mac->num_rar_entries    = IXGBE_X540_RAR_ENTRIES;
+       mac->rx_pb_size         = IXGBE_X540_RX_PB_SIZE;
+       mac->max_rx_queues      = IXGBE_X540_MAX_RX_QUEUES;
+       mac->max_tx_queues      = IXGBE_X540_MAX_TX_QUEUES;
        mac->max_msix_vectors   = ixgbe_get_pcie_msix_count_generic(hw);
 
        /*