From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BD7DEA0096 for ; Thu, 6 Jun 2019 12:43:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7E8651B999; Thu, 6 Jun 2019 12:43:19 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D1EE01B95A for ; Thu, 6 Jun 2019 12:43:17 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jun 2019 03:43:16 -0700 X-ExtLoop1: 1 Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by fmsmga006.fm.intel.com with ESMTP; 06 Jun 2019 03:43:15 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.227]) by IRSMSX154.ger.corp.intel.com ([169.254.12.45]) with mapi id 14.03.0415.000; Thu, 6 Jun 2019 11:43:14 +0100 From: "Ananyev, Konstantin" To: "Drost, MariuszX" , "Nicolau, Radu" , "akhil.goyal@nxp.com" , "Lu, Wenzhuo" CC: "dev@dpdk.org" Thread-Topic: [PATCH 1/2] net/ixgbe: fix lack of ip type for crypto session Thread-Index: AQHVGr2/eX8o9BlFWEqbR8LvjQ1dW6aOc14g Date: Thu, 6 Jun 2019 10:43:13 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725801688E0FEE@IRSMSX104.ger.corp.intel.com> References: <20190604100644.13724-1-mariuszx.drost@intel.com> <20190604100644.13724-2-mariuszx.drost@intel.com> In-Reply-To: <20190604100644.13724-2-mariuszx.drost@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTI0NGJkNWItOWI3ZS00ZGFkLTliY2EtZTgwODI2MTFiZGUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiM09lM1E1ZDRkWUpGQTF6emZiOGpTV0VUN3RZY0ZyZDh5WUt0SVhkeEl3YlB2aWhVNHFDNXBCVWwySEUwbG4rdiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] net/ixgbe: fix lack of ip type for crypto session X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Drost, MariuszX > Sent: Tuesday, June 4, 2019 11:07 AM > To: Nicolau, Radu ; akhil.goyal@nxp.com; Lu, Wenz= huo ; Ananyev, Konstantin > > Cc: dev@dpdk.org; Drost, MariuszX > Subject: [PATCH 1/2] net/ixgbe: fix lack of ip type for crypto session >=20 > When ixgbe_crypto_add_sa() is called, it checks whether the ip type is > IPv6 or IPv4 to write correct addresses to the registers. Type itself > is never specified, and act as IPv4, which is the default value. > It causes lack of support for IPv6. >=20 > To fix that, ip type needs to be stored in device private data, based on > crypto session ip type field, before the checking is done. >=20 > Fixes: ec17993a145a ("examples/ipsec-secgw: support security offload") > Fixes: 9a0752f498d2 ("net/ixgbe: enable inline IPsec") >=20 > Signed-off-by: Mariusz Drost > --- > drivers/net/ixgbe/ixgbe_ipsec.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ipsec.c b/drivers/net/ixgbe/ixgbe_ip= sec.c > index 5a416885f..1eea70716 100644 > --- a/drivers/net/ixgbe/ixgbe_ipsec.c > +++ b/drivers/net/ixgbe/ixgbe_ipsec.c > @@ -154,8 +154,12 @@ ixgbe_crypto_add_sa(struct ixgbe_crypto_session *ic_= session) > if (ic_session->op =3D=3D IXGBE_OP_AUTHENTICATED_DECRYPTION) > priv->rx_sa_tbl[sa_index].mode |=3D > (IPSRXMOD_PROTO | IPSRXMOD_DECRYPT); > - if (ic_session->dst_ip.type =3D=3D IPv6) > + if (ic_session->dst_ip.type =3D=3D IPv6) { > priv->rx_sa_tbl[sa_index].mode |=3D IPSRXMOD_IPV6; > + priv->rx_ip_tbl[ip_index].ip.type =3D IPv6; > + } else if (ic_session->dst_ip.type =3D=3D IPv4) > + priv->rx_ip_tbl[ip_index].ip.type =3D IPv4; > + > priv->rx_sa_tbl[sa_index].used =3D 1; >=20 > /* write IP table entry*/ > -- Acked-by: Konstantin Ananyev Tested-by: Konstantin Ananyev > 2.17.1