q->tail_ptr = (volatile uint32_t *)
&((uint32_t *)hw->hw_addr)[FM10K_RDT(queue_id)];
q->offloads = offloads;
- if (handle_rxconf(q, conf))
+ if (handle_rxconf(q, conf)) {
+ rte_free(q);
return -EINVAL;
-
+ }
/* allocate memory for the software ring */
q->sw_ring = rte_zmalloc_socket("fm10k sw ring",
(nb_desc + q->nb_fake_desc) * sizeof(struct rte_mbuf *),
hw->mbx.ops.disconnect(hw, &hw->mbx);
}
-static void
+static int
fm10k_dev_close(struct rte_eth_dev *dev)
{
struct fm10k_hw *hw = FM10K_DEV_PRIVATE_TO_HW(dev->data->dev_private);
rte_intr_callback_unregister(intr_handle,
fm10k_dev_interrupt_handler_vf, (void *)dev);
}
+
+ return 0;
}
static const struct eth_dev_ops fm10k_eth_dev_ops = {
&dev->data->mac_addrs[0]);
}
- /* Pass the information to the rte_eth_dev_close() that it should also
- * release the private port resources.
- */
- dev->data->dev_flags |= RTE_ETH_DEV_CLOSE_REMOVE;
-
/* Reset the hw statistics */
diag = fm10k_stats_reset(dev);
if (diag != 0) {