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_cmd.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_cmd.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cmd.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c index 948a2861cae3..343eca507870 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c | |||
@@ -1277,7 +1277,8 @@ int mthca_INIT_HCA(struct mthca_dev *dev, | |||
1277 | int err; | 1277 | int err; |
1278 | 1278 | ||
1279 | #define INIT_HCA_IN_SIZE 0x200 | 1279 | #define INIT_HCA_IN_SIZE 0x200 |
1280 | #define INIT_HCA_FLAGS_OFFSET 0x014 | 1280 | #define INIT_HCA_FLAGS1_OFFSET 0x00c |
1281 | #define INIT_HCA_FLAGS2_OFFSET 0x014 | ||
1281 | #define INIT_HCA_QPC_OFFSET 0x020 | 1282 | #define INIT_HCA_QPC_OFFSET 0x020 |
1282 | #define INIT_HCA_QPC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x10) | 1283 | #define INIT_HCA_QPC_BASE_OFFSET (INIT_HCA_QPC_OFFSET + 0x10) |
1283 | #define INIT_HCA_LOG_QP_OFFSET (INIT_HCA_QPC_OFFSET + 0x17) | 1284 | #define INIT_HCA_LOG_QP_OFFSET (INIT_HCA_QPC_OFFSET + 0x17) |
@@ -1320,15 +1321,18 @@ int mthca_INIT_HCA(struct mthca_dev *dev, | |||
1320 | 1321 | ||
1321 | memset(inbox, 0, INIT_HCA_IN_SIZE); | 1322 | memset(inbox, 0, INIT_HCA_IN_SIZE); |
1322 | 1323 | ||
1324 | if (dev->mthca_flags & MTHCA_FLAG_SINAI_OPT) | ||
1325 | MTHCA_PUT(inbox, 0x1, INIT_HCA_FLAGS1_OFFSET); | ||
1326 | |||
1323 | #if defined(__LITTLE_ENDIAN) | 1327 | #if defined(__LITTLE_ENDIAN) |
1324 | *(inbox + INIT_HCA_FLAGS_OFFSET / 4) &= ~cpu_to_be32(1 << 1); | 1328 | *(inbox + INIT_HCA_FLAGS2_OFFSET / 4) &= ~cpu_to_be32(1 << 1); |
1325 | #elif defined(__BIG_ENDIAN) | 1329 | #elif defined(__BIG_ENDIAN) |
1326 | *(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1 << 1); | 1330 | *(inbox + INIT_HCA_FLAGS2_OFFSET / 4) |= cpu_to_be32(1 << 1); |
1327 | #else | 1331 | #else |
1328 | #error Host endianness not defined | 1332 | #error Host endianness not defined |
1329 | #endif | 1333 | #endif |
1330 | /* Check port for UD address vector: */ | 1334 | /* Check port for UD address vector: */ |
1331 | *(inbox + INIT_HCA_FLAGS_OFFSET / 4) |= cpu_to_be32(1); | 1335 | *(inbox + INIT_HCA_FLAGS2_OFFSET / 4) |= cpu_to_be32(1); |
1332 | 1336 | ||
1333 | /* We leave wqe_quota, responder_exu, etc as 0 (default) */ | 1337 | /* We leave wqe_quota, responder_exu, etc as 0 (default) */ |
1334 | 1338 | ||