Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 18.05
[deb_dpdk.git]
/
examples
/
ip_pipeline
/
parser.c
diff --git
a/examples/ip_pipeline/parser.c
b/examples/ip_pipeline/parser.c
index
0901e9c
..
ffcdeb3
100644
(file)
--- a/
examples/ip_pipeline/parser.c
+++ b/
examples/ip_pipeline/parser.c
@@
-36,10
+36,8
@@
#include <sys/wait.h>
#include <rte_errno.h>
#include <sys/wait.h>
#include <rte_errno.h>
-#include <rte_cfgfile.h>
#include <rte_string_fns.h>
#include <rte_string_fns.h>
-#include "app.h"
#include "parser.h"
static uint32_t
#include "parser.h"
static uint32_t
@@
-596,10
+594,8
@@
parse_mac_addr(const char *token, struct ether_addr *addr)
}
int
}
int
-parse_pipeline_core(uint32_t *socket,
- uint32_t *core,
- uint32_t *ht,
- const char *entry)
+parse_cpu_core(const char *entry,
+ struct cpu_core_params *p)
{
size_t num_len;
char num[8];
{
size_t num_len;
char num[8];
@@
-609,6
+605,9
@@
parse_pipeline_core(uint32_t *socket,
const char *next = skip_white_spaces(entry);
char type;
const char *next = skip_white_spaces(entry);
char type;
+ if (p == NULL)
+ return -EINVAL;
+
/* Expect <CORE> or [sX][cY][h]. At least one parameter is required. */
while (*next != '\0') {
/* If everything parsed nothing should left */
/* Expect <CORE> or [sX][cY][h]. At least one parameter is required. */
while (*next != '\0') {
/* If everything parsed nothing should left */
@@
-682,8
+681,8
@@
parse_pipeline_core(uint32_t *socket,
}
}
}
}
-
*socket
= s;
-
*core
= c;
-
*ht
= h;
+
p->socket_id
= s;
+
p->core_id
= c;
+
p->thread_id
= h;
return 0;
}
return 0;
}