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
doc: fix nics features matrix for ixgbe
[dpdk.git]
/
examples
/
ip_pipeline
/
pipeline
/
pipeline_firewall_be.c
diff --git
a/examples/ip_pipeline/pipeline/pipeline_firewall_be.c
b/examples/ip_pipeline/pipeline/pipeline_firewall_be.c
index
1c376f7
..
e7a8a4c
100644
(file)
--- a/
examples/ip_pipeline/pipeline/pipeline_firewall_be.c
+++ b/
examples/ip_pipeline/pipeline/pipeline_firewall_be.c
@@
-1,7
+1,7
@@
/*-
* BSD LICENSE
*
/*-
* BSD LICENSE
*
- * Copyright(c) 2010-201
5
Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-201
6
Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-42,6
+42,7
@@
#include <rte_table_acl.h>
#include "pipeline_firewall_be.h"
#include <rte_table_acl.h>
#include "pipeline_firewall_be.h"
+#include "parser.h"
struct pipeline_firewall {
struct pipeline p;
struct pipeline_firewall {
struct pipeline p;
@@
-308,17
+309,26
@@
pipeline_firewall_parse_args(struct pipeline_firewall *p,
char *arg_value = params->args_value[i];
if (strcmp(arg_name, "n_rules") == 0) {
char *arg_value = params->args_value[i];
if (strcmp(arg_name, "n_rules") == 0) {
- if (n_rules_present)
- return -1;
+ int status;
+
+ PIPELINE_PARSE_ERR_DUPLICATE(
+ n_rules_present == 0, params->name,
+ arg_name);
n_rules_present = 1;
n_rules_present = 1;
- p->n_rules = atoi(arg_value);
+ status = parser_read_uint32(&p->n_rules,
+ arg_value);
+ PIPELINE_PARSE_ERR_INV_VAL((status != -EINVAL),
+ params->name, arg_name, arg_value);
+ PIPELINE_PARSE_ERR_OUT_RNG((status != -ERANGE),
+ params->name, arg_name, arg_value);
continue;
}
if (strcmp(arg_name, "pkt_type") == 0) {
continue;
}
if (strcmp(arg_name, "pkt_type") == 0) {
- if (pkt_type_present)
- return -1;
+ PIPELINE_PARSE_ERR_DUPLICATE(
+ pkt_type_present == 0, params->name,
+ arg_name);
pkt_type_present = 1;
/* ipv4 */
pkt_type_present = 1;
/* ipv4 */
@@
-351,11
+361,12
@@
pipeline_firewall_parse_args(struct pipeline_firewall *p,
}
/* other */
}
/* other */
- return -1;
+ PIPELINE_PARSE_ERR_INV_VAL(0, params->name,
+ arg_name, arg_value);
}
/* other */
}
/* other */
-
return -1
;
+
PIPELINE_PARSE_ERR_INV_ENT(0, params->name, arg_name)
;
}
return 0;
}
return 0;
@@
-439,7
+450,6
@@
pipeline_firewall_init(struct pipeline_params *params,
.arg_create = pipeline_port_out_params_convert(
¶ms->port_out[i]),
.f_action = NULL,
.arg_create = pipeline_port_out_params_convert(
¶ms->port_out[i]),
.f_action = NULL,
- .f_action_bulk = NULL,
.arg_ah = NULL,
};
.arg_ah = NULL,
};