linux-brain/drivers/infiniband/hw/hfi1
Mike Marciniszyn 7930b1f98d IB/hfi1: Adjust pkey entry in index 0
[ Upstream commit 62004871e1fa7f9a60797595c03477af5b5ec36f ]

It is possible for the primary IPoIB network device associated with any
RDMA device to fail to join certain multicast groups preventing IPv6
neighbor discovery and possibly other network ULPs from working
correctly. The IPv4 broadcast group is not affected as the IPoIB network
device handles joining that multicast group directly.

This is because the primary IPoIB network device uses the pkey at ndex 0
in the associated RDMA device's pkey table. Anytime the pkey value of
index 0 changes, the primary IPoIB network device automatically modifies
it's broadcast address (i.e. /sys/class/net/[ib0]/broadcast), since the
broadcast address includes the pkey value, and then bounces carrier. This
includes initial pkey assignment, such as when the pkey at index 0
transitions from the opa default of invalid (0x0000) to some value such as
the OPA default pkey for Virtual Fabric 0: 0x8001 or when the fabric
manager is restarted with a configuration change causing the pkey at index
0 to change. Many network ULPs are not sensitive to the carrier bounce and
are not expecting the broadcast address to change including the linux IPv6
stack.  This problem does not affect IPoIB child network devices as their
pkey value is constant for all time.

To mitigate this issue, change the default pkey in at index 0 to 0x8001 to
cover the predominant case and avoid issues as ipoib comes up and the FM
sweeps.

At some point, ipoib multicast support should automatically fix
non-broadcast addresses as it does with the primary broadcast address.

