From patchwork Mon Oct 18 05:22:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 101930 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CC6AA0C43; Mon, 18 Oct 2021 07:23:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE40940041; Mon, 18 Oct 2021 07:23:07 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 107DE4003C for ; Mon, 18 Oct 2021 07:23:06 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19I3oc3s026029; Sun, 17 Oct 2021 22:22:57 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=sSWC/UDatrlTvqyJncv8sPicTx5kypxdmOJd9xGaxK0=; b=h2X+v9DXSNK/8cvWNLJsxrGeW6nyWWLkGUFLXOZDwO2VM5e2GVwe4y5S2TXlPC8csFQp eLzKUZy50ZpHkhkqMeiyHrMpSQP2OpHvZMX4kVidcL6/4LUQIdP6S7wkKK8UD2q95+nC OXuqV9TNgYT38kagK0d07d92Jj9rO+sH1l8z915ATllSQuIFA55yIOEGsHxs0lHs2Eh7 TVcAC/NJ5a04ziR7Zu8GOo4XbohDJKqq9DEtUYvE+rdc4LBSDzhKtBT5qCQhAiRe/0sg Xz8Bex+DYH+5IhHegXCn9xlv0Ii0xmEOsFibpc4x62X4YN69rhTeynnoD4jYPf5LBAac PQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3bs1bug7wm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 17 Oct 2021 22:22:57 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 17 Oct 2021 22:22:56 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Sun, 17 Oct 2021 22:22:55 -0700 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id D3DB25C68E5; Sun, 17 Oct 2021 22:22:49 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , , , , , , , , , , Akhil Goyal , Ray Kinsella Date: Mon, 18 Oct 2021 10:52:46 +0530 Message-ID: <20211018052247.1082570-1-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211008204516.3497060-1-gakhil@marvell.com> References: <20211008204516.3497060-1-gakhil@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: o3UMfo7GJYvlf38EpwwaQfUck__QWxql X-Proofpoint-ORIG-GUID: o3UMfo7GJYvlf38EpwwaQfUck__QWxql X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-18_01,2021-10-14_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH v3 1/2] security: hide internal API 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" rte_security_dynfield_register() is an internal API to be used by the driver, hence moving it to internal. Signed-off-by: Akhil Goyal Acked-by: Konstantin Ananyev Acked-by: Ray Kinsella --- lib/security/rte_security_driver.h | 2 +- lib/security/version.map | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/security/rte_security_driver.h b/lib/security/rte_security_driver.h index 938373205c..b0253e962e 100644 --- a/lib/security/rte_security_driver.h +++ b/lib/security/rte_security_driver.h @@ -89,7 +89,7 @@ typedef int (*security_session_stats_get_t)(void *device, struct rte_security_session *sess, struct rte_security_stats *stats); -__rte_experimental +__rte_internal int rte_security_dynfield_register(void); /** diff --git a/lib/security/version.map b/lib/security/version.map index a1f46bfd27..edf4887e12 100644 --- a/lib/security/version.map +++ b/lib/security/version.map @@ -16,7 +16,12 @@ EXPERIMENTAL { __rte_security_get_userdata; __rte_security_set_pkt_metadata; rte_security_dynfield_offset; - rte_security_dynfield_register; rte_security_session_stats_get; rte_security_session_update; }; + +INTERNAL { + global: + + rte_security_dynfield_register; +}; From patchwork Mon Oct 18 05:22:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akhil Goyal X-Patchwork-Id: 101931 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F04C2A0C43; Mon, 18 Oct 2021 07:23:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D77FB410E1; Mon, 18 Oct 2021 07:23:13 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 46BA6410DA for ; Mon, 18 Oct 2021 07:23:13 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19HLKn9S008077; Sun, 17 Oct 2021 22:23:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=W3q+chzDCnB2dpKAi+1HLpK3YVK19UFnj3wd9ZHD5iQ=; b=gXB5JSthOnKHcGlSeWSTJzpkIO5PZg3cVottmRBbI8TqbsdPpyZ0PTq8wCvOoGwEWR5P fNPX8BlpQs/ubGbPlNUzsLfEzzxpIZAh48bd0OGFEwJ2apQ881RSCb1AV19CSzrK9PuM sU6BHA90mUSQZtqnNLooB3S6Hdpkx50POWdb6yLJY7Wa+0TI9JDmQm54GgXJd0AsBBQx Vp05x8L+vXvl+aKIDhorcMsB2sz5d8pPJ8NpVuuzJ4hZdOgJBnxtLt95x148X4AXTotR d17bAKUCMZVWC/HGgWEF1IPph4fI4chThzSxOZXiNr7Qnp1UL4gW4THwZKZMMhsJd5jk Nw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3brt1s15m8-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 17 Oct 2021 22:23:05 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 17 Oct 2021 22:23:02 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Sun, 17 Oct 2021 22:23:02 -0700 Received: from localhost.localdomain (unknown [10.28.36.185]) by maili.marvell.com (Postfix) with ESMTP id 298075C68E6; Sun, 17 Oct 2021 22:22:55 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , , , , , , , , , , Akhil Goyal , Ray Kinsella Date: Mon, 18 Oct 2021 10:52:47 +0530 Message-ID: <20211018052247.1082570-2-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211018052247.1082570-1-gakhil@marvell.com> References: <20211008204516.3497060-1-gakhil@marvell.com> <20211018052247.1082570-1-gakhil@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: hQfXj7u2IkXsscV4oTVQrw2g3YcI5QS- X-Proofpoint-GUID: hQfXj7u2IkXsscV4oTVQrw2g3YcI5QS- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-18_01,2021-10-14_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH v3 2/2] 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" 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. Signed-off-by: Akhil Goyal Acked-by: Konstantin Ananyev Acked-by: Ray Kinsella --- v3: - added a comment for requesting user to clear reserved_opts. - removed LIST_END enumerators patch. It will be handled separately. lib/security/rte_security.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index 17d0e95412..4c55dcd744 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -263,6 +263,15 @@ struct rte_security_ipsec_sa_options { * PKT_TX_UDP_CKSUM or PKT_TX_L4_MASK in mbuf. */ uint32_t l4_csum_enable : 1; + + /** Reserved bit fields for future extension + * + * User should ensure reserved_opts is cleared as it may change in + * subsequent releases to support new options. + * + * Note: Reduce number of bits in reserved_opts for every new option. + */ + uint32_t reserved_opts : 18; }; /** IPSec security association direction */