From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 29075A0C57; Wed, 8 Sep 2021 16:11:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AAEBA411D6; Wed, 8 Sep 2021 16:11:29 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 5972241102 for ; Wed, 8 Sep 2021 16:11:28 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1889r4sB000992; Wed, 8 Sep 2021 07:11:27 -0700 Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2172.outbound.protection.outlook.com [104.47.57.172]) by mx0b-0016f401.pphosted.com with ESMTP id 3axtxc0yng-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Sep 2021 07:11:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RFOH22+eoSSLyQrUaMkqT9wr6kI7blmzWbb5Le5FB3pQh8AOGgDEYadJYMaTI0R6wYa8LVxbtNaKz9zLJz5BVgkKG2PmA5dNNXVGOd7F5A1WrmXVlO0USSTVoT4+jWWu2fwKobQJDjTZyqYGtZe0OeOwLySq07CVLbAUhpLkCb5vy0fb2cndljJC54cAFg2USlyX8Lq8pqtf0/A1PuPwflExcziWCgXIvDmkSvIBbAAgcr/tJQpZKVYMKiL4Nb976+zpJTMz53NIky+U5PPR+K/icPiwkQsvZshv7xx8xLsfeHt91jQUnSSQHOj07Dpx8h/jSMFP3ytiE93hSDfyFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=fF9wBok+aRFr4H7Ui/iA/iwXObD3JOXBkSUBjvVOmEs=; b=KJK8hrRFlj+h28ByG/lEwnT0S8YwER3+9Y3Sw+H00YgCMvGpr7eTda5NUa4Fc20hIf4QV9/x9RGZfMGQohRzt2RbgOpTMMuI7QO7KYKz8KHgvnWvux2tQauta6bgaFdcRDcfyLC/7scmpPPIPZmaCSWhgU5LUipguecT+Jb5e4RIFGrcSFb9OwaTfmprP5L2co/tW7/fYFRxLQ8eNjZvcgjTXNxlAglORYBYDyc81JTdc2tG0yWJiMv1ujcVDtPUpMGeNgOGnAcE4Eb3EnLrC7XGEbfWtmuxpc/bYyqanPUmc5EywR+6WQeDxbBsPKph2ZxIKL0EPutB+gzHwVq9vA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fF9wBok+aRFr4H7Ui/iA/iwXObD3JOXBkSUBjvVOmEs=; b=es7rjHRBjLQgSbf3zJoAypqDw8GEQzXtBhnyen1UPQksKyO0a0E0Dw7dF61e4h8OmomwfMUgSkWC+EWuh/O17TWSLqcvwagsW5e38DSg6yj3UJMz+o9o3+PuyN3lHFFNYtICpEZhDsZ4U3066ZRQsDYZ2JSebiRCOtEwHDeCKBo= Received: from PH0PR18MB4491.namprd18.prod.outlook.com (2603:10b6:510:e6::13) by PH0PR18MB4718.namprd18.prod.outlook.com (2603:10b6:510:cc::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Wed, 8 Sep 2021 14:11:26 +0000 Received: from PH0PR18MB4491.namprd18.prod.outlook.com ([fe80::5511:79c8:c025:a250]) by PH0PR18MB4491.namprd18.prod.outlook.com ([fe80::5511:79c8:c025:a250%7]) with mapi id 15.20.4500.016; Wed, 8 Sep 2021 14:11:26 +0000 From: Akhil Goyal To: Radu Nicolau CC: "dev@dpdk.org" , "declan.doherty@intel.com" Thread-Topic: [EXT] [PATCH 6/7] examples/ipsec-secgw: add support for defining initial sequence number value Thread-Index: AQHXoLboJNW8hwsY0U6k077yroN5aKuaNR4Q Date: Wed, 8 Sep 2021 14:11:25 +0000 Message-ID: References: <20210903112257.303961-1-radu.nicolau@intel.com> <20210903112257.303961-7-radu.nicolau@intel.com> In-Reply-To: <20210903112257.303961-7-radu.nicolau@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: f892e38f-d935-4ade-2509-08d972d28b96 x-ms-traffictypediagnostic: PH0PR18MB4718: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:513; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mNM51bPXUL7/Gy/NdnddYjOWsBeLF2zTLclmcRsAPr9Ykn7dixpIdmNlm/Kk6wYUUjF7ctu/Ay7baGgZvpjnsVw2P50C/+uv/7FFBudoSmv6SkGOe2bp4fAfK6QdiYZSAUjg5RAmLBhsqs8l//0aB3gj7drNx3pu9RMtvKhu9ocVa9uTIIAn0Fffo2D8Ggu6GfLFXA0lOna0DqNolRUtYB53bPh07tDZNX+F498mJaa7B7k8x9ImxOsfr7Htb+RnJtLtNm2MtW1NuXf7VraKpJuQz49ZISO1hFywkz5e1AyfuY34lHXoonPk8bTVZa9SiNgbV0Y85wgMDbCGPwAjQRn9/ALUKVxwm6WUUPnP1ZSuRw8WSVMcAleORqW9A2tDfM5tJ+0sqt0ENsIwfvrRSx+hI2fLRiTmh6cO2G0k63iMcY2grR5PAn0B+zWfkIJ+tzT8lPLPWxCR2ZdSgXbnTyWo75l1UWvKfikjy31OLjph6m0hOIGrTadwQJBwoo9/U5Xnh9h/7z3noqTcRKEQSULSQVt+t9vrtHxx4nOs/ciTeKkojx4ZVwpwzzSraeZgfTIW4HZ2c7ghMZjJGUNmRRtpbfDPM+GDKvM7JYlNDZdMAX9Bx77ToXRPF/BZuFhTm+rhbJFqoabt7dpIk5Y82nDgYONIW0eKBJZiKofQpgNB0CntyalimLBOTfhVA0EjTuY4BjRM0D9ajxnAM651uQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR18MB4491.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(376002)(39860400002)(396003)(346002)(66946007)(66556008)(76116006)(66446008)(64756008)(66476007)(4326008)(478600001)(38070700005)(122000001)(71200400001)(86362001)(38100700002)(26005)(186003)(8676002)(7696005)(83380400001)(6916009)(6506007)(8936002)(5660300002)(33656002)(2906002)(52536014)(55016002)(54906003)(316002)(9686003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Uhz0xjPlW18UQs6uMV5btSNaXf40/3NI4e7Lc7NzeN8sjeI7xPCWceKAkvo1?= =?us-ascii?Q?kH7BIZyuEc2s808sbMKt4qQulp/tDzlLoijZ5eYJdiKzl2nXXhiB70s3RGVt?= =?us-ascii?Q?CA2sK4b/6EWxfzC1XrTg0fC30DlTeBhVOMps277b7NbtFjmR/0+dsK4M5/Y8?= =?us-ascii?Q?UwURC+LJbYDf2kmnvMH6dNx7C7lE6hgJjMqNbISz3ZvUfaKKv7exh+UmTc7A?= =?us-ascii?Q?Iw+zUNCIwaqmaIfO3u/eUL8xBLepXKu8k1ChhuzUIPt3aUnLo8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zSKPJy12dtgZaxAxdh1xzk3m+uRKZHTiASun0+bMQK3Z?= =?us-ascii?Q?cVIPosbmSf11DqpqEedr8esN4TO1mni3/krQemI40J2n72ZoZzgAzsw/GJ+R?= =?us-ascii?Q?9vWI3JEGYL61yGzca1Sal9NiNC1urunFMtt4B/rSxSkxHqiLYJiiBg0+fm34?= =?us-ascii?Q?bvk5/xjeX30DII2JIuK2FjMt?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR18MB4491.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f892e38f-d935-4ade-2509-08d972d28b96 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2021 14:11:25.9261 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kF+Q24bzc48f9BJjuEXWkOe/0JnRvHiA4O0ISf6br7hJ8H02SXQBiDbAxO3xHUpYPKXr+LpQAbt07b3YpzN9UQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR18MB4718 X-Proofpoint-ORIG-GUID: no9Ra8FkTVxcB7p9oEE5Aesm8KqfdUb9 X-Proofpoint-GUID: no9Ra8FkTVxcB7p9oEE5Aesm8KqfdUb9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-08_06,2021-09-07_02,2020-04-07_01 Subject: Re: [dpdk-dev] [EXT] [PATCH 6/7] examples/ipsec-secgw: add support for defining initial sequence number value X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" > Add esn field to SA definition block to allow initial ESN value >=20 Add description about the new option added and how to use it. > Signed-off-by: Declan Doherty > Signed-off-by: Radu Nicolau > --- > examples/ipsec-secgw/ipsec.c | 5 +++++ > examples/ipsec-secgw/ipsec.h | 2 ++ > examples/ipsec-secgw/sa.c | 15 +++++++++++++++ Documentation missing again. > 3 files changed, 22 insertions(+) >=20 > diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c > index aa68e4f827..28772da345 100644 > --- a/examples/ipsec-secgw/ipsec.c > +++ b/examples/ipsec-secgw/ipsec.c > @@ -234,6 +234,11 @@ create_inline_session(struct socket_ctx *skt_ctx, > struct ipsec_sa *sa, > sess_conf.ipsec.udp.dport =3D htons(sa->udp.dport); > } >=20 > + if (sa->esn > 0) { > + sess_conf.ipsec.options.esn =3D 1; > + sess_conf.ipsec.esn.value =3D sa->esn; > + } > + > struct rte_flow_action_security action_security; > struct rte_flow_error err; >=20 > diff --git a/examples/ipsec-secgw/ipsec.h b/examples/ipsec-secgw/ipsec.h > index 4f12c57dc3..db7988604a 100644 > --- a/examples/ipsec-secgw/ipsec.h > +++ b/examples/ipsec-secgw/ipsec.h > @@ -146,6 +146,8 @@ struct ipsec_sa { > uint8_t udp_encap; > uint16_t portid; > uint16_t mss; > + uint16_t esn; > + > uint8_t fdir_qid; > uint8_t fdir_flag; >=20 > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c > index 37039e70fc..3ee5ed7dcf 100644 > --- a/examples/ipsec-secgw/sa.c > +++ b/examples/ipsec-secgw/sa.c > @@ -711,6 +711,16 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, > continue; > } >=20 > + if (strcmp(tokens[ti], "esn") =3D=3D 0) { > + INCREMENT_TOKEN_INDEX(ti, n_tokens, status); > + if (status->status < 0) > + return; > + rule->esn =3D atoll(tokens[ti]); > + if (status->status < 0) > + return; > + continue; > + } > + > if (strcmp(tokens[ti], "fallback") =3D=3D 0) { > struct rte_ipsec_session *fb; >=20 > @@ -1387,6 +1397,11 @@ fill_ipsec_sa_prm(struct rte_ipsec_sa_prm *prm, > const struct ipsec_sa *ss, > prm->ipsec_xform.mss =3D ss->mss; > } >=20 > + if (ss->esn > 0) { > + prm->ipsec_xform.options.esn =3D 1; > + prm->ipsec_xform.esn.value =3D ss->esn; > + } > + > if (IS_TRANSPORT(ss->flags)) { > /* transport mode */ > prm->trs.proto =3D rc; > -- > 2.25.1