All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shannon Nelson <snelson@pensando.io>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: Shannon Nelson <snelson@pensando.io>
Subject: [PATCH net-next 2/9] ionic: rename rdma eqs field
Date: Sun, 16 Feb 2020 15:11:51 -0800	[thread overview]
Message-ID: <20200216231158.5678-3-snelson@pensando.io> (raw)
In-Reply-To: <20200216231158.5678-1-snelson@pensando.io>

Before adding fields to track the Eth Event Queues, we
need to rename the RDMA Event Queues fields so as to
prevent any confusion as to which set we're working with.

Signed-off-by: Shannon Nelson <snelson@pensando.io>
---
 drivers/net/ethernet/pensando/ionic/ionic.h   |  2 +-
 .../net/ethernet/pensando/ionic/ionic_lif.c   | 22 ++++++++++---------
 .../net/ethernet/pensando/ionic/ionic_lif.h   |  2 +-
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic.h b/drivers/net/ethernet/pensando/ionic/ionic.h
index bb106a32f416..7d41e7e56ca6 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic.h
@@ -46,7 +46,7 @@ struct ionic {
 	struct list_head lifs;
 	struct ionic_lif *master_lif;
 	unsigned int nnqs_per_lif;
-	unsigned int neqs_per_lif;
+	unsigned int nrdma_eqs_per_lif;
 	unsigned int ntxqs_per_lif;
 	unsigned int nrxqs_per_lif;
 	DECLARE_BITMAP(lifbits, IONIC_LIFS_MAX);
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 15d5b24d89a1..43c8bff02831 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -1912,7 +1912,7 @@ static struct ionic_lif *ionic_lif_alloc(struct ionic *ionic, unsigned int index
 	netdev->min_mtu = IONIC_MIN_MTU;
 	netdev->max_mtu = IONIC_MAX_MTU;
 
-	lif->neqs = ionic->neqs_per_lif;
+	lif->nrdma_eqs = ionic->nrdma_eqs_per_lif;
 	lif->nxqs = ionic->ntxqs_per_lif;
 
 	lif->ionic = ionic;
@@ -2458,26 +2458,28 @@ int ionic_lif_identify(struct ionic *ionic, u8 lif_type,
 int ionic_lifs_size(struct ionic *ionic)
 {
 	struct ionic_identity *ident = &ionic->ident;
-	unsigned int nintrs, dev_nintrs;
+	unsigned int nrdma_eqs_per_lif;
 	union ionic_lif_config *lc;
 	unsigned int ntxqs_per_lif;
 	unsigned int nrxqs_per_lif;
-	unsigned int neqs_per_lif;
 	unsigned int nnqs_per_lif;
-	unsigned int nxqs, neqs;
+	unsigned int dev_nintrs;
 	unsigned int min_intrs;
+	unsigned int nrdma_eqs;
+	unsigned int nintrs;
+	unsigned int nxqs;
 	int err;
 
 	lc = &ident->lif.eth.config;
 	dev_nintrs = le32_to_cpu(ident->dev.nintrs);
-	neqs_per_lif = le32_to_cpu(ident->lif.rdma.eq_qtype.qid_count);
+	nrdma_eqs_per_lif = le32_to_cpu(ident->lif.rdma.eq_qtype.qid_count);
 	nnqs_per_lif = le32_to_cpu(lc->queue_count[IONIC_QTYPE_NOTIFYQ]);
 	ntxqs_per_lif = le32_to_cpu(lc->queue_count[IONIC_QTYPE_TXQ]);
 	nrxqs_per_lif = le32_to_cpu(lc->queue_count[IONIC_QTYPE_RXQ]);
 
 	nxqs = min(ntxqs_per_lif, nrxqs_per_lif);
 	nxqs = min(nxqs, num_online_cpus());
-	neqs = min(neqs_per_lif, num_online_cpus());
+	nrdma_eqs = min(nrdma_eqs_per_lif, num_online_cpus());
 
 try_again:
 	/* interrupt usage:
@@ -2485,7 +2487,7 @@ int ionic_lifs_size(struct ionic *ionic)
 	 *    1 for each CPU for master lif TxRx queue pairs
 	 *    whatever's left is for RDMA queues
 	 */
-	nintrs = 1 + nxqs + neqs;
+	nintrs = 1 + nxqs + nrdma_eqs;
 	min_intrs = 2;  /* adminq + 1 TxRx queue pair */
 
 	if (nintrs > dev_nintrs)
@@ -2505,7 +2507,7 @@ int ionic_lifs_size(struct ionic *ionic)
 	}
 
 	ionic->nnqs_per_lif = nnqs_per_lif;
-	ionic->neqs_per_lif = neqs;
+	ionic->nrdma_eqs_per_lif = nrdma_eqs;
 	ionic->ntxqs_per_lif = nxqs;
 	ionic->nrxqs_per_lif = nxqs;
 	ionic->nintrs = nintrs;
@@ -2519,8 +2521,8 @@ int ionic_lifs_size(struct ionic *ionic)
 		nnqs_per_lif >>= 1;
 		goto try_again;
 	}
-	if (neqs > 1) {
-		neqs >>= 1;
+	if (nrdma_eqs > 1) {
+		nrdma_eqs >>= 1;
 		goto try_again;
 	}
 	if (nxqs > 1) {
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.h b/drivers/net/ethernet/pensando/ionic/ionic_lif.h
index 9c5a7dd45f9d..e912f8efb3d5 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.h
@@ -149,7 +149,7 @@ struct ionic_lif {
 	struct ionic_qcqst *txqcqs;
 	struct ionic_qcqst *rxqcqs;
 	u64 last_eid;
-	unsigned int neqs;
+	unsigned int nrdma_eqs;
 	unsigned int nxqs;
 	unsigned int ntxq_descs;
 	unsigned int nrxq_descs;
-- 
2.17.1


  parent reply	other threads:[~2020-02-16 23:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-16 23:11 [PATCH net-next 0/9] ionic: Add support for Event Queues Shannon Nelson
2020-02-16 23:11 ` [PATCH net-next 1/9] ionic: change param from lif to ionic Shannon Nelson
2020-02-16 23:11 ` Shannon Nelson [this message]
2020-02-16 23:11 ` [PATCH net-next 3/9] ionic: replace lif list with xarray Shannon Nelson
2020-02-16 23:11 ` [PATCH net-next 4/9] ionic: add event queue definitions to hw interface Shannon Nelson
2020-02-16 23:11 ` [PATCH net-next 5/9] ionic: rename napi irq functions Shannon Nelson
2020-02-16 23:11 ` [PATCH net-next 6/9] ionic: add functions for setup and tear down event queues Shannon Nelson
2020-02-16 23:11 ` [PATCH net-next 7/9] ionic: add q ident query for eq Shannon Nelson
2020-02-16 23:11 ` [PATCH net-next 8/9] ionic: add basic eq support Shannon Nelson
2020-02-16 23:11 ` [PATCH net-next 9/9] ionic: keep ionic dev on lif init fail Shannon Nelson
2020-02-17  4:11 ` [PATCH net-next 0/9] ionic: Add support for Event Queues David Miller
2020-02-17  6:55   ` Shannon Nelson
2020-02-17 22:03     ` David Miller
2020-02-18 16:16       ` Shannon Nelson
2020-02-18 20:33         ` David Miller

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=20200216231158.5678-3-snelson@pensando.io \
    --to=snelson@pensando.io \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.