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 4F1B9A0C43; Thu, 29 Jul 2021 12:23:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC4A740687; Thu, 29 Jul 2021 12:23:53 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 2BEED40041 for ; Thu, 29 Jul 2021 12:23:51 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10059"; a="273929443" X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="273929443" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2021 03:23:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="418091938" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 29 Jul 2021 03:23:39 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Thu, 29 Jul 2021 03:23:39 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Thu, 29 Jul 2021 03:23:39 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Thu, 29 Jul 2021 03:23:39 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Thu, 29 Jul 2021 03:23:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wr0Ybzk5Vt61AKel/MxoEu5bvYGIgG8oqPPgxo9Qha+zIpxJgvrtH3IDMks1gsj7sCC66uys/eG3J0HrAxKPZw3p0OsnbiVDZvgx4/kSXaoFOvaqxTQAkdV1fCp0CBiS5f9DHoA1PAC3+K2uYb5T/QH2/+s8Ap84Vuu8OdiWfgGpUtcOducg1tMmCJp64txc7OkByi6zObsxBXgXl4yoHl4DCPVy+vPAfjqr8Ap2OCwip2FLEvIsfKtdR5llmaZmCLDyDu7AuEMqOnT3xLdQjdDnFzo8eDYk8dM2ggM7OiMW2tJgItzXqQcFlooVR0njIOj2P/xA1MYiemYmr130HQ== 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=4TLsFZ7TIIhgch5t2Zz0HJDVDeIaFbjYdmlo6Uh0emE=; b=bcubLSbAdfDZ0WTH58KJNVeKlFxhezp457fSAKecB2fJesPWWvOGrtPuqAPGY42Y5q6oE4LENIUnCaA+u4HKnfAS2sVGZWIenizknPzcBOMNaC4JizC/mA0qUFFD1vbi0udyNuDVUXoXiwoI2D96CjDG3vhuorKnHjOv1OyKyeJyB2sOVRNYW5q4FGW4bDwEunh+vQDHeSPeL0I4lFl6bN614nu0XgD5YFhq1x+jf91hcaA511IqnIW0pNsRCrJO4x2Ed9fZJcdTNWD0wwAdnO/dQeitzcmtZ8W92QwtJeFbp60zcotXwoz73PnmY4/X1c5tF9Y+jibVkH7nyLAbmA== 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=4TLsFZ7TIIhgch5t2Zz0HJDVDeIaFbjYdmlo6Uh0emE=; b=MmsIFD39ywVPtiZqpJNYytvn9fbqp365/S+sPZebbkHJ4dqL47UqImlSJuFbLZrT06PdB0SWS6dnmA+v3BEkRLum5le1yHNow2NKPLwP+plCFREntqXfufaoB7kUKZjOiyUO1F1xbQMPoiG2ENKy0ngvK98ZwD7TIBEQ2S4AaQU= Received: from DM6PR11MB4491.namprd11.prod.outlook.com (2603:10b6:5:204::19) by DM5PR11MB2044.namprd11.prod.outlook.com (2603:10b6:3:10::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.19; Thu, 29 Jul 2021 10:23:34 +0000 Received: from DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::7dc4:66b0:f76b:6d48]) by DM6PR11MB4491.namprd11.prod.outlook.com ([fe80::7dc4:66b0:f76b:6d48%7]) with mapi id 15.20.4352.033; Thu, 29 Jul 2021 10:23:34 +0000 From: "Ananyev, Konstantin" To: Anoob Joseph , Akhil Goyal , "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: AQHXfSwfZZ8LQxx0IUyMwgdib0ZEGKtLZDUAgAnqBmCAACM3AIABQWuwgACOKYCAAO2NgIAAN6uAgAAb8QCAAUkngA== Date: Thu, 29 Jul 2021 10:23:34 +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-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 971c2620-6d7d-4668-f1df-08d9527aebae x-ms-traffictypediagnostic: DM5PR11MB2044: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: ItxVzUlkDDqH/jZPaiODcbYf2QW0/e06ciBOH7Uk7M3RTXYkMJhqh4dAnqEWabbejY8HIiyoLE39LQhSzyLDMsv3BflcuBAuz1M7rmC2PjXIg61Gq3e85xzYYg9yLbM9us1L754LYrXgy0FUEz5WLtRduEK7kPuuNdRCg+cWPUpUuUst7OhYBTYTNwta4mknLsiT+DWTFaQUbNP7EbtjPyYS6G3fuNiSOJTLiWVeKVj/vH1sw8DQM0bIsawxasJ99stFLFs3+gxVX9r4BLLhvRhEOSRXnPgzVlqlfqJiyEA+KH1mga/TYewWyVvkQw12Lztclb4geDZvJimjkwp6ku9dVdbM7luCi1eUDbxHvxc4bK5eYis7woJlDEGiSQHr7Y4wgiP3TkULXzbqdx77+pCWURwRocfvuOvGvqu31vNR6cNfGkyE1WV1QsIfxAmAtLxwXhnhWoPtyap60Us71EHTrOBmSZ6y29uIO83SDSsxbPT+D/XUrC/HTeNjTWkjm1tX7oj2Jbodm8scbk6N1fg6OzKLQztslyCpS2hFUTfy4ADqpRzWlzj4yq6EjzBj85EVD2rS9TiD3GHIKUy09b7FXRcm1LKuc9Tiz5o+WHB09SRslwhj0P/DDwOIOOjmQjZPgK4hAGZ8s51QAkZ2/pLN/XEowrAh9DA+kj0Cii2TWUN0x/+EyAe8al5Kdzwimrxv6XjITepwFAmwF9/PbA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4491.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(136003)(366004)(396003)(376002)(346002)(26005)(110136005)(66476007)(54906003)(66946007)(64756008)(66556008)(66446008)(9686003)(55236004)(38070700005)(6506007)(5660300002)(4326008)(122000001)(55016002)(186003)(15650500001)(316002)(38100700002)(8676002)(83380400001)(33656002)(86362001)(7696005)(2906002)(8936002)(478600001)(52536014)(76116006)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?c1Gj16BHSwJ7T3WWvLS8Vn3X4dKm/4/nVbCWAWtafqFTaro6th2OJ7Cd+/jZ?= =?us-ascii?Q?xJ4uv+z4dED1fDfr1l8h9jDK2OABsJRKlsi7hHZQ3vuo5l6zNwygV9Z2UynO?= =?us-ascii?Q?ag15YHJ5UVTWQ2zxPjpdlcK4rAjoZQxypy/pMlH21TBI8sBgCtzo0tw+sBXt?= =?us-ascii?Q?sAcpNU1NJcVk/mIzt9g3/ilb1qrMobrgW9lULMvSIAVefKoxockZ8+zYRxjI?= =?us-ascii?Q?KFIUJ+8zAhoUQd5VFADKdRjV3rU8i1r5n5h2q+BPtFiSVuiRp1+ctxPwAduR?= =?us-ascii?Q?KzlmVfZ93GTRvPLJ+6+eKQ51SFyWkU8StssFqEJ9zZOr3KR4jK/4pUS9N1T3?= =?us-ascii?Q?1qAlzUE86fyAA+B4XcBdvEM5I0nUVP7HRACSTHMe7ON/bErAPRIV8IATJcEr?= =?us-ascii?Q?w5tiMCw1Y3OzgyT7f6t37HvST5PbUWmVYb7VEi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NJYVMCfj?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4491.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 971c2620-6d7d-4668-f1df-08d9527aebae X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jul 2021 10:23:34.2524 (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: PvB+NkKsPBnOXPhuABNWDE+OhL5KbLA8deHI0POKGtMQsbDQYnC27L7cHW8W6Xw8+UMFzJLkHztOlvBEUa7x5nwPozAiEdmt5ZYhfM/xaOo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB2044 X-OriginatorOrg: intel.com 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 Anoob, > Now that we have an agreement on bitfields (hoping no one else has an obj= ection), I would like to discuss one more topic. It is more related > to checksum offload, but it's better that we discuss along with other sim= ilar items (like soft expiry). >=20 > L3 & L4 checksum can be tristate (CSUM_OK, CSUM_ERROR, CSUM_UNKOWN) >=20 > 1. Application didn't request. Nothing computed. > 2. Application requested. Checksum verification success. > 3. Application requested. Checksum verification failed. > 4. Application requested. Checksum could not be computed (PMD limitations= etc). >=20 > How would we indicate each case? >=20 > My proposal would be, let's call the field that we called "warning" as "a= ux_flags" (auxiliary or secondary information from the operation). >=20 > Sequence in the application would be, >=20 > if (op.status !=3D SUCCESS) { > /* handle errors */ > } >=20 > #define RTE_SEC_IPSEC_AUX_FLAGS_L4_CHECKSUM_COMPUTED (1 << 0) > #define RTE_SEC_IPSEC_AUX_FLAGS_L4_CHECSUM_GOOD (1 << 1) >=20 > if (op.aux_flags & RTE_SEC_IPSEC_AUX_FLAGS_L4_CHECKSUM_COMPUTED) { > if (op.aux_flags & RTE_SEC_IPSEC_AUX_FLAGS_L4_CHECSUM_GOOD) > mbuf->l4_checksum_good =3D 1; > else > mbuf->l4_checksum_good =3D 0; > } else { > if (verify_l4_checksum(mbuf) =3D=3D SUCCESS) { > mbuf->l4_checksum_good =3D 1; > else > mbuf->l4_checksum_good =3D 0; > } >=20 > For an application not worried about aux_flags (ex: ipsec-secgw), additio= nal checks are not required. For applications not interested in > checksum, a blind check on op.aux_flags would be enough to bail out early= . For applications interested in checksum, it can follow above > sequence (kinds, for demonstration purpose only). >=20 > Would something like above fine? Or if we want to restrict additional fie= lds for just warnings, (L4_CHECKSUM_ERROR), how would > application differentiate between checksum good & checksum not computed? = In that case, what should be PMDs treatment of "could not > compute" v/s "computed and wrong". I am ok with what you suggest. My only thought - we already have CSUM flags in mbuf itself, so why not to use them instead to pass this information from crypto PMD to = user? That way it would be compliant with ethdev CSUM approach and no need to spe= nd=20 2 bits in 'aux_flags'. Konstantin =20