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 DD8CCA034F; Sun, 3 Oct 2021 10:32:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DDC94125D; Sun, 3 Oct 2021 10:32:01 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 190214123D for ; Sun, 3 Oct 2021 10:32:00 +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 1931o58m005289; Sun, 3 Oct 2021 01:31:59 -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=oGW/IxtrdYd7VX+dHtXHxROu5owcDNno9SlbQR/Irgg=; b=Iw30c7YExtvmUhnuxEMKO3KAnD/Gw25pkIhiZSIcevY1H6dE3tv/XQ0uwaoUHGtB1Y0K AFl1Zcl9ObmDkaGSmzNfJJWjfp58H2Ra1/g1Q0Cf9ZDIc7CIb8o+hrmPbhTCmjdBTIze Nm0XyL3Z7MFELsHEtEqcD+vOkEj4RcLvGCsL/jmPwQIhgdxJfEiCS+8+cjgsuEf+eT3T RPWFCGON6QJHafFEnn6vhk4QGERmABKTXvFtHVEPVtSCbcZFHJvmta3VnhOHKa38SrHY dB0Lt052ikF9uQ0NA44WHPvK9vzT2B6yZgPFITCvj817sZ2+sj3zJxj7ILUZhV+KOncv 8w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3bepxna4n7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 03 Oct 2021 01:31:59 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 3 Oct 2021 01:31:57 -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, 3 Oct 2021 01:31:57 -0700 Received: from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.177.176]) by maili.marvell.com (Postfix) with ESMTP id BF7323F7044; Sun, 3 Oct 2021 01:31:54 -0700 (PDT) From: To: , Pavan Nikhilesh , "Shijith Thotton" , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , Harry van Haaren , Erik Gabriel Carrillo CC: Date: Sun, 3 Oct 2021 13:57:03 +0530 Message-ID: <20211003082710.8398-7-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211003082710.8398-1-pbhagavatula@marvell.com> References: <20210823194020.1229-1-pbhagavatula@marvell.com> <20211003082710.8398-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: hoVXg47F5nQzaEQpMlRh3w6mh8rYzR5n X-Proofpoint-ORIG-GUID: hoVXg47F5nQzaEQpMlRh3w6mh8rYzR5n X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-10-03_02,2021-10-01_02,2020-04-07_01 Subject: [dpdk-dev] [PATCH v 07/13] eventdev: hide timer adapter PMD file 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" From: Pavan Nikhilesh Hide rte_event_timer_adapter_pmd.h file as it is an internal file. Remove rte_ prefix from rte_event_timer_adapter_ops structure. Signed-off-by: Pavan Nikhilesh --- drivers/event/cnxk/cnxk_tim_evdev.c | 5 ++-- drivers/event/cnxk/cnxk_tim_evdev.h | 2 +- drivers/event/dsw/dsw_evdev.c | 4 +-- drivers/event/octeontx/ssovf_evdev.c | 2 +- drivers/event/octeontx/timvf_evdev.c | 17 ++++++----- drivers/event/octeontx/timvf_evdev.h | 9 +++--- drivers/event/octeontx2/otx2_tim_evdev.c | 5 ++-- drivers/event/octeontx2/otx2_tim_evdev.h | 4 +-- drivers/event/sw/sw_evdev.c | 5 ++-- ...dapter_pmd.h => event_timer_adapter_pmd.h} | 8 ++--- lib/eventdev/eventdev_pmd.h | 8 ++--- lib/eventdev/meson.build | 2 +- lib/eventdev/rte_event_timer_adapter.c | 30 +++++++++---------- lib/eventdev/rte_event_timer_adapter.h | 2 +- lib/eventdev/rte_eventdev.c | 2 +- 15 files changed, 51 insertions(+), 54 deletions(-) rename lib/eventdev/{rte_event_timer_adapter_pmd.h => event_timer_adapter_pmd.h} (95%) diff --git a/drivers/event/cnxk/cnxk_tim_evdev.c b/drivers/event/cnxk/cnxk_tim_evdev.c index 9d40e336d7..10634c31e3 100644 --- a/drivers/event/cnxk/cnxk_tim_evdev.c +++ b/drivers/event/cnxk/cnxk_tim_evdev.c @@ -5,7 +5,7 @@ #include "cnxk_eventdev.h" #include "cnxk_tim_evdev.h" -static struct rte_event_timer_adapter_ops cnxk_tim_ops; +static struct event_timer_adapter_ops cnxk_tim_ops; static int cnxk_tim_chnk_pool_create(struct cnxk_tim_ring *tim_ring, @@ -353,8 +353,7 @@ cnxk_tim_stats_reset(const struct rte_event_timer_adapter *adapter) int cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags, - uint32_t *caps, - const struct rte_event_timer_adapter_ops **ops) + uint32_t *caps, const struct event_timer_adapter_ops **ops) { struct cnxk_tim_evdev *dev = cnxk_tim_priv_get(); diff --git a/drivers/event/cnxk/cnxk_tim_evdev.h b/drivers/event/cnxk/cnxk_tim_evdev.h index c369f6f472..91e163eb5a 100644 --- a/drivers/event/cnxk/cnxk_tim_evdev.h +++ b/drivers/event/cnxk/cnxk_tim_evdev.h @@ -267,7 +267,7 @@ cnxk_tim_timer_cancel_burst(const struct rte_event_timer_adapter *adptr, int cnxk_tim_caps_get(const struct rte_eventdev *dev, uint64_t flags, uint32_t *caps, - const struct rte_event_timer_adapter_ops **ops); + const struct event_timer_adapter_ops **ops); void cnxk_tim_init(struct roc_sso *sso); void cnxk_tim_fini(void); diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c index 01f060fff3..e9d33ad36b 100644 --- a/drivers/event/dsw/dsw_evdev.c +++ b/drivers/event/dsw/dsw_evdev.c @@ -381,8 +381,8 @@ dsw_eth_rx_adapter_caps_get(const struct rte_eventdev *dev __rte_unused, static int dsw_timer_adapter_caps_get(const struct rte_eventdev *dev __rte_unused, - uint64_t flags __rte_unused, uint32_t *caps, - const struct rte_event_timer_adapter_ops **ops) + uint64_t flags __rte_unused, uint32_t *caps, + const struct event_timer_adapter_ops **ops) { *caps = 0; *ops = NULL; diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index 4a8c6a13a5..e7aecd4139 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -721,7 +721,7 @@ ssovf_parsekv(const char *key __rte_unused, const char *value, void *opaque) static int ssovf_timvf_caps_get(const struct rte_eventdev *dev, uint64_t flags, - uint32_t *caps, const struct rte_event_timer_adapter_ops **ops) + uint32_t *caps, const struct event_timer_adapter_ops **ops) { return timvf_timer_adapter_caps_get(dev, flags, caps, ops, timvf_enable_stats); diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c index 688e9daa66..1f1cda3f7f 100644 --- a/drivers/event/octeontx/timvf_evdev.c +++ b/drivers/event/octeontx/timvf_evdev.c @@ -407,18 +407,19 @@ timvf_stats_reset(const struct rte_event_timer_adapter *adapter) return 0; } -static struct rte_event_timer_adapter_ops timvf_ops = { - .init = timvf_ring_create, - .uninit = timvf_ring_free, - .start = timvf_ring_start, - .stop = timvf_ring_stop, - .get_info = timvf_ring_info_get, +static struct event_timer_adapter_ops timvf_ops = { + .init = timvf_ring_create, + .uninit = timvf_ring_free, + .start = timvf_ring_start, + .stop = timvf_ring_stop, + .get_info = timvf_ring_info_get, }; int timvf_timer_adapter_caps_get(const struct rte_eventdev *dev, uint64_t flags, - uint32_t *caps, const struct rte_event_timer_adapter_ops **ops, - uint8_t enable_stats) + uint32_t *caps, + const struct event_timer_adapter_ops **ops, + uint8_t enable_stats) { RTE_SET_USED(dev); diff --git a/drivers/event/octeontx/timvf_evdev.h b/drivers/event/octeontx/timvf_evdev.h index 2977063d66..cef02cd7f9 100644 --- a/drivers/event/octeontx/timvf_evdev.h +++ b/drivers/event/octeontx/timvf_evdev.h @@ -5,13 +5,13 @@ #ifndef __TIMVF_EVDEV_H__ #define __TIMVF_EVDEV_H__ +#include #include #include #include #include -#include #include -#include +#include #include #include #include @@ -196,8 +196,9 @@ uint8_t timvf_get_ring(void); void timvf_release_ring(uint8_t vfid); void *timvf_bar(uint8_t id, uint8_t bar); int timvf_timer_adapter_caps_get(const struct rte_eventdev *dev, uint64_t flags, - uint32_t *caps, const struct rte_event_timer_adapter_ops **ops, - uint8_t enable_stats); + uint32_t *caps, + const struct event_timer_adapter_ops **ops, + uint8_t enable_stats); uint16_t timvf_timer_cancel_burst(const struct rte_event_timer_adapter *adptr, struct rte_event_timer **tim, const uint16_t nb_timers); uint16_t timvf_timer_arm_burst_sp(const struct rte_event_timer_adapter *adptr, diff --git a/drivers/event/octeontx2/otx2_tim_evdev.c b/drivers/event/octeontx2/otx2_tim_evdev.c index de50c4c76e..7dcb291043 100644 --- a/drivers/event/octeontx2/otx2_tim_evdev.c +++ b/drivers/event/octeontx2/otx2_tim_evdev.c @@ -9,7 +9,7 @@ #include "otx2_evdev.h" #include "otx2_tim_evdev.h" -static struct rte_event_timer_adapter_ops otx2_tim_ops; +static struct event_timer_adapter_ops otx2_tim_ops; static inline int tim_get_msix_offsets(void) @@ -497,8 +497,7 @@ otx2_tim_stats_reset(const struct rte_event_timer_adapter *adapter) int otx2_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags, - uint32_t *caps, - const struct rte_event_timer_adapter_ops **ops) + uint32_t *caps, const struct event_timer_adapter_ops **ops) { struct otx2_tim_evdev *dev = tim_priv_get(); diff --git a/drivers/event/octeontx2/otx2_tim_evdev.h b/drivers/event/octeontx2/otx2_tim_evdev.h index caa6ad3b3c..dac642e0e1 100644 --- a/drivers/event/octeontx2/otx2_tim_evdev.h +++ b/drivers/event/octeontx2/otx2_tim_evdev.h @@ -5,8 +5,8 @@ #ifndef __OTX2_TIM_EVDEV_H__ #define __OTX2_TIM_EVDEV_H__ +#include #include -#include #include #include "otx2_dev.h" @@ -244,7 +244,7 @@ uint16_t otx2_tim_timer_cancel_burst( int otx2_tim_caps_get(const struct rte_eventdev *dev, uint64_t flags, uint32_t *caps, - const struct rte_event_timer_adapter_ops **ops); + const struct event_timer_adapter_ops **ops); void otx2_tim_init(struct rte_pci_device *pci_dev, struct otx2_dev *cmn_dev); void otx2_tim_fini(void); diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index 9b72073322..34815b30b2 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -561,10 +561,9 @@ sw_eth_rx_adapter_caps_get(const struct rte_eventdev *dev, } static int -sw_timer_adapter_caps_get(const struct rte_eventdev *dev, - uint64_t flags, +sw_timer_adapter_caps_get(const struct rte_eventdev *dev, uint64_t flags, uint32_t *caps, - const struct rte_event_timer_adapter_ops **ops) + const struct event_timer_adapter_ops **ops) { RTE_SET_USED(dev); RTE_SET_USED(flags); diff --git a/lib/eventdev/rte_event_timer_adapter_pmd.h b/lib/eventdev/event_timer_adapter_pmd.h similarity index 95% rename from lib/eventdev/rte_event_timer_adapter_pmd.h rename to lib/eventdev/event_timer_adapter_pmd.h index cf3509dc6f..189017b5c1 100644 --- a/lib/eventdev/rte_event_timer_adapter_pmd.h +++ b/lib/eventdev/event_timer_adapter_pmd.h @@ -3,8 +3,8 @@ * All rights reserved. */ -#ifndef __RTE_EVENT_TIMER_ADAPTER_PMD_H__ -#define __RTE_EVENT_TIMER_ADAPTER_PMD_H__ +#ifndef __EVENT_TIMER_ADAPTER_PMD_H__ +#define __EVENT_TIMER_ADAPTER_PMD_H__ /** * @file @@ -57,7 +57,7 @@ typedef int (*rte_event_timer_adapter_stats_reset_t)( * @internal Structure containing the functions exported by an event timer * adapter implementation. */ -struct rte_event_timer_adapter_ops { +struct event_timer_adapter_ops { rte_event_timer_adapter_init_t init; /**< Set up adapter */ rte_event_timer_adapter_uninit_t uninit;/**< Tear down adapter */ rte_event_timer_adapter_start_t start; /**< Start adapter */ @@ -111,4 +111,4 @@ struct rte_event_timer_adapter_data { } #endif -#endif /* __RTE_EVENT_TIMER_ADAPTER_PMD_H__ */ +#endif /* __EVENT_TIMER_ADAPTER_PMD_H__ */ diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h index 764555d54c..6646db4918 100644 --- a/lib/eventdev/eventdev_pmd.h +++ b/lib/eventdev/eventdev_pmd.h @@ -24,8 +24,8 @@ #include #include +#include "event_timer_adapter_pmd.h" #include "rte_eventdev.h" -#include "rte_event_timer_adapter_pmd.h" /* Logging Macros */ #define RTE_EDEV_LOG_ERR(...) \ @@ -591,10 +591,8 @@ struct rte_event_eth_rx_adapter_queue_conf; * */ typedef int (*eventdev_timer_adapter_caps_get_t)( - const struct rte_eventdev *dev, - uint64_t flags, - uint32_t *caps, - const struct rte_event_timer_adapter_ops **ops); + const struct rte_eventdev *dev, uint64_t flags, uint32_t *caps, + const struct event_timer_adapter_ops **ops); /** * Add ethernet Rx queues to event device. This callback is invoked if diff --git a/lib/eventdev/meson.build b/lib/eventdev/meson.build index 9051ff04b7..f19b831edd 100644 --- a/lib/eventdev/meson.build +++ b/lib/eventdev/meson.build @@ -24,7 +24,6 @@ headers = files( 'rte_event_ring.h', 'rte_event_eth_rx_adapter.h', 'rte_event_timer_adapter.h', - 'rte_event_timer_adapter_pmd.h', 'rte_event_crypto_adapter.h', 'rte_event_eth_tx_adapter.h', ) @@ -35,6 +34,7 @@ driver_sdk_headers += files( 'eventdev_pmd.h', 'eventdev_pmd_pci.h', 'eventdev_pmd_vdev.h', + 'event_timer_adapter_pmd.h', ) deps += ['ring', 'ethdev', 'hash', 'mempool', 'mbuf', 'timer', 'cryptodev'] diff --git a/lib/eventdev/rte_event_timer_adapter.c b/lib/eventdev/rte_event_timer_adapter.c index ee20b39f4b..ae55407042 100644 --- a/lib/eventdev/rte_event_timer_adapter.c +++ b/lib/eventdev/rte_event_timer_adapter.c @@ -20,11 +20,11 @@ #include #include -#include "rte_eventdev.h" +#include "event_timer_adapter_pmd.h" #include "eventdev_pmd.h" -#include "rte_eventdev_trace.h" #include "rte_event_timer_adapter.h" -#include "rte_event_timer_adapter_pmd.h" +#include "rte_eventdev.h" +#include "rte_eventdev_trace.h" #define DATA_MZ_NAME_MAX_LEN 64 #define DATA_MZ_NAME_FORMAT "rte_event_timer_adapter_data_%d" @@ -35,7 +35,7 @@ RTE_LOG_REGISTER_SUFFIX(evtim_svc_logtype, adapter.timer.svc, NOTICE); static struct rte_event_timer_adapter adapters[RTE_EVENT_TIMER_ADAPTER_NUM_MAX]; -static const struct rte_event_timer_adapter_ops swtim_ops; +static const struct event_timer_adapter_ops swtim_ops; #define EVTIM_LOG(level, logtype, ...) \ rte_log(RTE_LOG_ ## level, logtype, \ @@ -1207,15 +1207,15 @@ swtim_arm_tmo_tick_burst(const struct rte_event_timer_adapter *adapter, return __swtim_arm_burst(adapter, evtims, nb_evtims); } -static const struct rte_event_timer_adapter_ops swtim_ops = { - .init = swtim_init, - .uninit = swtim_uninit, - .start = swtim_start, - .stop = swtim_stop, - .get_info = swtim_get_info, - .stats_get = swtim_stats_get, - .stats_reset = swtim_stats_reset, - .arm_burst = swtim_arm_burst, - .arm_tmo_tick_burst = swtim_arm_tmo_tick_burst, - .cancel_burst = swtim_cancel_burst, +static const struct event_timer_adapter_ops swtim_ops = { + .init = swtim_init, + .uninit = swtim_uninit, + .start = swtim_start, + .stop = swtim_stop, + .get_info = swtim_get_info, + .stats_get = swtim_stats_get, + .stats_reset = swtim_stats_reset, + .arm_burst = swtim_arm_burst, + .arm_tmo_tick_burst = swtim_arm_tmo_tick_burst, + .cancel_burst = swtim_cancel_burst, }; diff --git a/lib/eventdev/rte_event_timer_adapter.h b/lib/eventdev/rte_event_timer_adapter.h index 4e0d2a819b..cad6d3b4c5 100644 --- a/lib/eventdev/rte_event_timer_adapter.h +++ b/lib/eventdev/rte_event_timer_adapter.h @@ -523,7 +523,7 @@ struct rte_event_timer_adapter { /**< Pointer to driver cancel function. */ struct rte_event_timer_adapter_data *data; /**< Pointer to shared adapter data */ - const struct rte_event_timer_adapter_ops *ops; + const struct event_timer_adapter_ops *ops; /**< Functions exported by adapter driver */ RTE_STD_C11 diff --git a/lib/eventdev/rte_eventdev.c b/lib/eventdev/rte_eventdev.c index 7a70c7a963..8de5f8b47f 100644 --- a/lib/eventdev/rte_eventdev.c +++ b/lib/eventdev/rte_eventdev.c @@ -142,7 +142,7 @@ int rte_event_timer_adapter_caps_get(uint8_t dev_id, uint32_t *caps) { struct rte_eventdev *dev; - const struct rte_event_timer_adapter_ops *ops; + const struct event_timer_adapter_ops *ops; RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); -- 2.17.1