[dpdk-dev] [PATCH v4 2/4] net/mlx4: spawn rdma-core dependency plug-in

Marcelo Ricardo Leitner mleitner at redhat.com
Tue Jan 30 18:54:59 CET 2018


On Tue, Jan 30, 2018 at 04:34:54PM +0100, Adrien Mazarguil wrote:
...
> +	handle = dlopen(MLX4_GLUE, RTLD_LAZY);
> +	if (!handle) {
> +		rte_errno = EINVAL;
> +		dlmsg = dlerror();
> +		if (dlmsg)
> +			ERROR("cannot load glue library: %s", dlmsg);
> +		goto glue_error;
> +	}
> +	sym = dlsym(handle, "mlx4_glue");
> +	if (!sym || !*sym) {
> +		rte_errno = EINVAL;
> +		dlmsg = dlerror();
> +		if (dlmsg)
> +			ERROR("cannot resolve glue symbol: %s", dlmsg);
> +		goto glue_error;
> +	}
> +	mlx4_glue = *sym;
> +	return 0;
> +glue_error:
> +	if (handle)
> +		dlclose(handle);
> +	ERROR("cannot initialize PMD due to missing run-time"
> +	      " dependency on rdma-core libraries (libibverbs,"
> +	      " libmlx4)");

Patches are mostly LGTM. The only concern left is if ERROR is the
appropriate log level here. I know it's a fatal error for Mellanox
cards, but Considering DPDK will load all drivers for probing the hw,
these messages will show up even when using other cards. So what about
switching to WARNING instead? Should be less confusing to the users
then.

  Marcelo


More information about the dev mailing list