[PATCH 01/14] net: ionic: Rename neqs_per_lif to reflect rdma capability

Abhijit Gangurde
2025-04-23T10:30:29Z

RDMA event queues are named as eqs in current ionic device and lif
structure. Rename these variables to reflect RDMA capability.

Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
---
drivers/net/ethernet/pensando/ionic/ionic.h | 2 +-
.../net/ethernet/pensando/ionic/ionic_lif.c | 20 +++++++++----------
.../net/ethernet/pensando/ionic/ionic_lif.h | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/pensando/ionic/ionic.h b/drivers/net/ethernet/pensando/ionic/ionic.h
index 04f00ea94230..013e1ce72d0d 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic.h
@@ -50,7 +50,7 @@ struct ionic {
struct workqueue_struct *wq;
struct ionic_lif *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;
unsigned int nintrs;
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
index 7707a9e53c43..0a99a72376ae 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
@@ -3267,7 +3267,7 @@ int ionic_lif_alloc(struct ionic *ionic)
lif->netdev->max_mtu =
le32_to_cpu(lif->identity->eth.max_frame_size) - VLAN_ETH_HLEN;

- lif->neqs = ionic->neqs_per_lif;
+ lif->nrdma_eqs = ionic->nrdma_eqs_per_lif;
lif->nxqs = ionic->ntxqs_per_lif;

lif->index = 0;
@@ -4022,19 +4022,20 @@ int ionic_lif_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 nrdma_eqs;
unsigned int min_intrs;
+ unsigned int nxqs;
int err;

/* retrieve basic values from FW */
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]);
@@ -4042,7 +4043,6 @@ int ionic_lif_size(struct ionic *ionic)
/* limit values to play nice with kdump */
if (is_kdump_kernel()) {
dev_nintrs = 2;
- neqs_per_lif = 0;
nnqs_per_lif = 0;
ntxqs_per_lif = 1;
nrxqs_per_lif = 1;
@@ -4060,7 +4060,7 @@ int ionic_lif_size(struct ionic *ionic)

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:
@@ -4068,7 +4068,7 @@ int ionic_lif_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)
@@ -4088,7 +4088,7 @@ int ionic_lif_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;
@@ -4102,8 +4102,8 @@ int ionic_lif_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 e01756fb7fdd..05e9a931ef0d 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.h
@@ -202,7 +202,7 @@ struct ionic_lif {
u64 last_eid;
unsigned int kern_pid;
u64 __iomem *kern_dbpage;
- unsigned int neqs;
+ unsigned int nrdma_eqs;
unsigned int nxqs;
unsigned int ntxq_descs;
unsigned int nrxq_descs;
--
2.34.1