I'm using a mellanox Infiniband card MT26428 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE].
Additionaly, I'm using the mlnx-ofed-kernel-3.1 on linux kernel version 3.13.0.
When the card is connected and configured (opensm running and the card is connected to another one), I experimented that every 9 seconds the card send 8 interrupts consisting of 4 pairs of type MLX4_EVENT_TYPE_COMP and MLX4_EVENT_TYPE_CMD.
If I modify the function mlx4_interrupt code (which is the interrupt handler in the mlnx-ofed-kernel-3.1) to avoid the handling those two interrupt, the completion queue are immedialty destroy and data transfers are stop.
My question is what are the purpose of those interrupt and why are they that mandatory for to keep queue pair available ?
Here are the codes called by each of those interrupt event in drivers/net/ethernet/mellanox/mlx4/eq.c
cqn = be32_to_cpu(eqe->event.comp.cqn) & 0xffffff;
mlx4_cmd_event(dev, be16_to_cpu(eqe->event.cmd.token), eqe->event.cmd.status, be64_to_cpu(eqe->event.cmd.out_param));
These events are one from the many others that you can find in MLX4_EVENT_TYPE_XXXXX definitions. Events comes from the event queue and define event.
MLX4_EVENT_TYPE_COMP is completion
MLX4_EVENT_TYPE_CMD related to the command performed by the hardware
It is not clear, what you are trying to do and what is the need to modify these functions, bus seems that you playing with two most important functions that can cause to such behaviour.