From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 03C5CA0613 for ; Tue, 24 Sep 2019 13:25:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8DC1E2BF2; Tue, 24 Sep 2019 13:25:29 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id A3FB62BE6 for ; Tue, 24 Sep 2019 13:25:28 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2019 04:25:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,543,1559545200"; d="scan'208";a="218594173" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga002.fm.intel.com with ESMTP; 24 Sep 2019 04:25:26 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.164]) by IRSMSX103.ger.corp.intel.com ([169.254.3.36]) with mapi id 14.03.0439.000; Tue, 24 Sep 2019 12:25:25 +0100 From: "Ananyev, Konstantin" To: Akhil Goyal , "dev@dpdk.org" CC: "hemant.agrawal@nxp.com" Thread-Topic: [PATCH v3 3/3] examples/ipsec-secgw: support IPv6 tunnel for lookaside proto Thread-Index: AQHVY+o1ae60S2A/5U6ujqC/wbPUxqc6zL8w Date: Tue, 24 Sep 2019 11:25:25 +0000 Message-ID: <2601191342CEEE43887BDE71AB97725801919699A4@irsmsx105.ger.corp.intel.com> References: <20190805082205.10794-1-akhil.goyal@nxp.com> <20190905124807.22158-1-akhil.goyal@nxp.com> <20190905124807.22158-4-akhil.goyal@nxp.com> In-Reply-To: <20190905124807.22158-4-akhil.goyal@nxp.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDcwOWNlODktNTMzZi00ZjEyLWJkZjEtNWQ1ODBlY2VmZDMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidVwvekJpaTZ0MmtYTlVoTDQ0V0ttanBPV2ZkYWRONXpobUUxSFZ6MmtjZGlGRmhhSjNDNFVkSWZ2QmJnXC9FSjZlIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action 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 v3 3/3] examples/ipsec-secgw: support IPv6 tunnel for lookaside proto 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: Akhil Goyal [mailto:akhil.goyal@nxp.com] > Sent: Thursday, September 5, 2019 1:48 PM > To: dev@dpdk.org > Cc: hemant.agrawal@nxp.com; Ananyev, Konstantin ; Akhil Goyal > Subject: [PATCH v3 3/3] examples/ipsec-secgw: support IPv6 tunnel for loo= kaside proto >=20 > IPv6 tunnels are already supported in case of inline and > lookaside none cases. In case of protocol offload, the details > for IPv6 header need to be added in session configuration > for security session create. >=20 > Signed-off-by: Akhil Goyal > --- > examples/ipsec-secgw/ipsec.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) >=20 > diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c > index dc85adfe5..317faed7a 100644 > --- a/examples/ipsec-secgw/ipsec.c > +++ b/examples/ipsec-secgw/ipsec.c > @@ -33,8 +33,20 @@ set_ipsec_conf(struct ipsec_sa *sa, struct rte_securit= y_ipsec_xform *ipsec) >=20 > memcpy((uint8_t *)&tunnel->ipv4.dst_ip, > (uint8_t *)&sa->dst.ip.ip4, 4); > + } else if (IS_IP6_TUNNEL(sa->flags)) { > + tunnel->type =3D > + RTE_SECURITY_IPSEC_TUNNEL_IPV6; > + tunnel->ipv6.hlimit =3D IPDEFTTL; > + tunnel->ipv6.dscp =3D 0; > + tunnel->ipv6.flabel =3D 0; > + > + memcpy((uint8_t *)&tunnel->ipv6.src_addr, > + (uint8_t *)&sa->src.ip.ip6.ip6_b, 16); > + > + memcpy((uint8_t *)&tunnel->ipv6.dst_addr, > + (uint8_t *)&sa->dst.ip.ip6.ip6_b, 16); > } > - /* TODO support for Transport and IPV6 tunnel */ > + /* TODO support for Transport */ > } > ipsec->esn_soft_limit =3D IPSEC_OFFLOAD_ESN_SOFTLIMIT; > } > -- Acked-by: Konstantin Ananyev > 2.17.1