@@ -1005,7 +1005,8 @@ eth_ionic_dev_init(struct rte_eth_dev *eth_dev, void *init_params)
/* Allocate memory for storing MAC addresses */
eth_dev->data->mac_addrs = rte_calloc("ionic",
adapter->max_mac_addrs,
- RTE_ETHER_ADDR_LEN, 0);
+ RTE_ETHER_ADDR_LEN,
+ RTE_CACHE_LINE_SIZE);
if (eth_dev->data->mac_addrs == NULL) {
IONIC_PRINT(ERR, "Failed to allocate %u bytes needed to "
"store MAC addresses",
@@ -1083,7 +1084,7 @@ eth_ionic_dev_probe(void *bus_dev, struct rte_device *rte_dev,
goto err;
}
- adapter = rte_zmalloc("ionic", sizeof(*adapter), 0);
+ adapter = rte_zmalloc("ionic", sizeof(*adapter), RTE_CACHE_LINE_SIZE);
if (!adapter) {
IONIC_PRINT(ERR, "OOM");
err = -ENOMEM;
@@ -598,7 +598,8 @@ ionic_qcq_alloc(struct ionic_lif *lif,
total_size += rte_mem_page_size();
}
- new = rte_zmalloc("ionic", struct_size, 0);
+ new = rte_zmalloc_socket("ionic", struct_size,
+ RTE_CACHE_LINE_SIZE, socket_id);
if (!new) {
IONIC_PRINT(ERR, "Cannot allocate queue structure");
return -ENOMEM;
@@ -1037,17 +1038,19 @@ ionic_lif_alloc(struct ionic_lif *lif)
return -ENOMEM;
}
- lif->txqcqs = rte_calloc("ionic",
+ lif->txqcqs = rte_calloc_socket("ionic",
adapter->max_ntxqs_per_lif,
- sizeof(*lif->txqcqs), 0);
+ sizeof(*lif->txqcqs),
+ RTE_CACHE_LINE_SIZE, socket_id);
if (!lif->txqcqs) {
IONIC_PRINT(ERR, "Cannot allocate tx queues array");
return -ENOMEM;
}
- lif->rxqcqs = rte_calloc("ionic",
+ lif->rxqcqs = rte_calloc_socket("ionic",
adapter->max_nrxqs_per_lif,
- sizeof(*lif->rxqcqs), 0);
+ sizeof(*lif->rxqcqs),
+ RTE_CACHE_LINE_SIZE, socket_id);
if (!lif->rxqcqs) {
IONIC_PRINT(ERR, "Cannot allocate rx queues array");
return -ENOMEM;
@@ -55,8 +55,7 @@ ionic_rx_filter_save(struct ionic_lif *lif, uint32_t flow_id,
struct ionic_rx_filter *f;
uint32_t key;
- f = rte_zmalloc("ionic", sizeof(*f), 0);
-
+ f = rte_zmalloc("ionic", sizeof(*f), RTE_CACHE_LINE_SIZE);
if (!f)
return -ENOMEM;