DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/4] net/ark: update mpu code to match current hardware version
@ 2022-05-02 21:22 Ed Czeck
  2022-05-02 21:22 ` [PATCH 2/4] net/ark: update ddm " Ed Czeck
                   ` (8 more replies)
  0 siblings, 9 replies; 49+ messages in thread
From: Ed Czeck @ 2022-05-02 21:22 UTC (permalink / raw)
  To: dev, ferruh.yigit; +Cc: Ed Czeck, Shepard Siegel, John Miller

new version code
remove device-level global operations
remove ark_mpu_reset_stats function

Signed-off-by: Ed Czeck <ed.czeck@atomicrules.com>
---
 drivers/net/ark/ark_ethdev.c    |  2 --
 drivers/net/ark/ark_ethdev_rx.c |  4 ----
 drivers/net/ark/ark_mpu.c       | 15 ++++-----------
 drivers/net/ark/ark_mpu.h       |  3 ++-
 4 files changed, 6 insertions(+), 18 deletions(-)

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..4038c08747 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)
diff --git a/drivers/net/ark/ark_mpu.h b/drivers/net/ark/ark_mpu.h
index 92c3e67c86..944bf37f59 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
@@ -113,7 +115,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.17.1


^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2022-06-08  8:41 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02 21:22 [PATCH 1/4] net/ark: update mpu code to match current hardware version Ed Czeck
2022-05-02 21:22 ` [PATCH 2/4] net/ark: update ddm " Ed Czeck
2022-05-02 21:22 ` [PATCH 3/4] net/ark: update udm " Ed Czeck
2022-05-02 21:22 ` [PATCH 4/4] net/ark: add new devices to support list Ed Czeck
2022-05-05 15:37 ` [PATCH v1 1/5] net/ark: update mpu code to match current hardware version Ed Czeck
2022-05-05 15:37   ` [PATCH v1 2/5] net/ark: update ddm " Ed Czeck
2022-05-05 15:37   ` [PATCH v1 3/5] net/ark: update udm " Ed Czeck
2022-05-05 15:37   ` [PATCH v1 4/5] net/ark: add new devices to support list Ed Czeck
2022-05-05 15:37   ` [PATCH v1 5/5] net/ark: add PMD support for devices as virtual functions Ed Czeck
2022-05-06 21:27 ` [PATCH v1 1/5] net/ark: update mpu code to match current hardware version Ed Czeck
2022-05-06 21:27   ` [PATCH v1 2/5] net/ark: update ddm " Ed Czeck
2022-05-06 21:27   ` [PATCH v1 3/5] net/ark: update udm " Ed Czeck
2022-05-06 21:27   ` [PATCH v1 4/5] net/ark: add new devices to support list Ed Czeck
2022-05-06 21:27   ` [PATCH v1 5/5] net/ark: add PMD support for devices as virtual functions Ed Czeck
2022-05-18 12:56     ` Ferruh Yigit
2022-05-18 12:54   ` [PATCH v1 1/5] net/ark: update mpu code to match current hardware version Ferruh Yigit
2022-05-19 10:13     ` Kevin Traynor
2022-05-19 21:36 ` [PATCH v2 1/7] devtools: add Atomic Rules acronyms for commit checks Ed Czeck
2022-05-19 21:36   ` [PATCH v2 2/7] net/ark: update MPU functions for firmware update Ed Czeck
2022-05-19 21:36   ` [PATCH v2 3/7] net/ark: update DDM " Ed Czeck
2022-05-19 21:36   ` [PATCH v2 4/7] net/ark: update UDM " Ed Czeck
2022-05-19 21:36   ` [PATCH v2 5/7] net/ark: report additional errors from firmware Ed Czeck
2022-05-19 21:36   ` [PATCH v2 6/7] net/ark: add new devices to support list Ed Czeck
2022-05-20  8:14     ` Andrew Rybchenko
2022-05-19 21:36   ` [PATCH v2 7/7] net/ark: add PMD support for devices as virtual functions Ed Czeck
2022-05-20 14:15 ` [PATCH v2 1/7] devtools: add Atomic Rules acronyms for commit checks Ed Czeck
2022-05-20 14:15   ` [PATCH v2 2/7] net/ark: update MPU functions for firmware update Ed Czeck
2022-05-23 14:39     ` Ferruh Yigit
2022-05-20 14:15   ` [PATCH v2 3/7] net/ark: update DDM " Ed Czeck
2022-05-20 14:15   ` [PATCH v2 4/7] net/ark: update UDM " Ed Czeck
2022-05-20 14:15   ` [PATCH v2 5/7] net/ark: report additional errors from firmware Ed Czeck
2022-05-20 14:15   ` [PATCH v2 6/7] net/ark: add new devices to support list Ed Czeck
2022-05-20 14:15   ` [PATCH v2 7/7] net/ark: add PMD support for devices as virtual functions Ed Czeck
2022-05-23 14:38     ` Ferruh Yigit
2022-06-07 15:49 ` [PATCH v3 1/7] devtools: add Atomic Rules acronyms for commit checks Ed Czeck
2022-06-07 15:49   ` [PATCH v3 2/7] net/ark: update MPU functions for firmware update Ed Czeck
2022-06-07 15:49   ` [PATCH v3 3/7] net/ark: update DDM " Ed Czeck
2022-06-07 15:49   ` [PATCH v3 4/7] net/ark: update UDM " Ed Czeck
2022-06-07 15:49   ` [PATCH v3 5/7] net/ark: report additional errors from firmware Ed Czeck
2022-06-07 15:49   ` [PATCH v3 6/7] net/ark: add new devices to support list Ed Czeck
2022-06-07 15:49   ` [PATCH v3 7/7] net/ark: add PMD support for devices as virtual functions Ed Czeck
2022-06-07 21:31 ` [PATCH v4 1/7] devtools: add Atomic Rules acronyms for commit checks Ed Czeck
2022-06-07 21:31   ` [PATCH v4 2/7] net/ark: update MPU functions for firmware update Ed Czeck
2022-06-07 21:31   ` [PATCH v4 3/7] net/ark: update DDM " Ed Czeck
2022-06-07 21:31   ` [PATCH v4 4/7] net/ark: update UDM " Ed Czeck
2022-06-07 21:31   ` [PATCH v4 5/7] net/ark: report additional errors from firmware Ed Czeck
2022-06-07 21:31   ` [PATCH v4 6/7] net/ark: add new devices to support list Ed Czeck
2022-06-07 21:31   ` [PATCH v4 7/7] net/ark: add PMD support for devices as virtual functions Ed Czeck
2022-06-08  8:41   ` [PATCH v4 1/7] devtools: add Atomic Rules acronyms for commit checks Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).