From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id CA4322BCE for ; Fri, 8 Apr 2016 19:01:05 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 08 Apr 2016 10:01:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,454,1455004800"; d="scan'208";a="683096702" Received: from sie-lab-214-036.ir.intel.com (HELO sie-lab-214-36.ir.intel.com) ([10.237.214.36]) by FMSMGA003.fm.intel.com with ESMTP; 08 Apr 2016 10:01:03 -0700 From: Pablo de Lara To: dev@dpdk.org Cc: sergio.gonzalez.monroy@intel.com, Pablo de Lara Date: Fri, 8 Apr 2016 18:01:09 +0100 Message-Id: <1460134869-42603-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [dpdk-dev] [PATCH] ipsec-secgw: fix anonymous union initialization 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: Fri, 08 Apr 2016 17:01:06 -0000 In icc 14.0, compilation was broken: examples/ipsec-secgw/sa.c(212): error: a designator for an anonymous union member can only appear within braces corresponding to that anonymous union .cipher = { RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_CIPHER_AES_CBC, ^ The member in anonymous union initialization should be inside '{}', otherwise it will report an error. Fixes: d299106e8e31 (examples/ipsec-secgw: add IPsec sample application) Signed-off-by: Pablo de Lara --- examples/ipsec-secgw/sa.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index a5b8a63..b6260ed 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -209,15 +209,17 @@ static uint8_t cipher_key[256] = "sixteenbytes key"; const struct rte_crypto_sym_xform aescbc_enc_xf = { NULL, RTE_CRYPTO_SYM_XFORM_CIPHER, - .cipher = { RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_CIPHER_AES_CBC, + {.cipher = { RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_CIPHER_AES_CBC, .key = { cipher_key, 16 } } + } }; const struct rte_crypto_sym_xform aescbc_dec_xf = { NULL, RTE_CRYPTO_SYM_XFORM_CIPHER, - .cipher = { RTE_CRYPTO_CIPHER_OP_DECRYPT, RTE_CRYPTO_CIPHER_AES_CBC, + {.cipher = { RTE_CRYPTO_CIPHER_OP_DECRYPT, RTE_CRYPTO_CIPHER_AES_CBC, .key = { cipher_key, 16 } } + } }; static uint8_t auth_key[256] = "twentybytes hash key"; @@ -226,28 +228,32 @@ static uint8_t auth_key[256] = "twentybytes hash key"; const struct rte_crypto_sym_xform sha1hmac_gen_xf = { NULL, RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { RTE_CRYPTO_AUTH_OP_GENERATE, RTE_CRYPTO_AUTH_SHA1_HMAC, + {.auth = { RTE_CRYPTO_AUTH_OP_GENERATE, RTE_CRYPTO_AUTH_SHA1_HMAC, .key = { auth_key, 20 }, 12, 0 } + } }; const struct rte_crypto_sym_xform sha1hmac_verify_xf = { NULL, RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { RTE_CRYPTO_AUTH_OP_VERIFY, RTE_CRYPTO_AUTH_SHA1_HMAC, + {.auth = { RTE_CRYPTO_AUTH_OP_VERIFY, RTE_CRYPTO_AUTH_SHA1_HMAC, .key = { auth_key, 20 }, 12, 0 } + } }; /* AES CBC xform */ const struct rte_crypto_sym_xform null_cipher_xf = { NULL, RTE_CRYPTO_SYM_XFORM_CIPHER, - .cipher = { .algo = RTE_CRYPTO_CIPHER_NULL } + {.cipher = { .algo = RTE_CRYPTO_CIPHER_NULL } + } }; const struct rte_crypto_sym_xform null_auth_xf = { NULL, RTE_CRYPTO_SYM_XFORM_AUTH, - .auth = { .algo = RTE_CRYPTO_AUTH_NULL } + {.auth = { .algo = RTE_CRYPTO_AUTH_NULL } + } }; struct sa_ctx { -- 2.5.5