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 BF450A054D; Tue, 7 Jun 2022 17:49:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3809841611; Tue, 7 Jun 2022 17:49:35 +0200 (CEST) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mails.dpdk.org (Postfix) with ESMTP id 0651E415D7 for ; Tue, 7 Jun 2022 17:49:34 +0200 (CEST) Received: by mail-qk1-f169.google.com with SMTP id 68so5056961qkk.9 for ; Tue, 07 Jun 2022 08:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atomicrules-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=a2piXELjlrhFfZYmCRutqk89uT5fUgz1qymRdV0Cwq0=; b=EwDlN5OcFt/lZk3sMhSjTGzKHiGSgkl9we4YvdFmvIr/Gqq/f4LqbHbL1kIlgSxK7C X+v7r5xHCnTMbyZO7B0SMKEB76Upx0mG5VDX+pLC/e2bn+O+AdHk46KyJKe3ETb33Smh BoXZ9eCR58dYDXpVDH9b+CSMTH+R94RSBEMWYLHSdzc/0bQHZRYH2BkPN4suUN02BT2c TbYOrkW9kDDS6KB7INJYrqcwwoWc7GOYvctHGPf/uD+Dc+4xTqyCm0kro1EQu3m1a2VJ EICzq7DpkAu/tcLRx+6+LzQTmJnHrUEYbxqHg1eKvUf+9xYnHfmdvbhZiXgZIR+LL0r0 yi6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=a2piXELjlrhFfZYmCRutqk89uT5fUgz1qymRdV0Cwq0=; b=8IgYkZldkjxyUqo1EbvL7fov9sJsFeJMxcZkSrYRH00nGqlXxfgElw0kMWAZvdNsdr 6alCKJQZcrxo1fFuDASpN6Z+rVIEkDVqGECfcKuu8BidmQ9ES14apmS+lv97nZPnXCRO mWdhmPfHDmoiBwlgeC+ep08FJ4WWwWslP74bbYrMoTUWzWNGdJWmOu6uGdhgI0HnMZ1N YHPKp9v7ivRImr3ukoeXoyaipmooShlOv+g7lhC+QqjImdDr6Ha+hXFrRXoZdS88OzZl pj7upZXSTEq0dzYt9juvY7/SDxoGuXHAl1o+aCJDkKnvKTr3nOSCXMsEnSNyzRoLKYgu ADXw== X-Gm-Message-State: AOAM530BE5IWxPsQH5HTGtYnc7D0qS5e5e+i7hKd7rMJsa2e1UTdjWeK eVDvZ/1dAzEV5HQswJNpGOLeNgM6cpfM2w== X-Google-Smtp-Source: ABdhPJwXJUoVXHH9QvUKuiIJ2V3/E9ZdGHxzjRJ84wBay++De2nG4bSDeN0ZYtlDYbbpBk7CkEx1vA== X-Received: by 2002:a37:bc03:0:b0:6a3:67d2:a7b4 with SMTP id m3-20020a37bc03000000b006a367d2a7b4mr20091472qkf.337.1654616973027; Tue, 07 Jun 2022 08:49:33 -0700 (PDT) Received: from z390.czeck.local (pool-173-48-102-189.bstnma.fios.verizon.net. [173.48.102.189]) by smtp.gmail.com with ESMTPSA id e185-20020a3769c2000000b006a5d4f32e5dsm14030266qkc.128.2022.06.07.08.49.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 08:49:32 -0700 (PDT) From: Ed Czeck To: dev@dpdk.org Cc: ferruh.yigit@xilinx.com, ktraynor@redhat.com, bluca@debian.org, Shepard Siegel , John Miller Subject: [PATCH v3 2/7] net/ark: update MPU functions for firmware update Date: Tue, 7 Jun 2022 11:49:12 -0400 Message-Id: <20220607154917.1871118-2-ed.czeck@atomicrules.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220607154917.1871118-1-ed.czeck@atomicrules.com> References: <20220502212232.1283-1-ed.czeck@atomicrules.com> <20220607154917.1871118-1-ed.czeck@atomicrules.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 new firmware version for MPU (Mbuf Prefetch Unit) remove device-level global operations remove ark_mpu_reset_stats function Signed-off-by: Ed Czeck --- v2: - document version compatibility between firmware and DPDK - reword commit message --- doc/guides/nics/ark.rst | 15 +++++++++++++++ drivers/net/ark/ark_ethdev.c | 2 -- drivers/net/ark/ark_ethdev_rx.c | 4 ---- drivers/net/ark/ark_mpu.c | 21 ++++----------------- drivers/net/ark/ark_mpu.h | 29 ++--------------------------- 5 files changed, 21 insertions(+), 50 deletions(-) diff --git a/doc/guides/nics/ark.rst b/doc/guides/nics/ark.rst index c965406a7b..29c0a07d60 100644 --- a/doc/guides/nics/ark.rst +++ b/doc/guides/nics/ark.rst @@ -300,6 +300,21 @@ ARK PMD supports the following Arkville RTL PCIe instances including: * ``1d6c:101e`` - AR-ARKA-FX1 [Arkville 64B DPDK Data Mover for Agilex R-Tile] * ``1d6c:101f`` - AR-TK242 [2x100GbE Packet Capture Device] +DPDK and Arkville Firmware Versioning +------------------------------------- + +Arkville's firmware and its PMD have version dependencies which must +be stepped together at certain releases. PMD code ensures the versions are +compatible. The following lists shows where version compatible steps have +occurred. If other combinations are required, please contact Atomic Rules +support. + +* DPDK 22.07 requires Arkville 22.07. +* DPDK 22.03 requires Arkville 22.03. +* DPDK 21.05 requires Arkville 21.05. +* DPDK 18.11 requires Arkville 18.11. +* DPDK 17.05 requires Arkville 17.05 -- initial version. + Supported Operating Systems --------------------------- diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c index 76b88c62d0..c0578b85ce 100644 --- a/drivers/net/ark/ark_ethdev.c +++ b/drivers/net/ark/ark_ethdev.c @@ -524,7 +524,6 @@ ark_config_device(struct rte_eth_dev *dev) num_q = ark_api_num_queues(mpu); ark->rx_queues = num_q; for (i = 0; i < num_q; i++) { - ark_mpu_reset(mpu); mpu = RTE_PTR_ADD(mpu, ARK_MPU_QOFFSET); } @@ -536,7 +535,6 @@ ark_config_device(struct rte_eth_dev *dev) num_q = ark_api_num_queues(mpu); ark->tx_queues = num_q; for (i = 0; i < num_q; i++) { - ark_mpu_reset(mpu); mpu = RTE_PTR_ADD(mpu, ARK_MPU_QOFFSET); } diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c index 0fbb2603db..85e34d0bb8 100644 --- a/drivers/net/ark/ark_ethdev_rx.c +++ b/drivers/net/ark/ark_ethdev_rx.c @@ -91,9 +91,6 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev, ark_udm_write_addr(queue->udm, phys_addr_prod_index); - /* advance the valid pointer, but don't start until the queue starts */ - ark_mpu_reset_stats(queue->mpu); - /* The seed is the producer index for the HW */ ark_mpu_set_producer(queue->mpu, queue->seed_index); dev->data->rx_queue_state[rx_queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED; @@ -589,7 +586,6 @@ eth_rx_queue_stats_reset(void *vqueue) if (queue == 0) return; - ark_mpu_reset_stats(queue->mpu); ark_udm_queue_stats_reset(queue->udm); } diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c index b8e94b6ed3..9d5ee7841b 100644 --- a/drivers/net/ark/ark_mpu.c +++ b/drivers/net/ark/ark_mpu.c @@ -24,10 +24,10 @@ ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size) { uint32_t version; - version = mpu->id.vernum & 0x0000fF00; - if ((mpu->id.idnum != 0x2055504d) || - (mpu->hw.obj_size != obj_size) || - (version != 0x00003100)) { + version = mpu->id.vernum; + if (mpu->id.idnum != ARK_MPU_MODID || + version != ARK_MPU_MODVER || + mpu->hw.obj_size != obj_size) { ARK_PMD_LOG(ERR, " MPU module not found as expected %08x" " \"%c%c%c%c %c%c%c%c\"\n", @@ -79,16 +79,9 @@ ark_mpu_reset(struct ark_mpu_t *mpu) mpu->cfg.command = MPU_CMD_FORCE_RESET; usleep(10); } - ark_mpu_reset_stats(mpu); return mpu->cfg.command != MPU_CMD_IDLE; } -void -ark_mpu_reset_stats(struct ark_mpu_t *mpu) -{ - mpu->stats.pci_request = 1; /* reset stats */ -} - int ark_mpu_configure(struct ark_mpu_t *mpu, rte_iova_t ring, uint32_t ring_size, int is_tx) @@ -118,12 +111,6 @@ ark_mpu_dump(struct ark_mpu_t *mpu, const char *code, uint16_t qid) ARK_PMD_LOG(DEBUG, "MPU: %s Q: %3u sw_prod %u, hw_cons: %u\n", code, qid, mpu->cfg.sw_prod_index, mpu->cfg.hw_cons_index); - ARK_PMD_LOG(DEBUG, "MPU: %s state: %d count %d, reserved %d" - "\n", - code, - mpu->debug.state, mpu->debug.count, - mpu->debug.reserved - ); } void diff --git a/drivers/net/ark/ark_mpu.h b/drivers/net/ark/ark_mpu.h index 92c3e67c86..9d2b70d35f 100644 --- a/drivers/net/ark/ark_mpu.h +++ b/drivers/net/ark/ark_mpu.h @@ -15,6 +15,8 @@ * there is minimal documentation. */ +#define ARK_MPU_MODID 0x2055504d +#define ARK_MPU_MODVER 0x37313232 /* * MPU hardware structures * These are overlay structures to a memory mapped FPGA device. These @@ -64,26 +66,6 @@ enum ARK_MPU_COMMAND { MPU_COMMAND_LIMIT = 0xfFFFFFFF }; -#define ARK_MPU_STATS 0x080 -struct ark_mpu_stats_t { - volatile uint64_t pci_request; - volatile uint64_t q_empty; - volatile uint64_t q_q1; - volatile uint64_t q_q2; - volatile uint64_t q_q3; - volatile uint64_t q_q4; - volatile uint64_t q_full; -}; - -#define ARK_MPU_DEBUG 0x0C0 -struct ark_mpu_debug_t { - volatile uint32_t state; - uint32_t reserved; - volatile uint32_t count; - volatile uint32_t take; - volatile uint32_t peek[4]; -}; - /* Consolidated structure */ struct ark_mpu_t { struct ark_mpu_id_t id; @@ -93,12 +75,6 @@ struct ark_mpu_t { uint8_t reserved1[(ARK_MPU_CFG - ARK_MPU_HW) - sizeof(struct ark_mpu_hw_t)]; struct ark_mpu_cfg_t cfg; - uint8_t reserved2[(ARK_MPU_STATS - ARK_MPU_CFG) - - sizeof(struct ark_mpu_cfg_t)]; - struct ark_mpu_stats_t stats; - uint8_t reserved3[(ARK_MPU_DEBUG - ARK_MPU_STATS) - - sizeof(struct ark_mpu_stats_t)]; - struct ark_mpu_debug_t debug; }; uint16_t ark_api_num_queues(struct ark_mpu_t *mpu); @@ -113,7 +89,6 @@ int ark_mpu_configure(struct ark_mpu_t *mpu, rte_iova_t ring, void ark_mpu_dump(struct ark_mpu_t *mpu, const char *msg, uint16_t idx); void ark_mpu_dump_setup(struct ark_mpu_t *mpu, uint16_t qid); -void ark_mpu_reset_stats(struct ark_mpu_t *mpu); /* this action is in a performance critical path */ static inline void -- 2.25.1