Lines Matching refs:priv

40 gve_free_qpl(struct gve_priv *priv, struct gve_queue_page_list *qpl)  in gve_free_qpl()  argument
68 priv->num_registered_pages--; in gve_free_qpl()
81 gve_alloc_qpl(struct gve_priv *priv, uint32_t id, int npages, bool single_kva) in gve_alloc_qpl() argument
87 if (npages + priv->num_registered_pages > priv->max_registered_pages) { in gve_alloc_qpl()
88 device_printf(priv->dev, "Reached max number of registered pages %ju > %ju\n", in gve_alloc_qpl()
89 (uintmax_t)npages + priv->num_registered_pages, in gve_alloc_qpl()
90 (uintmax_t)priv->max_registered_pages); in gve_alloc_qpl()
111 device_printf(priv->dev, "Failed to create the single kva for QPL %d\n", id); in gve_alloc_qpl()
125 device_printf(priv->dev, "Failed to create kva for page %d in QPL %d", i, id); in gve_alloc_qpl()
141 err = gve_dmamap_create(priv, /*size=*/PAGE_SIZE, /*align=*/PAGE_SIZE, in gve_alloc_qpl()
144 device_printf(priv->dev, "Failed to dma-map page %d in QPL %d\n", i, id); in gve_alloc_qpl()
149 priv->num_registered_pages++; in gve_alloc_qpl()
155 gve_free_qpl(priv, qpl); in gve_alloc_qpl()
160 gve_register_qpls(struct gve_priv *priv) in gve_register_qpls() argument
168 if (gve_get_state_flag(priv, GVE_STATE_FLAG_QPLREG_OK)) in gve_register_qpls()
172 for (i = 0; i < priv->tx_cfg.num_queues; i++) { in gve_register_qpls()
173 tx = &priv->tx[i]; in gve_register_qpls()
175 err = gve_adminq_register_page_list(priv, com->qpl); in gve_register_qpls()
177 device_printf(priv->dev, in gve_register_qpls()
186 for (i = 0; i < priv->rx_cfg.num_queues; i++) { in gve_register_qpls()
187 rx = &priv->rx[i]; in gve_register_qpls()
189 err = gve_adminq_register_page_list(priv, com->qpl); in gve_register_qpls()
191 device_printf(priv->dev, in gve_register_qpls()
198 gve_set_state_flag(priv, GVE_STATE_FLAG_QPLREG_OK); in gve_register_qpls()
203 gve_unregister_qpls(struct gve_priv *priv) in gve_unregister_qpls() argument
211 if (!gve_get_state_flag(priv, GVE_STATE_FLAG_QPLREG_OK)) in gve_unregister_qpls()
214 for (i = 0; i < priv->tx_cfg.num_queues; i++) { in gve_unregister_qpls()
215 tx = &priv->tx[i]; in gve_unregister_qpls()
217 err = gve_adminq_unregister_page_list(priv, com->qpl->id); in gve_unregister_qpls()
219 device_printf(priv->dev, in gve_unregister_qpls()
225 for (i = 0; i < priv->rx_cfg.num_queues; i++) { in gve_unregister_qpls()
226 rx = &priv->rx[i]; in gve_unregister_qpls()
228 err = gve_adminq_unregister_page_list(priv, com->qpl->id); in gve_unregister_qpls()
230 device_printf(priv->dev, in gve_unregister_qpls()
239 gve_clear_state_flag(priv, GVE_STATE_FLAG_QPLREG_OK); in gve_unregister_qpls()