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 94C32A0C47; Tue, 12 Oct 2021 10:31:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D47440E0F; Tue, 12 Oct 2021 10:31:57 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 186154003C for ; Tue, 12 Oct 2021 10:31:54 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10134"; a="214229542" X-IronPort-AV: E=Sophos;i="5.85,367,1624345200"; d="scan'208";a="214229542" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 01:31:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,367,1624345200"; d="scan'208";a="441141099" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga006.jf.intel.com with ESMTP; 12 Oct 2021 01:31:53 -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.12; Tue, 12 Oct 2021 01:31:52 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) 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.12; Tue, 12 Oct 2021 01:31:49 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 12 Oct 2021 01:31:49 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.42) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Tue, 12 Oct 2021 01:31:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PWg9Fv7XrCE0R95uPEniKOjTS9YRGKjMRPop3KuYWMiL8TSavkpBb6AE23hjZd2U7WNMwmJyLhildkpMiDhkK0rEPljFtMn6O08+jaqSKiCocNP0XmOGBIfmNMLP3gCJQPlTJpBeffEmtGdD6ThGreoDAe9A20cuB8NPMZUFGOnSkyQ5vVianTiqqCZjPv4Y8riJ8gr7iH854qOPd1KnvtS6Q3jbVBk1JjfafZmJ97P19uZ2tfW5T92zgkvMb8SCOs/tQQMyjDDVEG6js+h7pwUtPZK3Sr0nR6RjiMswnvamu+ZtFas9tCiis8kRXbUPBCvI30K++oaT7gcP1+txcQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=08mqKsKLLthEX5a7O4FKE5aRrKa668TI9B8LmEY1F8w=; b=FSvGQYkgzXgGLPv2Hk0DHEjvOgEIe+gbxz2gNVcjy1IArzDMxrZfi6GB5yDrNmQNLGfKCw4UTr/He0G5+I3iQ6XKQL2UaTY/yr1zDfufHY9el65arl0y+jC9+OZaJJE+2EJLSKw8BFYS7DSske8ueQBR87tGVYoAVpx5skYxma7lrAY8849g7Wkvs51IKQmGgFH+FXEeitn+5TcOc5BLgczv3OH/XJJquLPl/kzetBOCnceCrvMjM/ih4K+KkbZ7DBklALUiX423l0+eiB9/CGc8AeOqF0v0jGqh8YL3O/1UGMLEiqtEHBqVVjP+/e+P/Xj2YwSVYbeCvXISIlpB/A== 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=08mqKsKLLthEX5a7O4FKE5aRrKa668TI9B8LmEY1F8w=; b=mdlVZv9hDpfNKrXMWFv1pGfKKcHsFniZeXlulDr/pqOCb1Er1nfDljRv1HOJr+8g/dGAUBXNm+bZGwhkvCjxjSY4H54dw/F5HHV2Ikk+YzIg0rowxkWu+M2X9mc1MzQsqrga779kQexcdZlrauEZ1BVh7vt7qI0rxj+t4e1XtTw= Received: from PH0PR11MB4776.namprd11.prod.outlook.com (2603:10b6:510:30::14) by PH0PR11MB5928.namprd11.prod.outlook.com (2603:10b6:510:144::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.20; Tue, 12 Oct 2021 08:31:47 +0000 Received: from PH0PR11MB4776.namprd11.prod.outlook.com ([fe80::10fc:2967:ccc:fd08]) by PH0PR11MB4776.namprd11.prod.outlook.com ([fe80::10fc:2967:ccc:fd08%6]) with mapi id 15.20.4587.026; Tue, 12 Oct 2021 08:31:47 +0000 From: "Kinsella, Ray" To: Stephen Hemminger , Akhil Goyal CC: Thomas Monjalon , "dev@dpdk.org" , "david.marchand@redhat.com" , "hemant.agrawal@nxp.com" , Anoob Joseph , "De Lara Guarch, Pablo" , "Trahe, Fiona" , "Doherty, Declan" , "matan@nvidia.com" , "g.singh@nxp.com" , "Zhang, Roy Fan" , "jianjay.zhou@huawei.com" , "asomalap@amd.com" , "ruifeng.wang@arm.com" , "Ananyev, Konstantin" , "Nicolau, Radu" , "ajit.khaparde@broadcom.com" , "Nagadheeraj Rottela" , Ankur Dwivedi , "Power, Ciara" , "Richardson, Bruce" Thread-Topic: [EXT] Re: [PATCH v2 3/3] security: add reserved bitfields Thread-Index: AQHXvnqOSj1UccuFrE+U4P/PVoJCGKvOBXIAgABYrACAAKuR0A== Date: Tue, 12 Oct 2021 08:31:47 +0000 Message-ID: References: <20210731181327.660296-1-gakhil@marvell.com> <20211008204516.3497060-1-gakhil@marvell.com> <20211008204516.3497060-3-gakhil@marvell.com> <2663373.9MILaYa0Np@thomas> <20211011151546.3c5fffbb@hermes.local> In-Reply-To: <20211011151546.3c5fffbb@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: networkplumber.org; dkim=none (message not signed) header.d=none;networkplumber.org; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ef534004-a164-4451-2659-08d98d5abb2d x-ms-traffictypediagnostic: PH0PR11MB5928: 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:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wP21rSTmNGLY16viplPJxsIDsSKo9ZELV4y8AdxxVeodn1R/A176p0wzNz/4ouGAkiAOOuUOO+meLVuMF2Y3SKr/RxuzsjncJHVirOd1Mkfgj4qFMv3U6eB1puLxM39+yW0qrqKuTG/lrcDcS4r+lwVgGlwRsocDSVQwx5pRIE3Ns81vqF3YJaXV8wfQWDX7g1IUGWrIVsG5bd6R0a4PHi0l8o+GdaOT9elwS9H3OHxZgxka6jTT6ykTqgyZ4diwio/MR8yoWwNOy2iZTD9aJewf1l8tLRV3VRPLuH9lTkAdWa9c0CkmnM5rxB75QpEKxO739xYwlxkMkoqwNohL/4muMG8ADiJVI6Z/R8DvoFaG2cVndGhL7H/IQ6UgET70K82XoIsneiXjyLXuAflBC+I8XpgZnwX+PmPJrp6tsnsXcDWihN9uzNU1dy/XHtUdKJHW3WcNWVR9tERYrdqHKuDf1cdLlAFiNb5dTiioUT26EZyeDvOfbnO4ThnZR7PdyYwEbqIuX/JXpYU6v1t7Q/5ydah0mRneOkva1iW3GuxscfwJ+UW02a5dzQ0MJ9YfGNkrGsUWn7anplGG/hx4uORj6w0DDb9UOJg33cCHoiHj6b9edQrZiEDwmnxd9nFm92dptLSesjjhvXOm4abEtJbCKIW7xBuZvf4F1XZq5kKm/3mRD1n5ptUvdDS1YgLxHApMOibv3PBHkpyFmiSi9g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB4776.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(5660300002)(86362001)(66476007)(66446008)(66946007)(66556008)(107886003)(33656002)(76116006)(9686003)(122000001)(64756008)(26005)(38100700002)(15650500001)(54906003)(4326008)(110136005)(38070700005)(7416002)(508600001)(7696005)(8676002)(83380400001)(186003)(52536014)(55016002)(316002)(6506007)(53546011)(2906002)(8936002)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Y7qJ5PiPJBl4Ws6HwCfzvLg9oO3V3TLk4udAqWa1I+R26jtcIivcn7NvUWGm?= =?us-ascii?Q?QfVIOVRzOAzv0DrhN3JDvz5l4lOjEsjzuS52OHmVRCWX/F0OuL1wT0b5UJdz?= =?us-ascii?Q?o5RHfzpCMOCVzYqLVcRHVovggFNTa9gJ14GkQqUclCfQwAD05tdk1ev584E6?= =?us-ascii?Q?Z+MqdIIgXinqmUctQjf4MIuQDKTeb+qcH/pRKiPVPK/maGuMj3JgLRJAjAKg?= =?us-ascii?Q?CWbTIl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Jk+sx57nI/oW?= =?us-ascii?Q?f7UQPhIM9nxozWUuT+MNX4sK38cDwrw7V/gRECfVPSKMeIbYVofVoNr24HgA?= =?us-ascii?Q?NVnsZhdqYcnNXmlZLBuP/SfVVg5ivx8BtDO+aBxbt3XA6bVFZmuVqifxKB4E?= =?us-ascii?Q?u7EuAWchhxr0diIOko/77AuzhK3i8duO0qwz4mIL1OetQxupHeiIiZN1nU6l?= =?us-ascii?Q?ZFs4eKGFJ6xjdrxaSB2krYeX?= 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: PH0PR11MB4776.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef534004-a164-4451-2659-08d98d5abb2d X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2021 08:31:47.5143 (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: PgD8D+RqGCIo1wicYTuodRtZqS7vJWcYJeRKZXgWR0hkihG0tVzugXPnXi1aIpS/vw+7E/HArt7hcVuGn+28CA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5928 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v2 3/3] security: add reserved bitfields 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" > -----Original Message----- > From: Stephen Hemminger > Sent: Monday 11 October 2021 23:16 > To: Akhil Goyal > Cc: Thomas Monjalon ; dev@dpdk.org; > david.marchand@redhat.com; hemant.agrawal@nxp.com; Anoob Joseph > ; De Lara Guarch, Pablo > ; Trahe, Fiona ; > Doherty, Declan ; matan@nvidia.com; > g.singh@nxp.com; Zhang, Roy Fan ; > jianjay.zhou@huawei.com; asomalap@amd.com; ruifeng.wang@arm.com; > Ananyev, Konstantin ; Nicolau, Radu > ; ajit.khaparde@broadcom.com; Nagadheeraj > Rottela ; Ankur Dwivedi > ; Power, Ciara ; Kinsella, > Ray ; Richardson, Bruce > > Subject: Re: [EXT] Re: [PATCH v2 3/3] security: add reserved bitfields >=20 > On Mon, 11 Oct 2021 16:58:24 +0000 > Akhil Goyal wrote: >=20 > > > 08/10/2021 22:45, Akhil Goyal: > > > > In struct rte_security_ipsec_sa_options, for every new option > > > > added, there is an ABI breakage, to avoid, a reserved_opts > > > > bitfield is added to for the remaining bits available in the > > > > structure. > > > > Now for every new sa option, these reserved_opts can be reduced > > > > and new option can be added. > > > > > > How do you make sure this field is initialized to 0? > > > > > Struct rte_security_ipsec_xform Is part of rte_security_capability as > > well As a configuration structure in session create. > > User, should ensure that if a device support that option(in > > capability), then only these options will take into effect or else it > will be don't care for the PMD. > > The initial values of capabilities are set by PMD statically based on > > the features that it support. > > So if someone sets a bit in reserved_opts, it will work only if PMD > > support it And sets the corresponding field in capabilities. > > But yes, if a new field is added in future, and user sets the > > reserved_opts by mistake And the PMD supports that feature as well, > then that feature will be enabled. > > This may or may not create issue depending on the feature which is > enabled. > > > > Should I add a note in the comments to clarify that reserved_opts > > should be set as 0 And future releases may change this without > notice(But reserved in itself suggest that)? > > Adding an explicit check in session_create does not make sense to me. > > What do you suggest? > > > > Regards, > > Akhil > > >=20 > The problem is if user creates an on stack variable and sets the > unreserved fields to good values but other parts are garbage. This > passes API/ABI unless you strictly enforce that all reserved fields are > zero. Right, but that is no better or worse than the current struct, in that resp= ect, right? User case be careless there also - declare it on the stack and forget to me= mset. struct rte_security_ipsec_sa_options { uint32_t esn : 1; =20 uint32_t udp_encap : 1; =20 uint32_t copy_dscp : 1; =20 uint32_t copy_flabel : 1; =20 uint32_t copy_df : 1; =20 uint32_t dec_ttl : 1; =20 uint32_t ecn : 1; =20 uint32_t stats : 1; =20 uint32_t iv_gen_disable : 1; =20 uint32_t tunnel_hdr_verify : 2; };