Skip to content

Commit 72fb70f

Browse files
mjruhldledford
authored andcommitted
IB/hfi1: Correct MulticastMask/CollectiveMask info to SMA output
The FM uses the values of MulticastMask and CollectiveMask to determine the number of bits for net masks. The current values of 0 and 0 are incorrect. The values should be 4 and 1. Updated the necessary code to reflect the specified values. Reviewed-by: Sebastian Sanchez <[email protected]> Signed-off-by: Michael J. Ruhl <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent 20c7840 commit 72fb70f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

drivers/infiniband/hw/hfi1/common.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,15 @@ struct diag_pkt {
338338
#define HFI1_BECN_MASK 1
339339
#define HFI1_BECN_SMASK BIT(HFI1_BECN_SHIFT)
340340

341+
/**
342+
* 0xF8 - 4 bits of multicast range and 1 bit for collective range
343+
* Example: For 24 bit LID space,
344+
* Multicast range: 0xF00000 to 0xF7FFFF
345+
* Collective range: 0xF80000 to 0xFFFFFE
346+
*/
347+
#define HFI1_MCAST_NR 0x4 /* Number of top bits set */
348+
#define HFI1_COLLECTIVE_NR 0x1 /* Number of bits after MCAST_NR */
349+
341350
#define HFI1_PSM_IOC_BASE_SEQ 0x0
342351

343352
static inline __u64 rhf_to_cpu(const __le32 *rbuf)

drivers/infiniband/hw/hfi1/mad.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,11 @@ static int __subn_get_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data,
706706

707707
pi->opa_cap_mask = cpu_to_be16(OPA_CAP_MASK3_IsSharedSpaceSupported |
708708
OPA_CAP_MASK3_IsEthOnFabricSupported);
709+
/* Driver does not support mcast/collective configuration */
710+
pi->opa_cap_mask &=
711+
cpu_to_be16(~OPA_CAP_MASK3_IsAddrRangeConfigSupported);
712+
pi->collectivemask_multicastmask = ((HFI1_COLLECTIVE_NR & 0x7)
713+
<< 3 | (HFI1_MCAST_NR & 0x7));
709714

710715
/* HFI supports a replay buffer 128 LTPs in size */
711716
pi->replay_depth.buffer = 0x80;

0 commit comments

Comments
 (0)