DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Boyer <aboyer@pensando.io>
To: dev@dpdk.org
Cc: Alfredo Cardigliano <cardigliano@ntop.org>,
	Andrew Boyer <aboyer@pensando.io>
Subject: [dpdk-dev] [PATCH 04/14] net/ionic: remove unused field from queue structure
Date: Thu,  4 Feb 2021 11:58:43 -0800
Message-ID: <20210204195853.13411-5-aboyer@pensando.io> (raw)
In-Reply-To: <20210204195853.13411-1-aboyer@pensando.io>

This will conserve resources.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
---
 drivers/net/ionic/ionic_dev.c  | 6 ------
 drivers/net/ionic/ionic_dev.h  | 2 --
 drivers/net/ionic/ionic_lif.c  | 1 -
 drivers/net/ionic/ionic_rxtx.c | 9 +++++----
 4 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ionic/ionic_dev.c b/drivers/net/ionic/ionic_dev.c
index 74ac2e67a5..97fb8acf9b 100644
--- a/drivers/net/ionic/ionic_dev.c
+++ b/drivers/net/ionic/ionic_dev.c
@@ -383,12 +383,6 @@ ionic_cq_map(struct ionic_cq *cq, void *base, rte_iova_t base_pa)
 	cq->base_pa = base_pa;
 }
 
-void
-ionic_cq_bind(struct ionic_cq *cq, struct ionic_queue *q)
-{
-	q->bound_cq = cq;
-}
-
 uint32_t
 ionic_cq_service(struct ionic_cq *cq, uint32_t work_to_do,
 		 ionic_cq_cb cb, void *cb_arg)
diff --git a/drivers/net/ionic/ionic_dev.h b/drivers/net/ionic/ionic_dev.h
index 1a43ccc61f..511d0bc7aa 100644
--- a/drivers/net/ionic/ionic_dev.h
+++ b/drivers/net/ionic/ionic_dev.h
@@ -138,7 +138,6 @@ struct ionic_dev {
 struct ionic_queue {
 	struct ionic_dev *idev;
 	struct ionic_lif *lif;
-	struct ionic_cq *bound_cq;
 	uint32_t index;
 	uint32_t type;
 	uint32_t hw_index;
@@ -222,7 +221,6 @@ struct ionic_doorbell __iomem *ionic_db_map(struct ionic_lif *lif,
 
 int ionic_cq_init(struct ionic_cq *cq, uint16_t num_descs);
 void ionic_cq_map(struct ionic_cq *cq, void *base, rte_iova_t base_pa);
-void ionic_cq_bind(struct ionic_cq *cq, struct ionic_queue *q);
 typedef bool (*ionic_cq_cb)(struct ionic_cq *cq, uint32_t cq_desc_index,
 		void *cb_arg);
 uint32_t ionic_cq_service(struct ionic_cq *cq, uint32_t work_to_do,
diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c
index 52bc0b178d..1ca6e050ad 100644
--- a/drivers/net/ionic/ionic_lif.c
+++ b/drivers/net/ionic/ionic_lif.c
@@ -695,7 +695,6 @@ ionic_qcq_alloc(struct ionic_lif *lif, uint8_t type,
 
 	ionic_q_map(&new->q, q_base, q_base_pa);
 	ionic_cq_map(&new->cq, cq_base, cq_base_pa);
-	ionic_cq_bind(&new->cq, &new->q);
 
 	*qcq = new;
 
diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 81c9ff8ba8..107b1cb091 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -741,14 +741,15 @@ ionic_dev_rx_queue_setup(struct rte_eth_dev *eth_dev,
 }
 
 static __rte_always_inline void
-ionic_rx_clean(struct ionic_queue *q,
+ionic_rx_clean(struct ionic_qcq *rxq,
 		uint32_t q_desc_index, uint32_t cq_desc_index,
 		void *service_cb_arg)
 {
-	struct ionic_rxq_comp *cq_desc_base = q->bound_cq->base;
+	struct ionic_queue *q = &rxq->q;
+	struct ionic_cq *cq = &rxq->cq;
+	struct ionic_rxq_comp *cq_desc_base = cq->base;
 	struct ionic_rxq_comp *cq_desc = &cq_desc_base[cq_desc_index];
 	struct rte_mbuf *rxm, *rxm_seg;
-	struct ionic_qcq *rxq = IONIC_Q_TO_QCQ(q);
 	uint32_t max_frame_size =
 		rxq->lif->eth_dev->data->dev_conf.rxmode.max_rx_pkt_len;
 	uint64_t pkt_flags = 0;
@@ -1061,7 +1062,7 @@ ionic_rxq_service(struct ionic_qcq *rxq, uint32_t work_to_do,
 				/* q desc info */
 				rte_prefetch0(&q->info[q->tail_idx]);
 
-			ionic_rx_clean(q, curr_q_tail_idx, curr_cq_tail_idx,
+			ionic_rx_clean(rxq, curr_q_tail_idx, curr_cq_tail_idx,
 				service_cb_arg);
 
 		} while (more);
-- 
2.17.1


  parent reply	other threads:[~2021-02-04 19:59 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 19:58 [dpdk-dev] [PATCH 00/14] net/ionic: struct optimizations, fixes Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 01/14] net/ionic: cut down completion queue structure Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 02/14] net/ionic: consolidate adminq code Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 03/14] net/ionic: convert info array to generic pointers Andrew Boyer
2021-02-04 19:58 ` Andrew Boyer [this message]
2021-02-04 19:58 ` [dpdk-dev] [PATCH 05/14] net/ionic: remove unused interrupt free function Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 06/14] net/ionic: cut down queue structure Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 07/14] net/ionic: split up queue-completion " Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 08/14] net/ionic: use the socket id passed in for Rx and Tx queues Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 09/14] net/ionic: log queue counters when tearing down Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 10/14] net/ionic: break up queue post function Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 11/14] net/ionic: ring doorbell once at the end of each burst Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 12/14] net/ionic: send as many packets as possible Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 13/14] net/ionic: fix Tx fragment limit check Andrew Boyer
2021-02-04 19:58 ` [dpdk-dev] [PATCH 14/14] net/ionic: fix code around lif init devcmd Andrew Boyer
2021-02-04 20:25 ` [dpdk-dev] [PATCH 00/14] net/ionic: struct optimizations, fixes Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 00/15] " Andrew Boyer
2021-02-25 16:07   ` Ferruh Yigit
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 01/15] net/ionic: cut down completion queue structure Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 02/15] net/ionic: remove unused filter delete function Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 03/15] net/ionic: consolidate adminq code Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 04/15] net/ionic: convert info array to generic pointers Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 05/15] net/ionic: remove unused field from queue structure Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 06/15] net/ionic: remove unused interrupt free function Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 07/15] net/ionic: cut down queue structure Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 08/15] net/ionic: split up queue-completion " Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 09/15] net/ionic: use the socket id passed in for Rx and Tx queues Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 10/15] net/ionic: log queue counters when tearing down Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 11/15] net/ionic: break up queue post function Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 12/15] net/ionic: ring doorbell once at the end of each burst Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 13/15] net/ionic: send as many packets as possible Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 14/15] net/ionic: store Tx fragment limit in queue Andrew Boyer
2021-02-16 20:35 ` [dpdk-dev] [PATCH v2 15/15] net/ionic: fix code around lif init devcmd Andrew Boyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210204195853.13411-5-aboyer@pensando.io \
    --to=aboyer@pensando.io \
    --cc=cardigliano@ntop.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git