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 v4 5/9] net/ionic: remove some unused fields Date: Wed, 9 Dec 2020 18:07:39 -0800 Message-ID: <20201210020743.68927-6-aboyer@pensando.io> (raw) In-Reply-To: <20201210020743.68927-1-aboyer@pensando.io> In-Reply-To: <20201204201646.51746-1-aboyer@pensando.io> This conserves resources. Signed-off-by: Andrew Boyer <aboyer@pensando.io> --- drivers/net/ionic/ionic.h | 1 - drivers/net/ionic/ionic_dev.c | 5 +---- drivers/net/ionic/ionic_dev.h | 7 +------ drivers/net/ionic/ionic_ethdev.c | 2 -- drivers/net/ionic/ionic_lif.c | 22 ++++++---------------- drivers/net/ionic/ionic_lif.h | 2 -- drivers/net/ionic/ionic_regs.h | 6 ------ 7 files changed, 8 insertions(+), 37 deletions(-) diff --git a/drivers/net/ionic/ionic.h b/drivers/net/ionic/ionic.h index 1538df309..a93110326 100644 --- a/drivers/net/ionic/ionic.h +++ b/drivers/net/ionic/ionic.h @@ -59,7 +59,6 @@ struct ionic_adapter { uint32_t link_speed; uint32_t nintrs; bool intrs[IONIC_INTR_CTRL_REGS_MAX]; - bool is_mgmt_nic; bool link_up; char fw_version[IONIC_DEVINFO_FWVERS_BUFLEN]; struct rte_pci_device *pci_dev; diff --git a/drivers/net/ionic/ionic_dev.c b/drivers/net/ionic/ionic_dev.c index 5c2820b7a..fc68f5c74 100644 --- a/drivers/net/ionic/ionic_dev.c +++ b/drivers/net/ionic/ionic_dev.c @@ -65,7 +65,6 @@ ionic_dev_setup(struct ionic_adapter *adapter) } idev->db_pages = bar->vaddr; - idev->phy_db_pages = bar->bus_addr; return 0; } @@ -343,7 +342,6 @@ ionic_dev_cmd_adminq_init(struct ionic_dev *idev, .q_init.type = q->type, .q_init.index = q->index, .q_init.flags = IONIC_QINIT_F_ENA, - .q_init.pid = q->pid, .q_init.intr_index = intr_index, .q_init.ring_size = rte_log2_u32(q->num_descs), .q_init.ring_base = q->base_pa, @@ -419,7 +417,7 @@ ionic_cq_service(struct ionic_cq *cq, uint32_t work_to_do, int ionic_q_init(struct ionic_lif *lif, struct ionic_dev *idev, struct ionic_queue *q, uint32_t index, uint32_t num_descs, - size_t desc_size, size_t sg_desc_size, uint32_t pid) + size_t desc_size, size_t sg_desc_size) { uint32_t ring_size; @@ -439,7 +437,6 @@ ionic_q_init(struct ionic_lif *lif, struct ionic_dev *idev, q->sg_desc_size = sg_desc_size; q->head_idx = 0; q->tail_idx = 0; - q->pid = pid; return 0; } diff --git a/drivers/net/ionic/ionic_dev.h b/drivers/net/ionic/ionic_dev.h index dc64a6d28..7150f7f2c 100644 --- a/drivers/net/ionic/ionic_dev.h +++ b/drivers/net/ionic/ionic_dev.h @@ -120,10 +120,7 @@ struct ionic_dev { union ionic_dev_cmd_regs __iomem *dev_cmd; struct ionic_doorbell __iomem *db_pages; - rte_iova_t phy_db_pages; - struct ionic_intr __iomem *intr_ctrl; - struct ionic_intr_status __iomem *intr_status; struct ionic_port_info *port_info; @@ -163,11 +160,9 @@ struct ionic_queue { uint32_t num_descs; uint32_t desc_size; uint32_t sg_desc_size; - uint32_t pid; uint32_t qid; uint32_t qtype; struct ionic_doorbell __iomem *db; - void *nop_desc; }; #define IONIC_INTR_INDEX_NOT_ASSIGNED (-1) @@ -257,7 +252,7 @@ uint32_t ionic_cq_service(struct ionic_cq *cq, uint32_t work_to_do, int ionic_q_init(struct ionic_lif *lif, struct ionic_dev *idev, struct ionic_queue *q, uint32_t index, uint32_t num_descs, - size_t desc_size, size_t sg_desc_size, uint32_t pid); + size_t desc_size, size_t sg_desc_size); void ionic_q_map(struct ionic_queue *q, void *base, rte_iova_t base_pa); void ionic_q_sg_map(struct ionic_queue *q, void *base, rte_iova_t base_pa); void ionic_q_flush(struct ionic_queue *q); diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index 600333e20..cd79f250e 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -1178,8 +1178,6 @@ eth_ionic_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, goto err_free_adapter; } - adapter->is_mgmt_nic = (pci_dev->id.device_id == IONIC_DEV_ID_ETH_MGMT); - adapter->num_bars = 0; for (i = 0; i < PCI_MAX_RESOURCE && i < IONIC_BARS_MAX; i++) { resource = &pci_dev->mem_resource[i]; diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index 60a5f3d53..bc15d75fd 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -536,8 +536,6 @@ ionic_lif_change_mtu(struct ionic_lif *lif, int new_mtu) if (err) return err; - lif->mtu = new_mtu; - return 0; } @@ -583,7 +581,7 @@ ionic_qcq_alloc(struct ionic_lif *lif, uint8_t type, uint32_t desc_size, uint32_t cq_desc_size, uint32_t sg_desc_size, - uint32_t pid, struct ionic_qcq **qcq) + struct ionic_qcq **qcq) { struct ionic_dev *idev = &lif->adapter->idev; struct ionic_qcq *new; @@ -633,7 +631,7 @@ ionic_qcq_alloc(struct ionic_lif *lif, uint8_t type, new->q.type = type; err = ionic_q_init(lif, idev, &new->q, index, num_descs, - desc_size, sg_desc_size, pid); + desc_size, sg_desc_size); if (err) { IONIC_PRINT(ERR, "Queue initialization failed"); return err; @@ -734,7 +732,7 @@ ionic_rx_qcq_alloc(struct ionic_lif *lif, uint32_t index, uint16_t nrxq_descs, sizeof(struct ionic_rxq_desc), sizeof(struct ionic_rxq_comp), sizeof(struct ionic_rxq_sg_desc), - lif->kern_pid, &lif->rxqcqs[index]); + &lif->rxqcqs[index]); if (err) return err; @@ -756,7 +754,7 @@ ionic_tx_qcq_alloc(struct ionic_lif *lif, uint32_t index, uint16_t ntxq_descs, sizeof(struct ionic_txq_desc), sizeof(struct ionic_txq_comp), sizeof(struct ionic_txq_sg_desc), - lif->kern_pid, &lif->txqcqs[index]); + &lif->txqcqs[index]); if (err) return err; @@ -777,7 +775,7 @@ ionic_admin_qcq_alloc(struct ionic_lif *lif) sizeof(struct ionic_admin_cmd), sizeof(struct ionic_admin_comp), 0, - lif->kern_pid, &lif->adminqcq); + &lif->adminqcq); if (err) return err; @@ -798,7 +796,7 @@ ionic_notify_qcq_alloc(struct ionic_lif *lif) sizeof(struct ionic_notifyq_cmd), sizeof(union ionic_notifyq_comp), 0, - lif->kern_pid, &lif->notifyqcq); + &lif->notifyqcq); if (err) return err; @@ -831,8 +829,6 @@ ionic_lif_alloc(struct ionic_lif *lif) rte_spinlock_init(&lif->adminq_lock); rte_spinlock_init(&lif->adminq_service_lock); - lif->kern_pid = 0; - dbpage_num = ionic_db_page_num(lif, 0); lif->kern_dbpage = ionic_bus_map_dbpage(adapter, dbpage_num); @@ -1211,13 +1207,11 @@ ionic_lif_notifyq_init(struct ionic_lif *lif) .index = q->index, .flags = (IONIC_QINIT_F_IRQ | IONIC_QINIT_F_ENA), .intr_index = qcq->intr.index, - .pid = q->pid, .ring_size = rte_log2_u32(q->num_descs), .ring_base = q->base_pa, } }; - IONIC_PRINT(DEBUG, "notifyq_init.pid %d", ctx.cmd.q_init.pid); IONIC_PRINT(DEBUG, "notifyq_init.index %d", ctx.cmd.q_init.index); IONIC_PRINT(DEBUG, "notifyq_init.ring_base 0x%" PRIx64 "", @@ -1320,7 +1314,6 @@ ionic_lif_txq_init(struct ionic_qcq *qcq) .index = q->index, .flags = IONIC_QINIT_F_SG, .intr_index = cq->bound_intr->index, - .pid = q->pid, .ring_size = rte_log2_u32(q->num_descs), .ring_base = q->base_pa, .cq_ring_base = cq->base_pa, @@ -1329,7 +1322,6 @@ ionic_lif_txq_init(struct ionic_qcq *qcq) }; int err; - IONIC_PRINT(DEBUG, "txq_init.pid %d", ctx.cmd.q_init.pid); IONIC_PRINT(DEBUG, "txq_init.index %d", ctx.cmd.q_init.index); IONIC_PRINT(DEBUG, "txq_init.ring_base 0x%" PRIx64 "", ctx.cmd.q_init.ring_base); @@ -1368,7 +1360,6 @@ ionic_lif_rxq_init(struct ionic_qcq *qcq) .index = q->index, .flags = IONIC_QINIT_F_SG, .intr_index = cq->bound_intr->index, - .pid = q->pid, .ring_size = rte_log2_u32(q->num_descs), .ring_base = q->base_pa, .cq_ring_base = cq->base_pa, @@ -1377,7 +1368,6 @@ ionic_lif_rxq_init(struct ionic_qcq *qcq) }; int err; - IONIC_PRINT(DEBUG, "rxq_init.pid %d", ctx.cmd.q_init.pid); IONIC_PRINT(DEBUG, "rxq_init.index %d", ctx.cmd.q_init.index); IONIC_PRINT(DEBUG, "rxq_init.ring_base 0x%" PRIx64 "", ctx.cmd.q_init.ring_base); diff --git a/drivers/net/ionic/ionic_lif.h b/drivers/net/ionic/ionic_lif.h index 425762d65..4e091719f 100644 --- a/drivers/net/ionic/ionic_lif.h +++ b/drivers/net/ionic/ionic_lif.h @@ -84,13 +84,11 @@ struct ionic_lif { struct ionic_adapter *adapter; struct rte_eth_dev *eth_dev; uint16_t port_id; /**< Device port identifier */ - uint16_t mtu; uint32_t index; uint32_t hw_index; uint32_t state; uint32_t ntxqcqs; uint32_t nrxqcqs; - uint32_t kern_pid; rte_spinlock_t adminq_lock; rte_spinlock_t adminq_service_lock; struct ionic_qcq *adminqcq; diff --git a/drivers/net/ionic/ionic_regs.h b/drivers/net/ionic/ionic_regs.h index 6ebc48d04..3bdec3424 100644 --- a/drivers/net/ionic/ionic_regs.h +++ b/drivers/net/ionic/ionic_regs.h @@ -130,10 +130,4 @@ enum ionic_dbell_bits { IONIC_DBELL_INDEX_MASK = 0xffff, }; -static inline void -ionic_dbell_ring(u64 __iomem *db_page, int qtype, u64 val) -{ - writeq(val, &db_page[qtype]); -} - #endif /* _IONIC_REGS_H_ */ -- 2.17.1
next prev parent reply other threads:[~2020-12-10 2:09 UTC|newest] Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-02 18:35 [dpdk-dev] [PATCH 0/8] net/ionic: minor updates and documentation Andrew Boyer 2020-11-02 18:35 ` [dpdk-dev] [PATCH 1/8] ionic: update documentation and MAINTAINERS Andrew Boyer 2020-11-03 12:35 ` Ferruh Yigit 2020-11-03 14:43 ` Andrew Boyer 2020-11-02 18:35 ` [dpdk-dev] [PATCH 2/8] ionic: connect to the meson build system Andrew Boyer 2020-11-02 18:35 ` [dpdk-dev] [PATCH 3/8] ionic: update ionic_if.h to the latest version Andrew Boyer 2020-11-03 12:44 ` Ferruh Yigit 2020-11-03 14:36 ` Andrew Boyer 2020-11-03 15:55 ` Ferruh Yigit 2020-11-02 18:35 ` [dpdk-dev] [PATCH 4/8] ionic: check for devcmd/admincmd completion more frequently Andrew Boyer 2020-11-02 18:35 ` [dpdk-dev] [PATCH 5/8] ionic: remove some unused fields Andrew Boyer 2020-11-02 18:35 ` [dpdk-dev] [PATCH 6/8] ionic: convert 'deferred' boolean to a flag bit Andrew Boyer 2020-11-02 18:35 ` [dpdk-dev] [PATCH 7/8] ionic: warn if RTE tries to enable loopback mode Andrew Boyer 2020-11-03 12:52 ` Ferruh Yigit 2020-11-02 18:35 ` [dpdk-dev] [PATCH 8/8] ionic: nits - whitespace, logging, helper variables Andrew Boyer 2020-11-03 13:06 ` Ferruh Yigit 2020-11-03 14:00 ` Andrew Boyer 2020-11-03 14:02 ` Ferruh Yigit 2020-11-03 13:11 ` [dpdk-dev] [PATCH 0/8] net/ionic: minor updates and documentation Ferruh Yigit 2020-11-03 14:45 ` Andrew Boyer 2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 0/9] " Andrew Boyer 2020-12-04 20:16 ` [dpdk-dev] [PATCH v3 " Andrew Boyer 2020-12-10 2:07 ` [dpdk-dev] [PATCH v4 " Andrew Boyer 2020-12-10 2:57 ` [dpdk-dev] [PATCH v5 " Andrew Boyer 2020-12-10 12:31 ` Ferruh Yigit 2020-12-10 14:44 ` [dpdk-dev] Patchworks " Andrew Boyer 2020-12-10 15:06 ` Ferruh Yigit 2020-12-10 2:57 ` [dpdk-dev] [PATCH v5 1/9] net/ionic: connect ionic to the build system Andrew Boyer 2020-12-10 2:57 ` [dpdk-dev] [PATCH v5 2/9] net/ionic: update interface file to the latest version Andrew Boyer 2020-12-10 2:57 ` [dpdk-dev] [PATCH v5 3/9] net/ionic: update documentation and MAINTAINERS Andrew Boyer 2020-12-10 12:01 ` Ferruh Yigit 2020-12-10 2:57 ` [dpdk-dev] [PATCH v5 4/9] net/ionic: check for cmd completion more frequently Andrew Boyer 2020-12-10 2:57 ` [dpdk-dev] [PATCH v5 5/9] net/ionic: remove some unused fields Andrew Boyer 2020-12-10 2:57 ` [dpdk-dev] [PATCH v5 6/9] net/ionic: convert 'deferred' boolean to a flag bit Andrew Boyer 2020-12-10 2:57 ` [dpdk-dev] [PATCH v5 7/9] net/ionic: warn if loopback mode is requested Andrew Boyer 2020-12-10 2:57 ` [dpdk-dev] [PATCH v5 8/9] net/ionic: minor refactorings and helper variables Andrew Boyer 2020-12-10 2:57 ` [dpdk-dev] [PATCH v5 9/9] net/ionic: minor logging fixups Andrew Boyer 2020-12-10 2:07 ` [dpdk-dev] [PATCH v4 1/9] net/ionic: connect ionic to the build system Andrew Boyer 2020-12-10 2:07 ` [dpdk-dev] [PATCH v4 2/9] net/ionic: update interface file to the latest version Andrew Boyer 2020-12-10 2:07 ` [dpdk-dev] [PATCH v4 3/9] net/ionic: update documentation and MAINTAINERS Andrew Boyer 2020-12-10 2:07 ` [dpdk-dev] [PATCH v4 4/9] net/ionic: check for cmd completion more frequently Andrew Boyer 2020-12-10 2:07 ` Andrew Boyer [this message] 2020-12-10 2:07 ` [dpdk-dev] [PATCH v4 6/9] net/ionic: convert 'deferred' boolean to a flag bit Andrew Boyer 2020-12-10 2:07 ` [dpdk-dev] [PATCH v4 7/9] net/ionic: warn if loopback mode is requested Andrew Boyer 2020-12-10 2:07 ` [dpdk-dev] [PATCH v4 8/9] net/ionic: minor refactorings and helper variables Andrew Boyer 2020-12-10 2:07 ` [dpdk-dev] [PATCH v4 9/9] net/ionic: minor logging fixups Andrew Boyer 2020-12-04 20:16 ` [dpdk-dev] [PATCH v3 1/9] net/ionic: connect ionic to the build system Andrew Boyer 2020-12-04 20:16 ` [dpdk-dev] [PATCH v3 2/9] net/ionic: update interface file to the latest version Andrew Boyer 2020-12-04 20:16 ` [dpdk-dev] [PATCH v3 3/9] net/ionic: update documentation and MAINTAINERS Andrew Boyer 2020-12-09 12:03 ` Ferruh Yigit 2020-12-09 14:36 ` Andrew Boyer 2020-12-09 15:24 ` Ferruh Yigit 2020-12-09 16:24 ` Andrew Boyer 2020-12-09 17:15 ` Ferruh Yigit 2020-12-09 19:05 ` Andrew Boyer 2020-12-10 9:23 ` Ferruh Yigit 2020-12-04 20:16 ` [dpdk-dev] [PATCH v3 4/9] net/ionic: check for cmd completion more frequently Andrew Boyer 2020-12-04 20:16 ` [dpdk-dev] [PATCH v3 5/9] net/ionic: remove some unused fields Andrew Boyer 2020-12-04 20:16 ` [dpdk-dev] [PATCH v3 6/9] net/ionic: convert 'deferred' boolean to a flag bit Andrew Boyer 2020-12-04 20:16 ` [dpdk-dev] [PATCH v3 7/9] net/ionic: warn if loopback mode is requested Andrew Boyer 2020-12-04 20:16 ` [dpdk-dev] [PATCH v3 8/9] net/ionic: minor refactorings and helper variables Andrew Boyer 2020-12-09 13:04 ` Ferruh Yigit 2020-12-09 14:39 ` Andrew Boyer 2020-12-09 15:25 ` Ferruh Yigit 2020-12-04 20:16 ` [dpdk-dev] [PATCH v3 9/9] net/ionic: minor logging fixups Andrew Boyer 2020-12-09 13:47 ` Ferruh Yigit 2020-12-09 14:45 ` Andrew Boyer 2020-12-09 15:42 ` Ferruh Yigit 2020-12-09 19:26 ` Andrew Boyer 2020-12-10 9:58 ` Ferruh Yigit 2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 1/9] net/ionic: connect ionic to the build system Andrew Boyer 2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 2/9] net/ionic: update interface file to the latest version Andrew Boyer 2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 3/9] net/ionic: update documentation and MAINTAINERS Andrew Boyer 2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 4/9] net/ionic: check for cmd completion more frequently Andrew Boyer 2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 5/9] net/ionic: remove some unused fields Andrew Boyer 2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 6/9] net/ionic: convert 'deferred' boolean to a flag bit Andrew Boyer 2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 7/9] net/ionic: warn if loopback mode is requested Andrew Boyer 2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 8/9] net/ionic: minor refactorings and helper variables Andrew Boyer 2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 9/9] net/ionic: minor logging fixups 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=20201210020743.68927-6-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