if (q) {
PMD_INIT_LOG(DEBUG, "Freeing rx queue %p", q);
rx_queue_clean(q);
- if (q->sw_ring)
+ if (q->sw_ring) {
rte_free(q->sw_ring);
+ q->sw_ring = NULL;
+ }
rte_free(q);
+ q = NULL;
}
}
if (q) {
PMD_INIT_LOG(DEBUG, "Freeing tx queue %p", q);
tx_queue_clean(q);
- if (q->rs_tracker.list)
+ if (q->rs_tracker.list) {
rte_free(q->rs_tracker.list);
- if (q->sw_ring)
+ q->rs_tracker.list = NULL;
+ }
+ if (q->sw_ring) {
rte_free(q->sw_ring);
+ q->sw_ring = NULL;
+ }
rte_free(q);
+ q = NULL;
}
}
uint32_t size;
uint32_t rxdctl = FM10K_RXDCTL_WRITE_BACK_MIN_DELAY;
uint16_t buf_size;
- struct rte_pktmbuf_pool_private *mbp_priv;
/* Disable RXINT to avoid possible interrupt */
for (i = 0; i < hw->mac.max_queues; i++)
FM10K_WRITE_REG(hw, FM10K_RDLEN(i), size);
/* Configure the Rx buffer size for one buff without split */
- mbp_priv = rte_mempool_get_priv(rxq->mp);
- buf_size = (uint16_t) (mbp_priv->mbuf_data_room_size -
- RTE_PKTMBUF_HEADROOM);
+ buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rxq->mp) -
+ RTE_PKTMBUF_HEADROOM);
FM10K_WRITE_REG(hw, FM10K_SRRCTL(i),
buf_size >> FM10K_SRRCTL_BSIZEPKT_SHIFT);
hw->mbx.ops.disconnect(hw, &hw->mbx);
}
-static struct eth_dev_ops fm10k_eth_dev_ops = {
+static const struct eth_dev_ops fm10k_eth_dev_ops = {
.dev_configure = fm10k_dev_configure,
.dev_start = fm10k_dev_start,
.dev_stop = fm10k_dev_stop,
* The set of PCI devices this driver supports. This driver will enable both PF
* and SRIOV-VF devices.
*/
-static struct rte_pci_id pci_id_fm10k_map[] = {
+static const struct rte_pci_id pci_id_fm10k_map[] = {
#define RTE_PCI_DEV_ID_DECL_FM10K(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
#define RTE_PCI_DEV_ID_DECL_FM10KVF(vend, dev) { RTE_PCI_DEVICE(vend, dev) },
#include "rte_pci_dev_ids.h"