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 1AF03558B for ; Wed, 28 Sep 2016 05:51:08 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP; 27 Sep 2016 20:51:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,408,1470726000"; d="scan'208";a="14064342" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by orsmga005.jf.intel.com with ESMTP; 27 Sep 2016 20:51:07 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.164]) by IRSMSX106.ger.corp.intel.com ([169.254.8.209]) with mapi id 14.03.0248.002; Wed, 28 Sep 2016 04:51:06 +0100 From: "De Lara Guarch, Pablo" To: "Gonzalez Monroy, Sergio" , "dev@dpdk.org" Thread-Topic: [PATCH v2 1/7] examples/ipsec-secgw: change CBC IV generation Thread-Index: AQHSFW6Bha3YZ/KQMk6r69iENjruj6COSFmg Date: Wed, 28 Sep 2016 03:51:06 +0000 Message-ID: References: <1471971574-108998-1-git-send-email-sergio.gonzalez.monroy@intel.com> <1474616734-118291-1-git-send-email-sergio.gonzalez.monroy@intel.com> <1474616734-118291-2-git-send-email-sergio.gonzalez.monroy@intel.com> In-Reply-To: <1474616734-118291-2-git-send-email-sergio.gonzalez.monroy@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzY4MGM5MmEtZjc5My00YTgwLWFlZDEtY2JhZWU2Yjg3Nzc3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IktzUVJKSDV5ellEZ2VJMzBvU3dSYlVmbUhCa2dFYldEanRsaEFXWnNEaVk9In0= x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 1/7] examples/ipsec-secgw: change CBC IV generation 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, 28 Sep 2016 03:51:09 -0000 Hi Sergio, > -----Original Message----- > From: Gonzalez Monroy, Sergio > Sent: Friday, September 23, 2016 12:45 AM > To: dev@dpdk.org; De Lara Guarch, Pablo > Subject: [PATCH v2 1/7] examples/ipsec-secgw: change CBC IV generation >=20 > NIST SP800-38A recommends two methods to generate unpredictable IVs > (Initilisation Vector) for CBC mode: > 1) Apply the forward function to a nonce (ie. counter) > 2) Use a FIPS-approved random number generator >=20 > This patch implements the first recommended method by using the forward > function to generate the IV. >=20 > Signed-off-by: Sergio Gonzalez Monroy [...] > +static inline void * > +get_cop(struct rte_mbuf *m) > +{ > + struct ipsec_mbuf_metadata *priv =3D get_priv(m); > + > + return &priv->cop; > +} This function is not used in anywhere. Should it be called somewhere to get= the crypto op? > + > +static inline void * > +get_sym_cop(struct rte_crypto_op *cop) > +{ > + return (cop + 1); Why is this cop + 1? Am I missing something obvious? Maybe it is worth a comment here (I noticed this was already in the previou= s code, but I don't understand it :)) > +} > + > int > inbound_sa_check(struct sa_ctx *sa_ctx, struct rte_mbuf *m, uint32_t > sa_idx); >=20 > -- > 2.5.5 Thanks, Pablo