[ofa-general] Oddities with RDMA CM private data

Sean Hefty sean.hefty at intel.com
Mon Apr 21 12:34:14 PDT 2008


>I looked into the private_data chunk being exchanged during rdma_cm
>connection setup today, and there's something odd. I'm sending 8 bytes
>of data, but in the event handlers I get sizes such as 56, and 196.
>I haven't tracked it down, but my first suspicion would be that the
>code in cma.c adds its own private data, but forgets to decrement
>the data_len fields prior to calling the ULP event handler.
>
>Am I misunderstanding the semantics of private_data_len?

On the receive side of the rdma_cm, the length of the private data sent by the
user is unknown.  All that's known is the size of the data that was received.
For IB, this includes padded space to make the underlying CM MAD 256 bytes long.
>From the rdma_get_cm_event man page:

private_data_len
            The size of the private data  buffer.   Users  should  note
            that the size of the private data buffer may be larger than
            the amount of private data sent by the  remote  side.   Any
            additional space in the buffer will be zeroed out.

Basically, there isn't a data_len field that's carried in the connection
message.  Adding one would have required consuming some of the private data to
carry it.

- Sean




More information about the general mailing list