public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Chiang <achiang-VXdhtT5mjnY@public.gmane.org>
To: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	justin.chen-VXdhtT5mjnY@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: infiniband limit of 32 cards per system?
Date: Tue, 26 Jan 2010 15:03:33 -0700	[thread overview]
Message-ID: <20100126220333.GB12035@ldl.fc.hp.com> (raw)
In-Reply-To: <adaiqapplv7.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>

* Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>:
> 
>  > If that enum is indeed the limiting factor, would someone
>  > mind explaining (or pointing me at TFM ;) why it's limited
>  > to 32 devices?
> 
> That dates back to when device #s had 8 bits for major and 8
> bits for minor.  We got one major assigned for IB, and had to
> split up the 256 minors that gave us among userspace verbs,
> management access, etc.  And 32 seemed like a pretty reasonable
> limit for most uses.

Hm...

        IB_UMAD_MAX_PORTS  = 64,
        IB_UMAD_MAJOR      = 231,
        IB_UMAD_MINOR_BASE = 0
	register_chrdev_region(base_dev, IB_UMAD_MAX_PORTS * 2, "infiniband_mad");

        IB_UVERBS_MAJOR       = 231,
        IB_UVERBS_BASE_MINOR  = 192,
        IB_UVERBS_MAX_DEVICES = 32
	register_chrdev_region(IB_UVERBS_BASE_DEV, IB_UVERBS_MAX_DEVICES, "infiniband_verbs");

        IB_UCM_MAJOR = 231,
        IB_UCM_BASE_MINOR = 224,
        IB_UCM_MAX_DEVICES = 32
	register_chrdev_region(IB_UCM_BASE_DEV, IB_UCM_MAX_DEVICES, "infiniband_cm");

It looks like we have a hole from [128, 192).

Would it be something as simple as this?

diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uve
index 5f284ff..b9aa2b8 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -57,8 +57,8 @@ MODULE_LICENSE("Dual BSD/GPL");
 
 enum {
        IB_UVERBS_MAJOR       = 231,
-       IB_UVERBS_BASE_MINOR  = 192,
-       IB_UVERBS_MAX_DEVICES = 32
+       IB_UVERBS_BASE_MINOR  = 128,
+       IB_UVERBS_MAX_DEVICES = 64
 };
 
 #define IB_UVERBS_BASE_DEV     MKDEV(IB_UVERBS_MAJOR, IB_UVERBS_BASE_MINOR)

--
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

  parent reply	other threads:[~2010-01-26 22:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-25 23:50 infiniband limit of 32 cards per system? Alex Chiang
     [not found] ` <20100125235013.GD2828-TYHnb5JFxdjwUeR5qC7q4g@public.gmane.org>
2010-01-26  3:48   ` Roland Dreier
2010-01-26  3:59     ` Alex Chiang
     [not found]       ` <20100126035906.GA23347-e+Ta4ugHZmL3oGB3hsPCZA@public.gmane.org>
2010-01-26  4:03         ` Roland Dreier
     [not found]           ` <adaaaw1pl5d.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-01-26 21:38             ` Alex Chiang
     [not found]               ` <20100126213803.GA12035-e+Ta4ugHZmL3oGB3hsPCZA@public.gmane.org>
2010-01-26 23:52                 ` Roland Dreier
     [not found]     ` <adaiqapplv7.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-01-26 22:03       ` Alex Chiang [this message]
2010-01-27  0:09         ` Roland Dreier

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=20100126220333.GB12035@ldl.fc.hp.com \
    --to=achiang-vxdhtt5mjny@public.gmane.org \
    --cc=justin.chen-VXdhtT5mjnY@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@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