Skip to content

Contrail dpdk 17 02 mlx rdma deps#2

Open
elavee wants to merge 8 commits intoJuniper:contrail_dpdk_17_02from
elavee:contrail_dpdk_17_02_mlx_rdma_deps
Open

Contrail dpdk 17 02 mlx rdma deps#2
elavee wants to merge 8 commits intoJuniper:contrail_dpdk_17_02from
elavee:contrail_dpdk_17_02_mlx_rdma_deps

Conversation

@elavee
Copy link

@elavee elavee commented Feb 6, 2018

This patch set removes static dependencies when enabling mlx4/5 PMDs.

This is done through an intermediate internal plug-in hard-linked with rdma-core (to preserve symbol versioning) loaded by the PMD through dlopen(), so that a missing rdma-core does not cause unresolved
symbols, allowing applications to start normally in the absence of the dependencies (for systems not using mlx4/5 supported NICs).

This is a backport of upstreamed patch series introduced in DPDK 17.08:
http://dpdk.org/dev/patchwork/patch/34726/ (4 patches)
http://dpdk.org/dev/patchwork/patch/34896/ (4 patches)

mlx4/5 PMDs are still maintained disabled by default until required CI/build dependencies are handled.

am6 and others added 8 commits February 6, 2018 07:50
This lays the groundwork for externalizing rdma-core as an optional
run-time dependency instead of a mandatory one.

No functional change.

Signed-off-by: Eyal Lavee <elavee@mellanox.com>
When mlx4 is not compiled directly as an independent shared object (e.g.
CONFIG_RTE_BUILD_SHARED_LIB not enabled for performance reasons), DPDK
applications inherit its dependencies on libibverbs and libmlx4 through
rte.app.mk.

This is an issue both when DPDK is delivered as a binary package (Linux
distributions) and for end users because rdma-core then propagates as a
mandatory dependency for everything.

Application writers relying on binary DPDK packages are not necessarily
aware of this fact and may end up delivering packages with broken
dependencies.

This patch therefore introduces an intermediate internal plug-in
hard-linked with rdma-core (to preserve symbol versioning) loaded by the
PMD through dlopen(), so that a missing rdma-core does not cause unresolved
symbols, allowing applications to start normally.

Signed-off-by: Eyal Lavee <elavee@mellanox.com>
This lays the groundwork for externalizing rdma-core as an optional
run-time dependency instead of a mandatory one.

No functional change.

Signed-off-by: Eyal Lavee <elavee@mellanox.com>
When mlx5 is not compiled directly as an independent shared object (e.g.
CONFIG_RTE_BUILD_SHARED_LIB not enabled for performance reasons), DPDK
applications inherit its dependencies on libibverbs and libmlx5 through
rte.app.mk.

This is an issue both when DPDK is delivered as a binary package (Linux
distributions) and for end users because rdma-core then propagates as a
mandatory dependency for everything.

Application writers relying on binary DPDK packages are not necessarily
aware of this fact and may end up delivering packages with broken
dependencies.

This patch therefore introduces an intermediate internal plug-in
hard-linked with rdma-core (to preserve symbol versioning) loaded by the
PMD through dlopen(), so that a missing rdma-core does not cause unresolved
symbols, allowing applications to start normally.

Signed-off-by: Eyal Lavee <elavee@mellanox.com>
This code should catch mistakes early if a glue structure member is added
without a corresponding implementation in the library.

Signed-off-by: Eyal Lavee <elavee@mellanox.com>
When built as separate objects, these libraries do not have unique names.
Since they do not maintain a stable ABI, loading an incompatible library
may result in a crash (e.g. in case multiple versions are installed).

This patch addresses the above by versioning glue libraries, both on the
file system (version suffix) and by comparing a dedicated version field
member in glue structures.

Signed-off-by: Eyal Lavee <elavee@mellanox.com>
Since rdma-core glue libraries are intrinsically tied to their respective
PMDs and used as internal plug-ins, their presence in the default search
path among other system libraries for the dynamic linker is not necessarily
desired.

This commit enables their installation and subsequent look-up at run time
in RTE_EAL_PMD_PATH if configured to a nonempty string. This path can also
be overridden by environment variables MLX[45]_GLUE_PATH.

Signed-off-by: Eyal Lavee <elavee@mellanox.com>
Signed-off-by: Eyal Lavee <elavee@mellanox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants