public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
To: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Jack Morgenstein <jackm-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>,
	Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Subject: [PATCH] ib/mlx4: add IB_CQ_REPORT_MISSED_EVENTS support
Date: Tue, 27 Jul 2010 11:21:13 +0300	[thread overview]
Message-ID: <4C4E96F9.4040503@Voltaire.com> (raw)

enhance the cq arming code to support IB_CQ_REPORT_MISSED_EVENTS

Signed-off-by: Or Gerlitz <ogerlitz-smomgflXvOZWk0Htik3J/w@public.gmane.org>

----

I noted that the IB_CQ_REPORT_MISSED_EVENTS flag was added in the same cycle with mlx4
and maybe as of this, mlx4 didn't implement the flag, which is used by IPoIB

The patch is compile tested only, if the patch seems okay, I can conduct further testing.

diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c
index 5a219a2..4366811 100644
--- a/drivers/infiniband/hw/mlx4/cq.c
+++ b/drivers/infiniband/hw/mlx4/cq.c
@@ -755,6 +755,13 @@ int mlx4_ib_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
 		    to_mdev(ibcq->device)->uar_map,
 		    MLX4_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->uar_lock));
 
+	if (flags & IB_CQ_REPORT_MISSED_EVENTS) {
+		struct mlx4_cqe *cqe;
+		cqe = next_cqe_sw(to_mcq(ibcq));
+		if (cqe)
+			return 1;
+	}
+
 	return 0;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2010-07-27  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27  8:21 Or Gerlitz [this message]
     [not found] ` <4C4E96F9.4040503-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2010-07-27  9:14   ` [PATCH] ib/mlx4: add IB_CQ_REPORT_MISSED_EVENTS support Eli Cohen
     [not found]     ` <AANLkTinPRO6mOnCS-SJynkRXmt6J1uV3w5+8PfF6ubxN-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-27  9:29       ` Bart Van Assche
2010-07-27 10:55       ` Or Gerlitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C4E96F9.4040503@Voltaire.com \
    --to=ogerlitz-hkgkho2ms0fwk0htik3j/w@public.gmane.org \
    --cc=eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org \
    --cc=jackm-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox