diff options
author | Michael S. Tsirkin <mst@dev.mellanox.co.il> | 2007-05-03 06:48:47 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-05-07 00:18:11 -0400 |
commit | f4fd0b224d60044d2da5ca02f8f2b5150c1d8731 (patch) | |
tree | 9bc6c08bde26e6b7d5c51ebd48fc26357d6ae9c5 /drivers/infiniband/ulp/ipoib | |
parent | 154257f3626ea6dd96781fac0896c3f27fe2b0a1 (diff) |
IB: Add CQ comp_vector support
Add a num_comp_vectors member to struct ib_device and extend
ib_create_cq() to pass in a comp_vector parameter -- this parallels
the userspace libibverbs API. Update all hardware drivers to set
num_comp_vectors to 1 and have all ULPs pass 0 for the comp_vector
value. Pass the value of num_comp_vectors to userspace rather than
hard-coding a value of 1.
We want multiple CQ event vector support (via MSI-X or similar for
adapters that can generate multiple interrupts), but it's not clear
how many vectors we want, or how we want to deal with policy issues
such as how to decide which vector to use or how to set up interrupt
affinity. This patch is useful for experimenting, since no core
changes will be necessary when updating a driver to support multiple
vectors, and we know that we want to make at least these changes
anyway.
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_cm.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 1e27930077e6..b8089a041581 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -793,7 +793,7 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn, | |||
793 | } | 793 | } |
794 | 794 | ||
795 | p->cq = ib_create_cq(priv->ca, ipoib_cm_tx_completion, NULL, p, | 795 | p->cq = ib_create_cq(priv->ca, ipoib_cm_tx_completion, NULL, p, |
796 | ipoib_sendq_size + 1); | 796 | ipoib_sendq_size + 1, 0); |
797 | if (IS_ERR(p->cq)) { | 797 | if (IS_ERR(p->cq)) { |
798 | ret = PTR_ERR(p->cq); | 798 | ret = PTR_ERR(p->cq); |
799 | ipoib_warn(priv, "failed to allocate tx cq: %d\n", ret); | 799 | ipoib_warn(priv, "failed to allocate tx cq: %d\n", ret); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c index 7f3ec205e35f..5c3c6a43a52b 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_verbs.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_verbs.c | |||
@@ -187,7 +187,7 @@ int ipoib_transport_dev_init(struct net_device *dev, struct ib_device *ca) | |||
187 | if (!ret) | 187 | if (!ret) |
188 | size += ipoib_recvq_size; | 188 | size += ipoib_recvq_size; |
189 | 189 | ||
190 | priv->cq = ib_create_cq(priv->ca, ipoib_ib_completion, NULL, dev, size); | 190 | priv->cq = ib_create_cq(priv->ca, ipoib_ib_completion, NULL, dev, size, 0); |
191 | if (IS_ERR(priv->cq)) { | 191 | if (IS_ERR(priv->cq)) { |
192 | printk(KERN_WARNING "%s: failed to create CQ\n", ca->name); | 192 | printk(KERN_WARNING "%s: failed to create CQ\n", ca->name); |
193 | goto out_free_mr; | 193 | goto out_free_mr; |