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 0129EA04F5; Thu, 12 Dec 2019 12:30:27 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CD4BD374C; Thu, 12 Dec 2019 12:30:26 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 669991D9E for ; Thu, 12 Dec 2019 12:30:24 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Dec 2019 03:30:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,305,1571727600"; d="scan'208";a="415230435" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 12 Dec 2019 03:30:24 -0800 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Dec 2019 03:30:24 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Dec 2019 03:30:24 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Dec 2019 03:30:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fC/0cyF4N1f8MY2LntC5Ht45duDBCZzZuoxgVyJG8n35DpQJ7C7uskwx+GWAMJWA6ADFFbG9jJyeR1qZQXEgqg/5U3kX3ZOL5+Xi4z6YKhV38PKBErvxU9pxB+cJs7vMGRkzqPZLv3YYWioRhKnFQLfWl5wyg7/o0NWgx6kKQE8np8hGfmWRhJ5B9w68pjN5Qo99bMjCbT4+qJNfWX0PbsVPOF5iT/ONB/v8zN3VeezG6JqeuJF2w+VIQNgn19FKR2o56LOcNVPHD0iP45HHHcu1Gcb0fPQF2y4wu5Mmcp4gem5gL72InrUxBXBGOAFjtoJwMJgGpNwnQdyJ7WBssg== 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:X-MS-Exchange-SenderADCheck; bh=+SxhDgKIllyAMWIHKg6RaYtsqNi055+IhNv4aCSYys4=; b=G2QX+WtqNVpK1KgqGGeOelYyMG3rAkSHhiNniEmyz+YGTA8i/3gZVhGNJOuk1q21Bgt2TxSGa03f6Lxh1ypAZ1+mrXvTK6fzzUwwEZmNqDSNlAQQxYNPnXryU7RCH4CFIbZIi+vwJ/PUfJ4CH65oXswP5p594y8TjkGyE9HrNzcW4lBDM6kPkOAs7of2R9IUSVhW2J45/ZoN0pzzHQkP+EvpB82qydIGlgHfILr7dzGmD3P2V0TRCTJS6RJ4D5zykjyXGSd6i4KoRfAkdXqB8lNaVR5QGpTZzchgkHXs88EgOr5mmJXRajGSLEUEXozausBy728b+YLWZo7htJs3Yw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+SxhDgKIllyAMWIHKg6RaYtsqNi055+IhNv4aCSYys4=; b=ShsoVaGYHqwSfe0EUm6c+pF+UYZ0lWnhQuMtZ9HZeQiaBKq7MSDGDtdjgpZ6mVKQWkV2dhaPexBr7cr5HwZBTx97hlMm+lClmSV2HdUfPMveBT9yr0GWDzeRDIJyLfQVTxpfOrU6Pxx/WeEXM2et48b9186nBzOSR5ahrRxmvVI= Received: from DM6PR11MB2556.namprd11.prod.outlook.com (20.176.99.10) by DM6PR11MB3260.namprd11.prod.outlook.com (20.176.122.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.14; Thu, 12 Dec 2019 11:30:21 +0000 Received: from DM6PR11MB2556.namprd11.prod.outlook.com ([fe80::1b6:fe4f:c09a:a893]) by DM6PR11MB2556.namprd11.prod.outlook.com ([fe80::1b6:fe4f:c09a:a893%6]) with mapi id 15.20.2538.016; Thu, 12 Dec 2019 11:30:21 +0000 From: "Ananyev, Konstantin" To: "Dharmappa, Savinay" , "dev@dpdk.org" Thread-Topic: [PATCH v1] examples/ipsec-secgw: return on encountering algo as NULL Thread-Index: AQHVsMytHzfl1A7dGUCEWYrvGNii76e2XM7Q Date: Thu, 12 Dec 2019 11:30:21 +0000 Message-ID: References: <20191212091435.4398-1-savinay.dharmappa@intel.com> In-Reply-To: <20191212091435.4398-1-savinay.dharmappa@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWZjYjE5YjEtNzRiOC00ZTY2LWI2MzAtYzI2Njk4MGRhYzUzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMHoxRGJ6WnllZTdERWNvZ2lmRVRjSUl5anZUWUtZeXhZR25hK3U4YVRJenVBaW9qY1pcL0tMeUNDS0NCYlwvSGU5In0= dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.184] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 096f6b4e-f4d6-424b-dda5-08d77ef6aca5 x-ms-traffictypediagnostic: DM6PR11MB3260: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:270; x-forefront-prvs: 0249EFCB0B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(396003)(39860400002)(346002)(366004)(136003)(199004)(189003)(8936002)(71200400001)(9686003)(33656002)(2906002)(26005)(66556008)(5660300002)(6506007)(55016002)(8676002)(186003)(81166006)(81156014)(7696005)(76116006)(52536014)(64756008)(66446008)(86362001)(478600001)(316002)(110136005)(66946007)(66476007); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6PR11MB3260; H:DM6PR11MB2556.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mcA3VTRencQqeOkxMi/w6rEUXwUX2sWVKVMlcr6XYhT3wYvLKQ5aMqIc1CP8bZz/XYMSpI4YHzepKhsTtdi//7Mb2y0E/XarE3OTTTtM+RxWBFlY3wpV/NnKiq3i6zMfrRLbvl2QQDZHUB+Ll4mAHW62FdvzgGyWk6g/nNDrTSnfxxOSchyE0ECwDb5cB2l9ZKS8wqpyk7Oe6jAFBGzxLFbyXqkld8B6fPUCLx1dKi15WZNPfubtrW3L2h4n2o1ZPTNkIX/K7/V9o57GB7RN+2FQhkvy5YJp0YCgXtfxRP/NGvQ5xb114wuG1vi5azmID0HtvbhTNbabh1SC8KzTBs5M69THBIGS+mjhzaJ5/bCAfBSbYTVUrZoA2Kt1680l7jt3386EVkILJtWaDeFV9NvwZ07dJJNCYrlY+oeywPIzkXS0pf2X6XQ8roXybpet Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 096f6b4e-f4d6-424b-dda5-08d77ef6aca5 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Dec 2019 11:30:21.9200 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: KTR76/zP3mlhDnVTRVTIvkui0u7RllhDck2o5BQNsNzfEgSTbgsxhgHAinTnWm5h9WfHYjBo8Jejd13L172am7AeXpjku+PudsY6Jpmgnko= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3260 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v1] examples/ipsec-secgw: return on encountering algo as NULL 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" Hi,=20 =20 > if algo is NULL set the status to error and return. As this is a bug fix please add 'fix' to the commit header: examples/ipsec-secgw: fix ... Also probably worth to add 1-2 line explanation why this is needed into the commit message. Apart from that: Acked-by: Konstantin Ananyev =20 >=20 > Signed-off-by: Savinay Dharmappa > --- > examples/ipsec-secgw/sa.c | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c > index 7f046e3ed..c75a5a15f 100644 > --- a/examples/ipsec-secgw/sa.c > +++ b/examples/ipsec-secgw/sa.c > @@ -314,6 +314,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, > APP_CHECK(algo !=3D NULL, status, "unrecognized " > "input \"%s\"", tokens[ti]); >=20 > + if (status->status < 0) > + return; > + > rule->cipher_algo =3D algo->algo; > rule->block_size =3D algo->block_size; > rule->iv_len =3D algo->iv_len; > @@ -378,6 +381,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, > APP_CHECK(algo !=3D NULL, status, "unrecognized " > "input \"%s\"", tokens[ti]); >=20 > + if (status->status < 0) > + return; > + > rule->auth_algo =3D algo->algo; > rule->auth_key_len =3D algo->key_len; > rule->digest_len =3D algo->digest_len; > @@ -433,6 +439,9 @@ parse_sa_tokens(char **tokens, uint32_t n_tokens, > APP_CHECK(algo !=3D NULL, status, "unrecognized " > "input \"%s\"", tokens[ti]); >=20 > + if (status->status < 0) > + return; > + > rule->aead_algo =3D algo->algo; > rule->cipher_key_len =3D algo->key_len; > rule->digest_len =3D algo->digest_len; > -- > 2.17.1