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>, Neel Patel <neel@pensando.io>
Subject: [dpdk-dev] [PATCH 2/6] net/ionic: combine queue init and enable commands
Date: Mon, 11 Jan 2021 11:02:05 -0800
Message-ID: <20210111190209.70928-3-aboyer@pensando.io> (raw)
In-Reply-To: <20210111190209.70928-1-aboyer@pensando.io>

Adding F_ENA to the q_init command has the same effect as q_enable.
This reduces the startup time a bit.

Signed-off-by: Andrew Boyer <aboyer@pensando.io>
Signed-off-by: Neel Patel <neel@pensando.io>
---
 drivers/net/ionic/ionic_lif.c  | 4 ++--
 drivers/net/ionic/ionic_rxtx.c | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c
index ed1595e62..673f789f3 100644
--- a/drivers/net/ionic/ionic_lif.c
+++ b/drivers/net/ionic/ionic_lif.c
@@ -1371,7 +1371,7 @@ ionic_lif_txq_init(struct ionic_qcq *qcq)
 			.opcode = IONIC_CMD_Q_INIT,
 			.type = q->type,
 			.index = q->index,
-			.flags = IONIC_QINIT_F_SG,
+			.flags = IONIC_QINIT_F_SG | IONIC_QINIT_F_ENA,
 			.intr_index = cq->bound_intr->index,
 			.ring_size = rte_log2_u32(q->num_descs),
 			.ring_base = q->base_pa,
@@ -1417,7 +1417,7 @@ ionic_lif_rxq_init(struct ionic_qcq *qcq)
 			.opcode = IONIC_CMD_Q_INIT,
 			.type = q->type,
 			.index = q->index,
-			.flags = IONIC_QINIT_F_SG,
+			.flags = IONIC_QINIT_F_SG | IONIC_QINIT_F_ENA,
 			.intr_index = cq->bound_intr->index,
 			.ring_size = rte_log2_u32(q->num_descs),
 			.ring_base = q->base_pa,
diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index cf7ff6ce7..5d0e9d5d5 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -232,10 +232,10 @@ ionic_dev_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t tx_queue_id)
 		err = ionic_lif_txq_init(txq);
 		if (err)
 			return err;
+	} else {
+		ionic_qcq_enable(txq);
 	}
 
-	ionic_qcq_enable(txq);
-
 	tx_queue_state[tx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
 
 	return 0;
@@ -988,6 +988,8 @@ ionic_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
 		err = ionic_lif_rxq_init(rxq);
 		if (err)
 			return err;
+	} else {
+		ionic_qcq_enable(rxq);
 	}
 
 	/* Allocate buffers for descriptor rings */
@@ -997,8 +999,6 @@ ionic_dev_rx_queue_start(struct rte_eth_dev *eth_dev, uint16_t rx_queue_id)
 		return -1;
 	}
 
-	ionic_qcq_enable(rxq);
-
 	rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STARTED;
 
 	return 0;
-- 
2.17.1


  parent reply	other threads:[~2021-01-11 19:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 19:02 [dpdk-dev] [PATCH 0/6] net/ionic: fix device configuration and init Andrew Boyer
2021-01-11 19:02 ` [dpdk-dev] [PATCH 1/6] net/ionic: revise configuration flag handling Andrew Boyer
2021-01-11 19:02 ` Andrew Boyer [this message]
2021-01-11 19:02 ` [dpdk-dev] [PATCH 3/6] net/ionic: set port admin state to up in port init Andrew Boyer
2021-01-11 19:02 ` [dpdk-dev] [PATCH 4/6] net/ionic: don't add station MAC filter on init Andrew Boyer
2021-01-11 19:02 ` [dpdk-dev] [PATCH 5/6] net/ionic: clear up confusion around FC autoneg Andrew Boyer
2021-01-11 19:02 ` [dpdk-dev] [PATCH 6/6] net/ionic: correctly set link speed and autonegotiation Andrew Boyer
2021-01-18 17:10   ` Ferruh Yigit
2021-01-18 17:09 ` [dpdk-dev] [PATCH 0/6] net/ionic: fix device configuration and init Ferruh Yigit

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=20210111190209.70928-3-aboyer@pensando.io \
    --to=aboyer@pensando.io \
    --cc=cardigliano@ntop.org \
    --cc=dev@dpdk.org \
    --cc=neel@pensando.io \
    /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