Fixes: 7724105686 ("IB/hfi1: add driver files")
Link: https://lore.kernel.org/r/20210715160445.142451.47651.stgit@awfm-01.cornelisnetworks.com
Suggested-by: Josh Collier <josh.d.collier@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 12:26:23 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile IB/hfi1: Reduce excessive aspm inlines 2019-06-28 22:34:26 -03:00
affinity.c RDMA/hfi1: Fix memory leak in _dev_comp_vect_mappings_create 2020-02-19 19:53:06 +01:00
affinity.h IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support 2018-05-09 15:53:30 -04:00
aspm.c IB/hfi1: Reduce excessive aspm inlines 2019-06-28 22:34:26 -03:00
aspm.h IB/hfi1: Reduce excessive aspm inlines 2019-06-28 22:34:26 -03:00
chip.c IB/hfi1: Add RcvShortLengthErrCnt to hfi1stats 2020-02-24 08:36:45 +01:00
chip.h IB/hfi1: Add RcvShortLengthErrCnt to hfi1stats 2020-02-24 08:36:45 +01:00
chip_registers.h IB/hfi1: Add RcvShortLengthErrCnt to hfi1stats 2020-02-24 08:36:45 +01:00
common.h IB/hfi1: Remove reference to RHF.VCRCErr 2019-04-24 11:48:11 -03:00
debugfs.c IB/hfi1: Fix module use count flaw due to leftover module put calls 2020-06-30 15:36:53 -04:00
debugfs.h infiniband: hfi1: drop crazy DEBUGFS_SEQ_FILE_CREATE() macro 2019-01-24 09:22:29 -07:00
device.c infiniband: utilize the new cdev_set_parent function 2017-03-21 06:44:33 +01:00
device.h
driver.c IB/hfi1: Add software counter for ctxt0 seq drop 2020-02-24 08:36:45 +01:00
efivar.c IB/hfi1: Check upper-case EFI variables 2017-02-19 09:18:37 -05:00
efivar.h
eprom.c IB/hfi1: Check eeprom config partition validity 2017-09-27 11:10:36 -04:00
eprom.h IB/hfi1: Add ability to read platform config from the EPROM 2016-10-02 08:42:20 -04:00
exp_rcv.c IB/hfi1: Remove WARN_ON when freeing expected receive groups 2019-04-03 15:27:30 -03:00
exp_rcv.h IB/hfi1: Cleanup of exp_rcv 2018-05-24 09:39:25 -06:00
fault.c infiniband: hfi1: fix memory leaks 2019-08-20 13:44:45 -04:00
fault.h IB/hfi1: Rework fault injection machinery 2018-05-09 15:53:30 -04:00
file_ops.c IB/hfi1: Close window for pq and request coliding 2020-02-19 19:53:05 +01:00
firmware.c IB/hfi1: Fix error return code in parse_platform_config() 2021-05-14 09:44:28 +02:00
hfi.h IB/hfi1: Add software counter for ctxt0 seq drop 2020-02-24 08:36:45 +01:00
init.c IB/hfi1: Adjust pkey entry in index 0 2021-09-22 12:26:23 +02:00
intr.c IB/hfi1: Allow MgmtAllowed on B2B setups 2017-11-13 15:53:56 -05:00
iowait.c IB/hfi1: Don't cancel unused work item 2020-01-17 19:48:16 +01:00
iowait.h IB/hfi1: Prioritize the sending of ACK packets 2019-02-05 18:07:44 -05:00
mad.c IB/hfi1: Define variables as unsigned long to fix KASAN warning 2019-09-13 16:59:55 -03:00
mad.h IB/hfi1: Convert PortXmitWait/PortVLXmitWait counters to flit times 2018-02-01 15:43:30 -07:00
mmu_rb.c mm/mmu_notifier: use structure for invalidate_range_start/end callback 2018-12-28 12:11:50 -08:00
mmu_rb.h IB/hfi1: Don't remove RB entry when not needed. 2017-06-27 16:56:33 -04:00
msix.c IB/hfi1: Rework the IRQ API to be more flexible 2018-09-01 08:13:38 -04:00
msix.h IB/hfi1: Make the MSIx resource allocation a bit more flexible 2018-09-01 08:13:38 -04:00
opa_compat.h IB/hfi1: Document phys port state bits not used in IB 2017-08-22 14:22:37 -04:00
opfn.c IB/hfi1: Add TID RDMA retry timer 2019-02-05 18:07:43 -05:00
opfn.h IB/hfi1: Make opfn.h self sufficient 2019-04-24 11:31:49 -03:00
pcie.c IB/hfi1: Ensure full Gen3 speed in a Gen4 system 2019-11-06 13:13:43 -04:00
pio.c Linux 5.2-rc6 2019-06-28 21:18:23 -03:00
pio.h IB/hfi1: Reduce lock contention on iowait_lock for sdma and pio 2018-12-06 20:15:36 -07:00
pio_copy.c IB/hfi1: Optimize pio_buf and send_context structs 2016-11-15 16:37:27 -05:00
platform.c IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure 2018-05-03 15:24:48 -04:00
platform.h IB/hfi1: Define platform_config_table_limits once 2016-12-11 15:29:42 -05:00
qp.c IB/hfi1: Do not destroy hfi1_wq when the device is shut down 2020-07-16 08:16:42 +02:00
qp.h IB/hfi1: Add the dual leg code 2019-02-05 18:07:44 -05:00
qsfp.c IB/{hfi1, rdmavt}: Fix memory leak in hfi1_alloc_devdata() upon failure 2018-05-03 15:24:48 -04:00
qsfp.h
rc.c IB/hfi1: TID RDMA WRITE should not return IB_WC_RNR_RETRY_EXC_ERR 2019-11-06 13:15:36 -04:00
rc.h IB/hfi1: Delay the release of destination mr for TID RDMA WRITE DATA 2019-04-03 15:27:30 -03:00
ruc.c IB/{rdmavt, hfi1): Miscellaneous comment fixes 2019-04-24 11:31:48 -03:00
sdma.c IB/hfi1: Fix possible null-pointer dereference in _extend_sdma_tx_descs() 2021-09-03 10:08:13 +02:00
sdma.h IB/hfi1: Reduce lock contention on iowait_lock for sdma and pio 2018-12-06 20:15:36 -07:00
sdma_txreq.h IB/hfi1: Prioritize the sending of ACK packets 2019-02-05 18:07:44 -05:00
sysfs.c IB/hfi1: Fix memory leaks in sysfs registration and unregistration 2020-04-13 10:48:10 +02:00
tid_rdma.c RDMA/hfi1: Correct an interlock issue for TID RDMA WRITE request 2020-08-26 10:40:52 +02:00
tid_rdma.h IB/hfi1: Calculate flow weight based on QP MTU for TID RDMA 2019-11-06 13:15:36 -04:00
trace.c IB/hfi1: Add static trace for TID RDMA WRITE protocol 2019-02-05 18:07:44 -05:00
trace.h IB/hfi1: Add static trace for OPFN 2019-01-31 11:37:40 -05:00
trace_ctxts.h treewide: remove large struct-pass-by-value from tracepoint arguments 2018-03-28 22:55:18 +02:00
trace_dbg.h IB/hfi1: Fix two format strings 2019-03-28 11:03:49 -03:00
trace_ibhdrs.h IB/hfi1: Add missing INVALIDATE opcodes for trace 2019-06-28 22:34:26 -03:00
trace_iowait.h IB/hfi1: Add static trace for iowait 2018-09-30 19:21:12 -06:00
trace_misc.h IB/hfi1: Add traces for TID operations 2017-06-27 16:58:13 -04:00
trace_mmu.h IB/hif1: Remove static tracing from SDMA hot path 2017-08-28 19:12:27 -04:00
trace_rc.h IB/hfi1: Add static trace for TID RDMA READ protocol 2019-02-05 17:53:56 -05:00
trace_rx.h IB/hfi1: Add static trace for OPFN 2019-01-31 11:37:40 -05:00
trace_tid.h IB/hfi1: Add traces for TID RDMA READ 2019-09-13 16:59:55 -03:00
trace_tx.h IB/hfi1: Add static trace for TID RDMA WRITE protocol 2019-02-05 18:07:44 -05:00
uc.c IB/{hfi1, qib, rdmavt}: Put qp in error state when cq is full 2019-06-28 22:34:26 -03:00
ud.c IB/{rdmavt, hfi1, qib}: Add helpers to hide SWQE WR details 2019-06-28 22:34:26 -03:00
user_exp_rcv.c IB/hfi1: Close window for pq and request coliding 2020-02-19 19:53:05 +01:00
user_exp_rcv.h IB/hfi1: TID RDMA RcvArray programming and TID allocation 2019-02-05 17:53:55 -05:00
user_pages.c mm/gup: add make_dirty arg to put_user_pages_dirty_lock() 2019-09-24 15:54:08 -07:00
user_sdma.c IB/hfi1: Fix another case where pq is left on waitlist 2020-05-20 08:20:18 +02:00
user_sdma.h IB/hfi1: Remove unused define 2019-07-22 16:10:48 -03:00
verbs.c IB/hfi1, qib: Ensure RCU is locked when accessing list 2020-03-12 13:00:30 +01:00
verbs.h IB/hfi1: Use aborts to trigger RC throttling 2019-06-17 21:15:40 -04:00
verbs_txreq.c IB/hfi1: Silence txreq allocation warnings 2019-06-17 21:15:40 -04:00
verbs_txreq.h IB/hfi1: Silence txreq allocation warnings 2019-06-17 21:15:40 -04:00
vnic.h IB/hfi1: Add support to receive 16B bypass packets 2017-08-22 14:22:37 -04:00
vnic_main.c 5.2 Merge Window pull request 2019-05-09 09:02:46 -07:00
vnic_sdma.c net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00