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 9A07CA0C47; Mon, 26 Jul 2021 17:50:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 264A940F35; Mon, 26 Jul 2021 17:50:07 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1AC2C40DDA for ; Mon, 26 Jul 2021 17:50:04 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16QFeRe4020504; Mon, 26 Jul 2021 08:50:04 -0700 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2175.outbound.protection.outlook.com [104.47.56.175]) by mx0b-0016f401.pphosted.com with ESMTP id 3a1m9627ky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Jul 2021 08:50:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NHBXwZA4Vn0EJbO9/o99vnSp+1BVvDtAuNge2bITtkXHllIwkBuRJJBQjq8WjJ5e/OvX2preEcy5K67kdkgwExrglqJTaGnjJA1McSHLbs6BnURndUFF9Cm2/ah7GOpAd0sp+df59TlLzcHz+H1Mj4QWMc4op2tcY5aalymAcCAhZDOwWeRiZKwgkVrEZb7V0IZEAI4w7aTnJBGFodukjqKUDfWR8bFJG8GMJJMQYgB+KAqskSbB0iXFiVIQz5n/EsY+TqFSHrJqB/UmG99WOEZmbRF7gmLZnWaST9FLx64Ax5aiyoGRma98MFR1K7JweU/o65mNvY2n7An1Rwc21Q== 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=XpJwkSBsbt13tARU0E5WrYPqSwMpCLJVayQtfa54O9w=; b=WV16IFoe254Uv3n/sFLW6U1ta/eo55cpvWcmd3LgyQLIjIztpRF+yhINiUf2H0HlZfxgPspCQyt1ddlUCRBVFOHEMF6z4wT27xjtx/b6hOVdh+YuyIy6vNvunVe3NuiGfKnZ5zcYso6iEQLjJ18boVVyB16me0rwqJhcU9/lzToiLnGkhQyk3Ah1iu9x9aB6Pq5Uv88eaq8NQz3TrHXI/4QswTOcyp8QorpMGeOKj8gtycJyi6x2m9v4IPiZIUotnMX6OaF4sURBXejzNKOg+9j0rvApdLTOaB09782V8UBXBiqpLy6uJDUksu3QeqoYRuUJh3H14bE7zevEw3divA== 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=XpJwkSBsbt13tARU0E5WrYPqSwMpCLJVayQtfa54O9w=; b=U1aJQDyYaFvQ+5vYYgbjY2VK2G+FXp9iOX+VU9XId8eOZce2S3JSmbCx7MBZorbPyek/OPf5w4qN2jrz7gXfChbVu98XsxWUGsbl71zIcDBcw1ulWn/elrovlByotw3dorWwJueKnG9sFHfcnsByrYSfPknNay1S9SIgjQ5YKNw= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4764.namprd18.prod.outlook.com (2603:10b6:303:eb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.26; Mon, 26 Jul 2021 15:50:02 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::1455:9a67:a6e7:e557]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::1455:9a67:a6e7:e557%7]) with mapi id 15.20.4352.031; Mon, 26 Jul 2021 15:50:02 +0000 From: Akhil Goyal To: "Ananyev, Konstantin" , Anoob Joseph , "Doherty, Declan" , "Zhang, Roy Fan" , "hemant.agrawal@nxp.com" CC: Jerin Jacob Kollanukkaran , Ankur Dwivedi , Tejasree Kondoj , "dev@dpdk.org" , Archana Muniganti Thread-Topic: [PATCH 2/2] lib/security: add SA lifetime configuration Thread-Index: AQHXfSwXa0JAhHVxJEmykXnTo0RT0atLZDUAgAnryQCAABJkUA== Date: Mon, 26 Jul 2021 15:50:02 +0000 Message-ID: References: <1626759974-334-1-git-send-email-anoobj@marvell.com> <1626759974-334-3-git-send-email-anoobj@marvell.com> In-Reply-To: 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: b4d003d6-e4fc-4c39-6599-08d9504d07de x-ms-traffictypediagnostic: CO1PR18MB4764: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WXW5IU0WYN9dN4KDH6F//HSfnEN7ppA+vQx5cpB/0uJ03ndkWRbvvZqWf8Ta7c+yK/OylMTOavcWJfcPSRCbgXAAdkTEsDDGHLFrlebP2wNi+ev8/kiNK1GyR1q2lv9lV6cBtfMc3LGneIhmW29iLGlYY8pQ4eUhY7hPG2by/z6PfDcb6v37v61hYlx+oVePdd5HARO44b/b4o1n2Jx0YZx5H0eKmDoMlObwHduqyNk42GcRcU5g811YW2z8IpIgApS7yH2pOCKhUwAwpLRf0z9bI8yXKFBZzGEP3Yge8t1q1QA0FoSucbQH2p5Yl6TZb/icoVn66coQNy9Jg+Uzp4GeAo/rZoxGr7BHbxHcB9aeh+aNp13zob0B02PMSSxH0Web7bk3ZGZ4J9IimxI49mPnWWPjSclmyNx2g6rdtphIkNClflW91suE4DJt/0hKqc+aIIXyi3uXntx0LbAb+zJTujJIvQNlvKD37kc0R79/2ia/Q6MXe8A/X1o2NPuFqnK9iliZwGg5umcZKGFQafmnC+9+0RrH2tMGDcAcUCSppgbbdROLRVNNJ6Y5v7ZFvue5KJkpjnVS1BFej07GMo/+gi/Vhs7/tzRJ8U+a64CTgiuSytV6xsbfHAQpYM37pDHCNn+j9TVrYtigijJ4QLBGZS3gOqXQ0220LVqNiHcVitzKvulX8Pu9K3XKynMEZProXAv/0v1NM/7gfuO4edPrITG/ORL7lopEKP1/njtJILB7EBfR7BnBT01Aig29APpfs6zhPDwjIx7ivJvD0IXRo95UCEbA1M1K4aCW6GSS6k2R/9/BGOZyLQ338wBK8mmQ+oDPFuCVF7hVTHb4KQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(2906002)(8936002)(64756008)(26005)(107886003)(186003)(15650500001)(33656002)(966005)(52536014)(86362001)(508600001)(66446008)(55236004)(4326008)(7696005)(9686003)(122000001)(55016002)(8676002)(6506007)(54906003)(66476007)(71200400001)(5660300002)(76116006)(66556008)(316002)(66946007)(110136005)(38100700002)(83380400001)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?cqrkGZoey3W4gRRDaYqFjbILxr0Jf22HbZLt31utWz5ebjKfK4U2shpIa3TL?= =?us-ascii?Q?SdT1DdmW8Rqdu50rxLEX+dy4T6Ci7fet29DpdXhtMl1d74nCM9++bcOqYd6t?= =?us-ascii?Q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fijL9//f7TC3pNro1n3D?= =?us-ascii?Q?oyuFKXzMGt9F0VfopxN2tvzj73N7Y8yPloVgFFp91BStjBG8qCIQRYlOuYj3?= =?us-ascii?Q?CA4/v1hGAchIKjMpkzqxcPGrvMCFwhHNe2r24xGKwFDmcO2U4llxfrqbVxaA?= =?us-ascii?Q?8JMeJcRU88E9nikgMofI/spUf99KA4pTqp0z8rpuu1YU+lgKBOHJOdEPmySd?= =?us-ascii?Q?OhCKAWebpp2AKWwiOURtK46JqU7Z33p09YV0P7SH/vpTBZhbDvYTfznzk27V?= =?us-ascii?Q?GkFGC9fDzc2n8duZabBpxBZmHy83wIyrC1ZoUszGLAN1kyAgFg1IbC9O+0HF?= =?us-ascii?Q?zMdalKHJqGfuH3JYjeL6RDAR?= 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: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4d003d6-e4fc-4c39-6599-08d9504d07de X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2021 15:50:02.1846 (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: 4ziRifdPhbj499ZaLG9JYvIwW9B55FaTL4BslJIPLjPukYUocByLOz9/LFH6FaJraDklJxlrhgBv8wQvvmP+nA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4764 X-Proofpoint-ORIG-GUID: gjNrarEDbQDpD5D8jJfmWJEhW5QZlGX9 X-Proofpoint-GUID: gjNrarEDbQDpD5D8jJfmWJEhW5QZlGX9 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-26_10:2021-07-26, 2021-07-26 signatures=0 Subject: Re: [dpdk-dev] [PATCH 2/2] lib/security: add SA lifetime configuration 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" Hi Konstantin, > > There are two options that we considered, > > 1. Extend the enum, rte_crypto_op_status, to cover warnings [1] > > 2. There are reserved fields in rte_cryto_op structure. So we can use b= its in > them to indicate various cases. [2] > > > > Both the submitted patches follow approach 1 (following how it's done > currently), but we can switch to approach 2 if we think there can be > > more such "warnings" that can occur simultaneously. Can you share your > thoughts on how we should extend the library to handle such > > cases? > > > > [1] https://doc.dpdk.org/api/rte__crypto_8h.html#afe16508b77c2a8dc5caf7= 4a4e9850171 > > [2] https://doc.dpdk.org/api/rte__crypto_8h_source.html >=20 > My vote would probably be for option #2 (use one of the reserved fields f= or > it). > That way - existing code wouldn't need to be changed. Adding a single enum or multiple enums is the same thing. Right wrt code ch= anges? However, if the check is something like=20 If (status !=3D RTE_CRYPTO_OP_STATUS_SUCCESS) Report appropriate error number App code will need to be updated to take care the warnings in both options. It will be something like Option #1 If (status !=3D RTE_CRYPTO_OP_STATUS_SUCCESS) { If (status < RTE_CRYPTO_OP_STATUS_SUCCESS) Report appropriate error number. Else Report appropriate warning number probably in debug prints. } Option #2=09 If (op->status !=3D RTE_CRYPTO_OP_STATUS_SUCCESS) { If (op->status =3D=3D RTE_CRYPTO_OP_STATUS_WARNING) { Report appropriate warning based on op->reserved[0] } else { Report appropriate error number } } Here both the options are same wrt performance. But in option #2, driver and app need to fill and decode 2 separate variabl= es As against 1 variable in option #1 In both the options, there will be similar code changes. Do you suspect any other code change? > Again these warnings, it probably needs to be a bit-flags, correct? We can deal with both bit flags as well as new enums in the status. I believe both are same and in fact using enum in application is more conve= nient for user, instead of decoding bit flags. However, it is personal choice. People may differ on that. Regards, Akhil