]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sif: eq: Avoid sending COMM_EST event to ULPs (UD, RAW & GSI QPs)
authorVinay Shaw <vinay.shaw@oracle.com>
Tue, 31 May 2016 16:35:05 +0000 (18:35 +0200)
committerKnut Omang <knut.omang@oracle.com>
Sun, 3 Jul 2016 14:01:38 +0000 (16:01 +0200)
From IB spec, o11-5.1.1:
For UD and Raw service types, generation of the Communication
Established Affiliated Asynchronous Event is allowed, but is
strongly discouraged.

Signed-off-by: Vinay Shaw <vinay.shaw@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
drivers/infiniband/hw/sif/sif_eq.c

index df1d4e0e0ceff71a79c43f3956f76f8c769a7b02..5b5db9bf72162960cbb2130a4424f54d6fdcced7 100644 (file)
@@ -659,8 +659,15 @@ static void handle_event_work(struct work_struct *work)
                struct ib_qp *ibqp = ew->ibe.element.qp;
                struct sif_qp *qp = to_sqp(ibqp);
 
-               /* Avoid MAD layer reporting of fatal error */
-               if ((ibqp->qp_type == IB_QPT_GSI) && (ew->ibe.event == IB_EVENT_COMM_EST))
+               /* IB spec o11-5.1.1 says suppress COMM_EST event for UD & RAW QP types.
+                * Also, avoid sending COMM_EST to MAD layer (it reports fatal error).
+                */
+               if ((ew->ibe.event == IB_EVENT_COMM_EST)
+                       && ((ibqp->qp_type == IB_QPT_GSI)
+                       || (ibqp->qp_type == IB_QPT_UD)
+                       || (ibqp->qp_type == IB_QPT_RAW_IPV6)
+                       || (ibqp->qp_type == IB_QPT_RAW_ETHERTYPE)
+                       || (ibqp->qp_type == IB_QPT_RAW_PACKET)))
                        break;
 
                if (ibqp->event_handler)