diff options
author | Eli Cohen <eli@mellanox.co.il> | 2006-03-02 15:40:46 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-03-20 13:08:22 -0500 |
commit | 651eaac92894f8b6761c51b6637ea9cacea7fba2 (patch) | |
tree | 8be06461ef870b7d130ebce39f55fe93af6ac542 /drivers/infiniband/hw/mthca/mthca_main.c | |
parent | 27d56300647f6e76847bc2407d7abc782fe87495 (diff) |
IB/mthca: Optimize large messages on Sinai HCAs
Sinai (one-port PCI Express) HCAs get improved throughput for messages
bigger than 80 KB in DDR mode if memory keys are formatted in a
specific way. The enhancement only works if the memory key table is
smaller than 2^24 entries. For larger tables, the enhancement is off
and a warning is printed (to avoid silent performance loss).
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Michael Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_main.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_main.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 9c849d27b06e..d94837fbf162 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -935,13 +935,19 @@ enum { | |||
935 | 935 | ||
936 | static struct { | 936 | static struct { |
937 | u64 latest_fw; | 937 | u64 latest_fw; |
938 | int is_memfree; | 938 | u32 flags; |
939 | int is_pcie; | ||
940 | } mthca_hca_table[] = { | 939 | } mthca_hca_table[] = { |
941 | [TAVOR] = { .latest_fw = MTHCA_FW_VER(3, 3, 3), .is_memfree = 0, .is_pcie = 0 }, | 940 | [TAVOR] = { .latest_fw = MTHCA_FW_VER(3, 3, 3), |
942 | [ARBEL_COMPAT] = { .latest_fw = MTHCA_FW_VER(4, 7, 0), .is_memfree = 0, .is_pcie = 1 }, | 941 | .flags = 0 }, |
943 | [ARBEL_NATIVE] = { .latest_fw = MTHCA_FW_VER(5, 1, 0), .is_memfree = 1, .is_pcie = 1 }, | 942 | [ARBEL_COMPAT] = { .latest_fw = MTHCA_FW_VER(4, 7, 0), |
944 | [SINAI] = { .latest_fw = MTHCA_FW_VER(1, 0, 1), .is_memfree = 1, .is_pcie = 1 } | 943 | .flags = MTHCA_FLAG_PCIE }, |
944 | [ARBEL_NATIVE] = { .latest_fw = MTHCA_FW_VER(5, 1, 0), | ||
945 | .flags = MTHCA_FLAG_MEMFREE | | ||
946 | MTHCA_FLAG_PCIE }, | ||
947 | [SINAI] = { .latest_fw = MTHCA_FW_VER(1, 0, 1), | ||
948 | .flags = MTHCA_FLAG_MEMFREE | | ||
949 | MTHCA_FLAG_PCIE | | ||
950 | MTHCA_FLAG_SINAI_OPT } | ||
945 | }; | 951 | }; |
946 | 952 | ||
947 | static int __devinit mthca_init_one(struct pci_dev *pdev, | 953 | static int __devinit mthca_init_one(struct pci_dev *pdev, |
@@ -1031,12 +1037,9 @@ static int __devinit mthca_init_one(struct pci_dev *pdev, | |||
1031 | 1037 | ||
1032 | mdev->pdev = pdev; | 1038 | mdev->pdev = pdev; |
1033 | 1039 | ||
1040 | mdev->mthca_flags = mthca_hca_table[id->driver_data].flags; | ||
1034 | if (ddr_hidden) | 1041 | if (ddr_hidden) |
1035 | mdev->mthca_flags |= MTHCA_FLAG_DDR_HIDDEN; | 1042 | mdev->mthca_flags |= MTHCA_FLAG_DDR_HIDDEN; |
1036 | if (mthca_hca_table[id->driver_data].is_memfree) | ||
1037 | mdev->mthca_flags |= MTHCA_FLAG_MEMFREE; | ||
1038 | if (mthca_hca_table[id->driver_data].is_pcie) | ||
1039 | mdev->mthca_flags |= MTHCA_FLAG_PCIE; | ||
1040 | 1043 | ||
1041 | /* | 1044 | /* |
1042 | * Now reset the HCA before we touch the PCI capabilities or | 1045 | * Now reset the HCA before we touch the PCI capabilities or |