kernel_optimize_test/drivers/infiniband/hw
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
..
amso1100 RDMA/core: Add local DMA L_Key support 2008-07-14 23:48:53 -07:00
cxgb3 RDMA/cxgb3: Fix deadlock initializing iw_cxgb3 device 2008-08-04 11:08:37 -07:00
ehca IB/ehca: Discard double CQE for one WR 2008-08-12 11:34:59 -07:00
ipath Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2008-08-07 18:14:07 -07:00
mlx4 IB/mlx4: Allow 4K messages for UD QPs 2008-08-07 14:06:50 -07:00
mthca dma-mapping: add the device argument to dma_mapping_error() 2008-07-26 12:00:03 -07:00
nes RDMA/nes: CM connection setup/teardown rework 2008-07-24 20:50:45 -07:00