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 7D950A0C47; Tue, 12 Oct 2021 08:59:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0646740E0F; Tue, 12 Oct 2021 08:59:52 +0200 (CEST) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by mails.dpdk.org (Postfix) with ESMTP id C73E740E01 for ; Tue, 12 Oct 2021 08:59:50 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id F0734580D9B; Tue, 12 Oct 2021 02:59:49 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 12 Oct 2021 02:59:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= xdkO8GxDv0qMSa/zlA9K5M8bTXaIW8I0VPHO235W1M4=; b=beIfrzrV2w7wYGWQ DI8L/t6BsyXSvNs8P3Z6wwKpEFZ6+I/hWbk0d4BiNv3qJR41jSlBpJBeatNfBaNc k0iFXOnliierf+ejTQhSzOSiP6iIfayhXe/O/c+dEKCfybBtfuohPCe+mZq6LrLN iu0qnLo1ElBxcAd8lyg4hHaxcadCzlhs0AH+YV8RJWA7mNkMI8xPwnJQBP5bu6Uk eqJ2hOZVp2MadYzt+SZzmha7l+UVGqEWPOhTVUYizjzpKeWsZ7GU9O5l1awZNgWn NOuQAfGJX4BgHL/FPru4k/cbyv1zAz/hxygJGPMhlgpAM15SpNGTx+CX+4vgyeUl 6JakoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=xdkO8GxDv0qMSa/zlA9K5M8bTXaIW8I0VPHO235W1 M4=; b=CRoKW7jgHVoIi/6yb4g03l4y4gc2JUjUBGwCEM+mcFfMQTezi0C5MqYaU KE7lJjhZx+K0n2V1Qo2DHZ6L26UJBduNTexyJR4QSr0PEmXmR/gpIQdYRX7U6EBQ M17WWxhWpHcsf9UpLs9iX965ejpDZy/8Akpng8fSditSUcSrI75iCen+Gk5Q5TYE CBoysyIoFcRgLxVE3dvfGg58Ke9FK+IMJC4v84WokfByRXZfyv8/p6d3OTDdzNjE FHz1nPlKDCQBdcARngi3lP0jz6jrRtvfgVdNaA4woKKZ9tzwZ9wAxmqLwXTHvJ7t c2pd1N4mSEBlz6laRJ0fv3j8p5sPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtjedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Oct 2021 02:59:45 -0400 (EDT) From: Thomas Monjalon To: Akhil Goyal Cc: "dev@dpdk.org" , "david.marchand@redhat.com" , "hemant.agrawal@nxp.com" , Anoob Joseph , "pablo.de.lara.guarch@intel.com" , "fiona.trahe@intel.com" , "declan.doherty@intel.com" , "matan@nvidia.com" , "g.singh@nxp.com" , "roy.fan.zhang@intel.com" , "jianjay.zhou@huawei.com" , "asomalap@amd.com" , "ruifeng.wang@arm.com" , "konstantin.ananyev@intel.com" , "radu.nicolau@intel.com" , "ajit.khaparde@broadcom.com" , Nagadheeraj Rottela , Ankur Dwivedi , "ciara.power@intel.com" , Stephen Hemminger , "ray.kinsella@intel.com" , "bruce.richardson@intel.com" Date: Tue, 12 Oct 2021 08:59:43 +0200 Message-ID: <6054165.9aso14lfZU@thomas> In-Reply-To: References: <20210731181327.660296-1-gakhil@marvell.com> <2663373.9MILaYa0Np@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" 11/10/2021 18:58, Akhil Goyal: > > 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? Yes at the minimum you should add a comment. You could also initialize it in the lib, but it is not always possible.