From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id F2553ADE3 for ; Wed, 18 May 2016 14:42:18 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 18 May 2016 05:42:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,329,1459839600"; d="scan'208";a="983675762" Received: from sie-lab-212-209.ir.intel.com (HELO silpixa00377983.ir.intel.com) ([10.237.212.209]) by fmsmga002.fm.intel.com with ESMTP; 18 May 2016 05:42:17 -0700 From: Sergio Gonzalez Monroy To: dev@dpdk.org Cc: john.mcnamara@intel.com Date: Wed, 18 May 2016 13:42:07 +0100 Message-Id: <1463575330-8467-7-git-send-email-sergio.gonzalez.monroy@intel.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1463575330-8467-1-git-send-email-sergio.gonzalez.monroy@intel.com> References: <1462552302-5852-1-git-send-email-sergio.gonzalez.monroy@intel.com> <1463575330-8467-1-git-send-email-sergio.gonzalez.monroy@intel.com> Subject: [dpdk-dev] [PATCH v2 6/9] examples/ipsec-secgw: consistent config variable names X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2016 12:42:19 -0000 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 --- examples/ipsec-secgw/sp.c | 14 +++++++------- 1 file 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); -- 2.5.5