summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>2016-06-09 09:42:47 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-06-21 12:10:04 +0200
commit54526a537573ff9c2fd2ee3a454ed808b96435e1 (patch)
tree9ddfa08eae9d415d364782899385eee259d26c5e /examples
parent85f847672767062584e0fe9a9b603d90e5b058d0 (diff)
downloaddpdk-54526a537573ff9c2fd2ee3a454ed808b96435e1.zip
dpdk-54526a537573ff9c2fd2ee3a454ed808b96435e1.tar.gz
dpdk-54526a537573ff9c2fd2ee3a454ed808b96435e1.tar.xz
examples/ipsec-secgw: rename SP config
Modify the default SP config variables names to be consistent with SA. The resulting naming convention is that variables with suffixes _out/_in are the default for ep0 and the reverse for ep1. Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/ipsec-secgw/sp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/ipsec-secgw/sp.c b/examples/ipsec-secgw/sp.c
index 4f16730..6aa377d 100644
--- a/examples/ipsec-secgw/sp.c
+++ b/examples/ipsec-secgw/sp.c
@@ -112,7 +112,7 @@ struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
RTE_ACL_RULE_DEF(acl4_rules, RTE_DIM(ipv4_defs));
-const struct acl4_rules acl4_rules_in[] = {
+const struct acl4_rules acl4_rules_out[] = {
{
.data = {.userdata = PROTECT(5), .category_mask = 1, .priority = 1},
/* destination IPv4 */
@@ -175,7 +175,7 @@ const struct acl4_rules acl4_rules_in[] = {
}
};
-const struct acl4_rules acl4_rules_out[] = {
+const struct acl4_rules acl4_rules_in[] = {
{
.data = {.userdata = PROTECT(5), .category_mask = 1, .priority = 1},
/* destination IPv4 */
@@ -343,15 +343,15 @@ sp_init(struct socket_ctx *ctx, int socket_id, unsigned ep)
"initialized\n", socket_id);
if (ep == 0) {
- rules_out = acl4_rules_in;
- nb_out_rules = RTE_DIM(acl4_rules_in);
- rules_in = acl4_rules_out;
- nb_in_rules = RTE_DIM(acl4_rules_out);
- } else if (ep == 1) {
rules_out = acl4_rules_out;
nb_out_rules = RTE_DIM(acl4_rules_out);
rules_in = acl4_rules_in;
nb_in_rules = RTE_DIM(acl4_rules_in);
+ } else if (ep == 1) {
+ rules_out = acl4_rules_in;
+ nb_out_rules = RTE_DIM(acl4_rules_in);
+ rules_in = acl4_rules_out;
+ nb_in_rules = RTE_DIM(acl4_rules_out);
} else
rte_exit(EXIT_FAILURE, "Invalid EP value %u. "
"Only 0 or 1 supported.\n", ep);