env_dpdk: modify error message when DPDK already initialized
Ideally we'd have a way to query if DPDK is already initialized but we don't have that yet. We want that for the case where we have an SPDK application that's part of a framework that may (or may not) have already initialized DPDK. If it's already been initialized, let's print an error message that isn't quite as inflammatory. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ifc095245dcdef24cdeeaab2dbe791ca4e840870e Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471422 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
37c0a02e1c
commit
570d89a24a
@ -459,7 +459,11 @@ spdk_env_init(const struct spdk_env_opts *opts)
|
||||
free(dpdk_args);
|
||||
|
||||
if (rc < 0) {
|
||||
fprintf(stderr, "Failed to initialize DPDK\n");
|
||||
if (rte_errno == EALREADY) {
|
||||
fprintf(stderr, "DPDK already initialized\n");
|
||||
} else {
|
||||
fprintf(stderr, "Failed to initialize DPDK\n");
|
||||
}
|
||||
return -rte_errno;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user