Mercurial > illumos > illumos-gate
changeset 10009:11b987df0f95
6833882 Hermon limits Max QPs that can attach to a multicast group to 8.
author | agiri <Giri.Adari@Sun.COM> |
---|---|
date | Wed, 01 Jul 2009 11:08:16 -0700 |
parents | b5d6e292a984 |
children | 7433b2a78ba0 |
files | usr/src/uts/common/io/ib/adapters/hermon/hermon.c usr/src/uts/common/io/ib/adapters/hermon/hermon_cfg.c usr/src/uts/common/sys/ib/adapters/hermon/hermon_misc.h |
diffstat | 3 files changed, 16 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/ib/adapters/hermon/hermon.c Wed Jul 01 22:27:19 2009 +0530 +++ b/usr/src/uts/common/io/ib/adapters/hermon/hermon.c Wed Jul 01 11:08:16 2009 -0700 @@ -2720,7 +2720,7 @@ icm[HERMON_EQC].object_size = devlim->eqc_entry_sz; icm[HERMON_RDB].object_size = devlim->rdmardc_entry_sz * cfg->cp_hca_max_rdma_in_qp; - icm[HERMON_MCG].object_size = HERMON_MCG_SIZE; + icm[HERMON_MCG].object_size = HERMON_MCGMEM_SZ(state); icm[HERMON_ALTC].object_size = devlim->altc_entry_sz; icm[HERMON_AUXC].object_size = devlim->aux_entry_sz;
--- a/usr/src/uts/common/io/ib/adapters/hermon/hermon_cfg.c Wed Jul 01 22:27:19 2009 +0530 +++ b/usr/src/uts/common/io/ib/adapters/hermon/hermon_cfg.c Wed Jul 01 11:08:16 2009 -0700 @@ -68,7 +68,7 @@ */ uint32_t hermon_log_num_mcg = HERMON_NUM_MCG_SHIFT; uint32_t hermon_num_qp_per_mcg = HERMON_NUM_QP_PER_MCG; -uint32_t hermon_log_num_mcg_hash = HERMON_NUM_MCG_HASH_SHIFT; +uint32_t hermon_log_num_mcg_hash = HERMON_NUM_MCG_HASH_SHIFT; /* Number of UD AVs */ uint32_t hermon_log_num_ah = HERMON_NUM_AH_SHIFT; @@ -299,8 +299,11 @@ min(hermon_log_num_rdb_per_qp, devlim->log_max_ra_req_qp); cp->cp_hca_max_rdma_in_qp = cp->cp_hca_max_rdma_out_qp = 1 << min(hermon_log_num_rdb_per_qp, devlim->log_max_ra_req_qp); - cp->cp_num_qp_per_mcg = min(hermon_num_qp_per_mcg, - 1 << devlim->log_max_qp_mcg); + cp->cp_num_qp_per_mcg = max(hermon_num_qp_per_mcg, + HERMON_NUM_QP_PER_MCG_MIN); + cp->cp_num_qp_per_mcg = min(cp->cp_num_qp_per_mcg, + (1 << devlim->log_max_qp_mcg) - 8); + cp->cp_num_qp_per_mcg = (1 << highbit(cp->cp_num_qp_per_mcg + 7)) - 8; cp->cp_log_num_mcg = min(hermon_log_num_mcg, devlim->log_max_mcg); cp->cp_log_num_mcg_hash = hermon_log_num_mcg_hash;
--- a/usr/src/uts/common/sys/ib/adapters/hermon/hermon_misc.h Wed Jul 01 22:27:19 2009 +0530 +++ b/usr/src/uts/common/sys/ib/adapters/hermon/hermon_misc.h Wed Jul 01 11:08:16 2009 -0700 @@ -90,26 +90,21 @@ * The following defines specify the default number of Multicast Groups (MCG) * and the maximum number of QP which can be associated with each. By default * the maximum number of multicast groups is set to 256, and the maximum number - * of QP per multicast group is set to 8. These values are controllable - * through the "hermon_log_num_mcg" and "hermon_num_qp_per_mcg" configuration - * variables. - * We also define a macro below that is used to determine the size of each - * individual MCG entry (in hardware) based on the number of QP to be - * supported per multicast group. + * of QP per multicast group is set to 248 (256 4-byte slots minus the 8 slots + * in the header). The first of these values is controllable through the + * "hermon_log_num_mcg" configuration variable. "hermon_num_qp_per_mcg" is + * also available if the customer needs such a large capability. */ - +#define HERMON_NUM_MCG_SHIFT 0x8 +#define HERMON_NUM_QP_PER_MCG_MIN 0x8 +#define HERMON_NUM_QP_PER_MCG 0xf8 -#define HERMON_NUM_MCG_SHIFT 0x8 -#define HERMON_NUM_QP_PER_MCG 8 -#define HERMON_MCG_SIZE_SHIFT 0x6 -#define HERMON_MCG_SIZE (1 << HERMON_MCG_SIZE_SHIFT) - +#define HERMON_MCGMEM_SZ(state) \ + ((((state)->hs_cfg_profile->cp_num_qp_per_mcg) + 8) << 2) /* * Macro to compute the offset of the QP list in a given MCG entry. */ -#define HERMON_MCGMEM_SZ(state) \ - ((((state)->hs_cfg_profile->cp_num_qp_per_mcg) + 8) << 2) #define HERMON_MCG_GET_QPLIST_PTR(mcg) \ ((hermon_hw_mcg_qp_list_t *)((uintptr_t)(mcg) + \ sizeof (hermon_hw_mcg_t)))