Re: [PATCH] libibumad: add new registration ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 03, 2014 at 05:37:03PM -0400, ira.weiny@xxxxxxxxx wrote:
> From: Ira Weiny <ira.weiny@xxxxxxxxx>
> 
> This supports the new registration ioctl which the kernel is exporting.
> Specifically this adds flags to the registration operation.  The first such
> flag is to request user space RMPP.  Thus turning off kernel based RMPP
> coalescing.

Did the kernel side get posted?

> +struct umad_reg_attr {
> +	uint16_t   struct_version;
> +	uint8_t    mgmt_class;
> +	uint8_t    mgmt_class_version;
> +	uint32_t   flags;
> +	uint64_t   method_mask[2];
> +	uint8_t    oui[3]; /* network order */

Seems like oui should just be a uint32_t in host order, doesn't make
alot of API sense to burden callers with that detail.

> +	uint8_t    rmpp_version;
> +};
> +int umad_register2(int port_fd, struct umad_reg_attr *attr,
> +		   uint32_t *agent_id);

verbs has been moving to using sizeof(struct umad_reg_attr) not a
'struct_version', it would be nice to be consistent.

> +
> +
>  int umad_debug(int level);
>  void umad_addr_dump(ib_mad_addr_t * addr);
>  void umad_dump(void *umad);
> diff --git a/man/umad_register2.3 b/man/umad_register2.3
> new file mode 100644
> index 0000000..9086bb3
> +++ b/man/umad_register2.3
> @@ -0,0 +1,77 @@
> +.\" -*- nroff -*-
> +.\"
> +.TH UMAD_REGISTER2 3  "March 25, 2014" "OpenIB" "OpenIB Programmer\'s Manual"
> +.SH "NAME"
> +umad_register2 \- register the specified management class and version for port
> +.SH "SYNOPSIS"
> +.nf
> +.B #include <infiniband/umad.h>
> +.sp
> +.BI "int umad_register2(int " "port_fd" ", struct umad_reg_attr *" "attr" ", uint32_t *" "agent_id");
> +.fi
> +.SH "DESCRIPTION"
> +.B umad_register2()
> +registers for a MAD agent using the provided registration attributes
> +
> +.I port_fd\fR
> +the port on which to register the agent
> +
> +.I attr\fR
> +The registration attributes as defined by the structure passed.  See below for
> +details of this structure.  Future structures may be defined.
> +
> +.I agent_id\fR
> +returned on success.

The man page should describe what agent_id should be used for.. (I
expect it is the argument passed to umad_unregister?)

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux