[ofa-general] [PATCH] IB/mlx4: interrupt coalescing
Michael S. Tsirkin
mst at dev.mellanox.co.il
Thu Aug 30 05:58:39 PDT 2007
Enable interrupt coalescing for CQs in mlx4.
Signed-off-by: Michael S. Tsirkin <mst at dev.mellanox.co.il>
---
diff --git a/drivers/net/mlx4/cq.c b/drivers/net/mlx4/cq.c
index 39253d0..b58dd75 100644
--- a/drivers/net/mlx4/cq.c
+++ b/drivers/net/mlx4/cq.c
@@ -42,6 +42,14 @@
#include "mlx4.h"
#include "icm.h"
+static int cq_max_count = 16;
+static int cq_period = 10;
+
+module_param(cq_max_count, int, 0444);
+MODULE_PARM_DESC(cq_max_count, "number of CQEs to generate event");
+module_param(cq_period, int, 0444);
+MODULE_PARM_DESC(cq_period, "time in usec for CQ event generation");
+
struct mlx4_cq_context {
__be32 flags;
u16 reserved1[3];
@@ -174,6 +182,8 @@ int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt,
cq_context->mtt_base_addr_h = mtt_addr >> 32;
cq_context->mtt_base_addr_l = cpu_to_be32(mtt_addr & 0xffffffff);
cq_context->db_rec_addr = cpu_to_be64(db_rec);
+ cq_context->cq_max_count = cq_max_count;
+ cq_context->cq_period = cq_period;
err = mlx4_SW2HW_CQ(dev, mailbox, cq->cqn);
mlx4_free_cmd_mailbox(dev, mailbox);
--
MST
More information about the general
mailing list