git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drivers: remove octeontx2 drivers
[dpdk.git]
/
app
/
test
/
test_mp_secondary.c
diff --git
a/app/test/test_mp_secondary.c
b/app/test/test_mp_secondary.c
index
b597dfc
..
021ca05
100644
(file)
--- a/
app/test/test_mp_secondary.c
+++ b/
app/test/test_mp_secondary.c
@@
-28,27
+28,25
@@
#include <rte_lcore.h>
#include <rte_errno.h>
#include <rte_branch_prediction.h>
#include <rte_lcore.h>
#include <rte_errno.h>
#include <rte_branch_prediction.h>
-#include <rte_atomic.h>
#include <rte_ring.h>
#include <rte_debug.h>
#include <rte_log.h>
#include <rte_mempool.h>
#include <rte_ring.h>
#include <rte_debug.h>
#include <rte_log.h>
#include <rte_mempool.h>
-#ifdef RTE_LIB
RTE
_HASH
+#ifdef RTE_LIB_HASH
#include <rte_hash.h>
#include <rte_fbk_hash.h>
#include <rte_hash.h>
#include <rte_fbk_hash.h>
-#endif /* RTE_LIB
RTE
_HASH */
+#endif /* RTE_LIB_HASH */
-#ifdef RTE_LIB
RTE
_LPM
+#ifdef RTE_LIB_LPM
#include <rte_lpm.h>
#include <rte_lpm.h>
-#endif /* RTE_LIB
RTE
_LPM */
+#endif /* RTE_LIB_LPM */
#include <rte_string_fns.h>
#include "process.h"
#include <rte_string_fns.h>
#include "process.h"
-#define launch_proc(ARGV) process_dup(ARGV, \
- sizeof(ARGV)/(sizeof(ARGV[0])), __func__)
+#define launch_proc(ARGV) process_dup(ARGV, RTE_DIM(ARGV), __func__)
/*
* This function is called in the primary i.e. main test, to spawn off secondary
/*
* This function is called in the primary i.e. main test, to spawn off secondary
@@
-60,7
+58,7
@@
run_secondary_instances(void)
int ret = 0;
char coremask[10];
int ret = 0;
char coremask[10];
-#ifdef RTE_EXEC_ENV_LINUX
APP
+#ifdef RTE_EXEC_ENV_LINUX
char tmp[PATH_MAX] = {0};
char prefix[PATH_MAX] = {0};
char tmp[PATH_MAX] = {0};
char prefix[PATH_MAX] = {0};
@@
-86,7
+84,7
@@
run_secondary_instances(void)
prgname, "-c", coremask, "--proc-type=ERROR",
prefix
};
prgname, "-c", coremask, "--proc-type=ERROR",
prefix
};
-#ifdef RTE_EXEC_ENV_LINUX
APP
+#ifdef RTE_EXEC_ENV_LINUX
/* bad case, using invalid file prefix */
const char *argv4[] = {
prgname, "-c", coremask, "--proc-type=secondary",
/* bad case, using invalid file prefix */
const char *argv4[] = {
prgname, "-c", coremask, "--proc-type=secondary",
@@
-95,13
+93,20
@@
run_secondary_instances(void)
#endif
snprintf(coremask, sizeof(coremask), "%x", \
#endif
snprintf(coremask, sizeof(coremask), "%x", \
- (1 << rte_get_ma
ster
_lcore()));
+ (1 << rte_get_ma
in
_lcore()));
ret |= launch_proc(argv1);
ret |= launch_proc(argv1);
+ printf("### Testing rte_mp_disable() reject:\n");
+ if (rte_mp_disable()) {
+ printf("Error: rte_mp_disable() has been accepted\n");
+ ret |= -1;
+ } else {
+ printf("# Checked rte_mp_disable() is refused\n");
+ }
ret |= launch_proc(argv2);
ret |= !(launch_proc(argv3));
ret |= launch_proc(argv2);
ret |= !(launch_proc(argv3));
-#ifdef RTE_EXEC_ENV_LINUX
APP
+#ifdef RTE_EXEC_ENV_LINUX
ret |= !(launch_proc(argv4));
#endif
ret |= !(launch_proc(argv4));
#endif
@@
-151,7
+156,7
@@
run_object_creation_tests(void)
}
printf("# Checked rte_mempool_create() OK\n");
}
printf("# Checked rte_mempool_create() OK\n");
-#ifdef RTE_LIB
RTE
_HASH
+#ifdef RTE_LIB_HASH
const struct rte_hash_parameters hash_params = { .name = "test_mp_hash" };
rte_errno=0;
if ((rte_hash_create(&hash_params) != NULL) &&
const struct rte_hash_parameters hash_params = { .name = "test_mp_hash" };
rte_errno=0;
if ((rte_hash_create(&hash_params) != NULL) &&
@@
-171,7
+176,7
@@
run_object_creation_tests(void)
printf("# Checked rte_fbk_hash_create() OK\n");
#endif
printf("# Checked rte_fbk_hash_create() OK\n");
#endif
-#ifdef RTE_LIB
RTE
_LPM
+#ifdef RTE_LIB_LPM
rte_errno=0;
struct rte_lpm_config config;
rte_errno=0;
struct rte_lpm_config config;