[Ofvwg] Further thoughts on uAPI
Doug Ledford
dledford at redhat.com
Tue Apr 26 06:18:04 PDT 2016
On 4/25/2016 2:19 PM, Jason Gunthorpe wrote:
> There has been a lot of talk of using a structure like netlink with a
> linked list of binary attributes and an optional/mandatory flag. For
> the lower speed stuff that seems reasonable, though it is certainly
> over-engineered for some commands.
>
> So, a sketch would look like this:
>
> struct msg
> {
> uint16_t length;
> uint16_t class_id;
> uint32_t object_id; // in/out
> struct qp_base_attr
> {
> uint16_t length;
> uint16_t attribute_id;
>
> uint16_t qpn; //in/out
> uint16_t qp_flags;
> uint16_t max_send_wr,max_recv_qr,max_send_sge,////
> };
> // Option to piggy back what ibv_modify_qp does:
> struct qp_addr_ib
> {
> uint16_t length;
> uint16_t attribute_id;
>
> uint16_t dlid,slid,sl,pkey,etc;
> }
> }
>
> msg.length = sizeof(msg);
> msg.class_id = RDMA_OBJ_QP_UD;
> msg.base.legnth = sizeof(msg.base);
> msg.base.attribute_id = RDMA_ATTR_QP_BASE;
> msg.base.qp_flags = XX
> [..]
> ioctl(fd,RDMA_CREATE_OBJECT,&msg);
> [..]
> ioctl(fd,RDMA_MODIFY_OBJECT,&msg2);
I think I would do it slightly differently. In this example, the
class_id covers the entire list of commands. It might be more desirable
if each command in the linked list was fully self-contained and
complete. For the example of the cmtime program that's part of
librdamcm, when you run it with 1000s of connections as the test, being
able to pipeline 10, or 50, or 100 different commands would be useful to
the test. Likewise, a verbs 2.0 application might want to build up a
chain of commands and pass the whole chain down in one ioctl.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openfabrics.org/pipermail/ofvwg/attachments/20160426/959f9447/attachment.sig>
More information about the ofvwg
mailing list