Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217707
b: refs/heads/master
c: 97cb7e4
h: refs/heads/master
i:
  217705: ea7569a
  217703: a29360e
v: v3
  • Loading branch information
Steve Wise authored and Roland Dreier committed Oct 23, 2010
1 parent 89e4f8d commit c6c3641
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc4ec9bd82dbe08499d801f45a1d49e4c7b66b20
refs/heads/master: 97cb7e40c69618ba03030b467faf60dc3ee982ee
39 changes: 33 additions & 6 deletions trunk/drivers/infiniband/core/ucma.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <linux/in6.h>
#include <linux/miscdevice.h>
#include <linux/slab.h>
#include <linux/sysctl.h>

#include <rdma/rdma_user_cm.h>
#include <rdma/ib_marshall.h>
Expand All @@ -50,8 +51,24 @@ MODULE_AUTHOR("Sean Hefty");
MODULE_DESCRIPTION("RDMA Userspace Connection Manager Access");
MODULE_LICENSE("Dual BSD/GPL");

enum {
UCMA_MAX_BACKLOG = 128
static unsigned int max_backlog = 1024;

static struct ctl_table_header *ucma_ctl_table_hdr;
static ctl_table ucma_ctl_table[] = {
{
.procname = "max_backlog",
.data = &max_backlog,
.maxlen = sizeof max_backlog,
.mode = 0644,
.proc_handler = proc_dointvec,
},
{ }
};

static struct ctl_path ucma_ctl_path[] = {
{ .procname = "net" },
{ .procname = "rdma_ucm" },
{ }
};

struct ucma_file {
Expand Down Expand Up @@ -686,8 +703,8 @@ static ssize_t ucma_listen(struct ucma_file *file, const char __user *inbuf,
if (IS_ERR(ctx))
return PTR_ERR(ctx);

ctx->backlog = cmd.backlog > 0 && cmd.backlog < UCMA_MAX_BACKLOG ?
cmd.backlog : UCMA_MAX_BACKLOG;
ctx->backlog = cmd.backlog > 0 && cmd.backlog < max_backlog ?
cmd.backlog : max_backlog;
ret = rdma_listen(ctx->cm_id, ctx->backlog);
ucma_put_ctx(ctx);
return ret;
Expand Down Expand Up @@ -1279,16 +1296,26 @@ static int __init ucma_init(void)
ret = device_create_file(ucma_misc.this_device, &dev_attr_abi_version);
if (ret) {
printk(KERN_ERR "rdma_ucm: couldn't create abi_version attr\n");
goto err;
goto err1;
}

ucma_ctl_table_hdr = register_sysctl_paths(ucma_ctl_path, ucma_ctl_table);
if (!ucma_ctl_table_hdr) {
printk(KERN_ERR "rdma_ucm: couldn't register sysctl paths\n");
ret = -ENOMEM;
goto err2;
}
return 0;
err:
err2:
device_remove_file(ucma_misc.this_device, &dev_attr_abi_version);
err1:
misc_deregister(&ucma_misc);
return ret;
}

static void __exit ucma_cleanup(void)
{
unregister_sysctl_table(ucma_ctl_table_hdr);
device_remove_file(ucma_misc.this_device, &dev_attr_abi_version);
misc_deregister(&ucma_misc);
idr_destroy(&ctx_idr);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/infiniband/hw/amso1100/c2_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ void c2_rnic_interrupt(struct c2_dev *c2dev)
static void handle_mq(struct c2_dev *c2dev, u32 mq_index)
{
if (c2dev->qptr_array[mq_index] == NULL) {
pr_debug("handle_mq: stray activity for mq_index=%d\n",
mq_index);
pr_debug(KERN_INFO "handle_mq: stray activity for mq_index=%d\n",
mq_index);
return;
}

Expand Down

0 comments on commit c6c3641

Please sign in to comment.