linux_dsm_epyc7002/drivers/infiniband/hw/ehca
Alexander Schmidt 6773f079b7 IB/ehca: Discard double CQE for one WR
Under rare circumstances, the ehca hardware might erroneously generate
two CQEs for the same WQE, which is not compliant to the IB spec and
will cause unpredictable errors like memory being freed twice. To
avoid this problem, the driver needs to detect the second CQE and
discard it.

For this purpose, introduce an array holding as many elements as the
SQ of the QP, called sq_map. Each sq_map entry stores a "reported"
flag for one WQE in the SQ. When a work request is posted to the SQ,
the respective "reported" flag is set to zero. After the arrival of a
CQE, the flag is set to 1, which allows to detect the occurence of a
second CQE.

The mapping between WQE / CQE and the corresponding sq_map element is
implemented by replacing the lowest 16 Bits of the wr_id with the
index in the queue map. The original 16 Bits are stored in the sq_map
entry and are restored when the CQE is passed to the application.

Signed-off-by: Alexander Schmidt <alexs@linux.vnet.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-08-12 11:34:59 -07:00
..
ehca_av.c IB/ehca: Remove tgid checking 2008-04-16 21:01:13 -07:00
ehca_classes_pSeries.h IB/ehca: Fix warnings issued by checkpatch.pl 2007-07-17 18:37:40 -07:00
ehca_classes.h IB/ehca: Discard double CQE for one WR 2008-08-12 11:34:59 -07:00
ehca_cq.c IB/ehca: Allocate event queue size depending on max number of CQs and QPs 2008-04-29 13:46:53 -07:00
ehca_eq.c IB/ehca: handle negative return value from ibmebus_request_irq() properly 2008-04-29 13:46:52 -07:00
ehca_hca.c IB/ehca: Use default value for Local CA ACK Delay if FW returns 0 2008-07-22 14:18:08 -07:00
ehca_irq.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2008-07-24 12:56:07 -07:00
ehca_irq.h IB/ehca: Refactor sync between completions and destroy_cq using atomic_t 2007-07-09 20:12:27 -07:00
ehca_iverbs.h IB/ehca: Add PMA support 2008-02-04 20:20:42 -08:00
ehca_main.c IB/ehca: Make device table externally visible 2008-07-14 23:48:49 -07:00
ehca_mcast.c IB/ehca: Print return codes as signed decimal integers 2007-10-09 19:59:10 -07:00
ehca_mrmw.c IB: expand ib_umem_get() prototype 2008-04-29 08:06:12 -07:00
ehca_mrmw.h IB/ehca: Support large page MRs 2007-07-20 21:19:43 -07:00
ehca_pd.c IB/ehca: Remove tgid checking 2008-04-16 21:01:13 -07:00
ehca_qes.h IB/ehca: Discard double CQE for one WR 2008-08-12 11:34:59 -07:00
ehca_qp.c IB/ehca: Discard double CQE for one WR 2008-08-12 11:34:59 -07:00
ehca_reqs.c IB/ehca: Discard double CQE for one WR 2008-08-12 11:34:59 -07:00
ehca_sqp.c IB/ehca: Add PMA support 2008-02-04 20:20:42 -08:00
ehca_tools.h IB: Replace remaining __FUNCTION__ occurrences with __func__ 2008-04-16 21:01:10 -07:00
ehca_uverbs.c IB/ehca: Move high-volume debug output to higher debug levels 2008-04-23 11:55:45 -07:00
hcp_if.c IB/ehca: In case of lost interrupts, trigger EOI to reenable interrupts 2008-07-14 23:48:47 -07:00
hcp_if.h IB/ehca: In case of lost interrupts, trigger EOI to reenable interrupts 2008-07-14 23:48:47 -07:00
hcp_phyp.c IB/ehca: Fix warnings issued by checkpatch.pl 2007-07-17 18:37:40 -07:00
hcp_phyp.h IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
hipz_fns_core.h IB/ehca: Fix warnings issued by checkpatch.pl 2007-07-17 18:37:40 -07:00
hipz_fns.h IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00
hipz_hw.h IB/ehca: Serialize HCA-related hCalls if necessary 2007-12-12 14:09:43 -08:00
ipz_pt_fn.c IB/ehca: Release mutex in error path of alloc_small_queue_page() 2008-07-22 14:18:10 -07:00
ipz_pt_fn.h IB/ehca: Move extern declarations from .c files to .h files 2007-07-28 21:47:53 -07:00
Kconfig IB: Use menuconfig for InfiniBand menu 2007-07-09 20:12:26 -07:00
Makefile IB/ehca: Add driver for IBM eHCA InfiniBand adapters 2006-09-22 15:22:22 -07:00