From patchwork Thu Jul 2 06:19:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 72786 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C57BEA0523; Thu, 2 Jul 2020 08:38:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DD5371D922; Thu, 2 Jul 2020 08:38:33 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id AD2511D91D for ; Thu, 2 Jul 2020 08:38:32 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0626ZYav017448; Wed, 1 Jul 2020 23:38:31 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=G2Nrn0Iizv3TrscOJNwmoBdkskbNPB7yXV6vRC67EJQ=; b=ylhEUly4HqHv+PPjmxyOOG3RiJhvKwjPh4xp7jrZPoy/XXA+zoOwMsL5Sq54uLglP8mz nKQUmBoGHQuvDOgMFFufunr7tZ4Ll82qVnfwR9drQSN1isSWlrFgadt/cSqQQoAhnsGC NasJ5wWvqqmJaQZPmvUza6gq/XeL8aP5PKT6hfmu28T5auByr1bPYPwwdGOEnJVxdjJ1 sn0d6vlXq6NB6uV0sPeFKohvF/LLLh3ZpMdyca34t2O+oYmWnznPLGjHSZlAlDnOMWTN OydaDerpNJRYQPOrAGNSNPMfVjSoV6WtwOUp4PVUUVJUETNTYtRLV/BBENWVLEZtTPKB Ww== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 31x5mnv02h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 01 Jul 2020 23:38:31 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 1 Jul 2020 23:38:29 -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.2 via Frontend Transport; Wed, 1 Jul 2020 23:38:30 -0700 Received: from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.161.240]) by maili.marvell.com (Postfix) with ESMTP id 7DD863F7040; Wed, 1 Jul 2020 23:38:27 -0700 (PDT) From: To: , Abhinandan Gujjar , Nikhil Rao , Erik Gabriel Carrillo CC: , Pavan Nikhilesh Date: Thu, 2 Jul 2020 11:49:49 +0530 Message-ID: <20200702061951.1663-1-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-02_03:2020-07-01, 2020-07-02 signatures=0 Subject: [dpdk-dev] [PATCH (v20.11) 1/2] eventdev: reserve space in config structs for extension X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" From: Pavan Nikhilesh Reserve space in event device configuration structures as increasing their size would break ABI for some applications. In order to allow smooth addition of features without breaking ABI compatibility, reserve some space. Signed-off-by: Pavan Nikhilesh --- lib/librte_eventdev/rte_event_crypto_adapter.h | 4 ++++ lib/librte_eventdev/rte_event_eth_rx_adapter.h | 8 ++++++++ lib/librte_eventdev/rte_event_eth_tx_adapter.h | 4 ++++ lib/librte_eventdev/rte_event_timer_adapter.h | 8 ++++++++ lib/librte_eventdev/rte_eventdev.h | 16 ++++++++++++++++ 5 files changed, 40 insertions(+) diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.h b/lib/librte_eventdev/rte_event_crypto_adapter.h index 60630ef66..c471ece79 100644 --- a/lib/librte_eventdev/rte_event_crypto_adapter.h +++ b/lib/librte_eventdev/rte_event_crypto_adapter.h @@ -250,6 +250,10 @@ struct rte_event_crypto_adapter_conf { * max_nb crypto ops. This isn't treated as a requirement; batching * may cause the adapter to process more than max_nb crypto ops. */ + uint64_t reserved_64s[4]; + /**< Reserved for future fields. */ + void *reserved_ptrs[4]; + /**< Reserved for future fields. */ }; /** diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.h b/lib/librte_eventdev/rte_event_eth_rx_adapter.h index 2dd259c27..d10f632e9 100644 --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.h +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.h @@ -112,6 +112,10 @@ struct rte_event_eth_rx_adapter_conf { * max_nb_rx mbufs. This isn't treated as a requirement; batching may * cause the adapter to process more than max_nb_rx mbufs. */ + uint64_t reserved_64s[4]; + /**< Reserved for future fields. */ + void *reserved_ptrs[4]; + /**< Reserved for future fields. */ }; /** @@ -171,6 +175,10 @@ struct rte_event_eth_rx_adapter_queue_conf { * The event adapter sets ev.event_type to RTE_EVENT_TYPE_ETHDEV in the * enqueued event. */ + uint64_t reserved_64s[4]; + /**< Reserved for future fields. */ + void *reserved_ptrs[4]; + /**< Reserved for future fields. */ }; /** diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.h b/lib/librte_eventdev/rte_event_eth_tx_adapter.h index 8c5954716..442e54da4 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.h +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.h @@ -97,6 +97,10 @@ struct rte_event_eth_tx_adapter_conf { * max_nb_tx mbufs. This isn't treated as a requirement; batching may * cause the adapter to process more than max_nb_tx mbufs. */ + uint64_t reserved_64s[4]; + /**< Reserved for future fields. */ + void *reserved_ptrs[4]; + /**< Reserved for future fields. */ }; /** diff --git a/lib/librte_eventdev/rte_event_timer_adapter.h b/lib/librte_eventdev/rte_event_timer_adapter.h index d2ebcb090..f83d85f4d 100644 --- a/lib/librte_eventdev/rte_event_timer_adapter.h +++ b/lib/librte_eventdev/rte_event_timer_adapter.h @@ -171,6 +171,10 @@ struct rte_event_timer_adapter_conf { /**< Total number of timers per adapter */ uint64_t flags; /**< Timer adapter config flags (RTE_EVENT_TIMER_ADAPTER_F_*) */ + uint64_t reserved_64s[4]; + /**< Reserved for future fields. */ + void *reserved_ptrs[4]; + /**< Reserved for future fields. */ }; /** @@ -268,6 +272,10 @@ struct rte_event_timer_adapter_info { /**< Event timer adapter capabilities */ int16_t event_dev_port_id; /**< Event device port ID, if applicable */ + uint64_t reserved_64s[4]; + /**< Reserved for future fields. */ + void *reserved_ptrs[4]; + /**< Reserved for future fields. */ }; /** diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index 7dc832353..1effeed58 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -387,6 +387,10 @@ struct rte_event_dev_info { */ uint32_t event_dev_cap; /**< Event device capabilities(RTE_EVENT_DEV_CAP_)*/ + uint64_t reserved_64s[4]; + /**< Reserved for future fields. */ + void *reserved_ptrs[4]; + /**< Reserved for future fields. */ }; /** @@ -494,6 +498,10 @@ struct rte_event_dev_config { */ uint32_t event_dev_cfg; /**< Event device config flags(RTE_EVENT_DEV_CFG_)*/ + uint64_t reserved_64s[4]; + /**< Reserved for future fields. */ + void *reserved_ptrs[4]; + /**< Reserved for future fields. */ }; /** @@ -574,6 +582,10 @@ struct rte_event_queue_conf { * event device supported priority value. * Valid when the device has RTE_EVENT_DEV_CAP_QUEUE_QOS capability */ + uint64_t reserved_64s[4]; + /**< Reserved for future fields. */ + void *reserved_ptrs[4]; + /**< Reserved for future fields. */ }; /** @@ -705,6 +717,10 @@ struct rte_event_port_conf { * RTE_EVENT_OP_FORWARD. Must be false when the device is not * RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE capable. */ + uint64_t reserved_64s[4]; + /**< Reserved for future fields. */ + void *reserved_ptrs[4]; + /**< Reserved for future fields. */ }; /** From patchwork Thu Jul 2 06:19:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 72787 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E9E8DA0523; Thu, 2 Jul 2020 08:38:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 07B9E1D932; Thu, 2 Jul 2020 08:38:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 822641D931 for ; Thu, 2 Jul 2020 08:38:37 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0626ZVm1008645; Wed, 1 Jul 2020 23:38:36 -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=pfpt0818; bh=cD923D0DO277kDPP3toWKGETGfpITmatAIbOLr8exBA=; b=PdNKeZ1a6YsPsWg0Pyao9K2IpZGvT+kKaW5sd7YIqWxXWT2xmh9l7iEnptugo7CmjDQf TQ7LXvhtb6lkdUnXfWPH/a7uCN2VSakY2qLIYupBmSRC3E9zyyDnciT1ckXzXaySvG9f /99UFB514JZWMhDKchaYWVymXJd5yb0qZN9wzn8bSSanZAnC7nTuwNT75JaZ3ewlwNWn huFwjtKHbC+zO2FrshZNd1VGlS5SK/7Iqi4Att3JeH+iByl/gO1IA1Rf4AArJOZ+VnCK W4R5tuWAb7ewcU+I0j26pcAtcOG8XdyNLOZTfTtIVyythbXf+/9QwjYZrt2DYbos3xAf bg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 31y0ws89gu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 01 Jul 2020 23:38:36 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 1 Jul 2020 23:38:35 -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.2 via Frontend Transport; Wed, 1 Jul 2020 23:38:35 -0700 Received: from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.161.240]) by maili.marvell.com (Postfix) with ESMTP id 140203F703F; Wed, 1 Jul 2020 23:38:32 -0700 (PDT) From: To: , Erik Gabriel Carrillo CC: , Pavan Nikhilesh Date: Thu, 2 Jul 2020 11:49:50 +0530 Message-ID: <20200702061951.1663-2-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200702061951.1663-1-pbhagavatula@marvell.com> References: <20200702061951.1663-1-pbhagavatula@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-02_03:2020-07-01, 2020-07-02 signatures=0 Subject: [dpdk-dev] [PATCH (v20.11) 2/2] eventdev: reserve space in timer structs for extension X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" From: Pavan Nikhilesh The struct rte_event_timer_adapter and rte_event_timer_adapter_data are supposed to be used internally only, but there is a chance that increasing their size would break ABI for some applications. In order to allow smooth addition of features without breaking ABI compatibility, reserve some space. Signed-off-by: Pavan Nikhilesh --- lib/librte_eventdev/rte_event_timer_adapter.h | 5 +++++ lib/librte_eventdev/rte_event_timer_adapter_pmd.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lib/librte_eventdev/rte_event_timer_adapter.h b/lib/librte_eventdev/rte_event_timer_adapter.h index f83d85f4d..ce57a990a 100644 --- a/lib/librte_eventdev/rte_event_timer_adapter.h +++ b/lib/librte_eventdev/rte_event_timer_adapter.h @@ -529,6 +529,11 @@ struct rte_event_timer_adapter { RTE_STD_C11 uint8_t allocated : 1; /**< Flag to indicate that this adapter has been allocated */ + + uint64_t reserved_64s[4]; + /**< Reserved for future fields */ + void *reserved_ptrs[4]; + /**< Reserved for future fields */ } __rte_cache_aligned; #define ADAPTER_VALID_OR_ERR_RET(adapter, retval) do { \ diff --git a/lib/librte_eventdev/rte_event_timer_adapter_pmd.h b/lib/librte_eventdev/rte_event_timer_adapter_pmd.h index cf3509dc6..0a6682833 100644 --- a/lib/librte_eventdev/rte_event_timer_adapter_pmd.h +++ b/lib/librte_eventdev/rte_event_timer_adapter_pmd.h @@ -105,6 +105,11 @@ struct rte_event_timer_adapter_data { RTE_STD_C11 uint8_t started : 1; /**< Flag to indicate adapter started. */ + + uint64_t reserved_64s[4]; + /**< Reserved for future fields */ + void *reserved_ptrs[4]; + /**< Reserved for future fields */ } __rte_cache_aligned; #ifdef __cplusplus