From patchwork Mon May 3 15:22:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Nikhilesh Bhagavatula X-Patchwork-Id: 92664 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 36AB9A0562; Mon, 3 May 2021 17:26:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 800CE411A8; Mon, 3 May 2021 17:24:21 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id D1B6C411A1 for ; Mon, 3 May 2021 17:24:20 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 143FAGSX032536 for ; Mon, 3 May 2021 08:24:20 -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=xPQzcxYn+pqZvh/UVfryrwjewMW93g9ogKLpW2CnQLU=; b=S12/b/8WTnbj7jnmvTUOvdIBp9foiXxQogaFYzORbiD2PNwPepJruHhv7C7eHPP+Zqgz IXYATHkyxTaGM2k/z77nvEjOrBR9Vhz7oEtJBzsnjPF4PdvxMJbTX3rnCH8dJ1rHkl+6 ycibNJqbfYtB59lEAV+fWE5gWJmXmeUbEDX3jKsofsmaqG0mtVvT+HsfmN7zxUGN+jxb aDQaoUHZmECUczw/cwu+tgdnarhp4TuWTgokOv4+5Zv9j5fmcG+Fjy8fPfp3EBfh9XEY Y0VHMEFh8zrD5+BfWaZcoOg38SaQb/CqJF9iY8AEkUpiB2b141rAbXTa9LWCS+WvXJqV Ow== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 38ad05hepv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 03 May 2021 08:24:20 -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.2; Mon, 3 May 2021 08:24:16 -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; Mon, 3 May 2021 08:24:16 -0700 Received: from BG-LT7430.marvell.com (BG-LT7430.marvell.com [10.28.177.176]) by maili.marvell.com (Postfix) with ESMTP id ACDA23F7041; Mon, 3 May 2021 08:24:15 -0700 (PDT) From: To: , Pavan Nikhilesh , "Shijith Thotton" CC: Date: Mon, 3 May 2021 20:52:29 +0530 Message-ID: <20210503152238.2437-27-pbhagavatula@marvell.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210503152238.2437-1-pbhagavatula@marvell.com> References: <20210430135336.2749-1-pbhagavatula@marvell.com> <20210503152238.2437-1-pbhagavatula@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: _eMz4T22AMylXI5YHa1lewM980_DM906 X-Proofpoint-ORIG-GUID: _eMz4T22AMylXI5YHa1lewM980_DM906 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-05-03_10:2021-05-03, 2021-05-03 signatures=0 Subject: [dpdk-dev] [PATCH v4 26/34] event/cnxk: add timer adapter info function 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: Shijith Thotton Add TIM event timer adapter info get function. Signed-off-by: Shijith Thotton Signed-off-by: Pavan Nikhilesh --- drivers/event/cnxk/cnxk_tim_evdev.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/event/cnxk/cnxk_tim_evdev.c b/drivers/event/cnxk/cnxk_tim_evdev.c index 1eb39a789..2fefa56f5 100644 --- a/drivers/event/cnxk/cnxk_tim_evdev.c +++ b/drivers/event/cnxk/cnxk_tim_evdev.c @@ -76,6 +76,18 @@ cnxk_tim_chnk_pool_create(struct cnxk_tim_ring *tim_ring, return rc; } +static void +cnxk_tim_ring_info_get(const struct rte_event_timer_adapter *adptr, + struct rte_event_timer_adapter_info *adptr_info) +{ + struct cnxk_tim_ring *tim_ring = adptr->data->adapter_priv; + + adptr_info->max_tmo_ns = tim_ring->max_tout; + adptr_info->min_resolution_ns = tim_ring->tck_nsec; + rte_memcpy(&adptr_info->conf, &adptr->data->conf, + sizeof(struct rte_event_timer_adapter_conf)); +} + static int cnxk_tim_ring_create(struct rte_event_timer_adapter *adptr) { @@ -218,6 +230,7 @@ cnxk_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags, cnxk_tim_ops.init = cnxk_tim_ring_create; cnxk_tim_ops.uninit = cnxk_tim_ring_free; + cnxk_tim_ops.get_info = cnxk_tim_ring_info_get; /* Store evdev pointer for later use. */ dev->event_dev = (struct rte_eventdev *)(uintptr_t)evdev;