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 20656A00C3; Mon, 15 Aug 2022 23:59:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 15A9C42B98; Mon, 15 Aug 2022 23:57:46 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 1D94C427F3 for ; Mon, 15 Aug 2022 23:57:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660600656; x=1692136656; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jTBvDxCva+2jywFD/iRxa8kmbkUj6749qPhdJlMMffA=; b=YOQYs6iEmoEzKFpknR8pc7X/ToSBtzX6M2fSRqQYccp6it6ld2nfXjdC 1N+p4gb/6yQ7kd31KQyfLPENEfLXeeXSpZ21K0ZPS/N6UwXhaemW0knsa I61rvIfubUTLvarkftWWk4OZ81SyYPnuGcVLvP7SAHBlLAO/O+3R4zc7H JC+K7UXJtm8SHqwTdKFeC5nDah8q4Rm9CVGh1eoU8qqzdGzx80x2EMJEp A7DiHBZws7zIUFvYZMWWhJm6++j9xkzR79Yc4ld0VqqKdBr678Eqn5ELR 9jF221pPZm9Tt1gIjyM5le+rqVRYwaK7uSAL5p38NeNqhYT3ED0PcB/PY g==; X-IronPort-AV: E=McAfee;i="6400,9594,10440"; a="292862717" X-IronPort-AV: E=Sophos;i="5.93,239,1654585200"; d="scan'208";a="292862717" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Aug 2022 14:57:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,239,1654585200"; d="scan'208";a="666826057" Received: from unknown (HELO csl-npg-qt0.la.intel.com) ([10.233.181.103]) by fmsmga008.fm.intel.com with ESMTP; 15 Aug 2022 14:57:35 -0700 From: Hernan Vargas To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, Hernan Vargas Subject: [PATCH v1 13/33] baseband/acc100: enable vf2pf doorbell register Date: Mon, 15 Aug 2022 22:52:38 -0700 Message-Id: <20220816055258.107564-14-hernan.vargas@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220816055258.107564-1-hernan.vargas@intel.com> References: <20220816055258.107564-1-hernan.vargas@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Setup vf2pf doorbell register for ACC101 Signed-off-by: Hernan Vargas --- drivers/baseband/acc100/acc100_vf_enum.h | 6 ++++++ drivers/baseband/acc100/rte_acc100_pmd.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/baseband/acc100/acc100_vf_enum.h b/drivers/baseband/acc100/acc100_vf_enum.h index b512af33fc..5807a9d0fd 100644 --- a/drivers/baseband/acc100/acc100_vf_enum.h +++ b/drivers/baseband/acc100/acc100_vf_enum.h @@ -70,4 +70,10 @@ enum { ACC100_VF_INT_QMGR_AQ_OVERTHRESHOLD = 9, }; +/* TIP PF2VF Comms */ +enum { + ACC100_VF2PF_STATUS_REQUEST = 0, + ACC100_VF2PF_USING_VF = 1, +}; + #endif /* ACC100_VF_ENUM_H */ diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseband/acc100/rte_acc100_pmd.c index e0df07bc20..548f228f23 100644 --- a/drivers/baseband/acc100/rte_acc100_pmd.c +++ b/drivers/baseband/acc100/rte_acc100_pmd.c @@ -292,6 +292,13 @@ fetch_acc100_config(struct rte_bbdev *dev) acc100_conf->q_dl_5g.aq_depth_log2); } +static inline void +acc100_vf2pf(struct acc100_device *d, unsigned int payload) +{ + if (d->device_variant == ACC101_VARIANT) + acc100_reg_write(d, HWVfHiVfToPfDbellVf, payload); +} + static void free_base_addresses(void **base_addrs, int size) { @@ -712,6 +719,7 @@ acc100_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id) /* Mark as configured properly */ d->configured = true; + acc100_vf2pf(d, ACC100_VF2PF_USING_VF); rte_bbdev_log_debug( "ACC100 (%s) configured sw_rings = %p, sw_rings_iova = %#" -- 2.37.1