Re: [PATCH rdma-core 0/7] Add mlx5 direct verbs

Yishai Hadas
2017-01-26T21:54:53Z

On 1/26/2017 7:25 PM, Jason Gunthorpe wrote:
> On Thu, Jan 26, 2017 at 05:56:15PM +0200, Yishai Hadas wrote:
>> This patchset from Leon adds direct access to mlx5 devices.
>>
>> The libibverbs API is an abstract API. It is agnostic to any underlying
>> provider specific implementation. While this abstraction has the advantage of
>> user applications portability it has a performance penalty. For some
>> applications optimizing performance is more important than portability.
>>
>> The mlx5 direct verbs API introduced in this patchset is intended for such
>> applications. It exposes mlx5 specific low level data path
>> (send/receive/completion) operations, allowing the application to bypass the
>> libibverbs data path API.
>
> Applications need to link directly to the libraries that provide the
> symbols they use - this approach you have where linking happens
> implicitly at runtime is not OK.

Correct, the link will be explicitly by the application at compile time
so that the exported symbols will be resolved.

The below note from the cover letter planned to point on that:
"The direct include of dv.h together with linkage to mlx5 library will
allow usage of this new interface"

> Somehow libmlx needs to be in the standard ld.so search path, and
> available for linking via gcc, as well as continuing to be a plugin..
> The best choice might be to put it in /usr/lib/../libmlx5.so.1 and
> symlink that file to /usr/lib/../libibverbs/libmlx5-rdmav2.so

You are pointing on same usage as done for libibverbs which has the
symlink, correct ? Alternatively, application can use the linker flags
as part of its Makefile to find the shared library location, isn't it ?

> This series also needs patches to the included packaging files to
> bundle the new files. (buildlib/cbuild exists for a reason, be sure to
> test the packaging)

Thanks for pointing on, we'll add and test the packaging.

> These probably need a man page as well. It wasn't instantly obvious to
> me how these were supposed to work.

Sure, we can add some man page here.